pm-bench stats <name> — one-shot summary stats for any log#13
Closed
protosphinx wants to merge 1 commit into
Closed
pm-bench stats <name> — one-shot summary stats for any log#13protosphinx wants to merge 1 commit into
protosphinx wants to merge 1 commit into
Conversation
- pm_bench/stats.py:summarize(events, top_n) → LogStats with n_events, n_cases, n_activities, time span, earliest/latest, mean/median case length, top-N activities, top-N transitions - CLI: pm-bench stats <name-or-path> [--top-n N] emits JSON - Works on synthetic-toy and any CSV path that the existing _load_events dispatch accepts - 7 new tests (test_stats.py); 116 total, ruff clean - README gets a one-liner pointing at the command
This was referenced May 1, 2026
Member
Author
|
Merged into main as part of the audit-cleanup stack (commit 9c00b47). The full content of this PR is now on main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on top of #12 (synthetic-200). Merge order: #2 → #3 → #4 → #5 → #6 → #7 → #8 → #9 → #10 → #11 → #12 → this.
Summary
pm-bench stats <name-or-path>prints n_cases / n_events / n_activities / time span / mean+median case length / top-N activities / top-N transitions.synthetic-toyand any CSV path. Dispatched through the same_load_eventsso the CSV-ingest path Just Works.What's new
pm_bench/stats.py:summarize(events, top_n=10)— one pass over the event iterable; returnsLogStats(frozen dataclass).pm-bench statsemits JSON, includesearliest/latestISO timestamps andspan_daysso you can sanity-check a split before running it.Smoke
Why
statsanswers that in one command before they wire up a model.Test plan
pytest -q— 116 passed (was 109 on PR synthetic-toy → 200 cases: outcome leaderboard row lands; all 5 boards real #12)ruff check pm_bench tests— cleansynthetic-toyreturns expected counts (200 cases, 965 events, 9 activities)