##// END OF EJS Templates
Warnings if there is a bias in timings due to some side-effects of the method
MechCoder -
Show More
@@ -1016,6 +1016,10 b' python-profiler package from non-free.""")'
1016 all_runs = timer.repeat(repeat, number)
1016 all_runs = timer.repeat(repeat, number)
1017 best = min(all_runs) / number
1017 best = min(all_runs) / number
1018 if not quiet :
1018 if not quiet :
1019 worst = max(all_runs) / number
1020 if worst > 4 * best:
1021 warn("Worst time is %0.2f times that of the best. Timings may "
1022 "be biased." % (worst / best))
1019 print(u"%d loops, best of %d: %s per loop" % (number, repeat,
1023 print(u"%d loops, best of %d: %s per loop" % (number, repeat,
1020 _format_time(best, precision)))
1024 _format_time(best, precision)))
1021 if tc > tc_min:
1025 if tc > tc_min:
General Comments 0
You need to be logged in to leave comments. Login now