Interface IKernelProfiler
- Namespace
- DotCompute.Runtime.Services.Interfaces
- Assembly
- DotCompute.Runtime.dll
Profiles kernel execution for performance monitoring and optimization.
public interface IKernelProfiler
Methods
CleanupOldDataAsync(TimeSpan)
Clears profiling data older than the specified age.
Task<int> CleanupOldDataAsync(TimeSpan olderThan)
Parameters
olderThanTimeSpanAge threshold for data cleanup
Returns
ExportDataAsync(ExportFormat, string, TimeRange?)
Exports profiling data for external analysis.
Task<string> ExportDataAsync(ExportFormat format, string outputPath, TimeRange? timeRange = null)
Parameters
formatExportFormatExport format (JSON, CSV, etc.)
outputPathstringPath to write the export
timeRangeTimeRangeOptional time range filter
Returns
GetKernelStatisticsAsync(string, TimeRange?)
Gets aggregated statistics for a kernel across all executions.
Task<KernelStatistics> GetKernelStatisticsAsync(string kernelName, TimeRange? timeRange = null)
Parameters
Returns
- Task<KernelStatistics>
Aggregated profiling statistics
GetResultsAsync(Guid)
Gets profiling results for a completed session.
Task<ProfilingResults?> GetResultsAsync(Guid sessionId)
Parameters
sessionIdGuidThe session identifier
Returns
- Task<ProfilingResults>
Profiling results or null if session not found
StartProfiling(string)
Starts a profiling session for kernel execution.
IProfilingSession StartProfiling(string sessionName)
Parameters
sessionNamestringName for the profiling session
Returns
- IProfilingSession
A disposable profiling session