Skip to content

scope-profiler

Install from PyPI with

pip install scope-profiler

Mark the regions you want to measure, then run the script through the CLI to save an HDF5 profile and print a summary:

import scope_profiler as sp
with sp.session():
@sp.profile("main")
def main():
with sp.region("work"):
sum(range(100))
main()
scope-profiler run app.py
scope-profiler inspect profiling_data.h5 --sort total

The same API supports MPI, native code instrumentation, tags, sampling, pytest profiling, and notebook workflows. Results can be explored with the profiling catalogue.

Check out the code on GitHub!

Links:

From the documentation

Last updated: