metrics

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

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

func Init added in v2.1.0

func Init(iterationMetricsEnabled bool)

Types

type Metrics

type Metrics struct {
	Setup                   *prometheus.SummaryVec
	Iteration               *prometheus.SummaryVec
	Registry                *prometheus.Registry
	IterationMetricsEnabled bool
}

func Instance

func Instance() *Metrics

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)

func (*Metrics) Reset

func (metrics *Metrics) Reset()

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

Jump to

Keyboard shortcuts

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