Rechercher une page de manuel
Jifty::Plugin::SQLQueries.3pm
Langue: en
Version: 2008-08-12 (debian - 07/07/09)
Section: 3 (Bibliothèques de fonctions)
NAME
Jifty::Plugin::SQLQueries - SQL query logging and reporting for your Jifty appDESCRIPTION
SQL query logging and reporting for your Jifty appUSAGE
Add the following to your site_config.ymlframework: Plugins: - SQLQueries: {}
This makes the following URLs available:
View the top-level query report (how many queries each request had)
http://your.app/__jifty/admin/queries
View the top-level query report, including zero-query requests
http://your.app/__jifty/admin/queries/all
View an individual request's detailed query report (which queries were made, where, how long they took, etc)
http://your.app/__jifty/admin/queries/3
init
This makes sure that each request is wrapped with query logging.
post_init
This sets up Jifty::DBI's query logging, and is called at the end of "Jifty->new"
before_request
Clears the SQL log so you only get the request's queries
after_request
Logs the queries made (at level DEBUG)
halo_pre_template
Log any queries made to the previous template. Also, keep track of whatever queries made so the rest of the plugin can see them (since we clear the log)
halo_post_template
Log any queries made to the current template. Also, keep track of whatever queries made so the rest of the plugin can see them (since we clear the log)
XXX: can this somehow be refactored into one function? If the same pattern occurs elsewhere I'll look into it.
COPYRIGHT AND LICENSE
Copyright 2007 Best Practical SolutionsThis is free software and may be modified and distributed under the same terms as Perl itself.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre