SizeDiffPayloadBuilder
Namespace: Dotsider.Core.Protocol
Assembly: Dotsider.Core.dll
Builds the serializable payloads the diff-size and check-size-budgets
surfaces return. The MCP server’s direct mode and the running-session protocol handler
both call these, so the two transports cannot drift apart in shape or semantics.
public static class SizeDiffPayloadBuilderInheritance
Section titled “Inheritance”Object → SizeDiffPayloadBuilder
Methods
Section titled “Methods”BuildBudgetPayload(MstatSource, MstatSource?, IReadOnlyList<SizeBudget>, int?)
Section titled “BuildBudgetPayload(MstatSource, MstatSource?, IReadOnlyList<SizeBudget>, int?)”Builds the check-size-budgets payload: the basis-resolved totals and the budget
report. Growth budgets without a baseline are the caller’s error to reject; this
builder evaluates what it is given.
Parameters:
target(MstatSource): The build under check.baseline(MstatSource): The baseline, or null for an absolute-only gate.budgets(IReadOnlyList<SizeBudget>): The budgets to evaluate.topN(Nullable<Int32>): Contributors per violated budget, or null for DefaultTopN.
Returns: Object
The serializable payload.
public static object BuildBudgetPayload(MstatSource target, MstatSource? baseline, IReadOnlyList<SizeBudget> budgets, int? topN)BuildDiffPayload(MstatSource, MstatSource, int?, bool, int?)
Section titled “BuildDiffPayload(MstatSource, MstatSource, int?, bool, int?)”Builds the diff-size payload: the diff’s summary, aggregates, and top
contributors, plus — only on request — the delta tree, pruned depth-first by absolute
delta to a node cap with explicit truncation metadata, because a full tree for a real
application is enormous.
Parameters:
left(MstatSource): The baseline input.right(MstatSource): The input under comparison.topN(Nullable<Int32>): How many contributors to include, or null for DefaultTopN.includeTree(Boolean): Whether to include the delta tree.maxNodes(Nullable<Int32>): The tree node cap, or null for DefaultMaxNodes.
Returns: Object
The serializable payload.
public static object BuildDiffPayload(MstatSource left, MstatSource right, int? topN, bool includeTree, int? maxNodes)Fields
Section titled “Fields”DefaultMaxNodes
Section titled “DefaultMaxNodes”The default delta-tree node cap when a caller asks for the tree without one.
Returns: Int32
public const int DefaultMaxNodes = 500DefaultTopN
Section titled “DefaultTopN”The default contributor count when a caller does not pin one.
Returns: Int32
public const int DefaultTopN = 20