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)
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)
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)
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
Methods
CurrentTime()
Declaration
public long CurrentTime()
Returns
Type |
Description |
System.Int64 |
|
Dispose()
Declaration
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
NewContext()
Declaration
public ApdexContext NewContext()
Returns
Reset()
Declaration
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 Parameters