Table of Contents

Class ProfilingMeasurement

Namespace
Artemis.Core
Assembly
Artemis.Core.dll

Represents a set of profiling measurements

public class ProfilingMeasurement
Inheritance
object
ProfilingMeasurement

Properties

Identifier

Gets the unique identifier of this measurement

public string Identifier { get; }

Property Value

string

Measurements

Gets the last 1000 measurements

public long[] Measurements { get; }

Property Value

long[]

Methods

GetAverage()

Gets the average time of the last 1000 measurements

public TimeSpan GetAverage()

Returns

TimeSpan

GetCount()

Gets the number of measurements taken

public ulong GetCount()

Returns

ulong

GetLast()

Gets the last measured time

public TimeSpan GetLast()

Returns

TimeSpan

GetMax()

Gets the max time of the last 1000 measurements

public TimeSpan GetMax()

Returns

TimeSpan

GetMin()

Gets the min time of the last 1000 measurements

public TimeSpan GetMin()

Returns

TimeSpan

GetPercentile(double)

Gets the nth percentile of the last 1000 measurements

public TimeSpan GetPercentile(double percentile)

Parameters

percentile double

Returns

TimeSpan

Start()

Starts measuring time until Stop(long) is called

public void Start()

Stop(long)

Stops measuring time and stores the time passed in the Measurements list

public long Stop(long correction = 0)

Parameters

correction long

An optional correction in ticks to subtract from the measurement

Returns

long

The time passed since the last Start() call