Skip to content

Commit

Permalink
add some more todos
Browse files Browse the repository at this point in the history
  • Loading branch information
maciuszek committed Jan 10, 2025
1 parent 57ef42b commit 4610f55
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ func (s *statStore) Flush() {
s.sink.FlushTimerWithSampleRate(key.(string), value, sampleRate)
}

s.timers.Delete(key)
s.timers.Delete(key) // todo: not sure if this cleanup is necessary
return true
})
}
Expand Down Expand Up @@ -582,6 +582,9 @@ func (s *statStore) newTimer(serializedName string, base time.Duration) timer {
var t timer
settings := GetSettings() // todo: move this to some shared memory
if settings.isTimerReservoirEnabled() {
// todo: if s.timers gets to a certain size, we can flush all timers and delete them from the map
// todo: no idea how memory was managed here before did we just expect the map of s.timers to just be replaced after it's filled?

// todo: have defaults defined in a shared location
t = &reservoirTimer{
name: serializedName,
Expand Down

0 comments on commit 4610f55

Please sign in to comment.