Table of Contents

Class ProfiledEvent

Namespace
DotCompute.Backends.OpenCL.Profiling
Assembly
DotCompute.Backends.OpenCL.dll

Represents a single profiled event with detailed timing information.

public sealed class ProfiledEvent
Inheritance
ProfiledEvent
Inherited Members

Remarks

This class captures comprehensive timing data for OpenCL operations:

  • Queued time: When the command was added to the queue
  • Start time: When execution actually began on the device
  • End time: When execution completed
  • Duration: Calculated end - start time

All times are in nanoseconds since device timer initialization.

Properties

DurationMilliseconds

Gets the execution duration in milliseconds for easier interpretation.

public double DurationMilliseconds { get; }

Property Value

double

DurationNanoseconds

Gets the execution duration in nanoseconds (end - start).

public long DurationNanoseconds { get; }

Property Value

long

EndTimeNanoseconds

Gets or initializes the timestamp when execution completed (nanoseconds).

public required long EndTimeNanoseconds { get; init; }

Property Value

long

Metadata

Gets or initializes optional metadata associated with this event. Common metadata includes: SizeBytes, BandwidthGBPerSecond, WorkGroupSize, GlobalWorkSize.

public required Dictionary<string, object> Metadata { get; init; }

Property Value

Dictionary<string, object>

Name

Gets or initializes the descriptive name of the operation.

public required string Name { get; init; }

Property Value

string

Operation

Gets or initializes the type of operation that was profiled.

public required ProfiledOperation Operation { get; init; }

Property Value

ProfiledOperation

QueueToStartMilliseconds

Gets the queue-to-start latency in milliseconds.

public double QueueToStartMilliseconds { get; }

Property Value

double

QueueToStartNanoseconds

Gets the queue-to-start latency in nanoseconds. This measures the time spent waiting in the queue before execution.

public long QueueToStartNanoseconds { get; }

Property Value

long

QueuedTimeNanoseconds

Gets or initializes the timestamp when the command was queued (nanoseconds).

public required long QueuedTimeNanoseconds { get; init; }

Property Value

long

StartTimeNanoseconds

Gets or initializes the timestamp when execution started (nanoseconds).

public required long StartTimeNanoseconds { get; init; }

Property Value

long

Methods

ToString()

Returns a string representation of this profiled event.

public override string ToString()

Returns

string