workflow-run-report v1.0.0
workflow-run-report
Crystal command line tool and library. Give it a step log of automated workflow runs, one row per step, and it reports per workflow: runs, successful runs, success rate (1 decimal), failed runs, the step with the most failed rows (ties go to the alphabetically first step, none when nothing failed), the average run seconds and the p90 run seconds. A run is one run_id inside one workflow and is successful only when every one of its step rows is success. Run seconds is the sum of the seconds of its step rows. p90 uses the nearest rank method: sort the run seconds ascending, take rank = ceil(0.9 * n), and the value at that rank is the p90 (with 5 runs the rank is 5, the slowest run; with 10 runs it is 9).
Part of the OneGTMLab free GTM tools. Background on the idea: workflow automation.
Install
shards build # then ./bin/workflow-run-report
Use
Input: CSV with the columns run_id, workflow, step, status and seconds (any order, header case does not matter). status is success or failed, seconds is a number of 0 or more. Any other status or seconds value, a missing column or a short row stops the run with a message naming the row, and exit 1. Workflows are listed alphabetically.
$ bin/workflow-run-report sample.csv
workflow runs successful success rate failed top failing step avg seconds p90 seconds
workflow-a 5 2 40.0% 3 transform 5.80 10.00
workflow-b 2 2 100.0% 0 none 9.00 10.00
rows: 15
runs: 7
workflows: 2
Test
crystal spec
Offline, no network calls, no dependencies beyond the language runtime. MIT licensed.
workflow-run-report
- 0
- 0
- 0
- 0
- 0
- about 2 hours ago
- November 29, 2026
MIT License
Sun, 29 Nov 2026 00:12:56 GMT