pysay is a tiny helper for profiling Python code from the command line using cProfile and pstats, with minimal setup and readable output focused on your own project files.
It is built around simple mock workloads to make it easy to experiment with performance, measure changes, and share reproducible profiling snippets.
- Run any Python snippet under
cProfilewith one function call. - Summarize total runtime and top cumulative stats.
- Filter and print only lines that belong to your project files.
- Include a simple
mark()helper to time checkpoints inside your code. - Comes with mock CPU-bound tasks for quick testing.
pysay/
├─ main.py # Runs all mock tasks sequentially
├─ sample.py # Minimal example using investigate.say(...)
├─ investigate.py # Profiling utilities (core of pysay)
└─ mock/
├─ computations.py # Busy-loop CPU work used by tasks
├─ task_01.py # Example task wrappers around computations.run(...)
├─ task_02.py
├─ ...
└─ task_12.py