pain

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pain is where changing code was costly over a range: per area, the review rounds, halts, replans, recurring fixed findings, regressions and implement time its tasks took, against the same figures over every task in the range. Audit reads it as where to look, never as findings.

Index

Constants

View Source
const NoPain = "No area over the project median."

NoPain is the text form of a map with no area over the project.

View Source
const RecurringFloor = 3

RecurringFloor is the fewest tasks of an area that fixed a category for it to recur: a skip is a reviewer's noise, a fix is a cost paid.

Variables

This section is empty.

Functions

This section is empty.

Types

type Area

type Area struct {
	Dir          string               `json:"dir"`
	Tasks        []string             `json:"tasks"`
	MedianRounds *float64             `json:"median_rounds,omitempty"`
	MaxRounds    int                  `json:"max_rounds,omitempty"`
	Halts        []Halt               `json:"halts,omitempty"`
	Superseded   []string             `json:"superseded,omitempty"` // a task per superseded plan
	Recurring    []history.Recurring  `json:"recurring,omitempty"`
	Regressions  []history.Regression `json:"regressions,omitempty"`
	Density      *float64             `json:"implement_minutes_per_100_lines,omitempty"`
	Line         string               `json:"line"`
}

Area is one area's line: only the signals over the project are set.

type AreaTasks

type AreaTasks struct {
	Dir   string
	Tasks []string
}

AreaTasks is one area of the partition and the tasks whose commits in the range touched it.

type Figures

type Figures struct {
	Tasks          int      `json:"tasks"`
	MedianRounds   *float64 `json:"median_rounds"`
	HaltRate       float64  `json:"halts_per_task"`
	SupersedeRate  float64  `json:"superseded_per_task"`
	RegressionRate float64  `json:"regressions_per_task"`
	Density        *float64 `json:"implement_minutes_per_100_lines"`
}

Figures are the project's: medians over the tasks that recorded the figure, rates per task; a nil median had too few tasks to mean anything.

type Halt

type Halt struct {
	Task   string `json:"task"`
	Reason string `json:"reason"`
}

Halt is a drive stopping one of the area's tasks.

type Input

type Input struct {
	Areas  []AreaTasks
	Events []ledger.Event
	Since  time.Time
}

Input is the partition and the ledger rows of its tasks' sessions, with the project's regression_found rows (history.ReadLedger).

type Lineage

type Lineage struct {
	Origin string   `json:"origin"`
	Bugs   []string `json:"bugs"`
	Class  []string `json:"classes"`
}

Lineage is a task of the range and the bug tasks traced to it.

type Map

type Map struct {
	Project  Figures   `json:"project"`
	Areas    []Area    `json:"areas"`
	Lineages []Lineage `json:"lineages"`
}

Map is the areas over the project on at least one signal, each with the signals that put it there, and the regression lineages of the range.

func Build

func Build(in Input) *Map

Build is the map: the facts of every task once, then each area against the project.

func (*Map) Lines

func (m *Map) Lines() []string

Lines is the text form: one line per area.

Jump to

Keyboard shortcuts

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