(TimeSpan duration, string metadata)
| 175 | } |
| 176 | |
| 177 | internal void InsertRequest(TimeSpan duration, string metadata) |
| 178 | { |
| 179 | lock (this) |
| 180 | { |
| 181 | var sample = (duration, metadata); |
| 182 | |
| 183 | if (AllTimeMin == null || AllTimeMin.Value.Duration > duration) |
| 184 | { |
| 185 | AllTimeMin = sample; |
| 186 | } |
| 187 | if (AllTimeMax == null || AllTimeMax.Value.Duration < duration) |
| 188 | { |
| 189 | AllTimeMax = sample; |
| 190 | } |
| 191 | _totalSamples += 1; |
| 192 | |
| 193 | foreach (var window in TrackerWindows) |
| 194 | { |
| 195 | var tracker = Trackers[window]; |
| 196 | tracker.InsertRequest(duration, metadata); |
| 197 | Trackers[window] = tracker; // Needed because struct. |
| 198 | } |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | internal void InsertRequest(DateTime start, string metadata) |
| 203 | { |
no outgoing calls
no test coverage detected