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
Gondwana.Diagnostics.RuntimeProfiler Class Referencesealed

Opt-in, bounded runtime measurements independent of legacy CPS notifications. More...

Inheritance diagram for Gondwana.Diagnostics.RuntimeProfiler:

Public Member Functions

 RuntimeProfiler ()
 Creates an independent collector using the monotonic Stopwatch clock.
void Configure (TelemetryOptions options)
 Changes shared settings while inactive, clearing previous measurements.
IDisposable Start ()
 Starts or joins collection. Disposing the last request stops collection.
TelemetrySource? RegisterSource (string name, string backend)
 Registers an explicitly named source without retaining any runtime object.
TelemetrySnapshot? GetLatestSnapshot ()
 Returns the latest completed bucket, or null before one completes.
IReadOnlyList< TelemetrySnapshot > GetHistory ()
 Returns bounded completed buckets in chronological order without consuming them.
void Reset ()
 Clears telemetry history and rebases observations without changing renderer counters or leases.
void Dispose ()
 Stops collection, invalidates in-flight samples, and retires all source handles.

Properties

bool IsCollecting [get]
 Whether any collection request is active; safe on producer threads.
TelemetryOptions Options [get]
 Current immutable settings.

Detailed Description

Opt-in, bounded runtime measurements independent of legacy CPS notifications.

Queries are non-consuming. Producers take a short lock; no callbacks run inside it. A completed bucket is published on the next observation or query after the interval expires. Empty time spans form one idle bucket instead of an unbounded catch-up sequence.

Definition at line 10 of file RuntimeProfiler.cs.

Constructor & Destructor Documentation

◆ RuntimeProfiler()

Gondwana.Diagnostics.RuntimeProfiler.RuntimeProfiler ( )

Creates an independent collector using the monotonic Stopwatch clock.

Definition at line 24 of file RuntimeProfiler.cs.

Member Function Documentation

◆ Configure()

void Gondwana.Diagnostics.RuntimeProfiler.Configure ( TelemetryOptions options)

Changes shared settings while inactive, clearing previous measurements.

Parameters
optionsValidated bounded settings.

Definition at line 38 of file RuntimeProfiler.cs.

◆ Dispose()

void Gondwana.Diagnostics.RuntimeProfiler.Dispose ( )

Stops collection, invalidates in-flight samples, and retires all source handles.

Definition at line 128 of file RuntimeProfiler.cs.

◆ GetHistory()

IReadOnlyList< TelemetrySnapshot > Gondwana.Diagnostics.RuntimeProfiler.GetHistory ( )

Returns bounded completed buckets in chronological order without consuming them.

Returns
A detached read-only collection.

Definition at line 115 of file RuntimeProfiler.cs.

◆ GetLatestSnapshot()

TelemetrySnapshot? Gondwana.Diagnostics.RuntimeProfiler.GetLatestSnapshot ( )

Returns the latest completed bucket, or null before one completes.

Returns
An immutable detached snapshot safe to retain across reset and disposal.

Definition at line 104 of file RuntimeProfiler.cs.

◆ RegisterSource()

TelemetrySource? Gondwana.Diagnostics.RuntimeProfiler.RegisterSource ( string name,
string backend )

Registers an explicitly named source without retaining any runtime object.

Parameters
nameNonempty name of at most 96 characters.
backendNonempty backend label of at most 96 characters.
Returns
A source handle, or null when the source limit is reached; truncation is reported.

Definition at line 78 of file RuntimeProfiler.cs.

◆ Reset()

void Gondwana.Diagnostics.RuntimeProfiler.Reset ( )

Clears telemetry history and rebases observations without changing renderer counters or leases.

Definition at line 125 of file RuntimeProfiler.cs.

◆ Start()

IDisposable Gondwana.Diagnostics.RuntimeProfiler.Start ( )

Starts or joins collection. Disposing the last request stops collection.

Returns
An idempotent independent request; dispose it during consumer shutdown.

Definition at line 56 of file RuntimeProfiler.cs.

Property Documentation

◆ IsCollecting

bool Gondwana.Diagnostics.RuntimeProfiler.IsCollecting
get

Whether any collection request is active; safe on producer threads.

Definition at line 31 of file RuntimeProfiler.cs.

◆ Options

TelemetryOptions Gondwana.Diagnostics.RuntimeProfiler.Options
get

Current immutable settings.

Definition at line 34 of file RuntimeProfiler.cs.