Documentation ¶
Index ¶
- type ConcurrencyLimiter
- type Directive
- type Package
- type Response
- type StoreFront
- func (sf *StoreFront) GetPoint(name, precision string) models.Point
- func (sf *StoreFront) GetStatementResults(sID, t string) (res []influx.Result)
- func (sf *StoreFront) SendDirective(d Directive)
- func (sf *StoreFront) SendPackage(p Package)
- func (sf *StoreFront) SetCommune(name string) chan<- string
- func (sf *StoreFront) SetResultsClient(conf influx.HTTPConfig)
- type Tracer
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcurrencyLimiter ¶
ConcurrencyLimiter ensures that no more than a specified max number of goroutines are running.
func NewConcurrencyLimiter ¶
func NewConcurrencyLimiter(max int) *ConcurrencyLimiter
NewConcurrencyLimiter returns a configured limiter that will ensure that calls to Increment will block if the max is hit.
func (*ConcurrencyLimiter) Decrement ¶
func (c *ConcurrencyLimiter) Decrement()
Decrement will reduce the count of running goroutines by 1
func (*ConcurrencyLimiter) Increment ¶
func (c *ConcurrencyLimiter) Increment()
Increment will increase the count of running goroutines by 1. if the number is currently at the max, the call to Increment will block until another goroutine decrements.
func (*ConcurrencyLimiter) NewMax ¶
func (c *ConcurrencyLimiter) NewMax(i int)
NewMax resets the max of a ConcurrencyLimiter.
type Directive ¶
Directive is a struct to enable communication between SetStatements and the ponyExpress backend Directives change state for the stress test
type Package ¶
Package is a struct to enable communication between InsertStatements, QueryStatements and InfluxQLStatements and the ponyExpress backend Packages carry either writes or queries in the []byte that makes up the Body
type Response ¶
Response holds data scraped from InfluxDB HTTP responses turned into a *influx.Point for reporting See reporting.go for more information The Tracer contains a wait group sent from the statement. It needs to be decremented when the Response is consumed
func NewResponse ¶
NewResponse creates a new instance of Response
type StoreFront ¶
type StoreFront struct { TestID string TestName string Precision string StartDate string BatchSize int sync.WaitGroup sync.Mutex ResultsChan chan Response ResultsClient influx.Client // contains filtered or unexported fields }
The StoreFront is the Statement facing API that consume Statement output and coordinates the test results
func NewStoreFront ¶
func NewStoreFront() *StoreFront
NewStoreFront creates the backend for the stress test
func NewTestStoreFront ¶
func NewTestStoreFront() (*StoreFront, chan Package, chan Directive)
NewTestStoreFront returns a StoreFront to be used for testing Statements
func (*StoreFront) GetPoint ¶
func (sf *StoreFront) GetPoint(name, precision string) models.Point
GetPoint is called by a QueryStatement and retrieves a point sent by the associated InsertStatement
func (*StoreFront) GetStatementResults ¶
func (sf *StoreFront) GetStatementResults(sID, t string) (res []influx.Result)
GetStatementResults is a convinence function for fetching all results given a StatementID
func (*StoreFront) SendDirective ¶
func (sf *StoreFront) SendDirective(d Directive)
SendDirective is the public facing API to set state variables in the test
func (*StoreFront) SendPackage ¶
func (sf *StoreFront) SendPackage(p Package)
SendPackage is the public facing API for to send Queries and Points
func (*StoreFront) SetCommune ¶
func (sf *StoreFront) SetCommune(name string) chan<- string
SetCommune creates a new commune on the StoreFront
func (*StoreFront) SetResultsClient ¶
func (sf *StoreFront) SetResultsClient(conf influx.HTTPConfig)
SetResultsClient is the utility for reseting the address of the ResultsClient