metricsx

package
v2.32.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: Apache-2.0, BSD-3-Clause, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromMonitoringInfos

func FromMonitoringInfos(attempted []*pipepb.MonitoringInfo, committed []*pipepb.MonitoringInfo) *metrics.Results

FromMonitoringInfos extracts metrics from monitored states and groups them into counters, distributions and gauges.

func Int64Counter

func Int64Counter(v int64) ([]byte, error)

Int64Counter returns an encoded payload of the integer counter.

func Int64Distribution

func Int64Distribution(count, sum, min, max int64) ([]byte, error)

Int64Distribution returns an encoded payload of the distribution of an integer value.

func Int64Latest

func Int64Latest(t time.Time, v int64) ([]byte, error)

Int64Latest returns an encoded payload of the latest seen integer value.

func UrnToString

func UrnToString(u Urn) string

UrnToString returns a string representation of the urn.

func UrnToType

func UrnToType(u Urn) string

UrnToType maps the urn to it's encoding type. This function is written to be inlinable by the compiler.

Types

type Urn

type Urn uint32

Urn is an enum type for representing urns of metrics and monitored states.

const (
	UrnUserSumInt64 Urn = iota
	UrnUserSumFloat64
	UrnUserDistInt64
	UrnUserDistFloat64
	UrnUserLatestMsInt64
	UrnUserLatestMsFloat64
	UrnUserTopNInt64
	UrnUserTopNFloat64
	UrnUserBottomNInt64
	UrnUserBottomNFloat64

	UrnElementCount
	UrnSampledByteSize

	UrnStartBundle
	UrnProcessBundle
	UrnFinishBundle
	UrnTransformTotalTime

	UrnProgressRemaining
	UrnProgressCompleted
	UrnDataChannelReadIndex

	UrnTestSentinel // Must remain last.
)

The supported urns of metrics and monitored states.

Jump to

Keyboard shortcuts

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