Added more timing. Fixed whitification.
This commit is contained in:
parent
401ddc8a8b
commit
a6b08dfe8f
7 changed files with 95 additions and 30 deletions
|
@ -4,4 +4,4 @@ from grafic import writeGrafic, writeWhitePhase, readGrafic, readWhitePhase
|
|||
from borg import read_borg_vol
|
||||
from cic import cicParticles
|
||||
from simu import loadRamsesAll, simpleWriteGadget, SimulationBare
|
||||
from timing import timeit
|
||||
from timing import timeit, timeit_quiet
|
||||
|
|
|
@ -13,3 +13,16 @@ def timeit(method):
|
|||
|
||||
return timed
|
||||
|
||||
def timeit_quiet(method):
|
||||
|
||||
def timed(*args, **kw):
|
||||
ts = time.time()
|
||||
result = method(*args, **kw)
|
||||
te = time.time()
|
||||
|
||||
print '%r %2.2f sec' % \
|
||||
(method.__name__, te-ts)
|
||||
return result
|
||||
|
||||
return timed
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue