public void Flush()
 {
     if (metricsCollector != null)
     {
         metricsCollector.Dispose();
     }
 }
Exemple #2
0
        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");
        }
Exemple #3
0
 public void CleanUpForAllMetrics()
 => _metricsCollector?.Dispose();
Exemple #4
0
 public void Cleanup() =>
 metrics.Dispose();
Exemple #5
0
 protected override void Finished()
 {
     _collector.Dispose();
 }