good morning!!!!

Skip to content
Snippets Groups Projects
Commit 7f0726f7 authored by Anton Evangelatov's avatar Anton Evangelatov Committed by Péter Szilágyi
Browse files

metrics: return an empty snapshot for NilResettingTimer (#16930)

parent 13af2764
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,11 @@ type NilResettingTimer struct {
func (NilResettingTimer) Values() []int64 { return nil }
// Snapshot is a no-op.
func (NilResettingTimer) Snapshot() ResettingTimer { return NilResettingTimer{} }
func (NilResettingTimer) Snapshot() ResettingTimer {
return &ResettingTimerSnapshot{
values: []int64{},
}
}
// Time is a no-op.
func (NilResettingTimer) Time(func()) {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment