timing

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: 5 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 timing turns ledger events into the active time a run spent in a step: the window between two step boundaries, minus every wait on the user inside it. It never reports a wall duration: a window it cannot bound, or one an unended wait runs into, yields nothing rather than a guess.

Index

Constants

View Source
const (
	Plan      = "plan"
	Implement = "implement"
	Review    = "review"
	Resolve   = "resolve"
	Judge     = "judge"
	PR        = "pr"
	Cleanup   = "cleanup"
	Glue      = "glue" // a run's time outside every step
)

The steps named here; any other flow entry is measured under its own name.

Variables

This section is empty.

Functions

func Claim

func Claim(e ledger.Event) (string, string, string)

Claim reads a `state_set` row's arguments: `ship running implement` is phase ship, status running, leaf implement. Empty for any other row.

Types

type Window

type Window struct {
	Task    string
	Session string
	Step    string
	Label   string // the flow entry's display name, "" for none
	From    time.Time
	To      time.Time
	Active  time.Duration
}

Window is one stretch of a step in one session.

func Windows

func Windows(events []ledger.Event) []Window

Windows is every bounded step window and glue window, oldest first by end. A plan run counts to the plan it saves; a ship step from the claim entering it to the claim leaving it (next step, stop, backstop, next run). A plan claimed `prior` or `skipped` was never planned here. Glue is a run's segments minus every step window inside them.

Jump to

Keyboard shortcuts

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