示例#1
0
 public ServerEventLogEntry(int playerCount, Performance.Tick performance, int colliders) : base("ServerEvent")
 {
     player_count        = playerCount;
     fps                 = performance.frameRate;
     this.colliders      = colliders;
     load_balancer_tasks = performance.loadBalancerTasks;
     memory_allocations  = performance.memoryAllocations;
     memory_collections  = performance.memoryCollections;
     memory_usage_system = performance.memoryUsageSystem;
     ping                = performance.ping;
 }
示例#2
0
 private void FPSTimer()
 {
     this.frames++;
     this.time += Time.unscaledDeltaTime;
     if (this.time < 1f)
     {
         return;
     }
     Performance.current.frameRate = this.frames;
     Performance.current.frameTime = this.time / (float)this.frames * 1000f;
     Performance.frameRateHistory[checked ((IntPtr)(Performance.cycles % (long)((int)Performance.frameRateHistory.Length)))] = Performance.current.frameRate;
     Performance.frameTimeHistory[checked ((IntPtr)(Performance.cycles % (long)((int)Performance.frameTimeHistory.Length)))] = Performance.current.frameTime;
     Performance.current.frameRateAverage   = this.AverageFrameRate();
     Performance.current.frameTimeAverage   = this.AverageFrameTime();
     Performance.current.memoryUsageSystem  = (long)SystemInfoEx.systemMemoryUsed;
     Performance.current.memoryAllocations  = GC.GetTotalMemory(false) / (long)1048576;
     Performance.current.memoryCollections  = (long)GC.CollectionCount(0);
     Performance.current.loadBalancerTasks  = (long)LoadBalancer.Count();
     Performance.current.invokeHandlerTasks = (long)InvokeHandler.Count();
     this.frames         = 0;
     this.time           = 0f;
     Performance.cycles += (long)1;
     Performance.report  = Performance.current;
 }
示例#3
0
 private void FPSTimer()
 {
     ++this.frames;
     this.time += Time.get_unscaledDeltaTime();
     if ((double)this.time < 1.0)
     {
         return;
     }
     Performance.current.frameRate = this.frames;
     Performance.current.frameTime = (float)((double)this.time / (double)this.frames * 1000.0);
     Performance.frameRateHistory[Performance.cycles % (long)Performance.frameRateHistory.Length] = Performance.current.frameRate;
     Performance.frameTimeHistory[Performance.cycles % (long)Performance.frameTimeHistory.Length] = Performance.current.frameTime;
     Performance.current.frameRateAverage   = this.AverageFrameRate();
     Performance.current.frameTimeAverage   = this.AverageFrameTime();
     Performance.current.memoryUsageSystem  = (long)SystemInfoEx.systemMemoryUsed;
     Performance.current.memoryAllocations  = GC.GetTotalMemory(false) / 1048576L;
     Performance.current.memoryCollections  = (long)GC.CollectionCount(0);
     Performance.current.loadBalancerTasks  = (long)LoadBalancer.Count();
     Performance.current.invokeHandlerTasks = (long)InvokeHandler.Count();
     this.frames = 0;
     this.time   = 0.0f;
     ++Performance.cycles;
     Performance.report = Performance.current;
 }