Skip to content

Commit

Permalink
logging year and model with the time it took
Browse files Browse the repository at this point in the history
  • Loading branch information
fscottfoti committed Aug 6, 2014
1 parent 70768ba commit 68bbeb8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions urbansim/sim/simulation.py
Expand Up @@ -1178,11 +1178,11 @@ def run(models, years=None, data_out=None, out_interval=1):
model = get_model(model_name)
t2 = time.time()
model()
print("Time to execute model = %.3fs" % (time.time()-t2))
logger.info("Time to execute model = %.3fs" % (time.time()-t2))
print("Time to execute model '{}': {:.2f}s".format(
model_name, time.time()-t2))

print("Time to execute year = %.3fs" % (time.time()-t1))
logger.info("Time to execute year = %.3fs" % (time.time()-t1))
print("Total time to execute{}: {:.2f}s".format(
" year %d" % year if year is not None else '', time.time()-t1))
year_counter += 1

if data_out:
Expand Down

0 comments on commit 68bbeb8

Please sign in to comment.