metric

package
v0.0.0-...-4b634d0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Help = `` /* 207-byte string literal not displayed */

Help is a help message on available metrics.

Variables

This section is empty.

Functions

func Parser

func Parser(value string) (tester.Metric, error)

Parser is a parser for standard metrics.

Types

type ErrorsMetric

type ErrorsMetric struct {
	Statistics recorders.Statistics
}

ErrorsMetric fetches data from statistics.

func (*ErrorsMetric) Fetch

func (m *ErrorsMetric) Fetch(start time.Time, duration time.Duration) ([]tester.DataPoint, error)

Fetch calculates the errors percentage for the statistics.

func (*ErrorsMetric) Name

func (m *ErrorsMetric) Name() string

Name returns the name of the errors statistic.

func (*ErrorsMetric) Setup

func (m *ErrorsMetric) Setup(options interface{}) error

Setup prepares errors metric.

type ErrorsMetricOptions

type ErrorsMetricOptions interface {
	AddRecorder(bender.Recorder)
}

ErrorsMetricOptions represents errors metric options.

type LatencyMetric

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

LatencyMetric fetches data from statistics.

func (*LatencyMetric) Fetch

func (m *LatencyMetric) Fetch(start time.Time, duration time.Duration) ([]tester.DataPoint, error)

Fetch calculates the errors percentage for the statistics.

func (*LatencyMetric) Name

func (m *LatencyMetric) Name() string

Name returns the name of the errors statistic.

func (*LatencyMetric) Setup

func (m *LatencyMetric) Setup(options interface{}) error

Setup prepares errors metric.

type LatencyMetricOptions

type LatencyMetricOptions interface {
	AddRecorder(bender.Recorder)
	GetUnit() time.Duration
}

LatencyMetricOptions represents errors metric options.

Jump to

Keyboard shortcuts

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