Table of Contents

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

logger ILogger
reportingInterval TimeSpan?

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

MetalTelemetryReport

GetMetrics()

Gets current metrics snapshot

public Dictionary<string, object> GetMetrics()

Returns

Dictionary<string, object>

GetRecentEvents(int)

Gets recent events

public IReadOnlyList<MetalTelemetryEvent> GetRecentEvents(int count = 100)

Parameters

count int

Returns

IReadOnlyList<MetalTelemetryEvent>

RecordError(string, MetalError, string?)

Records error information

public void RecordError(string component, MetalError errorCode, string? message = null)

Parameters

component string
errorCode MetalError
message string

RecordEvent(string, string, Dictionary<string, object>?)

Records a telemetry event

public void RecordEvent(string category, string eventName, Dictionary<string, object>? properties = null)

Parameters

category string
eventName string
properties Dictionary<string, object>

RecordMetric(string, object)

Records a performance metric

public void RecordMetric(string name, object value)

Parameters

name string
value object

RecordResourceAllocation(MetalResourceType, long, bool)

Records resource allocation information

public void RecordResourceAllocation(MetalResourceType type, long sizeInBytes, bool success = true)

Parameters

type MetalResourceType
sizeInBytes long
success bool

RecordTiming(string, TimeSpan, bool)

Records timing information

public void RecordTiming(string operation, TimeSpan duration, bool success = true)

Parameters

operation string
duration TimeSpan
success bool