metrics

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VUsName               = "vus" //nolint:golint
	VUsMaxName            = "vus_max"
	IterationsName        = "iterations"
	IterationDurationName = "iteration_duration"
	DroppedIterationsName = "dropped_iterations"

	ChecksName        = "checks"
	GroupDurationName = "group_duration"

	HTTPReqsName              = "http_reqs"
	HTTPReqFailedName         = "http_req_failed"
	HTTPReqDurationName       = "http_req_duration"
	HTTPReqBlockedName        = "http_req_blocked"
	HTTPReqConnectingName     = "http_req_connecting"
	HTTPReqTLSHandshakingName = "http_req_tls_handshaking"
	HTTPReqSendingName        = "http_req_sending"
	HTTPReqWaitingName        = "http_req_waiting"
	HTTPReqReceivingName      = "http_req_receiving"

	WSSessionsName         = "ws_sessions"
	WSMessagesSentName     = "ws_msgs_sent"
	WSMessagesReceivedName = "ws_msgs_received"
	WSPingName             = "ws_ping"
	WSSessionDurationName  = "ws_session_duration"
	WSConnectingName       = "ws_connecting"

	GRPCReqDurationName = "grpc_req_duration"

	DataSentName     = "data_sent"
	DataReceivedName = "data_received"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuiltinMetrics added in v0.35.0

type BuiltinMetrics struct {
	VUs               *stats.Metric
	VUsMax            *stats.Metric
	Iterations        *stats.Metric
	IterationDuration *stats.Metric
	DroppedIterations *stats.Metric

	// Runner-emitted.
	Checks        *stats.Metric
	GroupDuration *stats.Metric

	// HTTP-related.
	HTTPReqs              *stats.Metric
	HTTPReqFailed         *stats.Metric
	HTTPReqDuration       *stats.Metric
	HTTPReqBlocked        *stats.Metric
	HTTPReqConnecting     *stats.Metric
	HTTPReqTLSHandshaking *stats.Metric
	HTTPReqSending        *stats.Metric
	HTTPReqWaiting        *stats.Metric
	HTTPReqReceiving      *stats.Metric

	// Websocket-related
	WSSessions         *stats.Metric
	WSMessagesSent     *stats.Metric
	WSMessagesReceived *stats.Metric
	WSPing             *stats.Metric
	WSSessionDuration  *stats.Metric
	WSConnecting       *stats.Metric

	// gRPC-related
	GRPCReqDuration *stats.Metric

	// Network-related; used for future protocols as well.
	DataSent     *stats.Metric
	DataReceived *stats.Metric
}

BuiltinMetrics represent all the builtin metrics of k6

func RegisterBuiltinMetrics added in v0.35.0

func RegisterBuiltinMetrics(registry *Registry) *BuiltinMetrics

RegisterBuiltinMetrics register and returns the builtin metrics in the provided registry

type Registry added in v0.35.0

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

Registry is what can create metrics

func NewRegistry added in v0.35.0

func NewRegistry() *Registry

NewRegistry returns a new registry

func (*Registry) MustNewMetric added in v0.35.0

func (r *Registry) MustNewMetric(name string, typ stats.MetricType, t ...stats.ValueType) *stats.Metric

MustNewMetric is like NewMetric, but will panic if there is an error

func (*Registry) NewMetric added in v0.35.0

func (r *Registry) NewMetric(name string, typ stats.MetricType, t ...stats.ValueType) (*stats.Metric, error)

NewMetric returns new metric registered to this registry TODO have multiple versions returning specific metric types when we have such things

Jump to

Keyboard shortcuts

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