Flameprof is a Python library and command-line tool that generates interactive SVG flame graphs from `cProfile` statistics. It visualizes function call hierarchies and their CPU time consumption, offering a compact and understandable alternative to raw `cProfile` output or tools like `gprof2dot`. The current version is 0.4. Releases are sporadic, with major updates occurring infrequently.
pip install flameprofVerified import paths — ran on the pinned version, not inferred.
First, create a Python script (`my_app.py`) that you wish to profile. Use Python's built-in `cProfile` module to run your application and save the profiling data to a `.prof` file. Then, use the `flameprof` command-line tool to convert this `.prof` file into an interactive SVG flame graph. Open the generated SVG file in a web browser to view the visualization.
Always invoke `flameprof` from your terminal or shell scripts after generating a cProfile output file.
Ensure your profiling data is in the `cProfile` format. If you need to profile other sources, consider converting their output to a compatible format or using different flame graph generators.
If encountering these errors, try simplifying the profiled code or updating to the latest `flameprof` version. For critical debugging, consider alternative profiling visualization tools if the issue persists.
No dependency data recorded yet.