Skip to content

Commit 9b0ebc6

Browse files
committed
small fix on metering function
1 parent 9cb6109 commit 9b0ebc6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

trie/trie_metrics.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
)
88

99
var (
10-
avgAccessDepthInBlock = metrics.NewRegisteredMeter("trie/access/depth/avg", nil)
11-
minAccessDepthInBlock = metrics.NewRegisteredMeter("trie/access/depth/min", nil)
10+
avgAccessDepthInBlock = metrics.NewRegisteredGauge("trie/access/depth/avg", nil)
11+
minAccessDepthInBlock = metrics.NewRegisteredGauge("trie/access/depth/min", nil)
1212
stateDepthAggregator = &depthAggregator{}
1313
)
1414

@@ -44,8 +44,8 @@ func (d *depthAggregator) end() {
4444
sum, cnt, min := d.sum, d.cnt, d.min
4545
d.mu.Unlock()
4646
if cnt > 0 {
47-
avgAccessDepthInBlock.Mark(sum / cnt)
48-
minAccessDepthInBlock.Mark(min)
47+
avgAccessDepthInBlock.Update(sum / cnt)
48+
minAccessDepthInBlock.Update(min)
4949
}
5050
}
5151

0 commit comments

Comments
 (0)