Class MetalExecutionTelemetry
- Namespace
- DotCompute.Backends.Metal.Execution
- Assembly
- DotCompute.Backends.Metal.dll
Telemetry collector for Metal execution components
public sealed class MetalExecutionTelemetry : IDisposable
- Inheritance
-
MetalExecutionTelemetry
- Implements
- Inherited Members
- Extension Methods
Constructors
MetalExecutionTelemetry(ILogger, TimeSpan?)
public MetalExecutionTelemetry(ILogger logger, TimeSpan? reportingInterval = null)
Parameters
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GenerateReport()
Generates a comprehensive telemetry report
public MetalTelemetryReport GenerateReport()
Returns
GetMetrics()
Gets current metrics snapshot
public Dictionary<string, object> GetMetrics()
Returns
GetRecentEvents(int)
Gets recent events
public IReadOnlyList<MetalTelemetryEvent> GetRecentEvents(int count = 100)
Parameters
countint
Returns
RecordError(string, MetalError, string?)
Records error information
public void RecordError(string component, MetalError errorCode, string? message = null)
Parameters
componentstringerrorCodeMetalErrormessagestring
RecordEvent(string, string, Dictionary<string, object>?)
Records a telemetry event
public void RecordEvent(string category, string eventName, Dictionary<string, object>? properties = null)
Parameters
categorystringeventNamestringpropertiesDictionary<string, object>
RecordMetric(string, object)
Records a performance metric
public void RecordMetric(string name, object value)
Parameters
RecordResourceAllocation(MetalResourceType, long, bool)
Records resource allocation information
public void RecordResourceAllocation(MetalResourceType type, long sizeInBytes, bool success = true)
Parameters
typeMetalResourceTypesizeInByteslongsuccessbool
RecordTiming(string, TimeSpan, bool)
Records timing information
public void RecordTiming(string operation, TimeSpan duration, bool success = true)