Table of Contents

Struct UiMetrics

Namespace
MLEM.Ui
Assembly
MLEM.Ui.dll

A snapshot of update and rendering statistics from Metrics to be used for runtime debugging and profiling.

public struct UiMetrics
Inherited Members

Properties

ActualAreaUpdates

The amount of times that SetAreaAndUpdateChildren(RectangleF) was called.

public readonly uint ActualAreaUpdates { get; }

Property Value

uint

DrawTime

The amount of time that Draw(GameTime, SpriteBatch, float, SpriteBatchContext) took. Can be divided by Draws to get an average per draw.

public readonly TimeSpan DrawTime { get; }

Property Value

TimeSpan

Draws

The amount of times that Draw(GameTime, SpriteBatch, float, SpriteBatchContext) was called.

public readonly uint Draws { get; }

Property Value

uint

ForceAreaUpdateTime

The amount of time that ForceUpdateArea() took. Can be divided by ForceAreaUpdates to get an average per area update.

public readonly TimeSpan ForceAreaUpdateTime { get; }

Property Value

TimeSpan

ForceAreaUpdates

The amount of times that ForceUpdateArea() was called.

public readonly uint ForceAreaUpdates { get; }

Property Value

uint

MaxRecursionDepth

The maximum recursion depth that ForceUpdateArea() went through in a single call.

public readonly int MaxRecursionDepth { get; }

Property Value

int

SummedRecursionDepth

The total amount of recursions that ForceUpdateArea() went through. Can be divided by ForceAreaUpdates to get an average.

public readonly uint SummedRecursionDepth { get; }

Property Value

uint

UpdateTime

The amount of time that Update(GameTime) took. Can be divided by Updates to get an average per update.

public readonly TimeSpan UpdateTime { get; }

Property Value

TimeSpan

Updates

The amount of times that Update(GameTime) was called.

public readonly uint Updates { get; }

Property Value

uint

Methods

ResetDraws()

Resets all rendering-related metrics to 0.

public void ResetDraws()

ResetUpdates()

Resets all update-related metrics to 0.

public void ResetUpdates()

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator +(UiMetrics, UiMetrics)

Adds two ui metrics together, causing all of their values to be combined. For MaxRecursionDepth, the maximum value is chosen instead of the sum.

public static UiMetrics operator +(UiMetrics left, UiMetrics right)

Parameters

left UiMetrics

The left metrics

right UiMetrics

The right metrics

Returns

UiMetrics

The sum of both metrics

operator -(UiMetrics, UiMetrics)

Subtracts two ui metrics from each other, causing their values to be subtracted. For MaxRecursionDepth, the minimum value is chosen instead of the difference.

public static UiMetrics operator -(UiMetrics left, UiMetrics right)

Parameters

left UiMetrics

The left metrics

right UiMetrics

The right metrics

Returns

UiMetrics

The difference of both metrics