Class MetalGraphStatistics
- Namespace
- DotCompute.Backends.Metal.Execution.Graph.Statistics
- Assembly
- DotCompute.Backends.Metal.dll
Contains comprehensive statistics and performance metrics for Metal compute graphs.
public class MetalGraphStatistics
- Inheritance
-
MetalGraphStatistics
- Inherited Members
Properties
AverageCommandBufferUtilization
Gets or sets the average command buffer utilization percentage.
public double AverageCommandBufferUtilization { get; set; }
Property Value
AverageCommandBuffersPerExecution
Gets or sets the average number of command buffers per execution.
public double AverageCommandBuffersPerExecution { get; set; }
Property Value
AverageCpuOverheadTimeMs
Gets or sets the average CPU overhead time per execution in milliseconds.
public double AverageCpuOverheadTimeMs { get; set; }
Property Value
AverageGpuExecutionTimeMs
Gets or sets the average GPU execution time per execution in milliseconds.
public double AverageGpuExecutionTimeMs { get; set; }
Property Value
AverageMemoryBandwidthGBps
Gets or sets the average memory bandwidth utilization in GB/s.
public double AverageMemoryBandwidthGBps { get; set; }
Property Value
AverageMemoryTransferred
Gets or sets the average memory transferred per execution in bytes.
public long AverageMemoryTransferred { get; set; }
Property Value
AveragePerformanceOpsPerSec
Gets the average performance in operations per second.
[JsonIgnore]
public double AveragePerformanceOpsPerSec { get; }
Property Value
BarrierNodeCount
Gets or sets the number of barrier nodes in the graph.
public int BarrierNodeCount { get; set; }
Property Value
CommandBufferBatchingsApplied
Gets or sets the number of command buffer batching optimizations applied.
public int CommandBufferBatchingsApplied { get; set; }
Property Value
CommandBufferCreationFailures
Gets or sets the total number of command buffer creation failures.
public long CommandBufferCreationFailures { get; set; }
Property Value
CreatedAt
Gets or sets the timestamp when the graph was created.
public DateTime CreatedAt { get; set; }
Property Value
CriticalPathLength
Gets or sets the critical path length through the graph.
public int CriticalPathLength { get; set; }
Property Value
EfficiencyRatio
Gets the efficiency ratio (GPU time / total time).
[JsonIgnore]
public double EfficiencyRatio { get; }
Property Value
ErrorFrequency
Gets or sets error frequency statistics.
public Dictionary<string, int> ErrorFrequency { get; }
Property Value
EstimatedMemoryFootprint
Gets or sets the estimated memory footprint of the graph in bytes.
public long EstimatedMemoryFootprint { get; set; }
Property Value
ExecutionLevels
Gets or sets the number of execution levels in the graph.
public int ExecutionLevels { get; set; }
Property Value
FailedExecutions
Gets or sets the number of failed executions.
public long FailedExecutions { get; set; }
Property Value
KernelFusionsApplied
Gets or sets the number of kernel fusion optimizations applied.
public int KernelFusionsApplied { get; set; }
Property Value
KernelNodeCount
Gets or sets the number of kernel nodes in the graph.
public int KernelNodeCount { get; set; }
Property Value
LastExecutedAt
Gets or sets the timestamp of the last execution.
public DateTime? LastExecutedAt { get; set; }
Property Value
LastExecutionTimeMs
Gets or sets the execution time of the last run in milliseconds.
public double LastExecutionTimeMs { get; set; }
Property Value
LastSuccessfulExecutionAt
Gets or sets the timestamp of the last successful execution.
public DateTime? LastSuccessfulExecutionAt { get; set; }
Property Value
LastUpdated
Gets or sets the timestamp when statistics were last updated.
public DateTime LastUpdated { get; set; }
Property Value
MaxGpuExecutionTimeMs
Gets or sets the maximum GPU execution time recorded in milliseconds.
public double MaxGpuExecutionTimeMs { get; set; }
Property Value
MemoryAllocationFailures
Gets or sets the total number of memory allocation failures.
public long MemoryAllocationFailures { get; set; }
Property Value
MemoryCoalescingsApplied
Gets or sets the number of memory coalescing optimizations applied.
public int MemoryCoalescingsApplied { get; set; }
Property Value
MemoryOperationNodeCount
Gets or sets the number of memory operation nodes in the graph.
public int MemoryOperationNodeCount { get; set; }
Property Value
MemoryReductionFactor
Gets or sets the memory reduction factor from optimizations.
public double MemoryReductionFactor { get; set; }
Property Value
MinGpuExecutionTimeMs
Gets or sets the minimum GPU execution time recorded in milliseconds.
public double MinGpuExecutionTimeMs { get; set; }
Property Value
MostCommonError
Gets or sets the most common error message.
public string? MostCommonError { get; set; }
Property Value
Name
Gets or sets the name of the graph these statistics represent.
public string Name { get; set; }
Property Value
NodeCount
Gets or sets the total number of nodes in the graph.
public int NodeCount { get; set; }
Property Value
NodeExecutionFailures
Gets or sets the total number of node execution failures.
public long NodeExecutionFailures { get; set; }
Property Value
OptimizationPasses
Gets or sets the number of optimization passes applied to the graph.
public int OptimizationPasses { get; set; }
Property Value
OptimizationSpeedup
Gets or sets the performance improvement factor from optimizations.
public double OptimizationSpeedup { get; set; }
Property Value
ParallelismOpportunities
Gets or sets the maximum parallelism opportunities in the graph.
public int ParallelismOpportunities { get; set; }
Property Value
ParallelizationEffectiveness
Gets the parallelization effectiveness.
[JsonIgnore]
public double ParallelizationEffectiveness { get; }
Property Value
PeakMemoryBandwidthGBps
Gets or sets the peak memory bandwidth utilization in GB/s.
public double PeakMemoryBandwidthGBps { get; set; }
Property Value
PeakMemoryUsage
Gets or sets the peak memory usage recorded in bytes.
public long PeakMemoryUsage { get; set; }
Property Value
ResourceUtilizationScore
Gets the resource utilization score (0-100).
[JsonIgnore]
public double ResourceUtilizationScore { get; }
Property Value
SuccessRate
Gets the success rate as a percentage.
[JsonIgnore]
public double SuccessRate { get; }
Property Value
SuccessfulExecutions
Gets or sets the number of successful executions.
public long SuccessfulExecutions { get; set; }
Property Value
ThroughputExecutionsPerSec
Gets the throughput in executions per second.
[JsonIgnore]
public double ThroughputExecutionsPerSec { get; }
Property Value
TimeoutOccurrences
Gets or sets the total number of timeout occurrences.
public long TimeoutOccurrences { get; set; }
Property Value
TotalBlitEncoders
Gets or sets the total number of blit command encoders used.
public long TotalBlitEncoders { get; set; }
Property Value
TotalCommandBuffers
Gets or sets the total number of command buffers used across all executions.
public long TotalCommandBuffers { get; set; }
Property Value
TotalComputeEncoders
Gets or sets the total number of compute command encoders used.
public long TotalComputeEncoders { get; set; }
Property Value
TotalCpuOverheadTimeMs
Gets or sets the total CPU overhead time in milliseconds.
public double TotalCpuOverheadTimeMs { get; set; }
Property Value
TotalExecutions
Gets or sets the total number of times the graph has been executed.
public long TotalExecutions { get; set; }
Property Value
TotalGpuExecutionTimeMs
Gets or sets the total GPU execution time across all executions in milliseconds.
public double TotalGpuExecutionTimeMs { get; set; }
Property Value
TotalMemoryAllocations
Gets or sets the total number of memory allocations performed.
public long TotalMemoryAllocations { get; set; }
Property Value
TotalMemoryTransferred
Gets or sets the total memory transferred across all executions in bytes.
public long TotalMemoryTransferred { get; set; }
Property Value
Methods
GenerateReport()
Creates a summary report of the statistics.
public string GenerateReport()
Returns
- string
A formatted string containing the statistics summary.
RecordError(string, string)
Records an execution error.
public void RecordError(string errorType, string errorMessage)
Parameters
Reset()
Resets all statistics to their initial state.
public void Reset()
UpdateExecutionStatistics(double, double, long, int, bool)
Updates the statistics with execution results.
public void UpdateExecutionStatistics(double executionTimeMs, double cpuOverheadMs, long memoryTransferred, int commandBuffersUsed, bool success)
Parameters
executionTimeMsdoubleThe GPU execution time in milliseconds.
cpuOverheadMsdoubleThe CPU overhead time in milliseconds.
memoryTransferredlongThe amount of memory transferred in bytes.
commandBuffersUsedintThe number of command buffers used.
successboolWhether the execution was successful.
UpdateOptimizationStatistics(int, int, int, double)
Updates optimization statistics.
public void UpdateOptimizationStatistics(int fusionsApplied, int coalescingsApplied, int batchingsApplied, double speedupFactor = 1)