Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Rails plugin to track database queries.
Ruby
tree: 2f61aa5f8e

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
CHANGELOG
README
Rakefile
init.rb
install.rb

README

= Query Stats Plugin

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.

== Requirements

* Rails >= 1.2

Does not work with Rails 2.0 (yet).

== 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/]
  
== Contributors

* Dan Manges
* Guillaume Dufloux

== License

Released under the MIT license.
Something went wrong with that request. Please try again.