djangosnippets.org: Latest snippets tagged with 'profiling'https://djangosnippets.org/tags/profiling/2013-10-27T17:34:57.073456-05:00Extended Profiling and Timing Middleware using cProfile
2013-10-27T17:34:57.073456-05:00dstrykehttps://djangosnippets.org/snippets/2998/<p>Modified version of <a href="http://djangosnippets.org/snippets/605/">Extended Profiling Middleware</a></p>
Freely redistributableFetching list of SQL queries executed so far for all requests
2011-12-18T04:43:31.268920-06:00hiddentaohttps://djangosnippets.org/snippets/2632/<p>These snippets together give you the ability to view all Django SQL queries executed across all incoming requests by visiting a particular URL (<code>/profiling</code> in the example). This is useful when developing with the Django test server.</p>
<p>This is useful if most of the incoming requests are AJAX requests, …</p>
Freely redistributableTiming Django Requests
2008-06-12T09:38:04.836610-05:00metajackhttps://djangosnippets.org/snippets/797/<p>Adds an 'X-Django-Request-Time' HTTP response header that times how long django spent processing the request.</p>
Freely redistributableCreate breakpoints to time code at
2008-06-04T10:54:04.231105-05:00menendezhttps://djangosnippets.org/snippets/783/<p>Include in your code like this:</p>
<p>t=Timer()</p>
<p>Then use it like this:</p>
<p>t.tick('Some optional description')</p>
<p>It will output the time spent between the tick and the previous tick (or inception) and the total time spent since it began tracking time. Can be placed multiple times in a long segment of …</p>
Freely redistributable