Skip to content

Commit

Permalink
Merge pull request #7 from exarkun/6.python3-benchutil
Browse files Browse the repository at this point in the history
Some Python3-related fixes
  • Loading branch information
tpltnt authored Dec 25, 2022
2 parents 12dad0b + 752d1a1 commit 488a25d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyutil/benchutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@

import cProfile, operator, time
from decimal import Decimal as D
import thread
import threading as thread

#from pyutil import jsonutil as json

Expand Down Expand Up @@ -178,7 +178,7 @@ def rep_bench(func, n, runtime=None, initfunc=None, runreps=None, runiters=10, p
if best < (worstemptymeasure * MARGINOFERROR):
raise BadMeasure("Apparently simply invoking an empty Python function can take as long as %0.10f seconds, and we were running reps for only about %0.10f seconds. So the measurement of the runtime of the code under benchmark is not reliable. Please pass a higher number for the 'runtime' argument to rep_bench().")

m = len(tls)/4
m = len(tls)//4
if m > 0:
mthbest = tls[m-1][0]
mthworst = tls[-m][0]
Expand Down

0 comments on commit 488a25d

Please sign in to comment.