test

package
v1.2.0-arch32 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

package test contains utility functions used by tests/benchmarks in various packages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsMKey

func ContainsMKey(list []schema.MKey, subject schema.MKey) bool

func GetAMKey

func GetAMKey(suffix int) schema.AMKey

func GetMKey

func GetMKey(suffix int) schema.MKey

func KeyToInt

func KeyToInt(key schema.MKey) int

func MustMKeyFromString

func MustMKeyFromString(id string) schema.MKey

func NewContext

func NewContext() context.Context

NewContext returns a context holding a tracing span

func Path

func Path(dst string) string

path takes a relative path within the metrictank repository and returns the full absolute filepath, assuming metrictank repo is in the first directory specified in GOPATH

func RandFloats

func RandFloats(size int) ([]schema.Point, uint32)

func RandFloats100

func RandFloats100() ([]schema.Point, uint32)

func RandFloats10k

func RandFloats10k() ([]schema.Point, uint32)

func RandFloats1M

func RandFloats1M() ([]schema.Point, uint32)

func RandFloatsWithNulls

func RandFloatsWithNulls(size int) ([]schema.Point, uint32)

func RandFloatsWithNulls100

func RandFloatsWithNulls100() ([]schema.Point, uint32)

func RandFloatsWithNulls10k

func RandFloatsWithNulls10k() ([]schema.Point, uint32)

func RandFloatsWithNulls1M

func RandFloatsWithNulls1M() ([]schema.Point, uint32)

func ShouldContainMKey

func ShouldContainMKey(actual interface{}, expected ...interface{}) string

Types

type DataFunc

type DataFunc func() ([]schema.Point, uint32)

Jump to

Keyboard shortcuts

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