Documentation
¶
Index ¶
- type BenchmarkStatus
- type Operations
- type Server
- func (s *Server) Done()
- func (s *Server) Errorln(data ...interface{})
- func (s *Server) InfoLn(data ...interface{})
- func (s *Server) InfoQuietln(data ...interface{})
- func (s *Server) OperationsReady(ops bench.Operations, filename, cmdLine string)
- func (s *Server) SetLnLoggers(info, err func(data ...interface{}))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BenchmarkStatus ¶
type BenchmarkStatus = struct {
// Text string describing the state of the benchmark run.
// Updated continuously.
LastStatus string `json:"last_status"`
// Any non-fatal error during the run.
Error string `json:"error"`
// Will be true when benchmark has finished and data is ready.
DataReady bool `json:"data_ready"`
// Base filename of the
Filename string `json:"filename,omitempty"`
}
BenchmarkStatus contains information when a benchmark is running.
type Operations ¶
type Operations struct {
Operations bench.Operations `json:"operations"`
}
Operations contains raw benchmark operations. Usually very verbose.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server contains the state of the running server.
func NewBenchmarkMonitor ¶
NewBenchmarkMonitor creates a new Server.
func (*Server) Done ¶
func (s *Server) Done()
Done can be called to block until a server is closed. If no server is started it will return at once.
func (*Server) Errorln ¶
func (s *Server) Errorln(data ...interface{})
Errorln allows to store a non-fatal error.
func (*Server) InfoLn ¶
func (s *Server) InfoLn(data ...interface{})
InfoLn allows to log data to the server. The server will update its status and send message upstream if set.
func (*Server) InfoQuietln ¶
func (s *Server) InfoQuietln(data ...interface{})
InfoQuietln can be used to log data to the internal status only and not forward it to the upstream logger.
func (*Server) OperationsReady ¶
func (s *Server) OperationsReady(ops bench.Operations, filename, cmdLine string)
OperationsReady can be used to send benchmark data to the server.
func (*Server) SetLnLoggers ¶
func (s *Server) SetLnLoggers(info, err func(data ...interface{}))
SetLnLoggers can be used to set upstream loggers. When logging to the servers these will be called.