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 }); }
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); } }