Пример #1
0
 public LogEventsMetrics Collect() =>
 new LogEventsMetrics(
     debugEvents.CollectAndReset(),
     infoEvents.CollectAndReset(),
     warnEvents.CollectAndReset(),
     errorEvents.CollectAndReset(),
     fatalEvents.CollectAndReset()
     );
Пример #2
0
 public void Collect(CurrentProcessMetrics metrics)
 {
     if (!RuntimeDetector.IsDotNet50AndNewer)
     {
         return;
     }
     metrics.DnsLookupsCount       = lookupsCounter.CollectAndReset();
     metrics.FailedDnsLookupsCount = failedLookupsCounter.CollectAndReset();
 }
        public void Collect(CurrentProcessMetrics metrics)
        {
            if (!RuntimeDetector.IsDotNet50AndNewer)
            {
                return;
            }
            metrics.OutgoingTcpConnectionsCount = outgoingTcpConnectionsCounter.CollectAndReset();
            metrics.IncomingTcpConnectionsCount = incomingTcpConnectionsCounter.CollectAndReset();
            metrics.FailedTcpConnectionsCount   = failedTcpConnectionsCounter.CollectAndReset();

            metrics.OutgoingDatagramsCount = outgoingDatagramsCounter.Collect();
            metrics.IncomingDatagramsCount = incomingDatagramsCounter.Collect();
        }