private EventData GetAppStatsEventData() { var e = new AppStatsEvent { MasterPeerCount = this.PeerCountMaster, PlayerCount = this.PeerCountGameServer, GameCount = this.GameCount }; return(new EventData((byte)EventCode.AppStats, e)); }
public void Publish(AppStatsEvent stat) { Guard.AgainstNull(stat); Guard.AgainstEmpty(stat.CheckId); var result = new HealthCheckResultNotification { MinuteBucket = stat.MinuteBucket, HourBucket = stat.HourBucket, DayBucket = stat.DayBucket, EventType = "AppStat", Agent = new AgentInfo { SiteId = stat.SiteId, AgentId = stat.AgentId }, Check = new HealthCheckData { Duration = stat.Duration ?? TimeSpan.Zero, Identity = new PluginDescriptor { Name = stat.CheckId }, ResultCount = stat.ResultCount, Tags = stat.Tag } }; if (string.IsNullOrEmpty(myDestinationQueue)) { myBus.Send(result); } else { myBus.Send(myDestinationQueue, result); } }
public static IAppStatsPieChartContinuation <AppStatsEvent> PieChart(this AppStatsEvent stat, string id) { stat.CheckId = id; return(stat); }