mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-05 23:07:44 +00:00
util/clientmetric: add test hooks and ResetLastDelta function
Necessary to force flushing of client metrics more aggressively in dev/test mode. Signed-off-by: Mihai Parparita <mihai@tailscale.com>
This commit is contained in:
parent
35111061e9
commit
7966aed1e0
@ -255,6 +255,10 @@ func EncodeLogTailMetricsDelta() string {
|
||||
return enc.buf.String()
|
||||
}
|
||||
|
||||
func ResetLastDeltaForTest() {
|
||||
lastDelta = time.Time{}
|
||||
}
|
||||
|
||||
var deltaPool = &sync.Pool{
|
||||
New: func() any {
|
||||
return new(deltaEncBuf)
|
||||
|
Loading…
x
Reference in New Issue
Block a user