About Measuring Code Execution Time
Check how long it takes to run a snippet of code in seconds like this:
import time
start_time = time.perf_counter()
# here goes code in question...
end_time = time.perf_counter()
elapsed_time = end_time - start_time
print(f"Elapsed time: {elapsed_time} s")
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django App for You
Django GDPR Cookie Consent app
For Django websites that use cookies.
Django App for You