Added more timing. Fixed whitification.

This commit is contained in:
Guilhem Lavaux 2014-06-12 09:45:46 +02:00
parent 401ddc8a8b
commit a6b08dfe8f
7 changed files with 95 additions and 30 deletions

View file

@ -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

View file

@ -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