The run history (mix juggernaut.history, design notes §3, §7.2): one row per recorded
run, newest first, then trends over the runs shown, oldest to newest, as sparklines of
the score, the mutant count, the wall time and the results reused.
It reads the records of Juggernaut.Store.History.read/1 (string-keyed maps). A run's
wall time is its finished_at minus its started_at, as recorded. Reused results are
shown with the run time recorded for them, labelled as recorded. Lines the history
reader skipped are listed with their reason, and a field of a readable line that is
missing or not of the expected type is shown as "-" (and null in trends): one odd
line never stops the listing. Nothing is cut silently: when the limit hides older runs
the output says how many and how to see them.
The JSON document is {"format": 1, "kind": "history", "total", "shown", "more", "next", "runs", "trends", "skipped"}; each run is its history record (keys sorted)
plus wall_ms, and each trend lists one value per shown run, oldest first.
Summary
Functions
The history in format (:human or :json).
The records matching filters (lane, since date), newest first, at most limit;
with the number matched and the number left out.
A sparkline of values (numbers, nil for a gap shown as a space), scaled from the
smallest to the largest; equal values are drawn at mid height.
A run's recorded wall time in milliseconds (finished_at - started_at), or nil.
Types
@type filters() :: [limit: pos_integer(), lane: atom() | nil, since: Date.t() | nil]
@type history() :: %{ records: [map()], skipped: [%{line: pos_integer(), reason: String.t()}] }
Functions
The history in format (:human or :json).
@spec select([map()], keyword()) :: %{ runs: [map()], total: non_neg_integer(), more: non_neg_integer() }
The records matching filters (lane, since date), newest first, at most limit;
with the number matched and the number left out.
A sparkline of values (numbers, nil for a gap shown as a space), scaled from the
smallest to the largest; equal values are drawn at mid height.
@spec wall_ms(map()) :: non_neg_integer() | nil
A run's recorded wall time in milliseconds (finished_at - started_at), or nil.