Docs · API reference · Motus.Abstractions

PerformanceBudgetEntry Class#

A single metric evaluation within a performance budget check.

public sealed record PerformanceBudgetEntry : System.IEquatable<Motus.Abstractions.PerformanceBudgetEntry>

Inheritance System.Object → PerformanceBudgetEntry

Implements System.IEquatable<PerformanceBudgetEntry>

Constructors#

PerformanceBudgetEntry(string, double, Nullable<double>, bool, Nullable<double>) Constructor#

A single metric evaluation within a performance budget check.

public PerformanceBudgetEntry(string MetricName, double Threshold, System.Nullable<double> ActualValue, bool Passed, System.Nullable<double> Delta);

Parameters#

MetricName System.String

The name of the metric (e.g. "LCP", "CLS").

Threshold System.Double

The configured budget threshold.

ActualValue System.Nullable<System.Double>

The measured value, or null if the metric was not collected.

Passed System.Boolean

Whether the metric met the budget (true if actual is within threshold, or if actual is null).

Delta System.Nullable<System.Double>

Difference between actual and threshold (positive means over budget), or null if metric was not collected.

Properties#

ActualValue Property#

The measured value, or null if the metric was not collected.

public System.Nullable<double> ActualValue { get; init; }

Property Value#

System.Nullable<System.Double>

Delta Property#

Difference between actual and threshold (positive means over budget), or null if metric was not collected.

public System.Nullable<double> Delta { get; init; }

Property Value#

System.Nullable<System.Double>

MetricName Property#

The name of the metric (e.g. "LCP", "CLS").

public string MetricName { get; init; }

Property Value#

System.String

Passed Property#

Whether the metric met the budget (true if actual is within threshold, or if actual is null).

public bool Passed { get; init; }

Property Value#

System.Boolean

Threshold Property#

The configured budget threshold.

public double Threshold { get; init; }

Property Value#

System.Double