metrics: fix mismatched names in comments (#29348)

This commit is contained in:
Daniel Liu 2024-12-13 14:00:14 +08:00
parent c7565af9b8
commit 988465cafa
3 changed files with 3 additions and 3 deletions

View file

@ -74,7 +74,7 @@ func (g *StandardGauge) Update(v int64) {
g.value.Store(v)
}
// Update updates the gauge's value if v is larger then the current value.
// UpdateIfGt updates the gauge's value if v is larger then the current value.
func (g *StandardGauge) UpdateIfGt(v int64) {
for {
exist := g.value.Load()

View file

@ -173,7 +173,7 @@ type meterArbiter struct {
var arbiter = meterArbiter{ticker: time.NewTicker(5 * time.Second), meters: make(map[*StandardMeter]struct{})}
// Ticks meters on the scheduled interval
// tick meters on the scheduled interval
func (ma *meterArbiter) tick() {
for range ma.ticker.C {
ma.tickMeters()

View file

@ -30,7 +30,7 @@ var enablerFlags = []string{"metrics"}
// enablerEnvVars is the env var names to use to enable metrics collections.
var enablerEnvVars = []string{"XDC_METRICS"}
// Init enables or disables the metrics system. Since we need this to run before
// init enables or disables the metrics system. Since we need this to run before
// any other code gets to create meters and timers, we'll actually do an ugly hack
// and peek into the command line args for the metrics flag.
func init() {