Table of Contents

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

kernelName string

The kernel name to analyze.

timeWindow TimeSpan?

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

timeWindow TimeSpan?

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

correlationId string

The correlation ID for tracking this profile.

profileOptions ProfileOptions

Optional profile configuration options.

cancellationToken CancellationToken

Cancellation 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

correlationId string

The correlation ID of the profile to finish.

cancellationToken CancellationToken

Cancellation 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

correlationId string

The correlation ID of the profile.

kernelName string

The kernel name.

deviceId string

The device ID.

executionMetrics KernelExecutionMetrics

Detailed 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

correlationId string

The correlation ID of the profile.

operationType string

Type of memory operation (e.g., "Transfer", "Allocation").

deviceId string

The device ID.

memoryMetrics MemoryOperationMetrics

Detailed memory operation metrics.