Documentation
¶
Index ¶
- Constants
- Variables
- func LogLevel() string
- func SetLogLevel(level uint8)
- type Client
- func (c *Client) Access(done chan<- bool, echan chan<- error)
- func (c *Client) Benchmark(duration time.Duration, results string, nClients int) error
- func (c *Client) Close() (err error)
- func (c *Client) Connect(timeout time.Duration) (err error)
- func (c *Client) Init(addr, name string)
- func (c *Client) Results(path string, data map[string]interface{}) error
- func (c *Client) Send(msg string) error
- func (c *Client) Shutdown() error
- type Error
- type Metrics
- func (m *Metrics) Accesses() uint64
- func (m *Metrics) Append(o *Metrics)
- func (m *Metrics) ClientMean() float64
- func (m *Metrics) Complete()
- func (m *Metrics) Duration() time.Duration
- func (m *Metrics) Increment(client string)
- func (m *Metrics) Init()
- func (m *Metrics) NClients() uint64
- func (m *Metrics) Serialize(extra map[string]interface{}) map[string]interface{}
- func (m *Metrics) String() string
- func (m *Metrics) Throughput() (throughput float64)
- func (m *Metrics) Write(path string, extra map[string]interface{}) error
- type Server
Constants ¶
const ( Trace uint8 = iota Debug Info Status Warn Silent )
Levels for implementing the debug and trace message functionality.
Variables ¶
var (
ErrNotImplemented = errors.New("functionality not implemented yet")
)
Standard errors for primary operations.
Functions ¶
func LogLevel ¶
func LogLevel() string
LogLevel returns a string representation of the current level
func SetLogLevel ¶
func SetLogLevel(level uint8)
SetLogLevel modifies the log level for messages at runtime. Ensures that the highest level that can be set is the trace level.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Access ¶
Access sends a request to the server and waits for a response, measuring the latency of the message send to get throughput benchmarks.
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error wraps other library errors and provides easier logging.
type Metrics ¶
Metrics tracks the measurable statistics of the system over time from the perspective of the local replica. Many stats are simply counters, other statistics perform online computations of the distribution of values.
func (*Metrics) ClientMean ¶
ClientMean returns the average number of accesses per client.
func (*Metrics) Complete ¶
func (m *Metrics) Complete()
Complete an access and set the finished time.
func (*Metrics) Duration ¶
Duration computes the amount of time during which accesses were received.
func (*Metrics) Throughput ¶
Throughput computes the number of messages per second.