Open source adaptive Python performance profiler, implemented as an extension module written in Rust.
Provides the accuracy of a tracing profiler (such as cProfile) with the low overhead of a statistical profiler (such as statprof).
This is an open source reimplementation of the method described in the "Exploring the Use of Learning Algorithms for Efficient Performance Profiling" paper.
You need Make, Python 3 and the Rust toolset.
You can install the required Python packages using the requirements file.
Use the associated Makefile to build the Rust module:
make build
To run the profiler benchmarks, use:
make run
In order for statistics such as cache misses to be computed, you need to configure the kernel to give unprivileged programs access to the hardware performance counters:
echo '1' | sudo tee /proc/sys/kernel/perf_event_paranoid
The code is available under the permissive MIT license.