Skip to content

test(perf): full 0.6.0 repeated baseline, CPU/RSS and scoped cleanup - #121

Merged
agustin18 merged 7 commits into
stablefrom
test/perf-full-repeats-resources
Nov 23, 2026
Merged

agustin18 merged 7 commits into
stablefrom
test/perf-full-repeats-resources

Conversation

@agustin18

Copy link
Copy Markdown
Owner

Goal

Extend merged #120 as the next measurable slice of #100. No package runtime/API changes, no release, no Pages deployment.

New evidence

  • Full profile with bounded InMemory 1k/10k/100k and localhost Redis 7.4 at 1/10/100/1000 concurrent clients, now run on benchmark-related PRs as well as manual full dispatch.
  • Run the full workload three times in fresh isolated Python 3.12 workload processes; reuse only the wheel-verified, pinned-dependency venv. The published 0.6.0 wheel SHA check and python -I site-packages guard are unchanged.
  • Add aggregate.json with per-case medians, standard deviations and coefficient of variation across independent workload processes, not across individual operation samples. Warn when each run has fewer than 100 samples for p99 interpretation.
  • Record Linux current/peak process RSS and CPU durations; per-stage process snapshots and Redis server INFO memory/CPU deltas. Peak RSS is cumulative and includes the measurement harness, not isolated cache heap memory.
  • HTTP benchmark now clears the entire randomly generated cache prefix on exit, including vary, slow, and ttl entries, not just payload. No remote Redis, secrets or FLUSHDB.
  • Add unit tests for aggregate invariants, dissimilar case sets, run-count bounds, and changelog fragment.

Review and acceptance

  • All existing CI checks and the new full-profile/aggregate workflow green on exact PR HEAD.
  • Inspect CI artifact: 3 full summary.json and raw.csv sets, aggregate.json, provenance, freeze; no missing Redis levels or 100k InMemory cases.
  • Confirm resources are correctly scoped and time/variance claims conservative.
  • Confirm complete namespaced cleanup never deletes unrelated Redis data.
  • Independent review of measurement overhead and CI resource usage.

Explicitly not complete

No controlled cross-version 0.5.0 vs 0.6.0 comparison yet; still need a fair common-feature control, independently repeated hosts, real network HTTP, failure/timeout profile, stable resource budgets agreed before regression decisions and profiling for future #96/#50 opt-in modes. Keep #100 open after merging this infrastructure/evidence PR. The InMemory integer-clock TTL edge found in #120 belongs to #111; this PR neither masks an actual backend regression nor changes TTL policy.

Refs #100, #111, #95.

Copy link
Copy Markdown
Owner Author

Implementation audit checkpoint (2026-11-23)

The first full-profile Actions run 45115357363 completed successfully, and the full artifact 14791103409 was independently inspected: 3 isolated runs × 64 cases, including InMemory N=100,000 and standalone Redis 7.4.12 with 1,000 concurrent tasks. Exact 0.6.0 PyPI wheel digest verified. Process CPU in the three runs: 5.044, 4.943 and 4.972 seconds; cumulative Linux peak RSS ~130,152–130,728 KiB includes benchmark imports/results and is not cache-only memory. The 1,000-concurrency Redis SET measurement includes progressive connection pool growth and must not be presented as normal production request latency.

Follow-up on this branch after that run: HTTP and direct Redis prefixes now have explicit post-clear SCAN assertions and Redis INFO records connected-client counts to contextualize server used_memory (buffers/pools versus stored keys). These additional lines require fresh CI on the latest head before approval. No runtime, release or historical 0.6.0 artifact was changed.

Review gate: verify final full artifact contains expected run directories, that no scoped keys survive cleanup, and that normal CI is green. Keep #100 open for controlled 0.5.0 comparison, independent hardware repetitions, real HTTP network/failures and pre-agreed budgets.

Copy link
Copy Markdown
Owner Author

2026-11-23 addendum — Redis pool accounting verified: full benchmark run 45115733415 and artifact 14790793938 passed 3 × 64 cases with post-clear SCAN assertions for the benchmark's randomly scoped HTTP/direct prefixes. During the 1,000-concurrency profile, connected_clients grew from 1 to 1,000; Redis INFO used_memory moved from 1,085,944 to 37,040,960 bytes while the client pool remained connected. This measurement therefore includes client buffers/pool resources; it is not evidence of 36 MB of retained cache entries. Cumulative Python peak RSS: ~130,736–131,160 KiB across fresh processes. The latest revision only repairs runner import spacing for Ruff, and needs CI on exact HEAD before merge. Do not interpret the Redis p95 as production latency or set thresholds retrospectively.

Copy link
Copy Markdown
Owner Author

Final exact-head CI checkpoint (2026-11-23): HEAD 9ab69ee now has 35/35 successful checks, including normal Python compatibility/security/lint/typecheck, published-wheel smoke and 3-run full benchmark. Verified latest full artifact 14791557105: 3 repeats, 64 cases, 0.6.0 pinned PyPI wheel SHA-256, Redis 7.4.12, CPU/RSS/pool telemetry and post-cleanup prefix assertions. Draft remains intentionally open for independent review of metric interpretation and scoped Redis cleanup; issue #100 remains open for controlled historical 0.5.0 comparator, true network/failure profiles, independent hardware runs and pre-agreed performance budgets. No tag/release/upload/deployment.

@agustin18

Copy link
Copy Markdown
Owner Author

I would not merge this yet: the full-evidence job and the README disagree.

.github/workflows/benchmark-published.yml has:

full-evidence:
  if: github.event_name == 'pull_request'

So workflow_dispatch runs only the smoke job. benchmarks/README.md says the manual workflow_dispatch also executes the full matrix. Please choose one contract and align both:

  • Preferred for the documented workflow: allow full-evidence on both pull_request and workflow_dispatch (or remove the if), then rerun the workflow.
  • Or change the README to say manual dispatch is smoke-only; that would leave the full profile PR-only.

The full artifact itself looks good: three processes, 64 comparable cases, wheel hash verified, Redis cleanup assertions, process/Redis resource caveats, and #100 remains open. The TTL edge remains correctly tracked in #111 and is not a reason to block the benchmark harness.

Copy link
Copy Markdown
Owner Author

Addressed the manual-dispatch review blocker in commit f114b22: full-evidence is no longer PR-only, and both pull_request and workflow_dispatch run one smoke job + one independent three-process full job (no duplicate full run). Updated benchmarks/README.md to state the precise contract and added test_manual_workflow_dispatch_runs_full_and_smoke to guard against reintroducing the conditional. This changes no benchmark runtime, Redis cleanup or published distribution. CI was re-triggered on the exact correction SHA; manual workflow_dispatch itself has not been invoked from this session, so its end-to-end scheduling remains to be confirmed after merge.

@agustin18
agustin18 marked this pull request as ready for review November 23, 2026 05:59
@agustin18
agustin18 merged commit 866d2d0 into stable Nov 23, 2026
35 checks passed
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