Skip to content

SizeBudgetEvaluator

Namespace: Dotsider.Core.Analysis

Assembly: Dotsider.Core.dll

Evaluates size budgets against a size diff. Total budgets measure the caller’s basis-resolved totals (file size for binaries, mstat total for bare reports); namespace and assembly budgets always measure the diff’s mstat aggregates, with namespace targets covering their sub-namespaces. Each breach carries the scope’s top positive regressions — the rows that explain the growth.

public static class SizeBudgetEvaluator

ObjectSizeBudgetEvaluator

Evaluate(IReadOnlyList<SizeBudget>, MstatDiffResult, SizeBasis, long, long?, int)

Section titled “Evaluate(IReadOnlyList<SizeBudget>, MstatDiffResult, SizeBasis, long, long?, int)”

Evaluates budgets against a diff.

Parameters:

  • budgets (IReadOnlyList<SizeBudget>): The budgets to evaluate, reported in this order.
  • diff (MstatDiffResult): The size diff between the baseline and the build under check. For a check without a baseline, a diff against Empty.
  • totalBasis (SizeBasis): What the total figures count.
  • currentTotalBytes (Int64): The build’s total on totalBasis.
  • baselineTotalBytes (Nullable<Int64>): The baseline’s total on totalBasis, or null when the check runs without one.
  • defaultTopN (Int32): How many contributors a breach lists when its budget does not pin its own count.

Returns: SizeBudgetReport

The report, failing only on error-severity breaches.

Exceptions:

  • ArgumentException: A total-scope growth budget was supplied without a baseline; callers reject that combination before evaluating.
public static SizeBudgetReport Evaluate(IReadOnlyList<SizeBudget> budgets, MstatDiffResult diff, SizeBasis totalBasis, long currentTotalBytes, long? baselineTotalBytes, int defaultTopN = 10)