コード例 #1
0
ファイル: Global.cs プロジェクト: orbitlens/centaurus
 private static void PerformanceStatisticsManager_OnUpdates(PerformanceStatisticsManager.PerformanceStatisticsManagerUpdate updates)
 {
     if (!SubscriptionsManager.TryGetSubscription(PerformanceStatisticsSubscription.SubscriptionName, out var subscription))
     {
         return;
     }
     InfoConnectionManager.SendSubscriptionUpdate(subscription, PerformanceStatisticsUpdate.Generate(updates, PerformanceStatisticsSubscription.SubscriptionName));
 }
コード例 #2
0
 public static PerformanceStatisticsUpdate Generate(PerformanceStatisticsManager.PerformanceStatisticsManagerUpdate update, string channelName)
 {
     return(new PerformanceStatisticsUpdate
     {
         QuantaPerSecond = update.QuantaPerSecond,
         Throttling = update.Trottling,
         BatchSavedInfos = update.BatchInfos,
         ChannelName = channelName,
         UpdateDate = DateTime.UtcNow
     });
 }