tools: golang.org/x/tools/internal/telemetry/metric Index | Files

package metric

import "golang.org/x/tools/internal/telemetry/metric"

Package metric aggregates stats into metrics that can be exported.

Index

Package Files

metric.go

type Float64Data Uses

type Float64Data struct {
    // Info holds the original consruction information.
    Info *Scalar
    // IsGauge is true for metrics that track values, rather than increasing over time.
    IsGauge bool
    // Rows holds the per group values for the metric.
    Rows []float64
    // End is the last time this metric was updated.
    EndTime *time.Time
    // contains filtered or unexported fields
}

Float64Data is a concrete implementation of Data for float64 scalar metrics.

func (*Float64Data) Groups Uses

func (data *Float64Data) Groups() []telemetry.TagList

func (*Float64Data) Handle Uses

func (data *Float64Data) Handle() string

type HistogramFloat64 Uses

type HistogramFloat64 struct {
    // Name is the unique name of this metric.
    Name string
    // Description can be used by observers to describe the metric to users.
    Description string
    // Keys is the set of tags that collectively describe rows of the metric.
    Keys []interface{}
    // Buckets holds the inclusive upper bound of each bucket in the histogram.
    Buckets []float64
}

HistogramFloat64 represents the construction information for an float64 histogram metric.

func (HistogramFloat64) Record Uses

func (info HistogramFloat64) Record(measure *stats.Float64Measure) string

Record creates a new metric based on the HistogramFloat64 information that tracks the bucketized counts of values recorded on the float64 measure. Metrics of this type will use HistogramFloat64Data.

type HistogramFloat64Data Uses

type HistogramFloat64Data struct {
    // Info holds the original consruction information.
    Info *HistogramFloat64
    // Rows holds the per group values for the metric.
    Rows []*HistogramFloat64Row
    // End is the last time this metric was updated.
    EndTime *time.Time
    // contains filtered or unexported fields
}

HistogramFloat64Data is a concrete implementation of Data for float64 histogram metrics.

func (*HistogramFloat64Data) Groups Uses

func (data *HistogramFloat64Data) Groups() []telemetry.TagList

func (*HistogramFloat64Data) Handle Uses

func (data *HistogramFloat64Data) Handle() string

type HistogramFloat64Row Uses

type HistogramFloat64Row struct {
    // Values is the counts per bucket.
    Values []int64
    // Count is the total count.
    Count int64
    // Sum is the sum of all the values recorded.
    Sum float64
    // Min is the smallest recorded value.
    Min float64
    // Max is the largest recorded value.
    Max float64
}

HistogramFloat64Row holds the values for a single row of a HistogramFloat64Data.

type HistogramInt64 Uses

type HistogramInt64 struct {
    // Name is the unique name of this metric.
    Name string
    // Description can be used by observers to describe the metric to users.
    Description string
    // Keys is the set of tags that collectively describe rows of the metric.
    Keys []interface{}
    // Buckets holds the inclusive upper bound of each bucket in the histogram.
    Buckets []int64
}

HistogramInt64 represents the construction information for an int64 histogram metric.

func (HistogramInt64) Record Uses

func (info HistogramInt64) Record(measure *stats.Int64Measure) string

Record creates a new metric based on the HistogramInt64 information that tracks the bucketized counts of values recorded on the int64 measure. Metrics of this type will use HistogramInt64Data.

type HistogramInt64Data Uses

type HistogramInt64Data struct {
    // Info holds the original consruction information.
    Info *HistogramInt64
    // Rows holds the per group values for the metric.
    Rows []*HistogramInt64Row
    // End is the last time this metric was updated.
    EndTime *time.Time
    // contains filtered or unexported fields
}

HistogramInt64Data is a concrete implementation of Data for int64 histogram metrics.

func (*HistogramInt64Data) Groups Uses

func (data *HistogramInt64Data) Groups() []telemetry.TagList

func (*HistogramInt64Data) Handle Uses

func (data *HistogramInt64Data) Handle() string

type HistogramInt64Row Uses

type HistogramInt64Row struct {
    // Values is the counts per bucket.
    Values []int64
    // Count is the total count.
    Count int64
    // Sum is the sum of all the values recorded.
    Sum int64
    // Min is the smallest recorded value.
    Min int64
    // Max is the largest recorded value.
    Max int64
}

HistogramInt64Row holds the values for a single row of a HistogramInt64Data.

type Int64Data Uses

type Int64Data struct {
    // Info holds the original consruction information.
    Info *Scalar
    // IsGauge is true for metrics that track values, rather than increasing over time.
    IsGauge bool
    // Rows holds the per group values for the metric.
    Rows []int64
    // End is the last time this metric was updated.
    EndTime *time.Time
    // contains filtered or unexported fields
}

Int64Data is a concrete implementation of Data for int64 scalar metrics.

func (*Int64Data) Groups Uses

func (data *Int64Data) Groups() []telemetry.TagList

func (*Int64Data) Handle Uses

func (data *Int64Data) Handle() string

type Scalar Uses

type Scalar struct {
    // Name is the unique name of this metric.
    Name string
    // Description can be used by observers to describe the metric to users.
    Description string
    // Keys is the set of tags that collectively describe rows of the metric.
    Keys []interface{}
}

Scalar represents the construction information for a scalar metric.

func (Scalar) CountFloat64 Uses

func (info Scalar) CountFloat64(measure *stats.Float64Measure) string

CountFloat64 creates a new metric based on the Scalar information that counts the number of times the supplied float64 measure is set. Metrics of this type will use Int64Data.

func (Scalar) CountInt64 Uses

func (info Scalar) CountInt64(measure *stats.Int64Measure) string

CountInt64 creates a new metric based on the Scalar information that counts the number of times the supplied int64 measure is set. Metrics of this type will use Int64Data.

func (Scalar) LatestFloat64 Uses

func (info Scalar) LatestFloat64(measure *stats.Float64Measure) string

LatestFloat64 creates a new metric based on the Scalar information that tracks the most recent value recorded on the float64 measure. Metrics of this type will use Float64Data.

func (Scalar) LatestInt64 Uses

func (info Scalar) LatestInt64(measure *stats.Int64Measure) string

LatestInt64 creates a new metric based on the Scalar information that tracks the most recent value recorded on the int64 measure. Metrics of this type will use Int64Data.

func (Scalar) SumFloat64 Uses

func (info Scalar) SumFloat64(measure *stats.Float64Measure) string

SumFloat64 creates a new metric based on the Scalar information that sums all the values recorded on the float64 measure. Metrics of this type will use Float64Data.

func (Scalar) SumInt64 Uses

func (info Scalar) SumInt64(measure *stats.Int64Measure) string

SumInt64 creates a new metric based on the Scalar information that sums all the values recorded on the int64 measure. Metrics of this type will use Int64Data.

Package metric imports 7 packages (graph) and is imported by 7 packages. Updated 2019-11-15. Refresh now. Tools for package owners.