dan-manges / query_stats

A Rails plugin to track database queries.

This URL has Read+Write access

query_stats / README.rdoc
08da5080 » daniel.manges 2006-09-21 moved plugin inside query_s... 1 = Query Stats Plugin
2
529020d0 » dan-manges 2008-07-12 updating readme, give db ru... 3 The Query Stats plugin tracks database queries.
0b906bcf » daniel.manges 2008-05-01 update the readme, ignore r... 4
08da5080 » daniel.manges 2006-09-21 moved plugin inside query_s... 5 == Usage
6
f1dbf53e » daniel.manges 2007-02-14 updated documentation 7 Use the "queries" helper or controller method to access data on the queries.
8 See the documentation on QueryStats::Holder for functionality.
9
10 You can easily display statistics in your page footer, such as:
11 Queries in Controller: <%= queries.count_with_label :controller %>
12 Queries in View: <%= queries.count_with_label :view %>
13 Query Time: <%= queries.runtime %>
08da5080 » daniel.manges 2006-09-21 moved plugin inside query_s... 14
f1dbf53e » daniel.manges 2007-02-14 updated documentation 15 == Logging
6f5bc6eb » daniel.manges 2006-09-22 fixed bug which set label t... 16
f1dbf53e » daniel.manges 2007-02-14 updated documentation 17 QueryStats adds the number of queries to the log in the DB section:
18 Completed in 0.00642 (155 reqs/sec) | Rendering: 0.00228 (35%) | DB: 0.00247 (38%) 6 queries | 200 OK [http://test.host/]
529020d0 » dan-manges 2008-07-12 updating readme, give db ru... 19
20 == Response Headers
21
22 * X-QueryCount will be set to the number of queries
23 * X-QueryRuntime will be set to the db runtime
24
48c44743 » dan-manges 2008-08-24 minor cleanup 25 == Requirements
26
27 Tests pass with:
d6156be5 » dan-manges 2008-08-24 tests also pass w/ mysql & ... 28 * Rails: 1.2.6, 2.0.2, 2.1.0
29 * Adapters: sqlite3, mysql
48c44743 » dan-manges 2008-08-24 minor cleanup 30
31 == Maintainer
0b906bcf » daniel.manges 2008-05-01 update the readme, ignore r... 32
33 * Dan Manges
48c44743 » dan-manges 2008-08-24 minor cleanup 34
35 == Contributors
36
0b906bcf » daniel.manges 2008-05-01 update the readme, ignore r... 37 * Guillaume Dufloux
38
39 == License
08da5080 » daniel.manges 2006-09-21 moved plugin inside query_s... 40
0b906bcf » daniel.manges 2008-05-01 update the readme, ignore r... 41 Released under the MIT license.