5

What sort of stuff is going on in the "elapsed time" value in the Django Debug Toolbar? I assume CPU time is a part of it, but what else is going on? The more explicit you can be, the more it'll help!!

    Resource          Value
    User CPU time     110.000 msec
    System CPU time   50.000 msec
    Total CPU time    160.000 msec
    Elapsed time      1855.731 msec
    Context switches  74 voluntary, 80 involuntary

FYI: I've seen this but still don't really get what's going on.

Community
  • 1
  • 1
Matt Parrilla
  • 3,171
  • 6
  • 35
  • 54

1 Answers1

3

the elapsed time is the time it's taken to complete the request, that includes server processing and client-side rendering of the html/css/js

c4urself
  • 4,207
  • 21
  • 32
  • The elapsed time is only computed on the server side, it doesn't include client-side rendering. You can see that by comparing the time your browser shows for rendering a request in its developer tools against 'elapsed time' in Django Debug Toolbar. You will see that the time given in the browser is always higher. You can also look at https://github.com/jazzband/django-debug-toolbar/blob/main/debug_toolbar/panels/timer.py and see that 'elapsed time' is completely calculated on the backend. – jnns Apr 05 '22 at 08:34