603d9da6

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Measure whether the fact layer is earning its keep

It is not, at this size, and the numbers say so three ways.

Facts are larger than the source they summarise: 1.22x to 1.88x across four
nix-ci packages. levels.md named that exact threshold in advance and said
crossing it means the serialisation is carrying the AST rather than a designed
summary.

Half of a fact file is spans, and a quarter of it is one path. nix-ci-leader's
facts hold 8,345 spans over 248 distinct files, and every span inside a module
writes out that module's own path again. That is 520 KB of 2,205 KB, and it is
also a representable disagreement: nothing stops a span in one module's facts
from naming another module's file.

The unit of caching costs more to produce than the whole uncached job. Checking
all of nix-ci in one process takes 4.1 seconds. Building one package's facts as
a derivation takes 5.4, for about a third of the work.

Written up in plan/corpus.md with the three things that could follow, since
which one is a decision rather than a measurement.

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 0s 1s 1s 1s 0s
Eval 1s 19s 19s 20s 0s
Build 3s 10s 22s 26s 0s
Suite 0s 31s 26s 26s 0s

Timeline

0s10s20s