Skip to content

Instantly share code, notes, and snippets.

@turnerd18
Created November 6, 2020 22:04
Show Gist options
  • Save turnerd18/370b02ba79365dbc46c4b2d58e32469c to your computer and use it in GitHub Desktop.
Save turnerd18/370b02ba79365dbc46c4b2d58e32469c to your computer and use it in GitHub Desktop.
Python stopwatch timing
tic = time.perf_counter()
products_json = [foo.to_json2() for foo in foos]
toc = time.perf_counter()
print(f"Hydrated foos: {toc - tic:0.4f} seconds")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment