Class PerformanceTrend
- Namespace
- DotCompute.Abstractions.Types
- Assembly
- DotCompute.Abstractions.dll
Represents a comprehensive performance trend analysis for kernels and operations. Combines trend detection, statistical analysis, and performance recommendations to provide actionable insights into performance patterns over time.
public sealed class PerformanceTrend
- Inheritance
-
PerformanceTrend
- Inherited Members
Properties
AcceleratorType
Gets the accelerator type this trend analysis applies to.
public AcceleratorType AcceleratorType { get; init; }
Property Value
- AcceleratorType
The accelerator type from the AcceleratorType enumeration.
AnalysisTime
Gets the timestamp when this analysis was performed.
public DateTime AnalysisTime { get; init; }
Property Value
- DateTime
The analysis time as a DateTime.
Confidence
Gets the confidence level in this trend analysis. Higher values indicate more reliable trend detection based on data quality and quantity.
public double Confidence { get; init; }
Property Value
- double
The confidence level as a double between 0.0 and 1.0.
DataPoints
Gets the number of data points used in this trend analysis. More data points generally lead to higher confidence in the trend.
public int DataPoints { get; init; }
Property Value
- int
The number of data points as an integer.
Description
Gets a human-readable description of the trend. Provides context and interpretation of the numerical data.
public string Description { get; init; }
Property Value
- string
The trend description as a string.
Direction
Gets the direction of the trend (alias for TrendDirection for compatibility).
public TrendDirection Direction { get; }
Property Value
- TrendDirection
The trend direction from the TrendDirection enumeration.
EfficiencyTrend
Gets the efficiency trend for resource utilization. Measures how efficiently resources are being used over time.
public double EfficiencyTrend { get; init; }
Property Value
- double
The efficiency trend value as a double.
IsValid
Gets whether this trend analysis is considered valid. False may indicate insufficient data or analysis errors.
public bool IsValid { get; init; }
Property Value
- bool
True if the trend analysis is valid; otherwise, false.
KernelName
Gets the name of the kernel being analyzed.
public string KernelName { get; init; }
Property Value
- string
The kernel name as a string.
Magnitude
Gets the magnitude of the trend as a rate of change per time unit. Represents how quickly the metric is changing over time. Positive values indicate improvement, negative values indicate degradation.
public double Magnitude { get; init; }
Property Value
- double
The trend magnitude as a double (units depend on the specific metric).
MetricName
Gets the name of the specific metric being analyzed. Examples: "ExecutionTime", "MemoryUsage", "Throughput", "CPUUtilization"
public string MetricName { get; init; }
Property Value
- string
The metric name as a string.
PercentChange
Gets the percentage change in the metric over the analysis period. Expressed as a decimal (0.1 = 10% change).
public double PercentChange { get; init; }
Property Value
- double
The percentage change as a double.
PerformanceChange
Gets the performance change magnitude for comparison analysis. Used in telemetry and monitoring systems.
public double PerformanceChange { get; init; }
Property Value
- double
The performance change as a double.
Period
Gets the time period over which this trend was observed. Provides context for the temporal scope of the trend analysis.
public TimeSpan Period { get; init; }
Property Value
- TimeSpan
The analysis period as a TimeSpan.
PluginId
Gets the plugin ID if this trend is specific to a plugin. Used in extension and algorithm plugin systems.
public string? PluginId { get; init; }
Property Value
- string
The plugin identifier as a string.
RateOfChange
Gets the rate of change per time period for the metric. Similar to Magnitude but may use different calculation methods.
public double RateOfChange { get; init; }
Property Value
- double
The rate of change as a double.
Reason
Gets the reason for the trend or any analysis limitations. May include explanations for low confidence or invalid trends.
public string? Reason { get; init; }
Property Value
- string
The reason as a string.
Recommendations
Gets performance recommendations based on this trend analysis. Actionable insights for optimizing performance.
public IReadOnlyList<string> Recommendations { get; init; }
Property Value
- IReadOnlyList<string>
A list of recommendation strings.
SampleSize
Gets the number of samples used in the analysis. Similar to DataPoints but may refer to aggregated samples.
public int SampleSize { get; init; }
Property Value
- int
The sample size as an integer.
SessionId
Gets the session ID this trend data belongs to, if applicable.
public string SessionId { get; init; }
Property Value
- string
The session identifier as a string.
Strategy
Gets the execution strategy associated with this trend, if applicable. Useful for backend-specific trend analysis (e.g., SIMD strategies).
public string? Strategy { get; init; }
Property Value
- string
The strategy name as a string.
ThroughputTrend
Gets the throughput trend for performance analysis. Specific to operations per second or similar throughput metrics.
public double ThroughputTrend { get; init; }
Property Value
- double
The throughput trend value as a double.
TimeRange
Gets the time range for the trend analysis. Similar to Period but may use different measurement approach.
public TimeSpan TimeRange { get; init; }
Property Value
- TimeSpan
The time range as a TimeSpan.
TrendDirection
Gets the overall direction of the performance trend. Indicates whether the metric is improving, remaining stable, or degrading over time.
public TrendDirection TrendDirection { get; init; }
Property Value
- TrendDirection
The trend direction from the TrendDirection enumeration.
VectorizationTrend
Gets the vectorization trend for SIMD operations. Indicates how vectorization efficiency is changing over time.
public double VectorizationTrend { get; init; }
Property Value
- double
The vectorization trend value as a double.
Methods
CompareTo(PerformanceTrend)
Compares this trend with another trend for the same metric.
public double CompareTo(PerformanceTrend other)
Parameters
otherPerformanceTrendThe other performance trend to compare with.
Returns
- double
A positive value if this trend is better, negative if worse, zero if similar.
GetSummary()
Gets a summary of this performance trend for logging and reporting.
public string GetSummary()
Returns
- string
A formatted string summarizing the trend analysis.
IsSignificantChange(double)
Determines if this trend indicates a significant performance change.
public bool IsSignificantChange(double threshold = 0.1)
Parameters
thresholddoubleThe threshold for significance (default 0.1 for 10%)
Returns
- bool
True if the change is significant; otherwise, false.