Repository navigation
Add nightly job collecting median per-test-case durations - #111389
Conversation
Adds a new `Collect Test Duration Statistics` job to the `NightlyStatistics`
workflow. It collects the median duration of every test case per CI job from
master CI runs (`pull_request_number = 0` and `head_ref = 'master'`) over the
last 2 days, and uploads the result to S3 as JSON:
{ "<check name>": [ { "<test name>": <median_duration_ms> }, ... ], ... }
The batch suffix (e.g. `, 1/2`) is stripped from the job name so all batches of
a job are merged into a single entry.
Also renames the existing per-job `Collect Statistics` job/script to
`Collect Job Duration Statistics` (`collect_job_duration_statistics.py`) to
disambiguate it from the new per-test job.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Workflow [PR], commit [5288182] Summary: ✅ AI ReviewSummaryThis PR adds a new nightly Praktika job that exports median per-test durations from CI DB and renames the existing job-duration collector for clarity. The workflow wiring is fine, but the new query does not actually isolate ClickHouse Findings
Final VerdictStatus: |
leshikus
left a comment
There was a problem hiding this comment.
Changes look good; I cannot understand why they were made from PR description - if we need a statistics, we can query ClickHouse in runtime without adding a separate CI job
I prefer prepared data because it is simpler from a job infrastructure perspective. It works locally, requires no secrets, and is more reliable on the scale of thousands of jobs running at any given moment. Also, queries may become more complex (would be nice to track memory usage per test in the future), with this extra step, CI is more protected against a wide range of issues, from bugs in the queries to network issues |
Use the nightly per-test duration statistics (published by collect_test_duration_statistics, PR #111389) to balance batches by time instead of by count: - load_test_durations downloads test_statistics.json.gz from the public report bucket over plain HTTP (curl), so it works locally without AWS auth, and returns {test_identity: median_ms} for this job (batch suffix stripped to match the merged key). Missing/unavailable stats degrade to balancing by count rather than failing. - distribute_tests_into_batch now assigns tests with the greedy longest-processing-time heuristic (longest test to the least-loaded batch), which brings the per-batch estimated durations to within a second of each other on real data. Deterministic (ties broken by name); the group is written longest-first and --test-list-file preserves that order. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ation-statistics Add nightly job collecting median per-test-case durations
Adds a new
Collect Test Duration Statisticsjob to theNightlyStatisticsworkflow. It collects the median duration of every test case per CI job from master CI runs (pull_request_number = 0andhead_ref = 'master') over the last 2 days, and uploads the result to S3 as JSON:The batch suffix (e.g.
, 1/2) is stripped from the job name so all batches of a job are merged into a single entry.Also renames the existing per-job
Collect Statisticsjob/script toCollect Job Duration Statistics(collect_job_duration_statistics.py) to disambiguate it from the new per-test job.Changelog category (leave one):
Version info
26.7.1.1371(included in26.7and later)