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

Class DefaultApdexMetric

Apdex Metric allows us to measure an apdex score which is a ratio of the number of satisfied and tolerating requests to the total requests made. Each satisfied request counts as one request, while each tolerating request counts as half a satisfied request.

Inheritance
System.Object
DefaultApdexMetric
Namespace:App.Metrics.Apdex
Assembly:cs.temp.dll.dll
Syntax
public sealed class DefaultApdexMetric : IApdexMetric

Constructors

DefaultApdexMetric(IApdexProvider, IClock, Boolean)

Initializes a new instance of the DefaultApdexMetric class.

Declaration
public DefaultApdexMetric(IApdexProvider apdexProvider, IClock clock, bool allowWarmup)
Parameters
Type Name Description
IApdexProvider apdexProvider

The apdexProvider implementation to use for sampling values to generate the apdex score.

IClock clock

The clock to use to measure processing duration.

System.Boolean allowWarmup

if set to true allows the service to warmup before starting to calculate the apdex, the score will intitially be 1 until enough samples have been recorded.

Exceptions
Type Condition
System.ArgumentNullException

clock and apdexProvider are required.

DefaultApdexMetric(IReservoir, IClock, Boolean)

Initializes a new instance of the DefaultApdexMetric class.

Declaration
public DefaultApdexMetric(IReservoir reservoir, IClock clock, bool allowWarmup)
Parameters
Type Name Description
IReservoir reservoir

The reservoir to user for sampling.

IClock clock

The clock to use to measure processing duration.

System.Boolean allowWarmup

if set to true allows the service to warmup before starting to calculate the apdex, the score will intitially be 1 until enough samples have been recorded.

DefaultApdexMetric(IReservoir, Double, IClock, Boolean)

Initializes a new instance of the DefaultApdexMetric class.

Declaration
public DefaultApdexMetric(IReservoir reservoir, double apdexTSeconds, IClock clock, bool allowWarmup)
Parameters
Type Name Description
IReservoir reservoir

The reservoir to user for sampling.

System.Double apdexTSeconds

The apdex t seconds value between 0 and 1.

IClock clock

The clock to use to measure processing duration.

System.Boolean allowWarmup

if set to true allows the service to warmup before starting to calculate the apdex, the score will intitially be 1 until enough samples have been recorded.

Properties

Value

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

Methods

CurrentTime()

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

Dispose()

Declaration
public void Dispose()

EndRecording()

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

GetValue(Boolean)

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

NewContext()

Declaration
public ApdexContext NewContext()
Returns
Type Description
ApdexContext

Reset()

Declaration
public void Reset()

StartRecording()

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

Track(Action)

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

Track(Int64)

Declaration
public void Track(long duration)
Parameters
Type Name Description
System.Int64 duration

Track<T>(Func<T>)

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