unit

package
v0.0.0-...-f45f4dd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2016 License: Apache-2.0 Imports: 15 Imported by: 4

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

Constants

This section is empty.

Variables

View Source
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 (b *Builder) GetUnitPrefix() string

func (*Builder) MakeStatsDumper

func (b *Builder) MakeStatsDumper(name, cmd, statsEndpoint string) schema.Unit

MakeStatsDumper creates nomi specific units to collect metrics in each host

func (*Builder) MakeUnitChain

func (b *Builder) MakeUnitChain(id string) []schema.Unit

MakeUnitChain creates the unit files of the benchmark units.

func (*Builder) UseCustomUnitFileService

func (b *Builder) UseCustomUnitFileService(filePath string) error

type Stats

type Stats struct {
	Start        stats
	Stop         stats
	Script       string
	EventLog     []event
	MachineStats map[string][]processStatsLine
}

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)

type UnitState

type UnitState struct {
	// contains filtered or unexported fields
}

UnitState collects the timestamp of the operations

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL