mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
Update log.go
This commit is contained in:
parent
18a902799e
commit
04e034850f
1 changed files with 4 additions and 1 deletions
|
|
@ -18,7 +18,10 @@ func LogScaled(r Registry, freq time.Duration, scale time.Duration, l Logger) {
|
|||
du := float64(scale)
|
||||
duSuffix := scale.String()[1:]
|
||||
|
||||
for range time.Tick(freq) {
|
||||
ticker := time.NewTicker(freq)
|
||||
defer ticker.Stop()
|
||||
|
||||
for range ticker.C {
|
||||
r.Each(func(name string, i interface{}) {
|
||||
switch metric := i.(type) {
|
||||
case *Counter:
|
||||
|
|
|
|||
Loading…
Reference in a new issue