I've always used Python's timeit
library to time my little Python programs.
Now I'm developing a Django app and I was wondering how to time my Django functions, especially queries.
For example, I have a def index(request)
in my views.py which does a bunch of stuff when I load the index page.
How can I use timeit
to time this particular function without altering too much my existing functions?