public void AddEntry(TestDataEntry testData) { TestData.Enqueue(testData); // Alert any who may want to keep track of live events. EntryAddedEvent(this, new TestDataEntryEventArgs(testData)); }
private void UpdatePercentileTracking(TestDataEntry testData) { if ((ulong)PercentileTrackingTree.Count < NEventsExpected - KthElement) { PercentileTrackingTree.Add(testData.ElapsedTime); } else if (PercentileTrackingTree.Min < testData.ElapsedTime) { PercentileTrackingTree.Remove(PercentileTrackingTree.Min); PercentileTrackingTree.Add(testData.ElapsedTime); } }
public void ProcessTestEntry(object sender, TestDataEntryEventArgs e) { TestDataEntry testData = e.TestData; CurrentElement++; // Update percentile tracking. UpdatePercentileTracking(testData); // Update tracking for average time. OperationSumInMs += testData.ElapsedTime.TotalMilliseconds; if (CurrentElement % ReportFrequency == 0) { OutputUpdate(); } }
public TestDataEntryEventArgs(TestDataEntry testData) { TestData = testData; }