testtime

command
v0.175.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: BSD-3-Clause Imports: 11 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

testtime says which tests account for a Go package's wall clock.

go test -json ./... > run.json && testtime run.json
go test -json ./... | testtime

⚠ THE GAP IS PER-TEST, NOT TIMING ALTOGETHER, and the first version of this comment got that wrong. cmd/testwhy already parses the elapsed time of every PACKAGE and makes it load-bearing: "the time is a witness ... -min-seconds refuses a package that finished faster than it plausibly could" (cmd/testwhy/main.go:36-37, :430). What nobody had is the breakdown WITHIN a package — which tests account for its clock.

⛔ And the check that produced the wrong sentence deserves naming: `fleetverbs --match timing|elapsed|duration` returned 0 verbs over 112 packages, which reads like absence and is not — --match searches NAMES and DOCS, so a tool whose help says "the time is a witness" without the word "elapsed" in its verb line is invisible to it. A scan that could not see reported zero.

Three sessions wanted the per-test breakdown on 2026-11-17 alone, each working around its absence: go-tex/engine's ubuntu lane went from 1229 s to past its 1800 s bound and the only way anyone could attribute it was to bisect whole suite runs on a machine two orders of magnitude away from the one that grew.

Jump to

Keyboard shortcuts

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