Class OperationStatistics
- Namespace
- Excalibur.Dispatch.Resilience.Polly
- Assembly
- Excalibur.Dispatch.Resilience.Polly.dll
Thread-safe operation statistics for tracking using atomic increments.
public sealed class OperationStatistics
- Inheritance
-
OperationStatistics
- Inherited Members
- Extension Methods
Properties
Failures
Gets the number of failed operations.
public long Failures { get; }
Property Value
- long
The current failures value.
FallbackExecutions
Gets the number of fallback executions.
public long FallbackExecutions { get; }
Property Value
- long
The current fallback executions value.
Successes
Gets the number of successful operations.
public long Successes { get; }
Property Value
- long
The current successes value.
TotalAttempts
Gets the total number of operation attempts.
public long TotalAttempts { get; }
Property Value
- long
The current total attempts value.
Methods
Clone()
Creates a snapshot clone of the current statistics.
public OperationStatistics Clone()
Returns
- OperationStatistics
A cloned instance of the statistics.
RecordAttempt()
Records a new operation attempt.
public void RecordAttempt()
RecordFailure()
Records a failed operation.
public void RecordFailure()
RecordFallback()
Records a fallback execution.
public void RecordFallback()
RecordSuccess()
Records a successful operation.
public void RecordSuccess()