Documentation ¶
Overview ¶
Package core provide main components of go-perfsuite project
Index ¶
Constants ¶
View Source
const ( STATE_USER_STOPPED = 0 STATE_USER_RUNNING = 1 STATE_USER_PAUSED = 2 )
View Source
const DEFAULT_HTTP_PORT = 8000
Variables ¶
This section is empty.
Functions ¶
func IndexHandler ¶
Types ¶
type ControllerConfig ¶
type ControllerConfig struct {
HttpServerPort int
}
type ControllerInstance ¶
type ControllerInstance struct {
Config *ControllerConfig
}
func NewControllerInstance ¶
func NewControllerInstance() *ControllerInstance
func (*ControllerInstance) StartHttpServer ¶
func (c *ControllerInstance) StartHttpServer()
type Injector ¶
type Injector struct { Users []*Iuser Stat *StatStack Repository map[string]interface{} // contains filtered or unexported fields }
func NewInjector ¶
func NewInjector() *Injector
func (*Injector) Initialize ¶
func (*Injector) Run ¶
func (inj *Injector) Run()
Run start an infinite loop for starting, stopping iusers
func (*Injector) UpdateSpeed ¶
Starts new iusers if needed, according to ramp
type Iuser ¶
type Iuser struct { Uuid string Scenario Iscenario NRuns int Id int Inj *Injector Counters map[string]Counter // contains filtered or unexported fields }
func (*Iuser) DoInitOnce ¶
func (i *Iuser) DoInitOnce()
func (*Iuser) LoadScenarioString ¶
* Entry points
func (*Iuser) TransactionStart ¶
func (*Iuser) TransactionStop ¶
type StatStack ¶
type StatStack struct { Addr string Db string User string Pass string // contains filtered or unexported fields }
func NewStatStack ¶
NewStatStack returns instance of StatStack structure
func (*StatStack) DoRun ¶
func (i *StatStack) DoRun()
DoRun is the main loop that will pop the stats from the buffer and send them to the selected backend
func (*StatStack) FlushInflux ¶
func (i *StatStack) FlushInflux()
Click to show internal directories.
Click to hide internal directories.