About Quickly Measuring a Method Execution Time in Django Shell
You can use timeit
module to quickly measure a method execution time in Django shell, as follows:
1 2 3 4 5 6 7 |
|
The number
argument tells the timeit module to execute the callable 5 times and then calculates the average execution time.
Tips and Tricks Programming Optimization Performance Django 5.x Django 4.2 Django 3.2 Python 3
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.