This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 4d5ba1677b207d9f97522ca3b3ec02b3a0c11920
tree cad8b0374b0ce07091d510fc5c0baaea77473607
parent ca853c37205f646eb4219c65b123b6badfc251c9 parent 3f2cd6f5d9e6d5afb197aca117494891835a1bdc
tree cad8b0374b0ce07091d510fc5c0baaea77473607
parent ca853c37205f646eb4219c65b123b6badfc251c9 parent 3f2cd6f5d9e6d5afb197aca117494891835a1bdc
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Sun Dec 09 11:02:18 -0800 2007 | |
| |
README | Fri Mar 06 19:51:51 -0800 2009 | |
| |
Rakefile | Sun Dec 09 11:02:18 -0800 2007 | |
| |
init.rb | ||
| |
lib/ | ||
| |
query_reviewer_defaults.yml | Fri May 09 14:26:00 -0700 2008 | |
| |
tasks/ | Sun Dec 09 11:25:30 -0800 2007 | |
| |
test/ | Sun Dec 09 11:02:18 -0800 2007 |
README
QueryReviewer ============= QueryReviewer is an advanced SQL query analyzer. It accomplishes the following goals: * View all EXPLAIN output for all SELECT queries to generate a page (and optionally SHOW PROFILE ALL) * Rate a page's SQL usage into one of three categories: OK, WARNING, CRITICAL * Attach meaningful warnings to individual queries, and collections of queries * Display interactive summary on page All you have to do is install it. You can optionally run: rake query_reviewer:setup Which will create config/query_reviewer.yml, see below for what these options mean. If you don't have a config file, the plugin will use the default in vendor/plugins/query_reviewer. Configuration ============= The configuration file allows you to set configuration parameters shared across all rails environment, as well as overriding those shared parameteres with environment-specific parameters (such as disabling analysis on production!) * enabled: whether any output or query analysis is performed. Set this false in production! * inject_view: controls whether the output automatically is injected before the </body> in HTML output. * profiling: when enabled, runs the MySQL SET PROFILING=1 for queries longer than the warn_duration_threshold / 2.0 * production_data: whether the duration of a query should be taken into account (if you don't have real data, don't let query duration effect you!) * stack_trace_lines: number of lines of call stack to include in the "short" version of the stack trace * trace_includes_vendor: whether the "short" verison of the stack trace should include files in /vendor * trace_includes_lib: whether the "short" verison of the stack trace should include files in /lib * warn_severity: the severity of problem that merits "WARNING" status * critical_severity: the severity of problem that merits "CRITICAL" status * warn_query_count: the number of queries in a single request that merits "WARNING" status * critical_query_count: the number of queries in a single request that merits "CRITICAL" status * warn_duration_threshold: how long a query must take in seconds (float) before it's considered "WARNING" * critical_duration_threshold: how long a query must take in seconds (float) before it's considered "CRITICIAL" Example ======= If you disable the inject_view option, you'll need to manually put the analyzer's output into your view: <%= query_review_output %> Copyright (c) 2007-2008 Kongregate & David Stevenson, released under the MIT license








