Skip to content

feat(stats): smoke frame suite + per-stat CI perf report (#920)#921

Open
paddymul wants to merge 8 commits into
mainfrom
feat/920-smoke-frames-ci-report
Open

feat(stats): smoke frame suite + per-stat CI perf report (#920)#921
paddymul wants to merge 8 commits into
mainfrom
feat/920-smoke-frames-ci-report

Conversation

@paddymul

@paddymul paddymul commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Addresses items 1 and 2 of #920.

  1. Dataset variety. perf_smoke_test now runs over a suite of named frames instead of just the base synthetic frame. The suite covers the shapes with bug history: unhashable object cells (perf: DefaultSummaryStats O(n²) on object columns with unhashable values (lists/dicts/sets) #843), int64 beyond 2^53 (Xorq stats fail silently on int64 values > 2^53 (JSON-safe-integer limit) #800, Histogram computation crashes on large integers near 2^53 (float64 precision loss) #632), Decimal columns (Polars histogram stat fails silently on Decimal columns (DDD weird_types) #801), tz-aware datetimes (Failing on time zone information #277), all-null columns, and categorical dtype. SmokeFinding gains a frame field so a finding says which shape triggered it.

  2. CI report. The harness now collects a per-call measurement for every stat (not just limit exceedances), exposed via run_perf_smoke() -> SmokeResult. A new Stats / Perf Smoke Report CI job runs scripts/perf_smoke_report.py over PD_ANALYSIS_V2, appends a per-stat worst-case time / peak-memory table to the job summary, and fails only on the loose smoke limits.

Item 3 of #920 (smoke-testing stats added at runtime via add_stat / add_analysis / project stat dirs) is deliberately left out: it touches stat_pipeline.py and analysis_management.py, which #912 is rewriting. It stays tracked on #920.

First commit is the failing tests (TDD); implementation follows after CI shows the failure.

🤖 Generated with Claude Code


Update: now also covers polars and xorq (toward #920 item "where are the stats for polars and xorq"):

  • Native memory tracking. tracemalloc only sees python-heap allocations, so the harness now also measures a per-call peak-RSS delta (_NativePeak): on Linux via the kernel's VmHWM counter reset through /proc/self/clear_refs (exact, dependency-free), elsewhere via a psutil sampling thread. A memory finding fires when either signal exceeds the limit; the report table gains a "worst native peak" column. Verified: a 32MB polars Rust-side allocation invisible to tracemalloc is flagged.
  • Polars. Polars stats run through the same StatPipeline, so run_perf_smoke is now engine-agnostic (duck-typed frame size + canonical ops) and perf_smoke_pl.PL_SMOKE_FRAME_MAKERS mirrors the frame suite via pl.from_pandas (unhashable becomes native List/Struct, Decimal becomes pl.Decimal).
  • Xorq. Batch aggregate stats only build expressions; the engine executes them as one folded aggregate. perf_smoke_xorq.run_xorq_perf_smoke measures each batch stat as its own single-expression aggregate (per-stat engine time/memory attribution) and runs the full XorqStatPipeline per column for post-batch stats like histogram, which execute real queries inside their func.
  • The CI report job now emits three tables: pandas, polars, xorq (~18s total locally).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bb932c63c5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


from buckaroo.pluggable_analysis_framework.perf_smoke import perf_smoke_test
from buckaroo.pluggable_analysis_framework.perf_smoke import (
SMOKE_FRAME_MAKERS, measurements_markdown, perf_smoke_test, run_perf_smoke)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Import only symbols that perf_smoke exports

In the current tree this test module fails during collection because buckaroo/pluggable_analysis_framework/perf_smoke.py does not define SMOKE_FRAME_MAKERS, measurements_markdown, or run_perf_smoke; it only exposes the existing perf_smoke_test path. Any pytest tests/unit/perf_smoke_test.py run will stop with an ImportError before exercising the added tests, so these expectations need to land with the corresponding production API changes or be adjusted to the existing interface.

Useful? React with 👍 / 👎.

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

📦 TestPyPI package published

pip install --index-strategy unsafe-best-match --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ buckaroo==0.14.20.dev27466342860

or with uv:

uv pip install --index-strategy unsafe-best-match --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ buckaroo==0.14.20.dev27466342860

MCP server for Claude Code

claude mcp add buckaroo-table -- uvx --from "buckaroo[mcp]==0.14.20.dev27466342860" --index-strategy unsafe-best-match --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ buckaroo-table

📖 Docs preview

🎨 Storybook preview

⏱️ Perf smoke report

…elta, period, date/time/binary, uint, inf, big python ints, list<string>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant