|
@@ -2959,13 +2959,14 @@ bias=-1
|
|
|
def quickProfile(name="unnamed"):
|
|
def quickProfile(name="unnamed"):
|
|
|
global bias
|
|
global bias
|
|
|
if(base.config.GetBool("use-profiler",0)):
|
|
if(base.config.GetBool("use-profiler",0)):
|
|
|
- print "Calibrating profiler"
|
|
|
|
|
if bias == -1:
|
|
if bias == -1:
|
|
|
- prof.Profile.bias = prof.Profile().calibrate(10000)
|
|
|
|
|
- import pstats
|
|
|
|
|
|
|
+ print "Calibrating profiler"
|
|
|
|
|
+ bias = prof.Profile().calibrate(100000)
|
|
|
|
|
+ print "Bias is: ",bias
|
|
|
|
|
+ prof.Profile.bias =bias
|
|
|
|
|
|
|
|
def f8(x):
|
|
def f8(x):
|
|
|
- return ("%"+"8.%df"%base.config.GetBool("profile-decimals",3)) % x
|
|
|
|
|
|
|
+ return ("%"+"8.%df"%base.config.GetInt("profile-decimals",3)) % x
|
|
|
pstats.f8=f8
|
|
pstats.f8=f8
|
|
|
def profileDecorator(f):
|
|
def profileDecorator(f):
|
|
|
if(not base.config.GetBool("use-profiler",0)):
|
|
if(not base.config.GetBool("use-profiler",0)):
|