Open 4alexey opened 5 years ago
LogScaled uses time.Tick
func Tick(d Duration) <-chan Time
Tick is a convenience wrapper for NewTicker providing access to the ticking channel only. While Tick is useful for clients that have no need to shut down the Ticker, be aware that without a way to shut it down the underlying Ticker cannot be recovered by the garbage collector; it "leaks". Unlike NewTicker, Tick will return nil if d <= 0.
Hi, I'd like to log metrics once after command execution, log them or print them out, and exit. However the call to metrics.Log(r, 10*time.Second, histoLog) blocks and continues logging the metrics. How do I print metrics once, clean up, and exit? Thanks!