public void Flush() { if (metricsCollector != null) { metricsCollector.Dispose(); } }
public void ShouldNotCrashWhenEventRecordAfterDisposed() { var sink = new DictionarySink(); var e = new MetricsCollector(sink, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(5)); e.IncrementCounter("myCounter"); e.Dispose(); Assert.Single(sink.Counters); e.IncrementCounter("myCounter"); }
public void CleanUpForAllMetrics() => _metricsCollector?.Dispose();
public void Cleanup() => metrics.Dispose();
protected override void Finished() { _collector.Dispose(); }