dan-manges / query_stats
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
aa88196
query_stats / README.rdoc
| 08da5080 » | daniel.manges | 2006-09-21 | 1 | = Query Stats Plugin | |
| 2 | |||||
| 529020d0 » | dan-manges | 2008-07-12 | 3 | The Query Stats plugin tracks database queries. | |
| 0b906bcf » | daniel.manges | 2008-05-01 | 4 | ||
| 08da5080 » | daniel.manges | 2006-09-21 | 5 | == Usage | |
| 6 | |||||
| f1dbf53e » | daniel.manges | 2007-02-14 | 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 | 14 | ||
| f1dbf53e » | daniel.manges | 2007-02-14 | 15 | == Logging | |
| 6f5bc6eb » | daniel.manges | 2006-09-22 | 16 | ||
| f1dbf53e » | daniel.manges | 2007-02-14 | 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 | 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 | 25 | == Requirements | |
| 26 | |||||
| 27 | Tests pass with: | ||||
| d6156be5 » | dan-manges | 2008-08-24 | 28 | * Rails: 1.2.6, 2.0.2, 2.1.0 | |
| 29 | * Adapters: sqlite3, mysql | ||||
| 48c44743 » | dan-manges | 2008-08-24 | 30 | ||
| 31 | == Maintainer | ||||
| 0b906bcf » | daniel.manges | 2008-05-01 | 32 | ||
| 33 | * Dan Manges | ||||
| 48c44743 » | dan-manges | 2008-08-24 | 34 | ||
| 35 | == Contributors | ||||
| 36 | |||||
| 0b906bcf » | daniel.manges | 2008-05-01 | 37 | * Guillaume Dufloux | |
| 38 | |||||
| 39 | == License | ||||
| 08da5080 » | daniel.manges | 2006-09-21 | 40 | ||
| 0b906bcf » | daniel.manges | 2008-05-01 | 41 | Released under the MIT license. | |
