sizes

package
v0.0.0-...-c44c8e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinarySizes

type BinarySizes map[string]*ComponentMetadata

BinarySizes maps component names to ComponentMetadata.

func Parse

func Parse(raw map[string]any) (BinarySizes, error)

Parse parses a raw binary_sizes map from JSON to a structured BinarySizes object. Byte values are casted from float64 to int64, and ".owner" keys are removed as they are not meaningful to our tools.

The binary_sizes schema is defined in https://chromium.googlesource.com/infra/gerrit-plugins/binary-size/+/HEAD/README.md.

type ComponentMetadata

type ComponentMetadata struct {
	// Size of the component in bytes.
	Size int64

	// Budget of the component in bytes.
	Budget int64

	// Creep budget of the component in bytes.
	CreepBudget int64
}

ComponentMetadata contains size and size budget metadata for a single component.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL