budget

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package budget records a development experience measurement in the artifacts of the repository. See the SDD, section 3 and section 7, step 11.

Index

Constants

View Source
const (
	// JSONFile holds the measurements that a machine reads.
	JSONFile = "verification.json"
	// MarkdownFile holds the table that a person reads.
	MarkdownFile = "verification.md"
)

The files that the package writes.

View Source
const Dir = "artifacts"

Dir is the directory that holds the artifacts.

Variables

This section is empty.

Functions

func Record

func Record(root, id, requirement string, elapsed, limit time.Duration) error

Record writes one measurement into the artifacts. It merges with the measurements that another run wrote, so one table holds every budget.

Types

type Measurement

type Measurement struct {
	// ID is the identifier of the requirement, such as DX-1.
	ID string `json:"id"`
	// Requirement states the requirement in one line.
	Requirement string `json:"requirement"`
	// Budget is the limit in seconds.
	Budget float64 `json:"budget_seconds"`
	// Elapsed is the measurement in seconds.
	Elapsed float64 `json:"elapsed_seconds"`
	// State is pass or fail.
	State string `json:"state"`
	// MeasuredAt is the time of the measurement.
	MeasuredAt string `json:"measured_at"`
}

Measurement is one budget and its result.

Jump to

Keyboard shortcuts

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