Table of Contents

Class OperationStatistics

Namespace
WorkflowForge.Extensions.Observability.Performance
Assembly
WorkflowForge.Extensions.Observability.Performance.dll

Thread-safe accumulator of performance statistics for a single named operation. Populated by PerformanceStatisticsMiddleware.

public sealed class OperationStatistics : IOperationStatistics
Inheritance
OperationStatistics
Implements
Inherited Members

Constructors

OperationStatistics(string, string)

Initializes a new instance of the OperationStatistics class.

public OperationStatistics(string operationName, string operationId)

Parameters

operationName string

The operation name.

operationId string

The operation identifier.

Properties

AverageExecutionTime

Gets the average execution time for this operation.

public TimeSpan AverageExecutionTime { get; }

Property Value

TimeSpan

AverageMemoryPerExecution

Gets the average memory allocated per execution.

public long AverageMemoryPerExecution { get; }

Property Value

long

ExecutionCount

Gets the number of times this operation was executed.

public int ExecutionCount { get; }

Property Value

int

FailedExecutions

Gets the number of failed executions.

public int FailedExecutions { get; }

Property Value

int

MaximumExecutionTime

Gets the maximum execution time recorded.

public TimeSpan MaximumExecutionTime { get; }

Property Value

TimeSpan

MinimumExecutionTime

Gets the minimum execution time recorded.

public TimeSpan MinimumExecutionTime { get; }

Property Value

TimeSpan

OperationId

Gets the unique identifier of the operation.

public string OperationId { get; }

Property Value

string

OperationName

Gets the name of the operation.

public string OperationName { get; }

Property Value

string

SuccessRate

Gets the success rate for this operation (0.0 to 1.0).

public double SuccessRate { get; }

Property Value

double

SuccessfulExecutions

Gets the number of successful executions.

public int SuccessfulExecutions { get; }

Property Value

int

TotalMemoryAllocated

Gets the total memory allocated by this operation.

public long TotalMemoryAllocated { get; }

Property Value

long