ProfilerValue

Description

[ShutdownSurvive]
sealed class Tinman.Engine.Profiling.ProfilerValue

Represents a profiler value.

Public / Constants

Root


public static readonly attribute Root → (ProfilerValue)

The root ProfilerValue.

Use this profiler value to discover the existing ones.

Public / Constructors

ProfilerValue


public constructor ProfilerValue → (4)

name in : string

[not-empty]
The profiler value name.

unit in : ProfilerValueUnit

The profiler value unit.

digits opt : int32 = 0

[>=0]
The number of relevant fractional digits.

parent opt : ProfilerValue = null

Optional parent value.

Creates a new instance of ProfilerValue.

Public / Methods

Consume

2 overloads


public method Consume1 → (1)

profiler in : IProfiler

The profiler object or null if none.

returns → float64

The current value of 0 if profiler in is null. The unit of the returned value is the unit of this profiler value (see Unit).

Convenience method that delegates to IProfiler.Consume and IProfilerValueConsumer.Value in a null-safe way.


public method Consume2 → (2)

profiler in : IProfiler

The profiler object or null if none.

unit in : ProfilerValueUnit

The unit of the returned value.

returns → float64

The current value of 0 if profiler in is null.

Convenience method that delegates to IProfiler.Consume and IProfilerValueConsumer.Value in a null-safe way.

ForName


public static method ForName → (1)

name in : string

The profiler value name, see Name.

returns → ProfilerValue

The found profiler value or null if not found.

Returns the profiler value of this given name.

Produce

2 overloads


public method Produce1 → (2)

profiler in : IProfiler

The profiler object or null if none.

value in : float64

The current profiler value.

Convenience method that delegates to IProfiler.Produce and IProfilerValueProducer.Value in a null-safe way.

The unit of value in is expected to be Unit.


public method Produce2 → (3)

profiler in : IProfiler

The profiler object or null if none.

value in : float64

The current profiler value.

unit in : ProfilerValueUnit

The unit of value in.

Convenience method that delegates to IProfiler.Produce and IProfilerValueProducer.Value in a null-safe way.

Range

2 overloads


public method Range1 → (2)

from in : float64

The first value boundary.

to in : float64

The second value boundary.

returns → ProfilerValue

this

Specifies the acceptable value range.

The ProfilerValueRange.Good and ProfilerValueRange.Bad ranges are extrapolated from the acceptable range and lie before from in resp. after to in.
For example:

from = 30 ms, to = 60 ms : good < 30 ms, bad > 60 ms
from = 60 Hz, to = 30 Hz : good > 60 Hz, bad < 30 Hz

public method Range2 → (1)

range in : ProfilerValueRange

The value range type.

returns → RangeD

The value range bounds.

Returns a value range.

Public / Attributes

All


public static attribute All → (get)

value : ProfilerValue [ ]

[not-null]
A list of all profiler values.

Returns all profiler values.

Children


public attribute Children → (get)

value : IVectorConst<ProfilerValue>

[not-null]
The children of this profiler value.

Returns the children of this profiler value.

Digits


public attribute Digits → (get)

value : int32

[>=0]
The number of fractional digits.

The number of relevant fractional digits.

For example, measuring frames-per-second with more than one fractional digit is usually not relevant for performance analysis.

Id


public attribute Id → (get)

value : int32

The profiler value identifier.

The unique identifier of this profiler value.

Name


public attribute Name → (get)

value : string

[not-empty]
The human-readable name.

The profiler value name.

Parent


public attribute Parent → (get)

value : ProfilerValue

The parent value or null if none.

Returns the parent of this profiler value.

Unit


public attribute Unit → (get)

value : ProfilerValueUnit

The value unit.

The profiler value unit.