Files
Mastering-Python-2e-code_2/CH_12_performance/T_04_profiler_calibration.py
T
2022-05-05 18:25:55 +02:00

22 lines
483 B
Python

import profile
if __name__ == '__main__':
profiler = profile.Profile()
for i in range(10):
print(profiler.calibrate(100000))
##############################################################################
import profile
# The number here is bias calculated earlier
profile.Profile.bias = 9.809351906482531e-07
##############################################################################
import profile
profiler = profile.Profile(bias=9.809351906482531e-07)