Closed rafaellehmkuhl closed 4 years ago
If you are running pprofile as a command, you will want to check --exclude
& --include
options (see pprofile --help
).
If you are using pprofile as a module, you can pass a list of modules "filenames" (module.__file__
) to the filename
argument of annotate
or callgrind
method (depending on the output format you need). You can build such list by filtering the list of modules pprofile discovered during profiling (IOW, those which were executed during profiling) by calling getFilenameSet
.
On my software I have several modules that I built myself, and so I want to profile them, but I also use some standard modules (like serial, json, os, etc) that I don't want to profile. Those std modules make the output enormous and difficult to analyze. Is there a way to remove them from the output?