1 write to _heap
Microsoft.Extensions.Telemetry (1)
Sampling\BottomKSampler.cs (1)
102_heap = new List<HeapEntry>(reservoirCapacity + 2);
30 references to _heap
Microsoft.Extensions.Telemetry (30)
Sampling\BottomKSampler.cs (30)
206if (_heap.Count > _reservoirCapacity) 215foreach (var entry in _heap) 233_heap.Clear(); 277var output = new List<SampledRecord<TCallsite, TPayload>>(_heap.Count + ReserveLength); 323if (_heap.Count > _reservoirCapacity + 1) 340Tau = _heap.Count > _reservoirCapacity 341? _heap[0].Key 392_heap.Add(entry); 393int i = _heap.Count - 1; 397if (_heap[parent].Key >= _heap[i].Key) 402(_heap[parent], _heap[i]) = (_heap[i], _heap[parent]); 409HeapEntry root = _heap[0]; 410int last = _heap.Count - 1; 411_heap[0] = _heap[last]; 412_heap.RemoveAt(last); 413if (_heap.Count > 0) 426int count = _heap.Count; 433if (left < count && _heap[left].Key > _heap[largest].Key) 438if (right < count && _heap[right].Key > _heap[largest].Key) 448(_heap[i], _heap[largest]) = (_heap[largest], _heap[i]);