Skip to content

Instantly share code, notes, and snippets.

View rodrev's full-sized avatar

Roddie Reventar rodrev

View GitHub Profile
@rodrev
rodrev / timer.py
Last active August 29, 2015 14:10
time your python program (or parts of it) easily
"""
Adapted from code by Huy Nguyen: http://www.huyng.com/posts/python-performance-analysis/
Roddie Reventar, 2014
Displays elapsed time.
Fast times look like:
>>> 1.968050e-02 seconds
Slow times (large data) look like:
>>> 0h 10m 32s