Documentation ¶
Overview ¶
This unit package generates all the require unit files
This unit package implements the logic of the benchmark execution, as well as it process the defined instructions in the appropiate order
Index ¶
- Variables
- type Builder
- type Stats
- type UnitEngine
- func (e *UnitEngine) DumpProcessStats(statsid, hostname string, cpuusage float64, rss int)
- func (e *UnitEngine) InstanceGroupSize() int
- func (e *UnitEngine) MarkUnitRunning(id string) time.Duration
- func (e *UnitEngine) MarkUnitStopped(id string)
- func (e *UnitEngine) Run()
- func (e *UnitEngine) Stats() Stats
- type UnitObserver
- func (s *UnitObserver) AliveHandler(unitID string, w http.ResponseWriter, r *http.Request)
- func (s *UnitObserver) ByeHandler(unitID string, w http.ResponseWriter, r *http.Request)
- func (s *UnitObserver) HelloHandler(unitID string, w http.ResponseWriter, r *http.Request)
- func (s *UnitObserver) StartHTTPService(addr string)
- func (s *UnitObserver) StatsHandler(w http.ResponseWriter, r *http.Request)
- type UnitState
Constants ¶
This section is empty.
Variables ¶
var Verbose bool
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(app definition.Application, instanceGroupSize int, listenAddr string) (*Builder, error)
func (*Builder) GetUnitPrefix ¶
func (*Builder) MakeStatsDumper ¶
MakeStatsDumper creates nomi specific units to collect metrics in each host
func (*Builder) MakeUnitChain ¶
MakeUnitChain creates the unit files of the benchmark units.
func (*Builder) UseCustomUnitFileService ¶
type UnitEngine ¶
type UnitEngine struct { SpawnFunc func(string) error StopFunc func(string) error // contains filtered or unexported fields }
func NewEngine ¶
func NewEngine(def definition.BenchmarkDef, verbose bool) (*UnitEngine, error)
func (*UnitEngine) DumpProcessStats ¶
func (e *UnitEngine) DumpProcessStats(statsid, hostname string, cpuusage float64, rss int)
DumpProcessStats dumps the machine stats for the process systemd and fleetd
func (*UnitEngine) InstanceGroupSize ¶
func (e *UnitEngine) InstanceGroupSize() int
InstanceGroupSize returns the size specified for the instance groups used in the benchmark
func (*UnitEngine) MarkUnitRunning ¶
func (e *UnitEngine) MarkUnitRunning(id string) time.Duration
MarkUnitRunning collects the timestamps of the start operation for an unit
func (*UnitEngine) MarkUnitStopped ¶
func (e *UnitEngine) MarkUnitStopped(id string)
MarkUnitStopped collects the timestamps of the stop operation for an unit
func (*UnitEngine) Run ¶
func (e *UnitEngine) Run()
Run computes the benchmark definition in the order specified by the user
func (*UnitEngine) Stats ¶
func (e *UnitEngine) Stats() Stats
Stats returns all the collected metrics
type UnitObserver ¶
type UnitObserver struct {
// contains filtered or unexported fields
}
func NewUnitObserver ¶
func NewUnitObserver(engine *UnitEngine) *UnitObserver
func (*UnitObserver) AliveHandler ¶
func (s *UnitObserver) AliveHandler(unitID string, w http.ResponseWriter, r *http.Request)
func (*UnitObserver) ByeHandler ¶
func (s *UnitObserver) ByeHandler(unitID string, w http.ResponseWriter, r *http.Request)
func (*UnitObserver) HelloHandler ¶
func (s *UnitObserver) HelloHandler(unitID string, w http.ResponseWriter, r *http.Request)
func (*UnitObserver) StartHTTPService ¶
func (s *UnitObserver) StartHTTPService(addr string)
func (*UnitObserver) StatsHandler ¶
func (s *UnitObserver) StatsHandler(w http.ResponseWriter, r *http.Request)