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 ¶
func (bm *BatchTimerWithMetadatas) FromProto(pb *metricpb.BatchTimerWithMetadatas) error
FromProto converts the protobuf message to a batch timer with metadatas in place.
func (BatchTimerWithMetadatas) ToProto ¶
func (bm BatchTimerWithMetadatas) ToProto(pb *metricpb.BatchTimerWithMetadatas) error
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 ¶
Counter is a counter containing the counter ID and the counter value.
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 ¶
func (cm *CounterWithMetadatas) FromProto(pb *metricpb.CounterWithMetadatas) error
FromProto converts the protobuf message to a counter with metadatas in place.
func (CounterWithMetadatas) ToProto ¶
func (cm CounterWithMetadatas) ToProto(pb *metricpb.CounterWithMetadatas) error
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 ¶
Gauge is a gauge containing the gauge ID and the value at certain time.
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 ¶
func (gm *GaugeWithMetadatas) FromProto(pb *metricpb.GaugeWithMetadatas) error
FromProto converts the protobuf message to a gauge with metadatas in place.
func (GaugeWithMetadatas) ToProto ¶
func (gm GaugeWithMetadatas) ToProto(pb *metricpb.GaugeWithMetadatas) error
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) String ¶
func (m *MetricUnion) String() string
String is the string representation of a metric union.