Reports

Antony Dovgal edited this page Mar 16, 2015 · 11 revisions

There are two types of reports available:

  1. basic reports - request data grouped by different fields
  2. tag reports - grouped by tag values

Table of Contents

General info on reports

Reports are just 'virtual' tables that represent pre-processed raw data in Pinba. Running queries on raw data is very expensive and not quite reliable, since the data keeps updating in realtime.

You can create arbitrary number of custom reports (of any existing type) - to do that just create the table and run first SELECT query on it, the initial report state will be generated (that might take some time, be patient) and the report will be kept updated from then on. Please remember that all the report table fields are hardcoded, you can't change their order and/or type, but table or field names are up to your choice. ENGINE and COMMENT attributes are also essential - creating a table with a different ENGINE value means that Pinba won't even know it exists; COMMENT is used to specify report type and parameters.

Report generator

Since the structure of Pinba reports becomes more and more complex, a script to automate this task has been added.
Feel free to try scripts/table_generator.php in console.

Conditions

At the moment all reports support the following conditions:

  • min_time - minimal request time
  • max_time - maximal request time
Examples:
info report including data only from the requests that took more than 0.5 sec
 COMMENT='info::min_time=0.5'

info report including data only from the requests that took more than 0.5 sec, but less than 1 sec:

 COMMENT='info::min_time=0.5,max_time=1'

Request tags

Available since version 1.1.0.

Request tags are used to differentiate requests of different types. A request my have an arbitrary number of tags.

Example:
info report including data only from the requests from Chrome browser:

 COMMENT='info::tag.browser=chrome'

info report including data only from the requests from Chrome browser that took more than 0.1 sec:

 COMMENT='info::tag.browser=chrome,min_time=0.1'

of course, for this to work you need to set 'browser' tag to 'chrome' in the script (using pinba_tag_set() for PHP).

Percentiles

Available since version 1.1.0.

Percentiles are additional fields that you may add to the reports. Median is the 50th percentile and it's hardcoded in all reports, but if you want to add other percentiles, use the syntax described below.

Example:
info report with 95th and 75th percentiles:

 COMMENT='info:::75,95'

info report including data only from the requests from Chrome browser that took more than 0.1 sec with 75th and 95th percentiles:

 COMMENT='info::tag.browser=chrome,min_time=0.1:75,95'

Of course, in order to see these percentiles you also have to add two new fields when creating the table:

CREATE TABLE `info_01_browser_chrome_75_95` (
	`req_count` int(11) DEFAULT NULL,
	`time_total` float DEFAULT NULL,
	`ru_utime_total` float DEFAULT NULL,
	`ru_stime_total` float DEFAULT NULL,
	`time_interval` int(11) DEFAULT NULL,
	`kbytes_total` float DEFAULT NULL,
	`memory_footprint` float DEFAULT NULL,
	`req_time_median` float DEFAULT NULL,
	`p75` float DEFAULT NULL,
	`p95` float DEFAULT NULL
) ENGINE=PINBA COMMENT='info::tag.browser=chrome,min_time=0.1:75,95';

Request tags, conditions and percentiles can be freely combined.

Histograms

Available since version 1.1.0.

Histogram is a special kind of report that helps to dive a bit deeper than usual reports allow. Each report is an array of data, where each element in turn contains a so-called an array of values representing something similar to histogram used in modern DSLRs. This array has 512 elements and at the moment this number cannot be changed in userspace.

The histograms in DSLRs are used to show how many pixels of a certain color there are on the image, so on X-axis there's color and on Y-axis there's number of pixels. Histograms in Pinba have request time or timer value on X-axis and number of requests/hits on Y-axis. Obvius usage for histograms in Pinba is to see how timer value or request time is distributed over a number of records.

You can access histograms of a report by creating table with the following structure:

CREATE TABLE `example_histogram` (
	`index_value` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
	`segment` int(11) DEFAULT NULL,
	`time_value` float DEFAULT NULL,
	`cnt` int(11) DEFAULT NULL,
	`percent` float DEFAULT NULL,
	KEY `index_value` (`index_value`(85))
) ENGINE=PINBA COMMENT='hv.%TABLE_COMMENT%';
Replace %TABLE_COMMENT% with all the parameters of the parent report.

After that use the following request to list all histogram entries of a specified report entry:

 SELECT
       *
   FROM
       example_histogram
  WHERE
       index_value="%INDEX_VALUE%"

Use index value from the appropriate record in the report (notice that all the reports now have index_value column).

By default histograms have a maximum value size equal to the value of pinba_histogram_max_time variable in my.cnf (10 seconds by default). You might want to set a custom value (1 sec in this example) for a report by adding histogram_max_time condition to the report this way:

 COMMENT='info::histogram_max_time=1'

This way you'll get much more fine-grained histogram as it'll contain entries, each representing 1/512 of a second. Or, if your requests might take a lot of time, you might want to increase the max value instead (to 30 sec in this example):

 COMMENT='info::histogram_max_time=30'

Basic reports

info

The most basic report of all. Table structure:

 +------------------+--------------+------+-----+---------+-------+
 | Field            | Type         | Null | Key | Default | Extra |
 +------------------+--------------+------+-----+---------+-------+
 | req_count        | int(11)      | YES  |     | NULL    |       |
 | time_total       | float        | YES  |     | NULL    |       |
 | ru_utime_total   | float        | YES  |     | NULL    |       |
 | ru_stime_total   | float        | YES  |     | NULL    |       |
 | time_interval    | int(11)      | YES  |     | NULL    |       |
 | kbytes_total     | float        | YES  |     | NULL    |       |
 | memory_footprint | float        | YES  |     | NULL    |       |
 | req_time_median  | float        | YES  |     | NULL    |       |
 +------------------+--------------+------+-----+---------+-------+

This is what you would theoretically get with this query (but you most likely won't because the data is changing while you're reading it. There's also no MEDIAN() function in MySQL):

SELECT 
  COUNT(*) as req_count, 
  SUM(time) as time_total, 
  SUM(ru_utime) as ru_utime_total, 
  SUM(ru_stime) as ru_stime_total,
  MAX(timestamp) - MIN(timestamp) as time_interval,  
  SUM(doc_size) as kbytes_total,
  SUM(memory_footprint) as memory_footprint,
  MEDIAN(req_time_median) as req_time_median
FROM request

You might also notice that there is no such field as timestamp in request table. True, it just doesn't make any sense to store it.

report_by_script_name

Request data grouped by script_name.

Table structure:

 +--------------------------+--------------+------+-----+---------+-------+
 | Field                    | Type         | Null | Key | Default | Extra |
 +--------------------------+--------------+------+-----+---------+-------+
 | req_count                | int(11)      | YES  |     | NULL    |       |
 | req_per_sec              | float        | YES  |     | NULL    |       |
 | req_time_total           | float        | YES  |     | NULL    |       |
 | req_time_percent         | float        | YES  |     | NULL    |       |
 | req_time_per_sec         | float        | YES  |     | NULL    |       |
 | ru_utime_total           | float        | YES  |     | NULL    |       |
 | ru_utime_percent         | float        | YES  |     | NULL    |       |
 | ru_utime_per_sec         | float        | YES  |     | NULL    |       |
 | ru_stime_total           | float        | YES  |     | NULL    |       |
 | ru_stime_percent         | float        | YES  |     | NULL    |       |
 | ru_stime_per_sec         | float        | YES  |     | NULL    |       |
 | traffic_total            | float        | YES  |     | NULL    |       |
 | traffic_percent          | float        | YES  |     | NULL    |       |
 | traffic_per_sec          | float        | YES  |     | NULL    |       |
 | script_name              | varchar(128) | YES  |     | NULL    |       |
 | memory_footprint_total   | float        | YES  |     | NULL    |       |
 | memory_footprint_percent | float        | YES  |     | NULL    |       |
 | req_time_median          | float        | YES  |     | NULL    |       |
 | index_value              | varchar(256) | YES  |     | NULL    |       |
 +--------------------------+--------------+------+-----+---------+-------+

report_by_server_name

Request data grouped by server_name.

 +--------------------------+--------------+------+-----+---------+-------+
 | Field                    | Type         | Null | Key | Default | Extra |
 +--------------------------+--------------+------+-----+---------+-------+
 | req_count                | int(11)      | YES  |     | NULL    |       |
 | req_per_sec              | float        | YES  |     | NULL    |       |
 | req_time_total           | float        | YES  |     | NULL    |       |
 | req_time_percent         | float        | YES  |     | NULL    |       |
 | req_time_per_sec         | float        | YES  |     | NULL    |       |
 | ru_utime_total           | float        | YES  |     | NULL    |       |
 | ru_utime_percent         | float        | YES  |     | NULL    |       |
 | ru_utime_per_sec         | float        | YES  |     | NULL    |       |
 | ru_stime_total           | float        | YES  |     | NULL    |       |
 | ru_stime_percent         | float        | YES  |     | NULL    |       |
 | ru_stime_per_sec         | float        | YES  |     | NULL    |       |
 | traffic_total            | float        | YES  |     | NULL    |       |
 | traffic_percent          | float        | YES  |     | NULL    |       |
 | traffic_per_sec          | float        | YES  |     | NULL    |       |
 | server_name              | varchar(64)  | YES  |     | NULL    |       |
 | memory_footprint_total   | float        | YES  |     | NULL    |       |
 | memory_footprint_percent | float        | YES  |     | NULL    |       |
 | req_time_median          | float        | YES  |     | NULL    |       |
 | index_value              | varchar(256) | YES  |     | NULL    |       |
 +--------------------------+--------------+------+-----+---------+-------+

report_by_hostname

Request data grouped by hostname.

 +--------------------------+--------------+------+-----+---------+-------+
 | Field                    | Type         | Null | Key | Default | Extra |
 +--------------------------+--------------+------+-----+---------+-------+
 | req_count                | int(11)      | YES  |     | NULL    |       |
 | req_per_sec              | float        | YES  |     | NULL    |       |
 | req_time_total           | float        | YES  |     | NULL    |       |
 | req_time_percent         | float        | YES  |     | NULL    |       |
 | req_time_per_sec         | float        | YES  |     | NULL    |       |
 | ru_utime_total           | float        | YES  |     | NULL    |       |
 | ru_utime_percent         | float        | YES  |     | NULL    |       |
 | ru_utime_per_sec         | float        | YES  |     | NULL    |       |
 | ru_stime_total           | float        | YES  |     | NULL    |       |
 | ru_stime_percent         | float        | YES  |     | NULL    |       |
 | ru_stime_per_sec         | float        | YES  |     | NULL    |       |
 | traffic_total            | float        | YES  |     | NULL    |       |
 | traffic_percent          | float        | YES  |     | NULL    |       |
 | traffic_per_sec          | float        | YES  |     | NULL    |       |
 | hostname                 | varchar(32)  | YES  |     | NULL    |       |
 | memory_footprint_total   | float        | YES  |     | NULL    |       |
 | memory_footprint_percent | float        | YES  |     | NULL    |       |
 | req_time_median          | float        | YES  |     | NULL    |       |
 | index_value              | varchar(256) | YES  |     | NULL    |       |
 +--------------------------+--------------+------+-----+---------+-------+

report_by_server_and_script

Request data grouped by server_name and script_name.

 +------------------+--------------+------+-----+---------+-------+
 | Field            | Type         | Null | Key | Default | Extra |
 +------------------+--------------+------+-----+---------+-------+
 | req_count        | int(11)      | YES  |     | NULL    |       |
 | req_per_sec      | float        | YES  |     | NULL    |       |
 | req_time_total   | float        | YES  |     | NULL    |       |
 | req_time_percent | float        | YES  |     | NULL    |       |
 | req_time_per_sec | float        | YES  |     | NULL    |       |
 | ru_utime_total   | float        | YES  |     | NULL    |       |
 | ru_utime_percent | float        | YES  |     | NULL    |       |
 | ru_utime_per_sec | float        | YES  |     | NULL    |       |
 | ru_stime_total   | float        | YES  |     | NULL    |       |
 | ru_stime_percent | float        | YES  |     | NULL    |       |
 | ru_stime_per_sec | float        | YES  |     | NULL    |       |
 | traffic_total    | float        | YES  |     | NULL    |       |
 | traffic_percent  | float        | YES  |     | NULL    |       |
 | traffic_per_sec  | float        | YES  |     | NULL    |       |
 | server_name      | varchar(64)  | YES  |     | NULL    |       |
 | script_name      | varchar(128) | YES  |     | NULL    |       |
 +------------------+--------------+------+-----+---------+-------+

report_by_hostname_and_script

Request data grouped by hostname and script_name.

 +--------------------------+--------------+------+-----+---------+-------+
 | Field                    | Type         | Null | Key | Default | Extra |
 +--------------------------+--------------+------+-----+---------+-------+
 | req_count                | int(11)      | YES  |     | NULL    |       |
 | req_per_sec              | float        | YES  |     | NULL    |       |
 | req_time_total           | float        | YES  |     | NULL    |       |
 | req_time_percent         | float        | YES  |     | NULL    |       |
 | req_time_per_sec         | float        | YES  |     | NULL    |       |
 | ru_utime_total           | float        | YES  |     | NULL    |       |
 | ru_utime_percent         | float        | YES  |     | NULL    |       |
 | ru_utime_per_sec         | float        | YES  |     | NULL    |       |
 | ru_stime_total           | float        | YES  |     | NULL    |       |
 | ru_stime_percent         | float        | YES  |     | NULL    |       |
 | ru_stime_per_sec         | float        | YES  |     | NULL    |       |
 | traffic_total            | float        | YES  |     | NULL    |       |
 | traffic_percent          | float        | YES  |     | NULL    |       |
 | traffic_per_sec          | float        | YES  |     | NULL    |       |
 | hostname                 | varchar(32)  | YES  |     | NULL    |       |
 | script_name              | varchar(128) | YES  |     | NULL    |       |
 | memory_footprint_total   | float        | YES  |     | NULL    |       |
 | memory_footprint_percent | float        | YES  |     | NULL    |       |
 | req_time_median          | float        | YES  |     | NULL    |       |
 | index_value              | varchar(256) | YES  |     | NULL    |       |
 +--------------------------+--------------+------+-----+---------+-------+

report_by_hostname_and_server

Request data grouped by hostname and server_name.

 +--------------------------+--------------+------+-----+---------+-------+
 | Field                    | Type         | Null | Key | Default | Extra |
 +--------------------------+--------------+------+-----+---------+-------+
 | req_count                | int(11)      | YES  |     | NULL    |       |
 | req_per_sec              | float        | YES  |     | NULL    |       |
 | req_time_total           | float        | YES  |     | NULL    |       |
 | req_time_percent         | float        | YES  |     | NULL    |       |
 | req_time_per_sec         | float        | YES  |     | NULL    |       |
 | ru_utime_total           | float        | YES  |     | NULL    |       |
 | ru_utime_percent         | float        | YES  |     | NULL    |       |
 | ru_utime_per_sec         | float        | YES  |     | NULL    |       |
 | ru_stime_total           | float        | YES  |     | NULL    |       |
 | ru_stime_percent         | float        | YES  |     | NULL    |       |
 | ru_stime_per_sec         | float        | YES  |     | NULL    |       |
 | traffic_total            | float        | YES  |     | NULL    |       |
 | traffic_percent          | float        | YES  |     | NULL    |       |
 | traffic_per_sec          | float        | YES  |     | NULL    |       |
 | hostname                 | varchar(32)  | YES  |     | NULL    |       |
 | server_name              | varchar(64)  | YES  |     | NULL    |       |
 | memory_footprint_total   | float        | YES  |     | NULL    |       |
 | memory_footprint_percent | float        | YES  |     | NULL    |       |
 | req_time_median          | float        | YES  |     | NULL    |       |
 | index_value              | varchar(256) | YES  |     | NULL    |       |
 +--------------------------+--------------+------+-----+---------+-------+

report_by_hostname_server_and_script

Request data grouped by hostname, server_name and script_name.

 +--------------------------+--------------+------+-----+---------+-------+
 | Field                    | Type         | Null | Key | Default | Extra |
 +--------------------------+--------------+------+-----+---------+-------+
 | req_count                | int(11)      | YES  |     | NULL    |       |
 | req_per_sec              | float        | YES  |     | NULL    |       |
 | req_time_total           | float        | YES  |     | NULL    |       |
 | req_time_percent         | float        | YES  |     | NULL    |       |
 | req_time_per_sec         | float        | YES  |     | NULL    |       |
 | ru_utime_total           | float        | YES  |     | NULL    |       |
 | ru_utime_percent         | float        | YES  |     | NULL    |       |
 | ru_utime_per_sec         | float        | YES  |     | NULL    |       |
 | ru_stime_total           | float        | YES  |     | NULL    |       |
 | ru_stime_percent         | float        | YES  |     | NULL    |       |
 | ru_stime_per_sec         | float        | YES  |     | NULL    |       |
 | traffic_total            | float        | YES  |     | NULL    |       |
 | traffic_percent          | float        | YES  |     | NULL    |       |
 | traffic_per_sec          | float        | YES  |     | NULL    |       |
 | hostname                 | varchar(32)  | YES  |     | NULL    |       |
 | server_name              | varchar(64)  | YES  |     | NULL    |       |
 | script_name              | varchar(128) | YES  |     | NULL    |       |
 | memory_footprint_total   | float        | YES  |     | NULL    |       |
 | memory_footprint_percent | float        | YES  |     | NULL    |       |
 | req_time_median          | float        | YES  |     | NULL    |       |
 | index_value              | varchar(256) | YES  |     | NULL    |       |
 +--------------------------+--------------+------+-----+---------+-------+

Tag reports

There are no predefined tag reports, as they depend on the name of tags you use, so you're supposed to create them yourself.
At the moment only reports with grouping by 1 and 2 tags are supported.
There are also two (this seems to be a kind of magic number ...) types of tag reports:

  • tag_info - aggregated by the value of the specified tag
  • tag_report - aggregated by the tag value and script name
  • tag_report2 - aggregated by the tag value, script name, hostname and server_name

tag info by 1 tag

Timer data grouped by the value of the specified tag.

 +--------------+--------------+------+-----+---------+-------+
 | Field        | Type         | Null | Key | Default | Extra |
 +--------------+--------------+------+-----+---------+-------+
 | tag_value    | varchar(64)  | YES  |     | NULL    |       |
 | req_count    | int(11)      | YES  |     | NULL    |       |
 | req_per_sec  | float        | YES  |     | NULL    |       |
 | hit_count    | int(11)      | YES  |     | NULL    |       |
 | hit_per_sec  | float        | YES  |     | NULL    |       |
 | timer_value  | float        | YES  |     | NULL    |       |
 | timer_median | float        | YES  |     | NULL    |       |
 | ru_utime_value | float        | YES  |     | NULL    |       |
 | ru_stime_value | float        | YES  |     | NULL    |       |
 | index_value  | varchar(256) | YES  |     | NULL    |       |
 +--------------+--------------+------+-----+---------+-------+

You can create custom tag_info table using the following syntax:

 CREATE TABLE `tag_info_foo` (
   `tag_value` varchar(64) DEFAULT NULL,
   `req_count` int(11) DEFAULT NULL,
   `req_per_sec` float DEFAULT NULL,
   `hit_count` int(11) DEFAULT NULL,
   `hit_per_sec` float DEFAULT NULL,
   `timer_value` float DEFAULT NULL,
   `timer_median` float DEFAULT NULL,
   `ru_utime_value` float DEFAULT NULL,
   `ru_stime_value` float DEFAULT NULL,
   `index_value` VARCHAR(256) DEFAULT NULL
 ) ENGINE=PINBA DEFAULT CHARSET=latin1 COMMENT='tag_info:foo'

foo is the name of the tag.
req_count is the number of unique requests where a timer with this tag was found.
hit_count is the number of times a timer with this tag was started.

tag info by 2 tags

Timer data grouped by the values of 2 tags.

 +------------------+--------------+------+-----+---------+-------+
 | Field            | Type         | Null | Key | Default | Extra |
 +------------------+--------------+------+-----+---------+-------+
 | first_tag_value  | varchar(64)  | YES  |     | NULL    |       |
 | second_tag_value | varchar(64)  | YES  |     | NULL    |       |
 | req_count        | int(11)      | YES  |     | NULL    |       |
 | req_per_sec      | float        | YES  |     | NULL    |       |
 | hit_count        | int(11)      | YES  |     | NULL    |       |
 | hit_per_sec      | float        | YES  |     | NULL    |       |
 | timer_value      | float        | YES  |     | NULL    |       |
 | timer_median     | float        | YES  |     | NULL    |       |
 | ru_utime_value | float        | YES  |     | NULL    |       |
 | ru_stime_value | float        | YES  |     | NULL    |       |
 | index_value      | varchar(256) | YES  |     | NULL    |       |
 +------------------+--------------+------+-----+---------+-------+

You can create custom tag2_info table using the following syntax:

 CREATE TABLE `tag_info_foo_bar` (
  `foo_value` varchar(64) DEFAULT NULL,
  `bar_value` varchar(64) DEFAULT NULL,
  `req_count` int(11) DEFAULT NULL,
  `req_per_sec` float DEFAULT NULL,
  `hit_count` int(11) DEFAULT NULL,
  `hit_per_sec` float DEFAULT NULL,
  `timer_value` float DEFAULT NULL,
  `timer_median` float DEFAULT NULL,
  `ru_utime_value` float DEFAULT NULL,
  `ru_stime_value` float DEFAULT NULL,
  `index_value` VARCHAR(256) DEFAULT NULL
 ) ENGINE=PINBA DEFAULT CHARSET=latin1 COMMENT='tag2_info:foo,bar'

foo is the name of the first tag. bar is the name of the second tag.

tag info by N tags

Available since version 1.1.0.

Timer data grouped by the values of an arbitrary number of tags.

 +------------------+--------------+------+-----+---------+-------+
 | Field            | Type         | Null | Key | Default | Extra |
 +------------------+--------------+------+-----+---------+-------+
 | first_tag_value  | varchar(64)  | YES  |     | NULL    |       |
 | second_tag_value | varchar(64)  | YES  |     | NULL    |       |
 ...
 | N_tag_value      | varchar(64)  | YES  |     | NULL    |       |
 | req_count        | int(11)      | YES  |     | NULL    |       |
 | req_per_sec      | float        | YES  |     | NULL    |       |
 | hit_count        | int(11)      | YES  |     | NULL    |       |
 | hit_per_sec      | float        | YES  |     | NULL    |       |
 | timer_value      | float        | YES  |     | NULL    |       |
 | timer_median     | float        | YES  |     | NULL    |       |
 | index_value      | varchar(256) | YES  |     | NULL    |       |
 +------------------+--------------+------+-----+---------+-------+

You can create custom tagN_info table for 5 tags using the following syntax:

 CREATE TABLE `tag_info_foo_bar_zeta_teta_omega` (
  `foo_value` varchar(64) DEFAULT NULL,
  `bar_value` varchar(64) DEFAULT NULL,
  `zeta_value` varchar(64) DEFAULT NULL,
  `teta_value` varchar(64) DEFAULT NULL,
  `omega_value` varchar(64) DEFAULT NULL,
  `req_count` int(11) DEFAULT NULL,
  `req_per_sec` float DEFAULT NULL,
  `hit_count` int(11) DEFAULT NULL,
  `hit_per_sec` float DEFAULT NULL,
  `timer_value` float DEFAULT NULL,
  `timer_median` float DEFAULT NULL,
  `index_value` VARCHAR(256) DEFAULT NULL
 ) ENGINE=PINBA DEFAULT CHARSET=latin1 COMMENT='tagN_info:foo,bar,zeta,teta,omega'

tag report with grouping by script name and tag value

Timer data grouped by script name and value of the specified tag.

Table structure:

 +--------------+--------------+------+-----+---------+-------+
 | Field        | Type         | Null | Key | Default | Extra |
 +--------------+--------------+------+-----+---------+-------+
 | script_name  | varchar(128) | YES  |     | NULL    |       |
 | tag_value    | varchar(64)  | YES  |     | NULL    |       |
 | req_count    | int(11)      | YES  |     | NULL    |       |
 | req_per_sec  | float        | YES  |     | NULL    |       |
 | hit_count    | int(11)      | YES  |     | NULL    |       |
 | hit_per_sec  | float        | YES  |     | NULL    |       |
 | timer_value  | float        | YES  |     | NULL    |       |
 | timer_median | float        | YES  |     | NULL    |       |
 | index_value  | varchar(256) | YES  |     | NULL    |       |
 +--------------+--------------+------+-----+---------+-------+
 CREATE TABLE `tag_report_foo` (
  `script_name` varchar(128) DEFAULT NULL,
  `tag_value` varchar(64) DEFAULT NULL,
  `req_count` int(11) DEFAULT NULL,
  `req_per_sec` float DEFAULT NULL,
  `hit_count` int(11) DEFAULT NULL,
  `hit_per_sec` float DEFAULT NULL,
  `timer_value` float DEFAULT NULL,
  `timer_median` float DEFAULT NULL,
  `index_value` VARCHAR(256) DEFAULT NULL
 ) ENGINE=PINBA DEFAULT CHARSET=latin1 COMMENT='tag_report:foo'

tag report with grouping by script name, tag value, hostname and server name

Timer data grouped by script name, hostname, serve name and the value of the specified tag.

Table structure:

 +--------------+--------------+------+-----+---------+-------+
 | Field        | Type         | Null | Key | Default | Extra |
 +--------------+--------------+------+-----+---------+-------+
 | script_name  | varchar(128) | YES  |     | NULL    |       |
 | tag_value    | varchar(64)  | YES  |     | NULL    |       |
 | req_count    | int(11)      | YES  |     | NULL    |       |
 | req_per_sec  | float        | YES  |     | NULL    |       |
 | hit_count    | int(11)      | YES  |     | NULL    |       |
 | hit_per_sec  | float        | YES  |     | NULL    |       |
 | timer_value  | float        | YES  |     | NULL    |       |
 | hostname     | varchar(32)  | YES  |     | NULL    |       |
 | server_name  | varchar(64)  | YES  |     | NULL    |       |
 | timer_median | float        | YES  |     | NULL    |       |
 | index_value  | varchar(256) | YES  |     | NULL    |       |
 +--------------+--------------+------+-----+---------+-------+
 CREATE TABLE `tag_report_foo` (
  `script_name` varchar(128) DEFAULT NULL,
  `tag_value` varchar(64) DEFAULT NULL,
  `req_count` int(11) DEFAULT NULL,
  `req_per_sec` float DEFAULT NULL,
  `hit_count` int(11) DEFAULT NULL,
  `hit_per_sec` float DEFAULT NULL,
  `timer_value` float DEFAULT NULL,
  `hostname` varchar(32) DEFAULT NULL,
  `server_name` varchar(64) DEFAULT NULL,
  `timer_median` float DEFAULT NULL,
  `index_value` VARCHAR(256) DEFAULT NULL
 ) ENGINE=PINBA DEFAULT CHARSET=latin1 COMMENT='tag_report2:foo'

tag report with grouping by script name and 2 tags

Timer data grouped by script name and values of two specified tags.

Table structure:

 +--------------+--------------+------+-----+---------+-------+
 | Field        | Type         | Null | Key | Default | Extra |
 +--------------+--------------+------+-----+---------+-------+
 | script_name  | varchar(128) | YES  |     | NULL    |       |
 | tag1_value   | varchar(64)  | YES  |     | NULL    |       |
 | tag2_value   | varchar(64)  | YES  |     | NULL    |       |
 | req_count    | int(11)      | YES  |     | NULL    |       |
 | req_per_sec  | float        | YES  |     | NULL    |       |
 | hit_count    | int(11)      | YES  |     | NULL    |       |
 | hit_per_sec  | float        | YES  |     | NULL    |       |
 | timer_value  | float        | YES  |     | NULL    |       |
 | timer_median | float        | YES  |     | NULL    |       |
 | index_value  | varchar(256) | YES  |     | NULL    |       |
 +--------------+--------------+------+-----+---------+-------+
 CREATE TABLE `tag_report_foo_bar` (
  `script_name` varchar(128) DEFAULT NULL,
  `tag1_value` varchar(64) DEFAULT NULL,
  `tag2_value` varchar(64) DEFAULT NULL,
  `req_count` int(11) DEFAULT NULL,
  `req_per_sec` float DEFAULT NULL,
  `hit_count` int(11) DEFAULT NULL,
  `hit_per_sec` float DEFAULT NULL,
  `timer_value` float DEFAULT NULL,
  `timer_median` float DEFAULT NULL,
  `index_value` VARCHAR(256) DEFAULT NULL
 ) ENGINE=PINBA DEFAULT CHARSET=latin1 COMMENT='tag2_report:foo,bar'

tag report with grouping by script name and N tags

Available since version 1.1.0.

Timer data grouped by script name and values of an arbitrary number of tags.

Table structure:

 +--------------+--------------+------+-----+---------+-------+
 | Field        | Type         | Null | Key | Default | Extra |
 +--------------+--------------+------+-----+---------+-------+
 | script_name  | varchar(128) | YES  |     | NULL    |       |
 | tag1_value   | varchar(64)  | YES  |     | NULL    |       |
 | tag2_value   | varchar(64)  | YES  |     | NULL    |       |
 ...
 | tagN_value   | varchar(64)  | YES  |     | NULL    |       |
 | req_count    | int(11)      | YES  |     | NULL    |       |
 | req_per_sec  | float        | YES  |     | NULL    |       |
 | hit_count    | int(11)      | YES  |     | NULL    |       |
 | hit_per_sec  | float        | YES  |     | NULL    |       |
 | timer_value  | float        | YES  |     | NULL    |       |
 | timer_median | float        | YES  |     | NULL    |       |
 | index_value  | varchar(256) | YES  |     | NULL    |       |
 +--------------+--------------+------+-----+---------+-------+
 CREATE TABLE `tag_report_foo_bar` (
  `script_name` varchar(128) DEFAULT NULL,
  `tag1_value` varchar(64) DEFAULT NULL,
  `tag2_value` varchar(64) DEFAULT NULL,
  ...
  `tagN_value` varchar(64) DEFAULT NULL,
  `req_count` int(11) DEFAULT NULL,
  `req_per_sec` float DEFAULT NULL,
  `hit_count` int(11) DEFAULT NULL,
  `hit_per_sec` float DEFAULT NULL,
  `timer_value` float DEFAULT NULL,
  `timer_median` float DEFAULT NULL,
  `index_value` VARCHAR(256) DEFAULT NULL
 ) ENGINE=PINBA DEFAULT CHARSET=latin1 COMMENT='tagN_report:foo,bar,..,..,last'