Table of Contents

Class MetalOperationMetrics

Namespace
DotCompute.Backends.Metal.Utilities
Assembly
DotCompute.Backends.Metal.dll

Represents performance metrics for a specific Metal operation.

public sealed class MetalOperationMetrics
Inheritance
MetalOperationMetrics
Inherited Members

Remarks

Initializes a new instance of the MetalOperationMetrics class.

Constructors

MetalOperationMetrics(string)

Represents performance metrics for a specific Metal operation.

public MetalOperationMetrics(string operationName)

Parameters

operationName string

Name of the operation.

Remarks

Initializes a new instance of the MetalOperationMetrics class.

Properties

AverageTime

Gets the average execution time.

public TimeSpan AverageTime { get; }

Property Value

TimeSpan

ExecutionCount

Gets the total number of executions.

public int ExecutionCount { get; }

Property Value

int

MaxTime

Gets the maximum execution time.

public TimeSpan MaxTime { get; }

Property Value

TimeSpan

MinTime

Gets the minimum execution time.

public TimeSpan MinTime { get; }

Property Value

TimeSpan

OperationName

Gets the name of the operation.

public string OperationName { get; }

Property Value

string

SuccessRate

Gets the success rate as a percentage.

public double SuccessRate { get; }

Property Value

double

SuccessfulExecutions

Gets the number of successful executions.

public int SuccessfulExecutions { get; }

Property Value

int

TimeVariance

Gets the variance of execution times in milliseconds squared.

public double TimeVariance { get; }

Property Value

double

TotalTime

Gets the total time spent on this operation.

public TimeSpan TotalTime { get; }

Property Value

TimeSpan

Methods

RecordExecution(TimeSpan, bool)

Records an execution of this operation.

public void RecordExecution(TimeSpan elapsed, bool success)

Parameters

elapsed TimeSpan

Time taken for the execution.

success bool

Whether the execution was successful.