Interface IKernelTelemetryProvider
- Namespace
- DotCompute.Abstractions.Telemetry
- Assembly
- DotCompute.Abstractions.dll
Provides telemetry collection and reporting for kernel execution.
public interface IKernelTelemetryProvider
Remarks
Telemetry providers collect performance metrics such as throughput, latency, memory usage, and execution counts for Ring Kernels and standard kernels. Implementations must be thread-safe for concurrent metric collection.
Methods
GetAggregatedMetrics()
Gets aggregated metrics for all kernels.
TelemetryMetrics GetAggregatedMetrics()
Returns
- TelemetryMetrics
Aggregated telemetry metrics across all kernels.
GetMetrics(string)
Gets the current metrics for a specific kernel.
TelemetryMetrics GetMetrics(string kernelId)
Parameters
kernelIdstringUnique identifier for the kernel instance.
Returns
- TelemetryMetrics
Current telemetry metrics for the kernel.
RecordExecutionEnd(string, long, bool)
Records the completion of a kernel execution.
void RecordExecutionEnd(string kernelId, long timestamp, bool success)
Parameters
kernelIdstringUnique identifier for the kernel instance.
timestamplongHigh-precision timestamp when execution completed.
successboolTrue if execution succeeded, false if it failed.
RecordExecutionStart(string, long)
Records the start of a kernel execution.
void RecordExecutionStart(string kernelId, long timestamp)
Parameters
kernelIdstringUnique identifier for the kernel instance.
timestamplongHigh-precision timestamp when execution started.
RecordMemoryAllocation(string, long)
Records memory allocation for a kernel.
void RecordMemoryAllocation(string kernelId, long bytes)
Parameters
RecordMemoryDeallocation(string, long)
Records memory deallocation for a kernel.
void RecordMemoryDeallocation(string kernelId, long bytes)
Parameters
RecordMessageProcessed(string, int)
Records a message processed by a Ring Kernel.
void RecordMessageProcessed(string kernelId, int messageSize)
Parameters
kernelIdstringUnique identifier for the kernel instance.
messageSizeintSize of the message in bytes.
ResetAllMetrics()
Resets all telemetry data for all kernels.
void ResetAllMetrics()
ResetMetrics(string)
Resets all telemetry data for a specific kernel.
void ResetMetrics(string kernelId)
Parameters
kernelIdstringUnique identifier for the kernel instance.