Beispiel #1
0
 public static PerformanceStatisticsUpdate Generate(AlphaPerformanceStatistics update, string channelName)
 {
     return(new PerformanceStatisticsUpdate
     {
         QuantaPerSecond = update.QuantaPerSecond,
         Throttling = update.Throttling,
         BatchSavedInfos = update.BatchInfos,
         ChannelName = channelName,
         QuantaQueueLength = update.QuantaQueueLength,
         AuditorStatistics = update.AuditorStatistics,
         UpdateDate = DateTime.UtcNow
     });
 }
Beispiel #2
0
 protected override void CollectStatistics()
 {
     try
     {
         var statistics = new AlphaPerformanceStatistics
         {
             QuantaPerSecond   = GetItemsPerSecond(),
             QuantaQueueLength = GetQuantaAvgLength(),
             Throttling        = GetThrottling(),
             AuditorStatistics = GetAuditorsStatistics(),
             BatchInfos        = GetBatchInfos(),
             UpdateDate        = DateTime.UtcNow
         };
         OnUpdates?.Invoke(statistics);
     }
     catch (Exception exc)
     {
         logger.Error(exc);
     }
 }