Interface IPerformanceProfiler
- Namespace
- DotCompute.Core.Telemetry
- Assembly
- DotCompute.Core.dll
Interface for performance profiler enabling detailed kernel analysis, bottleneck identification, and optimization recommendations.
public interface IPerformanceProfiler : IDisposable
- Inherited Members
- Extension Methods
Methods
AnalyzeKernelPerformance(string, TimeSpan?)
Analyzes kernel performance based on historical data.
KernelAnalysisResult AnalyzeKernelPerformance(string kernelName, TimeSpan? timeWindow = null)
Parameters
kernelNamestringThe kernel name to analyze.
timeWindowTimeSpan?Optional time window for the analysis.
Returns
- KernelAnalysisResult
Analysis results for the kernel.
AnalyzeMemoryAccessPatterns(TimeSpan?)
Analyzes memory access patterns from profiling data.
MemoryAccessAnalysisResult AnalyzeMemoryAccessPatterns(TimeSpan? timeWindow = null)
Parameters
timeWindowTimeSpan?Optional time window for the analysis.
Returns
- MemoryAccessAnalysisResult
Memory access analysis results.
CreateProfileAsync(string, ProfileOptions?, CancellationToken)
Creates a new performance profile with the given correlation ID.
Task<PerformanceProfile> CreateProfileAsync(string correlationId, ProfileOptions? profileOptions = null, CancellationToken cancellationToken = default)
Parameters
correlationIdstringThe correlation ID for tracking this profile.
profileOptionsProfileOptionsOptional profile configuration options.
cancellationTokenCancellationTokenCancellation token for the async operation.
Returns
- Task<PerformanceProfile>
A task representing the asynchronous operation with the created performance profile.
FinishProfilingAsync(string, CancellationToken)
Finishes profiling and returns the completed profile with analysis.
Task<PerformanceProfile> FinishProfilingAsync(string correlationId, CancellationToken cancellationToken = default)
Parameters
correlationIdstringThe correlation ID of the profile to finish.
cancellationTokenCancellationTokenCancellation token for the async operation.
Returns
- Task<PerformanceProfile>
A task representing the asynchronous operation with the completed performance profile.
GetSystemPerformanceSnapshot()
Gets current system performance snapshot.
SystemPerformanceSnapshot GetSystemPerformanceSnapshot()
Returns
- SystemPerformanceSnapshot
System performance snapshot with current metrics.
RecordKernelExecution(string, string, string, KernelExecutionMetrics)
Records kernel execution metrics for the given profile.
void RecordKernelExecution(string correlationId, string kernelName, string deviceId, KernelExecutionMetrics executionMetrics)
Parameters
correlationIdstringThe correlation ID of the profile.
kernelNamestringThe kernel name.
deviceIdstringThe device ID.
executionMetricsKernelExecutionMetricsDetailed execution metrics.
RecordMemoryOperation(string, string, string, MemoryOperationMetrics)
Records memory operation metrics for the given profile.
void RecordMemoryOperation(string correlationId, string operationType, string deviceId, MemoryOperationMetrics memoryMetrics)
Parameters
correlationIdstringThe correlation ID of the profile.
operationTypestringType of memory operation (e.g., "Transfer", "Allocation").
deviceIdstringThe device ID.
memoryMetricsMemoryOperationMetricsDetailed memory operation metrics.