Skip to content

SizeBudgetViolation

Namespace: Dotsider.Core.Analysis.Models

Assembly: Dotsider.Core.dll

One breached limit of a size budget. Every figure is expressed in bytes — for the percent metric the limit is resolved against the baseline so the overage stays a byte count — with the percentages carried alongside where they apply.

public sealed record SizeBudgetViolation : IEquatable<SizeBudgetViolation>

ObjectSizeBudgetViolation

SizeBudgetViolation(SizeBudgetMetric, long, long, long, double?, double?)

Section titled “SizeBudgetViolation(SizeBudgetMetric, long, long, long, double?, double?)”

One breached limit of a size budget. Every figure is expressed in bytes — for the percent metric the limit is resolved against the baseline so the overage stays a byte count — with the percentages carried alongside where they apply.

Parameters:

  • Metric (SizeBudgetMetric): The limit that was breached.
  • ActualBytes (Int64): The measured value: the current size for MaxBytes, the growth in bytes for the growth metrics.
  • LimitBytes (Int64): The limit in bytes; for MaxGrowthPercent this is the baseline times the allowed percentage.
  • OverageBytes (Int64): ActualBytes minus LimitBytes.
  • ActualPercent (Nullable<Double>): The measured growth percentage, or null when the baseline was zero (a new scope — any growth breaches).
  • LimitPercent (Nullable<Double>): The allowed growth percentage, or null for the byte metrics.
public SizeBudgetViolation(SizeBudgetMetric Metric, long ActualBytes, long LimitBytes, long OverageBytes, double? ActualPercent, double? LimitPercent)

The measured value: the current size for MaxBytes, the growth in bytes for the growth metrics.

Returns: Int64

public long ActualBytes { get; init; }

The measured growth percentage, or null when the baseline was zero (a new scope — any growth breaches).

Returns: Nullable<Double>

public double? ActualPercent { get; init; }

The limit in bytes; for MaxGrowthPercent this is the baseline times the allowed percentage.

Returns: Int64

public long LimitBytes { get; init; }

The allowed growth percentage, or null for the byte metrics.

Returns: Nullable<Double>

public double? LimitPercent { get; init; }

The limit that was breached.

Returns: SizeBudgetMetric

public SizeBudgetMetric Metric { get; init; }

ActualBytes minus LimitBytes.

Returns: Int64

public long OverageBytes { get; init; }