Skip to content

Commit 1c9370e

Browse files
gzliudanJukLee0ira
authored andcommitted
metrics: fix docstring names (ethereum#28923)
1 parent 7f619f4 commit 1c9370e

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

metrics/counter.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type CounterSnapshot interface {
88
Count() int64
99
}
1010

11-
// Counters hold an int64 value that can be incremented and decremented.
11+
// Counter hold an int64 value that can be incremented and decremented.
1212
type Counter interface {
1313
Clear()
1414
Dec(int64)

metrics/gauge.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ package metrics
22

33
import "sync/atomic"
44

5-
// gaugeSnapshot contains a readonly int64.
5+
// GaugeSnapshot contains a readonly int64.
66
type GaugeSnapshot interface {
77
Value() int64
88
}
99

10-
// Gauges hold an int64 value that can be set arbitrarily.
10+
// Gauge holds an int64 value that can be set arbitrarily.
1111
type Gauge interface {
1212
Snapshot() GaugeSnapshot
1313
Update(int64)

metrics/gauge_float64.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type gaugeFloat64Snapshot float64
4848
// Value returns the value at the time the snapshot was taken.
4949
func (g gaugeFloat64Snapshot) Value() float64 { return float64(g) }
5050

51-
// NilGauge is a no-op Gauge.
51+
// NilGaugeFloat64 is a no-op Gauge.
5252
type NilGaugeFloat64 struct{}
5353

5454
func (NilGaugeFloat64) Snapshot() GaugeFloat64Snapshot { return NilGaugeFloat64{} }

metrics/gauge_info.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type GaugeInfoSnapshot interface {
99
Value() GaugeInfoValue
1010
}
1111

12-
// GaugeInfos hold a GaugeInfoValue value that can be set arbitrarily.
12+
// GaugeInfo holds a GaugeInfoValue value that can be set arbitrarily.
1313
type GaugeInfo interface {
1414
Update(GaugeInfoValue)
1515
Snapshot() GaugeInfoSnapshot

metrics/healthcheck.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package metrics
22

3-
// Healthchecks hold an error value describing an arbitrary up/down status.
3+
// Healthcheck holds an error value describing an arbitrary up/down status.
44
type Healthcheck interface {
55
Check()
66
Error() error

metrics/histogram.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ type HistogramSnapshot interface {
44
SampleSnapshot
55
}
66

7-
// Histograms calculate distribution statistics from a series of int64 values.
7+
// Histogram calculates distribution statistics from a series of int64 values.
88
type Histogram interface {
99
Clear()
1010
Update(int64)

metrics/influxdb/influxdbv2.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type v2Reporter struct {
2525
write api.WriteAPI
2626
}
2727

28-
// InfluxDBWithTags starts a InfluxDB reporter which will post the from the given metrics.Registry at each d interval with the specified tags
28+
// InfluxDBV2WithTags starts a InfluxDB reporter which will post the from the given metrics.Registry at each d interval with the specified tags
2929
func InfluxDBV2WithTags(r metrics.Registry, d time.Duration, endpoint string, token string, bucket string, organization string, namespace string, tags map[string]string) {
3030
rep := &v2Reporter{
3131
reg: r,

metrics/sample.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,13 @@ func (NilSample) Clear() {}
148148
func (NilSample) Snapshot() SampleSnapshot { return (*emptySnapshot)(nil) }
149149
func (NilSample) Update(v int64) {}
150150

151-
// SamplePercentiles returns an arbitrary percentile of the slice of int64.
151+
// SamplePercentile returns an arbitrary percentile of the slice of int64.
152152
func SamplePercentile(values []int64, p float64) float64 {
153153
return CalculatePercentiles(values, []float64{p})[0]
154154
}
155155

156156
// CalculatePercentiles returns a slice of arbitrary percentiles of the slice of
157-
// int64. This method returns interpolated results, so e.g if there are only two
157+
// int64. This method returns interpolated results, so e.g. if there are only two
158158
// values, [0, 10], a 50% percentile will land between them.
159159
//
160160
// Note: As a side-effect, this method will also sort the slice of values.

0 commit comments

Comments
 (0)