Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
Loading...
Searching...
No Matches
CyclesPerSecondCalculatedEventArgs.cs
1using System.Text;
2
3namespace Gondwana;
4
16public class CyclesPerSecondCalculatedEventArgs : EventArgs
17{
24 public long TotalGrossCycles;
25
31 public long TotalNetCycles;
32
38 public double GrossCPS;
39
45 public double NetCPS;
46
58 public double? GpuFps;
59
64 public double SampleTime;
65
88 public CyclesPerSecondCalculatedEventArgs(long totalGross, long totalNet, double grossCPS, double netCPS, double sampleTime, double? gpuFps = null)
89 {
90 TotalGrossCycles = totalGross;
91 TotalNetCycles = totalNet;
92 GrossCPS = grossCPS;
93 NetCPS = netCPS;
94 SampleTime = sampleTime;
95 GpuFps = gpuFps;
96 }
97
107 public override string ToString()
108 {
109 var cpsValue = new StringBuilder()
110 .AppendLine($"Total gross cycles: {TotalGrossCycles:N0}")
111 .AppendLine($"Total net cycles: {TotalNetCycles:N0}")
112 .AppendLine($"Sampling time: {SampleTime:N2}s")
113 .AppendLine($"Gross CPS: {GrossCPS:N2}")
114 .AppendLine($"Net CPS (FPS): {NetCPS:N2}");
115
116 if (GpuFps.HasValue)
117 cpsValue.AppendLine($"GPU FPS: {GpuFps.Value:N2}");
118
119 return cpsValue.ToString();
120 }
121}
double GrossCPS
The calculated gross cycles per second rate, representing how many engine cycles occurred per second ...
double NetCPS
The calculated net cycles per second rate, representing the effective frame rate (FPS)....
override string ToString()
Returns a formatted string representation of the performance metrics, including total cycle counts,...
long TotalGrossCycles
The total number of gross cycles counted during the sampling period. Gross cycles represent all engin...
double? GpuFps
The actual GPU presentation rate, measured by counting successful GPU PaintSurface callbacks over the...
long TotalNetCycles
The total number of net cycles counted during the sampling period. Net cycles typically represent eng...
double SampleTime
The duration of the sampling period in seconds over which the cycle counts and rates were measured....
CyclesPerSecondCalculatedEventArgs(long totalGross, long totalNet, double grossCPS, double netCPS, double sampleTime, double? gpuFps=null)
Initializes a new instance of the CyclesPerSecondCalculatedEventArgs class with the specified cycle c...