App Metrics Fork me on GitHub
Show / Hide Table of Contents

Class DefaultTimerMetric

Inheritance
System.Object
DefaultTimerMetric
Namespace:App.Metrics.Timer
Assembly:cs.temp.dll.dll
Syntax
public sealed class DefaultTimerMetric : ITimerMetric, IDisposable

Constructors

DefaultTimerMetric(IHistogramMetric, IClock)

Initializes a new instance of the DefaultTimerMetric class.

Declaration
public DefaultTimerMetric(IHistogramMetric histogram, IClock clock)
Parameters
Type Name Description
IHistogramMetric histogram

The histogram implementation to use.

IClock clock

The clock to use to measure processing duration.

DefaultTimerMetric(IHistogramMetric, IMeterMetric, IClock)

Initializes a new instance of the DefaultTimerMetric class.

Declaration
public DefaultTimerMetric(IHistogramMetric histogram, IMeterMetric meter, IClock clock)
Parameters
Type Name Description
IHistogramMetric histogram

The histogram implementation to use.

IMeterMetric meter

The meter implementation to use to genreate the rate of events over time.

IClock clock

The clock to use to measure processing duration.

DefaultTimerMetric(IReservoir, IClock)

Initializes a new instance of the DefaultTimerMetric class.

Declaration
public DefaultTimerMetric(IReservoir reservoir, IClock clock)
Parameters
Type Name Description
IReservoir reservoir

The reservoir implementation to use for sampling values to generate the histogram.

IClock clock

The clock to use to measure processing duration.

DefaultTimerMetric(IReservoir, IMeterMetric, IClock)

Initializes a new instance of the DefaultTimerMetric class.

Declaration
public DefaultTimerMetric(IReservoir reservoir, IMeterMetric meter, IClock clock)
Parameters
Type Name Description
IReservoir reservoir

The reservoir to use for sampling within the histogram.

IMeterMetric meter

The meter implementation to use to genreate the rate of events over time.

IClock clock

The clock to use to measure processing duration.

Properties

Value

Declaration
public TimerValue Value { get; }
Property Value
Type Description
TimerValue

Methods

CurrentTime()

Declaration
public long CurrentTime()
Returns
Type Description
System.Int64

Dispose()

Declaration
public void Dispose()
Implements
System.IDisposable.Dispose()

Dispose(Boolean)

Declaration
public void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

EndRecording()

Declaration
public long EndRecording()
Returns
Type Description
System.Int64

GetValue(Boolean)

Declaration
public TimerValue GetValue(bool resetMetric = false)
Parameters
Type Name Description
System.Boolean resetMetric
Returns
Type Description
TimerValue

NewContext()

Declaration
public TimerContext NewContext()
Returns
Type Description
TimerContext

NewContext(String)

Declaration
public TimerContext NewContext(string userValue)
Parameters
Type Name Description
System.String userValue
Returns
Type Description
TimerContext

Record(Int64, TimeUnit)

Declaration
public void Record(long time, TimeUnit unit)
Parameters
Type Name Description
System.Int64 time
TimeUnit unit

Record(Int64, TimeUnit, String)

Declaration
public void Record(long duration, TimeUnit unit, string userValue)
Parameters
Type Name Description
System.Int64 duration
TimeUnit unit
System.String userValue

Reset()

Declaration
public void Reset()

StartRecording()

Declaration
public long StartRecording()
Returns
Type Description
System.Int64

Time(Action)

Declaration
public void Time(Action action)
Parameters
Type Name Description
System.Action action

Time(Action, String)

Declaration
public void Time(Action action, string userValue)
Parameters
Type Name Description
System.Action action
System.String userValue

Time<T>(Func<T>)

Declaration
public T Time<T>(Func<T> action)
Parameters
Type Name Description
System.Func<T> action
Returns
Type Description
T
Type Parameters
Name Description
T

Time<T>(Func<T>, String)

Declaration
public T Time<T>(Func<T> action, string userValue)
Parameters
Type Name Description
System.Func<T> action
System.String userValue
Returns
Type Description
T
Type Parameters
Name Description
T
Back to top Copyright © 2017 Allan Hardy
Generated by DocFX