Closed LouisAsh closed 4 years ago
Hello,
Thanks a lot for the kind words ! Happy that you find pprofile useful.
I just pushed a change to master which should fix this pattern - as you may guess from the breakage, this is the first time I've seen it.
Could you give this version a try, and tell me if you find any issue ?
Ah, that was a fairly fast response! I just installed the master version via pip
and it works just perfectly now.
I can't thank you enough for putting the effort into solving it that quickly: I was already able to spot a source of slow processing in one my projects just by looking at the pprofile outpus via KChaceGrind to test your update. Just awesome.
Thanks for testing. I just released pprofile 2.0.5 with this fix.
Happy profiling !
Since I have worked with
pprofile
in the past and find it the single best Python profiling tool (I particularly love how easy it is to use its Callgrind Profile Format output mode), I just tried it on a few projects I currently have to manage.However, code execution breaks, stating that several objects and libraries are not defined - all things that are inherited via
from __main__ import *
. Unfortunately, the specific setup of those projects do require the usage offrom __main__ import *
. Needless to say, everything works fine if executing the main entry point file viapython main.py
instead ofpprofile main.py
.Would it be at all possible to solve this and make
pprofile
recognize objects inherited viafrom __main__ import *
? I really hope so, as none of the alternative profiling tools goes as deep as yours.