Jifty::Plugin::SQLQueries(3pm)

Jifty::Plugin::SQLQueries3pm

Inspect your application's sql queries

Overview

This plugin will log each SQL query, its duration, its bind parameters, and its stack trace. Such reports are available at:

    http://your.app/__jifty/admin/requests

Usage

Add the following to your site_config.yml

 framework:
   Plugins:
     - SQLQueries: {}

You can turn on and off the stacktrace, as well as an "EXPLAIN" of each query, using options to the plugin:

 framework:
   Plugins:
     - SQLQueries:
         stacktrace: 0
         explain: 1

The plugin defaults to logging the stack trace, but not the explain.

Methods

init

Sets up a "post_init" hook.

inspect_before_request

Clears the query log so we don't log any unrelated previous queries.

inspect_after_request

Stash the query log.

inspect_render_summary

Display how many queries and their total time.

inspect_render_analysis

Render a template with all the detailed information.

post_init

Tells Jifty::DBI to log queries in a way that records stack traces.

prereq_plugins

This plugin depends on Jifty::Plugin::RequestInspector.

Releases

2 releases since Debian 6.0 (Squeeze); the text changed 1 time.

  1. 6.0
  2. 7

From libjifty-perl 1.10518+dfsg-2 in Debian 7 (Wheezy). Parsed by carta from the page's man source.