Table of Contents

Class OperationStatistics

Namespace
DotCompute.Backends.OpenCL.Profiling
Assembly
DotCompute.Backends.OpenCL.dll

Statistical metrics for a specific operation type.

public sealed record OperationStatistics : IEquatable<OperationStatistics>
Inheritance
OperationStatistics
Implements
Inherited Members

Remarks

These statistics provide deep insights into operation performance:

  • Count: Total number of operations
  • Min/Max: Performance bounds
  • Avg: Expected typical performance
  • Median: True "middle" performance (less affected by outliers)
  • P95/P99: Worst-case performance for 95th/99th percentile

Use P95/P99 for SLA definitions and performance guarantees.

Properties

AvgDurationMs

Gets the average (mean) duration for this operation (milliseconds).

public required double AvgDurationMs { get; init; }

Property Value

double

CoefficientOfVariationPercent

Gets the coefficient of variation (CV) as a percentage. CV = (StandardDeviation / Mean) * 100

public double CoefficientOfVariationPercent { get; }

Property Value

double

Remarks

CV quantifies the degree of variability relative to the mean:

  • CV < 10%: Very consistent performance
  • CV 10-20%: Moderately consistent performance
  • CV 20-30%: Variable performance
  • CV > 30%: Highly variable performance

Count

Gets the number of times this operation was profiled.

public required int Count { get; init; }

Property Value

int

MaxDurationMs

Gets the maximum duration observed for this operation (milliseconds). Represents worst-case performance (may include outliers).

public required double MaxDurationMs { get; init; }

Property Value

double

MedianDurationMs

Gets the median duration for this operation (milliseconds). The median is less sensitive to outliers than the average.

public required double MedianDurationMs { get; init; }

Property Value

double

MinDurationMs

Gets the minimum duration observed for this operation (milliseconds). Represents best-case performance.

public required double MinDurationMs { get; init; }

Property Value

double

P95DurationMs

Gets the 95th percentile duration (milliseconds). 95% of operations completed within this time or faster. Useful for SLA definitions and performance targets.

public required double P95DurationMs { get; init; }

Property Value

double

P99DurationMs

Gets the 99th percentile duration (milliseconds). 99% of operations completed within this time or faster. Identifies extreme outliers and worst-case scenarios.

public required double P99DurationMs { get; init; }

Property Value

double

StandardDeviationMs

Gets the standard deviation of durations (milliseconds). Measures variability/consistency of performance.

public double StandardDeviationMs { get; }

Property Value

double

Remarks

High standard deviation indicates inconsistent performance. Low standard deviation indicates predictable, consistent behavior.

TotalDurationMs

Gets the total cumulative duration for all operations of this type (milliseconds).

public required double TotalDurationMs { get; init; }

Property Value

double

Methods

ToString()

Returns a formatted string summary of the operation statistics.

public override string ToString()

Returns

string