unaggregated

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 9 Imported by: 26

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchTimer

type BatchTimer struct {
	ID              id.RawID
	Values          []float64
	Annotation      []byte
	ClientTimeNanos xtime.UnixNano
}

BatchTimer is a timer containing the timer ID and a list of timer values.

func (*BatchTimer) FromProto

func (t *BatchTimer) FromProto(pb metricpb.BatchTimer)

FromProto converts the protobuf message to a batch timer in place.

func (BatchTimer) ToProto

func (t BatchTimer) ToProto(pb *metricpb.BatchTimer)

ToProto converts the batch timer to a protobuf message in place.

func (BatchTimer) ToUnion

func (t BatchTimer) ToUnion() MetricUnion

ToUnion converts the batch timer to a metric union.

type BatchTimerWithMetadatas

type BatchTimerWithMetadatas struct {
	metadata.StagedMetadatas
	BatchTimer
}

BatchTimerWithMetadatas is a batch timer with applicable metadatas.

func (*BatchTimerWithMetadatas) FromProto

FromProto converts the protobuf message to a batch timer with metadatas in place.

func (BatchTimerWithMetadatas) ToProto

ToProto converts the batch timer with metadatas to a protobuf message in place.

type BatchTimerWithPoliciesList

type BatchTimerWithPoliciesList struct {
	policy.PoliciesList
	BatchTimer
}

BatchTimerWithPoliciesList is a batch timer with applicable policies list.

type Counter

type Counter struct {
	ID              id.RawID
	Annotation      []byte
	Value           int64
	ClientTimeNanos xtime.UnixNano
}

Counter is a counter containing the counter ID and the counter value.

func (*Counter) FromProto

func (c *Counter) FromProto(pb metricpb.Counter)

FromProto converts the protobuf message to a counter in place.

func (Counter) ToProto

func (c Counter) ToProto(pb *metricpb.Counter)

ToProto converts the counter to a protobuf message in place.

func (Counter) ToUnion

func (c Counter) ToUnion() MetricUnion

ToUnion converts the counter to a metric union.

type CounterWithMetadatas

type CounterWithMetadatas struct {
	metadata.StagedMetadatas
	Counter
}

CounterWithMetadatas is a counter with applicable metadatas.

func (*CounterWithMetadatas) FromProto

FromProto converts the protobuf message to a counter with metadatas in place.

func (CounterWithMetadatas) ToProto

ToProto converts the counter with metadatas to a protobuf message in place.

type CounterWithPoliciesList

type CounterWithPoliciesList struct {
	policy.PoliciesList
	Counter
}

CounterWithPoliciesList is a counter with applicable policies list.

type Gauge

type Gauge struct {
	ID              id.RawID
	Annotation      []byte
	Value           float64
	ClientTimeNanos xtime.UnixNano
}

Gauge is a gauge containing the gauge ID and the value at certain time.

func (*Gauge) FromProto

func (g *Gauge) FromProto(pb metricpb.Gauge)

FromProto converts the protobuf message to a gauge in place.

func (Gauge) ToProto

func (g Gauge) ToProto(pb *metricpb.Gauge)

ToProto converts the gauge to a protobuf message in place.

func (Gauge) ToUnion

func (g Gauge) ToUnion() MetricUnion

ToUnion converts the gauge to a metric union.

type GaugeWithMetadatas

type GaugeWithMetadatas struct {
	metadata.StagedMetadatas
	Gauge
}

GaugeWithMetadatas is a gauge with applicable metadatas.

func (*GaugeWithMetadatas) FromProto

FromProto converts the protobuf message to a gauge with metadatas in place.

func (GaugeWithMetadatas) ToProto

ToProto converts the gauge with metadatas to a protobuf message in place.

type GaugeWithPoliciesList

type GaugeWithPoliciesList struct {
	policy.PoliciesList
	Gauge
}

GaugeWithPoliciesList is a gauge with applicable policies list.

type MetricUnion

type MetricUnion struct {
	TimerValPool    pool.FloatsPool
	Annotation      []byte
	ID              id.RawID
	BatchTimerVal   []float64
	CounterVal      int64
	GaugeVal        float64
	Type            metric.Type
	ClientTimeNanos xtime.UnixNano
}

MetricUnion is a union of different types of metrics, only one of which is valid at any given time. The actual type of the metric depends on the type field, which determines which value field is valid. Note that if the timer values are allocated from a pool, the TimerValPool should be set to the originating pool, and the caller is responsible for returning the timer values to the pool.

func (*MetricUnion) BatchTimer

func (m *MetricUnion) BatchTimer() BatchTimer

BatchTimer returns the batch timer metric.

func (*MetricUnion) Counter

func (m *MetricUnion) Counter() Counter

Counter returns the counter metric.

func (*MetricUnion) Gauge

func (m *MetricUnion) Gauge() Gauge

Gauge returns the gauge metric.

func (*MetricUnion) Reset

func (m *MetricUnion) Reset()

Reset resets the metric union.

func (*MetricUnion) String

func (m *MetricUnion) String() string

String is the string representation of a metric union.

Jump to

Keyboard shortcuts

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