Documentation
¶
Index ¶
- Constants
- func Init(iterationMetricsEnabled bool)
- type Metrics
- func (metrics *Metrics) RecordIterationResult(name string, result ResultType, nanoseconds int64)
- func (metrics *Metrics) RecordIterationStage(name string, stage string, result ResultType, nanoseconds int64)
- func (metrics *Metrics) RecordSetupResult(name string, result ResultType, nanoseconds int64)
- func (metrics *Metrics) Reset()
- type ResultType
Constants ¶
View Source
const ( TestNameLabel = "test" StageLabel = "stage" ResultLabel = "result" )
View Source
const IterationMetricName = "form3_loadtest_iteration"
View Source
const IterationStage = "iteration"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Metrics ¶
type Metrics struct { Setup *prometheus.SummaryVec Iteration *prometheus.SummaryVec Registry *prometheus.Registry IterationMetricsEnabled bool }
func NewInstance ¶ added in v2.1.0
func NewInstance(registry *prometheus.Registry, iterationMetricsEnabled bool) *Metrics
func (*Metrics) RecordIterationResult ¶ added in v2.1.0
func (metrics *Metrics) RecordIterationResult(name string, result ResultType, nanoseconds int64)
func (*Metrics) RecordIterationStage ¶ added in v2.1.0
func (metrics *Metrics) RecordIterationStage(name string, stage string, result ResultType, nanoseconds int64)
func (*Metrics) RecordSetupResult ¶ added in v2.1.0
func (metrics *Metrics) RecordSetupResult(name string, result ResultType, nanoseconds int64)
type ResultType ¶ added in v2.1.0
type ResultType string
const ( SucessResult ResultType = "success" FailedResult ResultType = "fail" DroppedResult ResultType = "dropped" UnknownResult ResultType = "unknown" )
func Result ¶
func Result(failed bool) ResultType
func (ResultType) String ¶ added in v2.1.0
func (r ResultType) String() string
Click to show internal directories.
Click to hide internal directories.