Class ProfilingStatistics
- Namespace
- DotCompute.Backends.OpenCL.Profiling
- Assembly
- DotCompute.Backends.OpenCL.dll
Aggregated profiling statistics for a session.
public sealed record ProfilingStatistics : IEquatable<ProfilingStatistics>
- Inheritance
-
ProfilingStatistics
- Implements
- Inherited Members
Remarks
This class provides comprehensive statistical analysis of profiled events, grouped by operation type. It includes standard metrics (min/max/avg) as well as percentile analysis (median, P95, P99) for identifying outliers and performance characteristics.
Statistics are calculated lazily and cached for performance.
Properties
DeviceUtilizationPercent
Gets the device utilization percentage. Calculated as: (total execution time / session wall-clock time) * 100
public double DeviceUtilizationPercent { get; }
Property Value
Remarks
Values > 100% indicate concurrent operations (e.g., overlapped transfers and kernels). Values < 100% indicate idle time or CPU-bound operations.
OperationStats
Gets statistics for each operation type profiled in the session. Dictionary maps operation type to its aggregated statistics.
public required Dictionary<ProfiledOperation, OperationStatistics> OperationStats { get; init; }
Property Value
TotalEvents
Gets the total number of profiled events in the session.
public required int TotalEvents { get; init; }
Property Value
TotalExecutionTimeMs
Gets the total execution time across all events (sum of all durations).
public double TotalExecutionTimeMs { get; }
Property Value
TotalSessionTime
Gets the total wall-clock time of the profiling session.
public required TimeSpan TotalSessionTime { get; init; }
Property Value
Methods
ToString()
Returns a formatted string summary of the statistics.
public override string ToString()