Metrics filter - MySQL
The Metrics filter collects information about what SQL commands are being run, how long they take to execute, and how much data they return.
This filter is a duplex filter because it needs to collect information both from the client and the server. For instance, when the client sends a Command packet of type QUERY or STMT_PREPARE, this filter makes a note of it and starts a timer. It will then keep track of ResultsetRow packets being sent back as a result of this query.
This filter can output a summary of what it has seen so far (since the Gallium Data engine started) either in a file, or to a logger, or to standard out.
Note that the SQL statements are "cleaned up" for display, meaning extra spaces and line breaks are removed. This is only for display, obviously this filter does not affect the actual statements.
This filter takes the following parameters:
Output type : can be either file (output to a file), log (output to a logger as info messages), or out (output to standard out).
Output name : if the output is set to file, this should be the name of the file to write to. If the output is set to log, this should be the name of the logger to write to.
Use timestamp : if the output is set to file, selecting this option will cause a timestamp to be added to the file name.
Output frequency : how often to output a report, in minutes. This is a minimum: if there is no activity, no report will be output.
Max statements : this filter keeps track of the top 200 statements by default, you can change that number here.
Max reports : when outputting a report, only the top 10 statements will be shown by default. You can change that number here.
Typical output from this filter: