Gondwana Game Engine
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, mobile, and web platforms using SkiaSharp for graphics and NAudio for sound.
Loading...
Searching...
No Matches
Gondwana.CyclesPerSecondCalculatedEventArgs Class Reference

Provides data for events that report calculated cycles per second (CPS) performance metrics. This event args class contains both gross and net cycle counts, their corresponding rates per second, and the sampling time period. Net CPS typically represents the effective frame rate (FPS) of the engine, while gross CPS includes all cycles regardless of whether they resulted in rendered frames. More...

Inheritance diagram for Gondwana.CyclesPerSecondCalculatedEventArgs:

Public Member Functions

 CyclesPerSecondCalculatedEventArgs (long totalGross, long totalNet, double grossCPS, double netCPS, double sampleTime)
 Initializes a new instance of the CyclesPerSecondCalculatedEventArgs class with the specified cycle counts, rates, and sampling time.
override string ToString ()
 Returns a formatted string representation of the performance metrics, including total cycle counts, sampling time, and calculated rates. This provides a human-readable summary of all performance data suitable for logging, debugging, or display purposes.

Public Attributes

long TotalGrossCycles
 The total number of gross cycles counted during the sampling period. Gross cycles represent all engine update cycles, including those that may not have resulted in a rendered frame. This value provides insight into the engine's overall processing activity.
long TotalNetCycles
 The total number of net cycles counted during the sampling period. Net cycles typically represent engine update cycles that resulted in rendered frames, providing a more accurate measure of visible performance and frame delivery.
double GrossCPS
 The calculated gross cycles per second rate, representing how many engine cycles occurred per second during the sampling period. This includes all cycles regardless of whether they produced rendered output.
double NetCPS
 The calculated net cycles per second rate, representing the effective frame rate (FPS). This value indicates how many rendered frames or meaningful engine cycles occurred per second during the sampling period, providing the most relevant performance metric for visual smoothness.
double SampleTime
 The duration of the sampling period in seconds over which the cycle counts and rates were measured. This time window determines the granularity and accuracy of the CPS calculations.

Detailed Description

Provides data for events that report calculated cycles per second (CPS) performance metrics. This event args class contains both gross and net cycle counts, their corresponding rates per second, and the sampling time period. Net CPS typically represents the effective frame rate (FPS) of the engine, while gross CPS includes all cycles regardless of whether they resulted in rendered frames.

Constructor & Destructor Documentation

◆ CyclesPerSecondCalculatedEventArgs()

Gondwana.CyclesPerSecondCalculatedEventArgs.CyclesPerSecondCalculatedEventArgs ( long totalGross,
long totalNet,
double grossCPS,
double netCPS,
double sampleTime )

Initializes a new instance of the CyclesPerSecondCalculatedEventArgs class with the specified cycle counts, rates, and sampling time.

Parameters
totalGrossThe total number of gross cycles counted during the sampling period.
totalNetThe total number of net cycles counted during the sampling period.
grossCPSThe calculated gross cycles per second rate.
netCPSThe calculated net cycles per second rate (effective FPS).
sampleTimeThe duration of the sampling period in seconds.

Member Function Documentation

◆ ToString()

override string Gondwana.CyclesPerSecondCalculatedEventArgs.ToString ( )

Returns a formatted string representation of the performance metrics, including total cycle counts, sampling time, and calculated rates. This provides a human-readable summary of all performance data suitable for logging, debugging, or display purposes.

Returns
A multi-line string containing formatted performance metrics with the following information: total gross cycles, total net cycles, sampling time in seconds, gross CPS, and net CPS (FPS).

Member Data Documentation

◆ GrossCPS

double Gondwana.CyclesPerSecondCalculatedEventArgs.GrossCPS

The calculated gross cycles per second rate, representing how many engine cycles occurred per second during the sampling period. This includes all cycles regardless of whether they produced rendered output.

◆ NetCPS

double Gondwana.CyclesPerSecondCalculatedEventArgs.NetCPS

The calculated net cycles per second rate, representing the effective frame rate (FPS). This value indicates how many rendered frames or meaningful engine cycles occurred per second during the sampling period, providing the most relevant performance metric for visual smoothness.

◆ SampleTime

double Gondwana.CyclesPerSecondCalculatedEventArgs.SampleTime

The duration of the sampling period in seconds over which the cycle counts and rates were measured. This time window determines the granularity and accuracy of the CPS calculations.

◆ TotalGrossCycles

long Gondwana.CyclesPerSecondCalculatedEventArgs.TotalGrossCycles

The total number of gross cycles counted during the sampling period. Gross cycles represent all engine update cycles, including those that may not have resulted in a rendered frame. This value provides insight into the engine's overall processing activity.

◆ TotalNetCycles

long Gondwana.CyclesPerSecondCalculatedEventArgs.TotalNetCycles

The total number of net cycles counted during the sampling period. Net cycles typically represent engine update cycles that resulted in rendered frames, providing a more accurate measure of visible performance and frame delivery.