Skip to content

feat: add heavy-load CPU/memory profiling mode#149

Open
pandego wants to merge 1 commit intoVectifyAI:mainfrom
pandego:feat/heavy-load-profiling
Open

feat: add heavy-load CPU/memory profiling mode#149
pandego wants to merge 1 commit intoVectifyAI:mainfrom
pandego:feat/heavy-load-profiling

Conversation

@pandego
Copy link

@pandego pandego commented Mar 5, 2026

Summary

This PR adds built-in runtime profiling support for heavy-load runs so users can measure end-to-end latency and memory usage directly from the CLI.

What changed

  • Added pageindex/profiling.py with:
    • profile_run(...) context manager
    • write_profile_report(...) JSON report writer
  • Extended run_pageindex.py with:
    • --enable-profile
    • --profile-output (default: ./results/profile_report.json)
  • Updated README with a heavy-load profiling walkthrough and report interpretation guidance.
  • Added tests/test_profiling.py coverage for report generation/writing logic.

Why

Issue #141 asks for practical CPU/memory profiling documentation under heavy load. This PR provides both:

  • executable profiling support in the main entrypoint,
  • and docs showing how to use it for repeatable performance analysis.

Validation

  • python3 -m py_compile run_pageindex.py pageindex/profiling.py tests/test_profiling.py

Note: full runtime tests were not executed in this environment because Python package dependencies/tooling (pip/pytest) are unavailable on this runner.

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