MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / InsertRequest

Method InsertRequest

sdks/csharp/src/Stats.cs:177–200  ·  view source on GitHub ↗
(TimeSpan duration, string metadata)

Source from the content-addressed store, hash-verified

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 {

Callers 2

ParseMessageMethod · 0.45
ApplyMessageMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected