My patch to record the time spent in the librarian client downloading files to the appservers; in memcache set and gets; and in sending email has landed.
This means several things. If a page is slow, and it was spending time talking to memcache, or sending email, or grabbing files from the librarian; these activities will now appear in the OOPS 'database statements' section. The new data has been exposed in the existing structure for ease of implementation. For instance, a page that grabs a librarian file may show: 1 132 15 librarian-connection http://localhost:58000/93/hi.txt 2 148 30 librarian-read http://localhost:58000/93/hi.txt Indicating that it connected to the librarian at 132 ms into the request, which took 15ms, and then spent 30ms doing a read. This should make some OOPSes like the 'convert to question' much easier to debug - the huge python time black box should now show (in the convert to question case) a lot of emails being sent: and we can see how long it takes to send each one. Its my hope that this will make it a lot easier for everyone trying to debug performance problems via OOPS reports where the database time is sensible. Finally, the new API is in lp.services.timeline.requesttimeline. Please use it if you're adding anything to the system which can block (or even just regular python calls that might take unreasonable amounts of time). Note that it does not support nested calls at the moment, so you can't record a function that uses anything that is put in the timeline. This is also referenced from https://dev.launchpad.net/ArchitectureGuide#transparency. Also, if you know of anything not being recorded please add it in, or let me know and I'll help you add it - or even do it if you promise to review the patch :P. The current list of things recorded in the request timeline is: - sql query execution - memcache get/set - library client gets (I skipped uploads as AFAIK they are very few. Its a low-pri TODO). - sending email. Cheers, Rob _______________________________________________ Mailing list: https://launchpad.net/~launchpad-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp

