| 1 | // Copyright 2019 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package metricscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/ |
| 6 | |
| 7 | import ( |
| 8 | "golang.org/x/tools/internal/event/keysscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/keys`/" |
| 9 | "golang.org/x/tools/internal/event/labelscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/label`/" |
| 10 | ) |
| 11 | |
| 12 | // Scalar represents the construction information for a scalar metric. |
| 13 | type Scalarscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Scalar# struct { |
| 14 | // Name is the unique name of this metric. |
| 15 | Namescip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Scalar#Name. string |
| 16 | // Description can be used by observers to describe the metric to users. |
| 17 | Descriptionscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Scalar#Description. string |
| 18 | // Keys is the set of labels that collectively describe rows of the metric. |
| 19 | Keysscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Scalar#Keys. []labelscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/label`/.Keyscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/label`/Key# |
| 20 | } |
| 21 | |
| 22 | // HistogramInt64 represents the construction information for an int64 histogram metric. |
| 23 | type HistogramInt64scip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramInt64# struct { |
| 24 | // Name is the unique name of this metric. |
| 25 | Namescip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramInt64#Name. string |
| 26 | // Description can be used by observers to describe the metric to users. |
| 27 | Descriptionscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramInt64#Description. string |
| 28 | // Keys is the set of labels that collectively describe rows of the metric. |
| 29 | Keysscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramInt64#Keys. []labelscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/label`/.Keyscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/label`/Key# |
| 30 | // Buckets holds the inclusive upper bound of each bucket in the histogram. |
| 31 | Bucketsscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramInt64#Buckets. []int64 |
| 32 | } |
| 33 | |
| 34 | // HistogramFloat64 represents the construction information for a float64 histogram metric. |
| 35 | type HistogramFloat64scip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramFloat64# struct { |
| 36 | // Name is the unique name of this metric. |
| 37 | Namescip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramFloat64#Name. string |
| 38 | // Description can be used by observers to describe the metric to users. |
| 39 | Descriptionscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramFloat64#Description. string |
| 40 | // Keys is the set of labels that collectively describe rows of the metric. |
| 41 | Keysscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramFloat64#Keys. []labelscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/label`/.Keyscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/label`/Key# |
| 42 | // Buckets holds the inclusive upper bound of each bucket in the histogram. |
| 43 | Bucketsscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramFloat64#Buckets. []float64 |
| 44 | } |
| 45 | |
| 46 | // Count creates a new metric based on the Scalar information that counts |
| 47 | // the number of times the supplied int64 measure is set. |
| 48 | // Metrics of this type will use Int64Data. |
| 49 | func (info Scalarscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Scalar#) Countscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Scalar#Count().(e *Configscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Config#, key labelscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/label`/.Keyscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/label`/Key#) { |
| 50 | data := &Int64Datascip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Int64Data#{Infoscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Int64Data#Info.: &info, keyscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Int64Data#key.: nil} |
| 51 | e.subscribescip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Config#subscribe().(key, data.countscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Int64Data#count().) |
| 52 | } |
| 53 | |
| 54 | // SumInt64 creates a new metric based on the Scalar information that sums all |
| 55 | // the values recorded on the int64 measure. |
| 56 | // Metrics of this type will use Int64Data. |
| 57 | func (info Scalarscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Scalar#) SumInt64scip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Scalar#SumInt64().(e *Configscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Config#, key *keysscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/keys`/.Intscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/keys`/Int#) { |
| 58 | data := &Int64Datascip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Int64Data#{Infoscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Int64Data#Info.: &info, keyscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Int64Data#key.: key} |
| 59 | e.subscribescip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Config#subscribe().(key, data.sumscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Int64Data#sum().) |
| 60 | } |
| 61 | |
| 62 | // LatestInt64 creates a new metric based on the Scalar information that tracks |
| 63 | // the most recent value recorded on the int64 measure. |
| 64 | // Metrics of this type will use Int64Data. |
| 65 | func (info Scalarscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Scalar#) LatestInt64scip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Scalar#LatestInt64().(e *Configscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Config#, key *keysscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/keys`/.Intscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/keys`/Int#) { |
| 66 | data := &Int64Datascip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Int64Data#{Infoscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Int64Data#Info.: &info, IsGaugescip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Int64Data#IsGauge.: true, keyscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Int64Data#key.: key} |
| 67 | e.subscribescip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Config#subscribe().(key, data.latestscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Int64Data#latest().) |
| 68 | } |
| 69 | |
| 70 | // SumFloat64 creates a new metric based on the Scalar information that sums all |
| 71 | // the values recorded on the float64 measure. |
| 72 | // Metrics of this type will use Float64Data. |
| 73 | func (info Scalarscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Scalar#) SumFloat64scip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Scalar#SumFloat64().(e *Configscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Config#, key *keysscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/keys`/.Floatscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/keys`/Float#) { |
| 74 | data := &Float64Datascip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Float64Data#{Infoscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Float64Data#Info.: &info, keyscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Float64Data#key.: key} |
| 75 | e.subscribescip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Config#subscribe().(key, data.sumscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Float64Data#sum().) |
| 76 | } |
| 77 | |
| 78 | // LatestFloat64 creates a new metric based on the Scalar information that tracks |
| 79 | // the most recent value recorded on the float64 measure. |
| 80 | // Metrics of this type will use Float64Data. |
| 81 | func (info Scalarscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Scalar#) LatestFloat64scip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Scalar#LatestFloat64().(e *Configscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Config#, key *keysscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/keys`/.Floatscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/keys`/Float#) { |
| 82 | data := &Float64Datascip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Float64Data#{Infoscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Float64Data#Info.: &info, IsGaugescip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Float64Data#IsGauge.: true, keyscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Float64Data#key.: key} |
| 83 | e.subscribescip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Config#subscribe().(key, data.latestscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Float64Data#latest().) |
| 84 | } |
| 85 | |
| 86 | // Record creates a new metric based on the HistogramInt64 information that |
| 87 | // tracks the bucketized counts of values recorded on the int64 measure. |
| 88 | // Metrics of this type will use HistogramInt64Data. |
| 89 | func (info HistogramInt64scip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramInt64#) Recordscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramInt64#Record().(e *Configscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Config#, key *keysscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/keys`/.Intscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/keys`/Int#) { |
| 90 | data := &HistogramInt64Datascip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramInt64Data#{Infoscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramInt64Data#Info.: &info, keyscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramInt64Data#key.: key} |
| 91 | e.subscribescip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Config#subscribe().(key, data.recordscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramInt64Data#record().) |
| 92 | } |
| 93 | |
| 94 | // Record creates a new metric based on the HistogramFloat64 information that |
| 95 | // tracks the bucketized counts of values recorded on the float64 measure. |
| 96 | // Metrics of this type will use HistogramFloat64Data. |
| 97 | func (info HistogramFloat64scip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramFloat64#) Recordscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramFloat64#Record().(e *Configscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Config#, key *keysscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/keys`/.Floatscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/keys`/Float#) { |
| 98 | data := &HistogramFloat64Datascip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramFloat64Data#{Infoscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramFloat64Data#Info.: &info, keyscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramFloat64Data#key.: key} |
| 99 | e.subscribescip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/Config#subscribe().(key, data.recordscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/event/export/metric`/HistogramFloat64Data#record().) |
| 100 | } |