We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed7c116 commit 967b4e3Copy full SHA for 967b4e3
pkg/recorder/recorder.go
@@ -169,14 +169,6 @@ func (r *Recorder) copy() record.MemoryRecords {
169
func (r *Recorder) clear(records record.MemoryRecords) {
170
r.lock.Lock()
171
defer r.lock.Unlock()
172
- size := int64(0)
173
- for _, record := range records {
174
- existing, ok := r.records[record.Name]
175
- if !ok || existing.Data == nil || existing.At != record.At || existing.Fingerprint != record.Fingerprint {
176
- continue
177
- }
178
- size += int64(len(existing.Data))
179
- existing.Data = nil
180
181
- r.size -= size
+ r.records = make(map[string]*record.MemoryRecord, len(records))
+ r.size = 0
182
}
0 commit comments