usage

package
v0.55.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package usage implements usage tracking for k6 in order to figure what is being used within a given execution

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Usage

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

Usage is a way to collect usage data for within k6

func New

func New() *Usage

New returns a new empty Usage ready to be used

func (*Usage) Map

func (u *Usage) Map() map[string]any

Map returns a copy of the internal map

func (*Usage) Strings

func (u *Usage) Strings(originalKey, value string) error

Strings appends the provided value to a slice of strings that is the value. Appending to the slice if the key is already there. It also works out level of keys

func (*Usage) Uint64

func (u *Usage) Uint64(originalKey string, value uint64) error

Uint64 adds the provided value to a given key. Creating the key if needed and working out levels of keys

Jump to

Keyboard shortcuts

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