Documentation
¶
Index ¶
- type BenchmarkStatus
- type Operations
- type Server
- func (s *Server) Done()
- func (s *Server) Errorln(data ...any)
- func (s *Server) InfoLn(data ...any)
- func (s *Server) InfoQuietln(data ...any)
- func (s *Server) OperationsReady(ops bench.Operations, filename, cmdLine string)
- func (s *Server) SetLnLoggers(info, err func(data ...any))
- func (s *Server) SetUpdate(updates chan<- aggregate.UpdateReq)
- func (s *Server) UpdateAggregate(res *aggregate.Realtime, filename string)
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"`
// Base filename of the
Filename string `json:"filename,omitempty"`
// Will be true when benchmark has finished and data is ready.
DataReady bool `json:"data_ready"`
// LiveData will be set with partial or final data when benchmark is running.
LiveData *aggregate.Realtime `json:"realtime,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) InfoLn ¶ added in v0.3.18
InfoLn allows to log data to the server. The server will update its status and send message upstream if set.
func (*Server) InfoQuietln ¶
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 ¶
SetLnLoggers can be used to set upstream loggers. When logging to the servers these will be called.