# Packages
Package engine contains the internal metrics engine responsible for aggregating metrics during the test and evaluating thresholds against them.
# Functions
B formats a boolean value for emission.
D formats a duration for emission.
GetBufferedSamples will read all present (i.e.
GetResolversForTrendColumns checks if passed trend columns are valid for use in the summary output and then returns a map of the corresponding resolvers.
IntoSampleTags "consumes" the passed map and creates a new SampleTags struct with the data.
MarshalJSONWithoutHTMLEscape marshals t to JSON without escaping characters for safe use in HTML.
NewRegistry returns a new registry.
NewSampleTags *copies* the supplied tag set and returns a new SampleTags instance with the key-value pairs from it.
NewSystemTagSet returns a SystemTagSet from input.
NewThresholds returns Thresholds objects representing the provided source strings.
ParseMetricName parses a metric name expression of the form metric_name{tag_key:tag_value,...} Its first return value is the parsed metric name, second are parsed tags as as slice of "key:value" strings.
PushIfNotDone first checks if the supplied context is done and doesn't push the sample container if it is.
RegisterBuiltinMetrics register and returns the builtin metrics in the provided registry.
SystemTagSetString retrieves an enum value from the enum constants string name.
SystemTagSetValues returns all values of the enum.
ToD converts an emitted duration to a time.Duration.
ToSystemTagSet converts list of tags to SystemTagSet TODO: emit error instead of discarding invalid values.
# Constants
No description provided by the author
A counter that sums its data points.
Values are data amounts (bytes).
No description provided by the author
No description provided by the author
Values are presented as-is.
No description provided by the author
A gauge that displays the latest value.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
A rate, displays % of values that aren't 0.
Default system tags includes all of the system tags emitted with metrics by default.
Default system tags includes all of the system tags emitted with metrics by default.
Default system tags includes all of the system tags emitted with metrics by default.
Default system tags includes all of the system tags emitted with metrics by default.
Default system tags includes all of the system tags emitted with metrics by default.
Default system tags includes all of the system tags emitted with metrics by default.
System tags not enabled by default.
Default system tags includes all of the system tags emitted with metrics by default.
Default system tags includes all of the system tags emitted with metrics by default.
Default system tags includes all of the system tags emitted with metrics by default.
Default system tags includes all of the system tags emitted with metrics by default.
Default system tags includes all of the system tags emitted with metrics by default.
Default system tags includes all of the system tags emitted with metrics by default.
Default system tags includes all of the system tags emitted with metrics by default.
Default system tags includes all of the system tags emitted with metrics by default.
Default system tags includes all of the system tags emitted with metrics by default.
Default system tags includes all of the system tags emitted with metrics by default.
Default system tags includes all of the system tags emitted with metrics by default.
Values are timestamps (nanoseconds).
A trend, min/max/avg/med are interesting.
No description provided by the author
nolint:revive.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
DefaultSystemTagSet includes all of the system tags emitted with metrics by default.
ErrInvalidMetricType indicates the serialized metric type is invalid.
ErrInvalidThreshold indicates a threshold is not valid.
ErrInvalidValueType indicates the serialized value type is invalid.
ErrMetricNameParsing indicates parsing a metric name failed.
# Structs
BuiltinMetrics represent all the builtin metrics of k6.
ConnectedSamples is the simplest ConnectedSampleContainer implementation that will be used when there's no need for extra information.
No description provided by the author
No description provided by the author
A Metric defines the shape of a set of data.
No description provided by the author
Registry is what can create metrics.
A Sample is a single measurement.
SampleTags is an immutable string[string] map for tags.
A Submetric represents a filtered dataset based on a parent metric.
Threshold is a representation of a single threshold for a single metric.
Thresholds is the combination of all Thresholds for a given metric.
No description provided by the author
# Interfaces
ConnectedSampleContainer is an extension of the SampleContainer interface that should be implemented when emitted samples are connected and share the same time and tags.
SampleContainer is a simple abstraction that allows sample producers to attach extra information to samples they return.
No description provided by the author
# Type aliases
No description provided by the author
EnabledTags is a string to bool map (for lookup efficiency) that is used to keep track of which system tags and non-system tags to include.
A MetricType specifies the type of a metric.
Samples is just the simplest SampleContainer implementation that will be used when there's no need for extra information.
SystemTagSet is a bitmask that is used to keep track which system tags should be included with which workerMetrics.go:generate enumer -type=SystemTagSet -transform=snake -trimprefix=Tag -output system_tag_set_gen.go.
ValueType holds the type of values a metric contains.