tests.test_job_timings module¶

Runner timings aggregate honestly, and sort as durations rather than strings.

tests.test_job_timings.test_match_runner(job_name, expected)[source]¶

A job is attributed to the image its name carries, or to nothing.

Return type:

None

tests.test_job_timings.test_duration_skips_what_it_cannot_measure(job, expected)[source]¶

A job with no usable pair is skipped, never counted as zero.

Counting it as zero would drag a median toward a runner’s queue behaviour instead of its speed, which is the opposite of what this measures.

Return type:

None

tests.test_job_timings.test_fetch_job_timings_samples_dated_successful_runs()[source]¶

Runs come from the dated listing of successful runs, never gh run list.

That listing command has served runs weeks old as the newest ones, which would time an image on builds nobody runs any more.

Return type:

None

tests.test_job_timings.test_format_duration_sorts_chronologically()[source]¶

Rendered durations sort as strings in the order they sort as durations.

--sort-by orders the rendered table lexicographically. Unpadded, 21s lands between 1m37s and 2m03s and the default view reads as though a 21-second job were slower than a 97-second one.

Return type:

None

tests.test_job_timings.test_summarize_puts_the_slowest_median_first()[source]¶

Aggregation answers “which image is holding the matrix up” at the top.

Return type:

None

tests.test_job_timings.test_render_markdown_carries_its_own_caveat()[source]¶

The table says how it was sampled, since the numbers drift.

Return type:

None