Created
June 10, 2015 17:51
-
-
Save atiaxi/04ed3a5c6b4190ac9cdd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@contextmanager | |
def timeit(event) | |
atime = time.time() | |
yield | |
btime = time.time() | |
logger.debug("%s took %d" % (event, btime-atime)) | |
with timeit("EmailAddressClaimantHistory"): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment