Query Stats plugin

Plugin details

The Query Stats plugin helps track database queries and performance. It helps developers know the performance of their interaction with databases without constantly watching the logs.

Websitehttp://code.google.com/p/query-stats/ Repositoryhttp://query-stats.googlecode.com/svn/trunk/query_stats/ Author Dan Manges Tags query LicenseRuby's (MIT)

Documentation

Install the plugin:
ruby script/plugin install http://query-stats.googlecode.com/svn/trunk/query_stats/

Usage
=======

Use the "queries" helper or controller method to access data on the queries.
See the documentation on QueryStats::Holder for functionality.

You can easily display statistics in your page footer, such as:

  Queries in Controller: <%= queries.count_with_label :controller %>
  Queries in View:       <%= queries.count_with_label :view %>
  Query Time:            <%= queries.runtime %>



Logging
==========

QueryStats adds the number of queries to the log in the DB section:

  Completed in 0.00642 (155 reqs/sec) | Rendering: 0.00228 (35%) | DB: 0.00247 (38%) 6 queries | 200 OK [http://test.host/]

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (1 older version) | Last edited by: scott, 11 months ago