Skip to content

Commit 7939e31

Browse files
authored
Merge pull request #2043 from CortexFoundation/dev
metrics: fix function comment
2 parents c638791 + f4854bd commit 7939e31

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

metrics/debug.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ var (
1919
gcStats debug.GCStats
2020
)
2121

22-
// Capture new values for the Go garbage collector statistics exported in
23-
// debug.GCStats. This is designed to be called as a goroutine.
22+
// CaptureDebugGCStats captures new values for the Go garbage collector statistics
23+
// exported in debug.GCStats. This is designed to be called as a goroutine.
2424
func CaptureDebugGCStats(r Registry, d time.Duration) {
2525
for range time.Tick(d) {
2626
CaptureDebugGCStatsOnce(r)
2727
}
2828
}
2929

30-
// Capture new values for the Go garbage collector statistics exported in
31-
// debug.GCStats. This is designed to be called in a background goroutine.
32-
// Giving a registry which has not been given to RegisterDebugGCStats will
33-
// panic.
30+
// CaptureDebugGCStatsOnce captures new values for the Go garbage collector
31+
// statistics exported in debug.GCStats. This is designed to be called in
32+
// a background goroutine. Giving a registry which has not been given to
33+
// RegisterDebugGCStats will panic.
3434
//
3535
// Be careful (but much less so) with this because debug.ReadGCStats calls
3636
// the C function runtime·lock(runtime·mheap) which, while not a stop-the-world
@@ -50,9 +50,9 @@ func CaptureDebugGCStatsOnce(r Registry) {
5050
debugMetrics.GCStats.PauseTotal.Update(int64(gcStats.PauseTotal))
5151
}
5252

53-
// Register metrics for the Go garbage collector statistics exported in
54-
// debug.GCStats. The metrics are named by their fully-qualified Go symbols,
55-
// i.e. debug.GCStats.PauseTotal.
53+
// RegisterDebugGCStats registers metrics for the Go garbage collector statistics
54+
// exported in debug.GCStats. The metrics are named by their fully-qualified Go
55+
// symbols, i.e. debug.GCStats.PauseTotal.
5656
func RegisterDebugGCStats(r Registry) {
5757
debugMetrics.GCStats.LastGC = NewGauge()
5858
debugMetrics.GCStats.NumGC = NewGauge()

0 commit comments

Comments
 (0)