Table of Contents

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

olderThan TimeSpan

Age threshold for data cleanup

Returns

Task<int>

Number of sessions cleaned up

ExportDataAsync(ExportFormat, string, TimeRange?)

Exports profiling data for external analysis.

Task<string> ExportDataAsync(ExportFormat format, string outputPath, TimeRange? timeRange = null)

Parameters

format ExportFormat

Export format (JSON, CSV, etc.)

outputPath string

Path to write the export

timeRange TimeRange

Optional time range filter

Returns

Task<string>

Path to the exported file

GetKernelStatisticsAsync(string, TimeRange?)

Gets aggregated statistics for a kernel across all executions.

Task<KernelStatistics> GetKernelStatisticsAsync(string kernelName, TimeRange? timeRange = null)

Parameters

kernelName string

The kernel name

timeRange TimeRange

Optional time range filter

Returns

Task<KernelStatistics>

Aggregated profiling statistics

GetResultsAsync(Guid)

Gets profiling results for a completed session.

Task<ProfilingResults?> GetResultsAsync(Guid sessionId)

Parameters

sessionId Guid

The 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

sessionName string

Name for the profiling session

Returns

IProfilingSession

A disposable profiling session