Scalene is a high-performance CPU, GPU and memory profiler for Python that does a number of things that other Python profilers do not and cannot do. It runs orders of magnitude faster than other profilers while delivering far more detailed information.
Scalene has all of the following features, many of which only Scalene supports:
- Lines or functions: does the profiler report information only for entire functions, or for every line -- Scalene does both.
- Unmodified Code: works on unmodified code.
- Threads: supports Python threads.
- Multiprocessing: supports use of the
multiprocessing
library -- Scalene only - Python vs. C time: breaks out time spent in Python vs. native code (e.g., libraries) -- Scalene only
- System time: breaks out system time (e.g., sleeping or performing I/O) -- Scalene only
- Profiles memory: reports memory consumption per line / function
- GPU: reports time spent on an NVIDIA GPU (if present) -- Scalene only
- Memory trends: reports memory use over time per line / function -- Scalene only
- Copy volume: reports megabytes being copied per second -- Scalene only
- Detects leaks: automatically pinpoints lines responsible for likely memory leaks -- Scalene only
Scalene prints annotated source code for the program being profiled
(as text, JSON (--json
), or HTML (--html
)) and any modules it
uses in the same directory or subdirectories (you can optionally have
it --profile-all
and only include files with at least a
--cpu-percent-threshold
of time).
No comments:
Post a Comment