Jifty::Plugin::SQLQueries
SQL query logging and reporting for your Jifty app
Add the following to your site_config.yml
framework: 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
This makes sure that each request is wrapped with query logging.
This sets up Jifty::DBI's query logging, and is called at the end of Jifty->new
Jifty->new
Clears the SQL log so you only get the request's queries
Logs the queries made (at level DEBUG)
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)
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 2007 Best Practical Solutions
This is free software and may be modified and distributed under the same terms as Perl itself.
To install Jifty, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Jifty
CPAN shell
perl -MCPAN -e shell install Jifty
For more information on module installation, please visit the detailed CPAN module installation guide.