Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentDiff ¶
type ComponentDiff struct { // Name of the component. Name string `json:"name"` // Baseline size of the component in bytes. BaselineSize int64 `json:"baseline_size"` // Size of the component in bytes. Size int64 `json:"size"` // Size diff in bytes. SizeDiff int64 `json:"size_diff"` // Budget of the component in bytes. Budget int64 `json:"budget"` // Creep budget of the component in bytes. CreepBudget int64 `json:"creep_budget"` // Whether the budget is exceeded. BudgetExceeded bool `json:"budget_exceeded"` // Whether the creep budget is exceeded. CreepBudgetExceeded bool `json:"creep_budget_exceeded"` }
ComponentDiff contains metadata of a per-component diff.
func NewComponentDiff ¶
func NewComponentDiff(name string, baselineSize, size, budget, creepBudget int64, enforceCreepBudget bool) *ComponentDiff
NewComponentDiff constructs a ComponentDiff.
type Diff ¶
type Diff struct { // The per-component diffs. ComponentDiffs []*ComponentDiff `json:"component_diffs"` // Whether one or more budgets are exceeded. BudgetExceeded bool `json:"budget_exceeded"` // Whether one or more creep budgets are exceeded. CreepBudgetExceeded bool `json:"creep_budget_exceeded"` // The baseline build ID that was used, if applicable. BaselineBuildID int64 `json:"baseline_build_id,omitempty"` }
Diff is a combined diff of per-component diffs.
func DiffBinarySizes ¶
func DiffBinarySizes(binarySizes, baselineBinarySizes sizes.BinarySizes) *Diff
DiffBinarySizes diffs two BinarySizes objects.
func NewDiff ¶
func NewDiff(componentDiffs []*ComponentDiff) *Diff
NewDiff constructs a Diff from a slice of ComponentDiffs.
Click to show internal directories.
Click to hide internal directories.