Beispiel #1
0
 public void SendStatisticDataOnRoundStop(NodeRemoveEvent e, SingleNode <RoundUserComponent> roundUser, [JoinByUser] BattleUserNode battleUser, [JoinByUser] SelfUserNode selfUser, [JoinByUser] SingleNode <RoundUserComponent> node, [JoinByBattle] SingleNode <BattleComponent> battle, [JoinByMap] SingleNode <MapComponent> map, [JoinAll] StatisticsNode statistics)
 {
     if (!RoundTimeTooShortForMeasuring(statistics))
     {
         PerformanceStatisticsHelperComponent performanceStatisticsHelper = statistics.performanceStatisticsHelper;
         FramesCollection         frames = performanceStatisticsHelper.frames;
         PerformanceStatisticData data   = new PerformanceStatisticData {
             UserName             = selfUser.userUid.Uid,
             GraphicDeviceName    = SystemInfo.graphicsDeviceName,
             GraphicsDeviceType   = SystemInfo.graphicsDeviceType.ToString(),
             GraphicsMemorySize   = SystemInfo.graphicsMemorySize,
             DefaultQuality       = GraphicsSettings.INSTANCE.DefaultQuality.Name,
             Quality              = QualitySettings.names[QualitySettings.GetQualityLevel()],
             Resolution           = GraphicsSettings.INSTANCE.CurrentResolution.ToString(),
             MapName              = GetMapName(map),
             BattleRoundTimeInMin = (int)((Time.realtimeSinceStartup - performanceStatisticsHelper.startRoundTimeInSec) / 60f),
             TankCountModa        = performanceStatisticsHelper.tankCount.Moda,
             Moda    = frames.Moda,
             Average = frames.Average,
             StandardDeviationInMs = frames.StandartDevation,
             HugeFrameCount        = frames.HugeFrameCount,
             MinAverageForInterval = frames.MinAverageForInterval,
             MaxAverageForInterval = frames.MaxAverageForInterval,
             GraphicDeviceKey      = $"DeviceVendorID: {SystemInfo.graphicsDeviceVendorID}; DeviceID: {SystemInfo.graphicsDeviceID}",
             AveragePing           = battleUser.battlePing.getAveragePing(),
             PingModa = battleUser.battlePing.getMediana(),
             GraphicsDeviceVersion = SystemInfo.graphicsDeviceVersion,
             CustomSettings        = GraphicsSettings.INSTANCE.customSettings,
             Windowed            = !Screen.fullScreen,
             SaturationLevel     = GraphicsSettings.INSTANCE.CurrentSaturationLevel,
             VegetationLevel     = GraphicsSettings.INSTANCE.CurrentVegetationLevel,
             GrassLevel          = GraphicsSettings.INSTANCE.CurrentGrassLevel,
             AntialiasingQuality = GraphicsSettings.INSTANCE.CurrentAntialiasingQuality,
             AnisotropicQuality  = GraphicsSettings.INSTANCE.CurrentAnisotropicQuality,
             TextureQuality      = GraphicsSettings.INSTANCE.CurrentTextureQuality,
             ShadowQuality       = GraphicsSettings.INSTANCE.CurrentShadowQuality,
             AmbientOcclusion    = GraphicsSettings.INSTANCE.currentAmbientOcclusion,
             Bloom = GraphicsSettings.INSTANCE.currentBloom,
             RenderResolutionQuality = GraphicsSettings.INSTANCE.CurrentRenderResolutionQuality,
             SystemMemorySize        = SystemInfo.systemMemorySize,
             TotalReservedMemory     = (long)Profiler.GetTotalReservedMemory(),
             TotalAllocatedMemory    = (long)Profiler.GetTotalAllocatedMemory(),
             MonoHeapSize            = (long)Profiler.GetMonoHeapSize(),
             HandlerNames            = new string[0],
             HandlerCallCounts       = new int[0]
         };
         base.Log.InfoFormat("{0}\n{1}", "PerformanceStatisticData", EcsToStringUtil.ToStringWithProperties(data, ", "));
         base.ScheduleEvent(new SendPerfomanceStatisticDataEvent(data), selfUser);
     }
 }
Beispiel #2
0
 public override string ToString() =>
 $"ComponentChangeCommand Entity={base.Entity} Component={EcsToStringUtil.ToStringWithProperties(this.Component, ", ")}";
Beispiel #3
0
 public override string ToString() =>
 EcsToStringUtil.ToStringWithProperties(this, "\n");