Grafana dashboard: JMeter Results from ClickHouse(Eng)
Description: JMeter dashboard for ClickHouse datasource

Dashboard shows online statistic from [ClickHouse](https://clickhouse.yandex) collected by special [JMeter Listener (actually this is pack of listeners in one jar)](https://mvnrepository.com/artifact/cloud.testload/jmeter.pack-listener/1.4).

Dashboard and Listener inspired by [JM dashboard and plugin from NovaTec](https://grafana.com/dashboards/1152) Many thanks these guys!!!

## But there is additional important features in this project:
1. [ClickHouse](https://clickhouse.yandex) support, of course
2. Aggregation support (necessary for highload on not premium hardware)
3. [Listener](https://mvnrepository.com/artifact/cloud.testload/jmeter.pack-listener/1.4) support gzip requests to ClickHouse database (it very useful on highload)
4. [Listener](https://mvnrepository.com/artifact/cloud.testload/jmeter.pack-listener/1.4) sends to clickhouse not only statistic but Requests and Responses as well (it useful for debug)

## How to start:
1. Download, install and setup [ClickHouse](https://clickhouse.yandex), [CHProxy](https://github.com/Vertamedia/chproxy) strongly recommended
2. Download and install [listener](https://mvnrepository.com/artifact/cloud.testload/jmeter.pack-listener/1.4) to you're JMeter lib/ext
3. Start JMeter, add BackendListener and setup
4. Install and setup Dashboard
5. Start Test.

More detailed instructions will be published on [plugin wiki](https://gitlab.com/testload/jmeter-listener/wikis/home) soon

{
  "__inputs": [
    {
      "name": "DS_JMRESULTS",
      "label": "jmresults",
      "description": "",
      "type": "datasource",
      "pluginId": "vertamedia-clickhouse-datasource",
      "pluginName": "ClickHouse"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.2.1"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "vertamedia-clickhouse-datasource",
      "name": "ClickHouse",
      "version": "1.8.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "JMeter dashboard for ClickHouse datasource",
  "editable": true,
  "gnetId": 9561,
  "graphTooltip": 1,
  "id": null,
  "iteration": 1559588949393,
  "links": [],
  "panels": [
    {
      "content": "<h3 style=\"text-align: center;\"><em>Briefly by <span style=\"color: #00ccff;\"><strong>all operations</strong></span></em></h3>",
      "editable": true,
      "error": false,
      "gridPos": {
        "h": 3,
        "w": 4,
        "x": 0,
        "y": 0
      },
      "height": "180",
      "id": 25,
      "links": [],
      "mode": "html",
      "options": {},
      "title": "",
      "transparent": true,
      "type": "text"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "rgba(245, 54, 54, 0.9)",
        "rgba(237, 129, 40, 0.89)",
        "rgba(50, 172, 45, 0.97)"
      ],
      "datasource": "${DS_JMRESULTS}",
      "decimals": 1,
      "editable": true,
      "error": false,
      "format": "percentunit",
      "gauge": {
        "maxValue": 1,
        "minValue": null,
        "show": true,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 4,
        "x": 4,
        "y": 0
      },
      "height": "180",
      "id": 18,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "",
      "postfixFontSize": "30%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "minus(1, divide(sum(errors_count), sum(points_count)))",
      "targets": [
        {
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "table",
          "formattedQuery": "SELECT 1 - sum(\"errorCount\")/sum(\"points\") FROM \"requestsRaw\" WHERE \"testName\" =~ /^$profile$/ AND \"runId\" =~ /^$runid$/ AND \"requestName\"=~ /(send|block|request)/ AND $timeFilter",
          "groupBy": [],
          "intervalFactor": 1,
          "measurement": "virtualUsers",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT 1 - sum(errors_count) / sum(points_count)\nFROM jmresults_statistic\nWHERE\n    $timeFilter\n    AND profile_name = '$profile'\n    AND run_id = '$runid'",
          "rawQuery": "SELECT 1 - sum(errors_count) / sum(points_count) FROM jmresults_statistic WHERE     timestamp_sec >= toDateTime(1559585668)     AND profile_name = 'TEST'     AND run_id = 'TEST'",
          "refId": "A",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "finishedThreads"
                ],
                "type": "field"
              }
            ]
          ],
          "table": "jmresults",
          "tableLoading": false,
          "tags": []
        }
      ],
      "thresholds": "-1,-1",
      "title": "Pass",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "rgb(109, 109, 109)",
        "rgba(237, 129, 40, 0.89)",
        "rgba(126, 0, 0, 0.9)"
      ],
      "datasource": "${DS_JMRESULTS}",
      "decimals": 2,
      "editable": true,
      "error": false,
      "format": "percentunit",
      "gauge": {
        "maxValue": 1,
        "minValue": null,
        "show": true,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 4,
        "x": 8,
        "y": 0
      },
      "height": "180",
      "id": 21,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "",
      "postfixFontSize": "30%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "divide(sum(errors_count), sum(points_count))",
      "targets": [
        {
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "table",
          "formattedQuery": "SELECT sum(\"errorCount\")/sum(\"points\") FROM \"requestsRaw\" WHERE \"testName\" =~ /^$profile$/ AND \"runId\" =~ /^$runid$/ AND \"requestName\"=~ /(send|block|request)/ AND $timeFilter",
          "groupBy": [],
          "intervalFactor": 1,
          "measurement": "virtualUsers",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT sum(errors_count) / sum(points_count)\nFROM jmresults_statistic\nWHERE\n    $timeFilter\n    AND profile_name = '$profile'\n    and run_id = '$runid'",
          "rawQuery": "SELECT sum(errors_count) / sum(points_count) FROM jmresults_statistic WHERE     timestamp_sec >= toDateTime(1559585668)     AND profile_name = 'TEST'     and run_id = 'TEST'",
          "refId": "A",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "finishedThreads"
                ],
                "type": "field"
              }
            ]
          ],
          "table": "jmresults",
          "tableLoading": false,
          "tags": []
        }
      ],
      "thresholds": "0.01,0.1",
      "title": "Fails",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_JMRESULTS}",
      "editable": true,
      "error": false,
      "fill": 0,
      "grid": {},
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 3
      },
      "height": "300",
      "id": 6,
      "legend": {
        "alignAsTable": false,
        "avg": true,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "null",
      "options": {},
      "paceLength": 10,
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "Throughput",
          "yaxis": 2
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "format": "time_series",
          "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t",
          "interval": "[[agr]]s",
          "intervalFactor": 1,
          "query": "SELECT\n    $timeSeries as t,\n    sum(points_count)/$agr as \"TPS\"\nFROM jmresults_statistic\nWHERE $timeFilter\nAND profile_name ='$profile' and run_id='$runid'\nGROUP BY t\nORDER BY t",
          "rawQuery": "SELECT     (intDiv(toUInt32(timestamp_sec), 60) * 60) * 1000 as t,     sum(points_count)/60 as \"TPS\" FROM jmresults_statistic WHERE timestamp_sec >= toDateTime(1559585668) AND profile_name ='TEST' and run_id='TEST' GROUP BY t ORDER BY t",
          "refId": "A",
          "round": "0s",
          "table": "jmresults",
          "tableLoading": false
        },
        {
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "format": "time_series",
          "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t",
          "hide": false,
          "interval": "[[agr]]s",
          "intervalFactor": 1,
          "query": "SELECT\n    $timeSeries as t,\n    sum(errors_count)/$agr as \"EPS\"\nFROM jmresults_statistic\nWHERE $timeFilter\nAND profile_name ='$profile' and run_id='$runid'\nGROUP BY t\nORDER BY t",
          "rawQuery": "SELECT     (intDiv(toUInt32(timestamp_sec), 60) * 60) * 1000 as t,     sum(errors_count)/60 as \"EPS\" FROM jmresults_statistic WHERE timestamp_sec >= toDateTime(1559585668) AND profile_name ='TEST' and run_id='TEST' GROUP BY t ORDER BY t",
          "refId": "B",
          "round": "0s",
          "table": "jmresults",
          "tableLoading": false
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Int.",
      "tooltip": {
        "msResolution": false,
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "ops",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "columns": [],
      "datasource": "${DS_JMRESULTS}",
      "editable": true,
      "error": false,
      "fontSize": "90%",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 9
      },
      "height": "300",
      "id": 9,
      "links": [],
      "options": {},
      "pageSize": 50,
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": null,
        "desc": false
      },
      "styles": [
        {
          "alias": "Дата/время",
          "dateFormat": "LT",
          "pattern": "Time",
          "type": "hidden"
        },
        {
          "alias": "errorRate",
          "colorMode": "cell",
          "colors": [
            "rgba(0, 0, 0, 0)",
            "rgba(183, 84, 26, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "decimals": 2,
          "pattern": "ErrorRate",
          "thresholds": [
            "0.00000001",
            "0.01"
          ],
          "type": "number",
          "unit": "percentunit"
        },
        {
          "alias": "Process",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "link": false,
          "pattern": "sample_label",
          "preserveFormat": false,
          "sanitize": false,
          "thresholds": [],
          "type": "string",
          "unit": "short"
        },
        {
          "alias": "Trans.",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 0,
          "pattern": "total",
          "thresholds": [],
          "type": "number",
          "unit": "none"
        },
        {
          "alias": "Avg.Resp.",
          "colorMode": "cell",
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 3,
          "pattern": "AvgResp",
          "thresholds": [
            "10",
            "30"
          ],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "Min.Resp.",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 3,
          "pattern": "MinResp",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "Errors total",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 0,
          "mappingType": 1,
          "pattern": "Errors",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "97%",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 3,
          "mappingType": 1,
          "pattern": "97perc",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "Max.Resp.",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 3,
          "mappingType": 1,
          "pattern": "MaxResp",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "90%",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 3,
          "mappingType": 1,
          "pattern": "90perc",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "95%",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 3,
          "mappingType": 1,
          "pattern": "95perc",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "99%",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 3,
          "mappingType": 1,
          "pattern": "99perc",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "Total recs.",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 0,
          "mappingType": 1,
          "pattern": "TotalRecs",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "Compression",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 1,
          "mappingType": 1,
          "pattern": "Compress",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "start",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "alias": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "stop",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "alias": "Trans./sec.",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "rate",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "colorMode": null,
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "pattern": "/.*/",
          "thresholds": [
            "0.01",
            "0.05"
          ],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "alias": "",
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "table",
          "formattedQuery": "SELECT sample_label,\n       sum(points_count) as \"Total\",\n       count(points_count) as \"TotalRecs\",\n       sum(points_count)/count(points_count) as \"Compress\",\n       avg(average_time)/1000 as \"AvgResp\",\n       min(average_time)/1000 as \"MinResp\",\n       max(average_time)/1000 as \"MaxResp\",\n       quantile(0.9)(average_time) as \"90perc\",\n       quantile(0.95)(average_time) as \"95perc\",\n       quantile(0.97)(average_time) as \"97perc\",\n       quantile(0.99)(average_time) as \"99perc\",\n       sum(errors_count) as \"Errors\",\n       (sum(errors_count)/sum(points_count)) as \"ErrorRate\"\nfrom jmresults\nWHERE  profile_name ='TEST' and run_id='TEST'\nGROUP BY sample_label;",
          "groupBy": [
            {
              "params": [
                "$interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "interval": "[[agr]]s",
          "intervalFactor": 1,
          "measurement": "requests",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT sample_label,\n       sum(points_count) as total,\n       min(timestamp_sec) as start,\n       max(timestamp_sec) as stop,\n       total/toUInt64(stop-start) as rate,\n       avg(average_time)/1000 as \"AvgResp\",\n       min(average_time)/1000 as \"MinResp\",\n       max(average_time)/1000 as \"MaxResp\",\n       quantileTDigest(0.9)(average_time)/1000 as \"90perc\",\n       quantileTDigest(0.95)(average_time)/1000 as \"95perc\",\n       quantileTDigest(0.97)(average_time)/1000 as \"97perc\",\n       quantileTDigest(0.99)(average_time)/1000 as \"99perc\",\n       sum(errors_count) as \"Errors\",\n       (sum(errors_count)/sum(points_count)) as \"ErrorRate\"\nfrom jmresults_statistic\nWHERE  $timeFilter AND profile_name ='$profile' and run_id='$runid'\nGROUP BY sample_label",
          "rawQuery": "SELECT sample_label,        sum(points_count) as total,        min(timestamp_sec) as start,        max(timestamp_sec) as stop,        total/toUInt64(stop-start) as rate,        avg(average_time)/1000 as \"AvgResp\",        min(average_time)/1000 as \"MinResp\",        max(average_time)/1000 as \"MaxResp\",        quantileTDigest(0.9)(average_time)/1000 as \"90perc\",        quantileTDigest(0.95)(average_time)/1000 as \"95perc\",        quantileTDigest(0.97)(average_time)/1000 as \"97perc\",        quantileTDigest(0.99)(average_time)/1000 as \"99perc\",        sum(errors_count) as \"Errors\",        (sum(errors_count)/sum(points_count)) as \"ErrorRate\" from jmresults_statistic WHERE  timestamp_sec >= toDateTime(1559585668) AND profile_name ='TEST' and run_id='TEST' GROUP BY sample_label",
          "refId": "A",
          "resultFormat": "table",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "table": "jmresults",
          "tableLoading": false,
          "tags": []
        }
      ],
      "title": "Legend",
      "transform": "table",
      "type": "table"
    },
    {
      "columns": [],
      "datasource": "${DS_JMRESULTS}",
      "fontSize": "100%",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 9
      },
      "id": 27,
      "links": [],
      "options": {},
      "pageSize": null,
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": 0,
        "desc": true
      },
      "styles": [
        {
          "alias": "Time",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "Time",
          "type": "date"
        },
        {
          "alias": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 2,
          "pattern": "/.*/",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "format": "table",
          "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "intervalFactor": 1,
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT response\nFROM jmresults\nWHERE $timeFilter AND profile_name ='$profile' and run_id='$runid' and sample_label='$request' and errors_count>0\nORDER BY 1 DESC\nLIMIT 10",
          "rawQuery": "SELECT response FROM jmresults WHERE timestamp_sec >= toDateTime(1559585668) AND profile_name ='TEST' and run_id='TEST' and sample_label='hit_google_stats_to_clickhouse' and errors_count>0 ORDER BY 1 DESC LIMIT 10",
          "refId": "A",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "table": "jmresults",
          "tableLoading": false,
          "tags": []
        }
      ],
      "title": "Errors of [[request]] (last 10)",
      "transform": "table",
      "type": "table"
    },
    {
      "content": "<h3 style=\"text-align: center;\"><em>Detail information for <span style=\"color: #00ccff;\"><strong>\"[[request]]\"</strong></span></em></h3>",
      "editable": true,
      "error": false,
      "gridPos": {
        "h": 3,
        "w": 24,
        "x": 0,
        "y": 17
      },
      "height": "110",
      "id": 23,
      "links": [],
      "mode": "html",
      "options": {},
      "title": "",
      "transparent": true,
      "type": "text"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_JMRESULTS}",
      "editable": true,
      "error": false,
      "fill": 1,
      "grid": {},
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 20
      },
      "height": "300px",
      "id": 7,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "connected",
      "options": {},
      "paceLength": 10,
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Интенсивность",
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "time_series",
          "formattedQuery": "SELECT sum(\"points\")/$aggregation FROM \"requestsRaw\" WHERE  \"testName\" =~ /^$profile$/ AND \"runId\" =~ /^$runid$/ AND \"requestName\" =~ /^$request$/ AND $timeFilter GROUP BY time([[aggregation]]s) fill(null)",
          "groupBy": [
            {
              "params": [
                "10s"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "interval": "[[agr]]s",
          "intervalFactor": 1,
          "measurement": "requestsRaw",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT\n    $timeSeries as t,\n    sum(points_count)/$agr as \"TPS\"\nFROM jmresults_statistic\nWHERE $timeFilter\nAND profile_name ='$profile' and run_id='$runid' and sample_label='$request'\nGROUP BY t\nORDER BY t",
          "rawQuery": "SELECT     (intDiv(toUInt32(timestamp_sec), 60) * 60) * 1000 as t,     sum(points_count)/60 as \"TPS\" FROM jmresults_statistic WHERE timestamp_sec >= toDateTime(1559585668) AND profile_name ='TEST' and run_id='TEST' and sample_label='hit_google_stats_to_clickhouse' GROUP BY t ORDER BY t",
          "refId": "A",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "responseTime"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "count"
              }
            ]
          ],
          "table": "jmresults",
          "tableLoading": false,
          "tags": [
            {
              "key": "requestName",
              "operator": "=~",
              "value": "/^$request$/"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Int.",
      "tooltip": {
        "msResolution": false,
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "ops",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "rgba(245, 54, 54, 0.9)",
        "rgba(237, 129, 40, 0.89)",
        "rgba(61, 165, 30, 0.97)"
      ],
      "datasource": "${DS_JMRESULTS}",
      "editable": true,
      "error": false,
      "format": "percentunit",
      "gauge": {
        "maxValue": 1,
        "minValue": 0,
        "show": true,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 12,
        "y": 20
      },
      "height": "180",
      "id": 12,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "minus(1, divide(sum(errors_count), sum(points_count)))",
      "targets": [
        {
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "table",
          "formattedQuery": "SELECT 1 - sum(\"errorCount\")/sum(\"points\") FROM \"requestsRaw\" WHERE  \"testName\" =~ /^$profile$/ AND \"runId\" =~ /^$runid$/ AND $timeFilter AND \"requestName\" =~ /^$request$/",
          "groupBy": [
            {
              "params": [
                "$interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "interval": "",
          "intervalFactor": 1,
          "measurement": "requests",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT 1 - sum(errors_count)/sum(points_count) FROM jmresults_statistic WHERE $timeFilter AND profile_name ='$profile' AND run_id ='$runid' and sample_label='$request'",
          "rawQuery": "SELECT 1 - sum(errors_count)/sum(points_count) FROM jmresults_statistic WHERE timestamp_sec >= toDateTime(1559585668) AND profile_name ='TEST' AND run_id ='TEST' and sample_label='hit_google_stats_to_clickhouse'",
          "refId": "A",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "table": "jmresults",
          "tableLoading": false,
          "tags": []
        }
      ],
      "thresholds": "-1,-1",
      "title": "Pass",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "rgba(245, 54, 54, 0.9)",
        "rgba(237, 129, 40, 0.89)",
        "rgba(4, 106, 0, 0.97)"
      ],
      "datasource": "${DS_JMRESULTS}",
      "editable": true,
      "error": false,
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 16,
        "y": 20
      },
      "height": "160",
      "id": 3,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "sum(points_count)",
      "targets": [
        {
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "table",
          "formattedQuery": "SELECT sum(points_count) FROM jmresults WHERE $timeFilter AND profile_name ='$profile' AND run_id ='$runid' and sample_label='$request'",
          "groupBy": [],
          "interval": "[[agr]]s",
          "intervalFactor": 1,
          "measurement": "requestsRaw",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT sum(points_count)\nFROM jmresults_statistic\nWHERE\n    $timeFilter\n    AND profile_name = '$profile'\n    AND run_id = '$runid'\n    and sample_label = '$request'",
          "rawQuery": "SELECT sum(points_count) FROM jmresults_statistic WHERE     timestamp_sec >= toDateTime(1559585668)     AND profile_name = 'TEST'     AND run_id = 'TEST'     and sample_label = 'hit_google_stats_to_clickhouse'",
          "refId": "A",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "responseTime"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "count"
              }
            ]
          ],
          "table": "jmresults",
          "tableLoading": false,
          "tags": [
            {
              "key": "requestName",
              "operator": "=~",
              "value": "/^$request$/"
            }
          ]
        }
      ],
      "thresholds": "",
      "title": "Total",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "rgb(100, 100, 100)",
        "rgba(237, 129, 40, 0.89)",
        "rgba(150, 20, 20, 0.9)"
      ],
      "datasource": "${DS_JMRESULTS}",
      "decimals": 2,
      "editable": true,
      "error": false,
      "format": "percentunit",
      "gauge": {
        "maxValue": 1,
        "minValue": 0,
        "show": true,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 20,
        "y": 20
      },
      "height": "180",
      "id": 5,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "divide(sum(errors_count), sum(points_count))",
      "targets": [
        {
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "table",
          "formattedQuery": "SELECT sum(\"errorCount\")/sum(\"points\") FROM \"requestsRaw\" WHERE  \"testName\" =~ /^$profile$/ AND \"runId\" =~ /^$runid$/ AND $timeFilter AND \"requestName\" =~ /^$request$/",
          "groupBy": [
            {
              "params": [
                "$interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "intervalFactor": 1,
          "measurement": "requests",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT sum(errors_count)/sum(points_count) FROM jmresults_statistic WHERE $timeFilter AND profile_name ='$profile' AND run_id ='$runid' and sample_label='$request'",
          "rawQuery": "SELECT sum(errors_count)/sum(points_count) FROM jmresults_statistic WHERE timestamp_sec >= toDateTime(1559585668) AND profile_name ='TEST' AND run_id ='TEST' and sample_label='hit_google_stats_to_clickhouse'",
          "refId": "A",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "table": "jmresults",
          "tableLoading": false,
          "tags": []
        }
      ],
      "thresholds": "0.01,0.1",
      "title": "Fails",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "aliasColors": {
        "95 perc": "#F9934E",
        "99 perc": "#E24D42",
        "Max": "#BF1B00"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_JMRESULTS}",
      "editable": true,
      "error": false,
      "fill": 3,
      "grid": {},
      "gridPos": {
        "h": 12,
        "w": 12,
        "x": 12,
        "y": 25
      },
      "height": "300",
      "id": 1,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {},
      "paceLength": 10,
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "Mean",
          "zindex": 3
        },
        {
          "alias": "90 perc",
          "zindex": 2
        },
        {
          "alias": "95 perc",
          "zindex": 1
        },
        {
          "alias": "99 perc",
          "zindex": 0
        },
        {
          "alias": "Max",
          "zindex": -1
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Среднее",
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "time_series",
          "formattedQuery": "SELECT mean(\"responseTime\") FROM \"requestsRaw\" WHERE  \"testName\" =~ /^$profile$/ AND \"runId\" =~ /^$runid$/ AND \"requestName\" =~ /^$request$/ AND $timeFilter GROUP BY time([[aggregation]]s) fill(null)",
          "groupBy": [
            {
              "params": [
                "$aggregation"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "interval": "[[agr]]s",
          "intervalFactor": 1,
          "measurement": "requestsRaw",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT\n    $timeSeries as t,\n    avg(average_time) as AVG\nFROM jmresults_statistic\nWHERE $timeFilter\nAND profile_name ='$profile' and run_id='$runid' and sample_label='$request'\nGROUP BY t\nORDER BY t",
          "rawQuery": "SELECT     (intDiv(toUInt32(timestamp_sec), 60) * 60) * 1000 as t,     avg(average_time) as AVG FROM jmresults_statistic WHERE timestamp_sec >= toDateTime(1559585668) AND profile_name ='TEST' and run_id='TEST' and sample_label='hit_google_stats_to_clickhouse' GROUP BY t ORDER BY t",
          "refId": "A",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "responseTime"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "table": "jmresults",
          "tableLoading": false,
          "tags": [
            {
              "key": "requestName",
              "operator": "=~",
              "value": "/^$request$/"
            }
          ]
        },
        {
          "alias": "90 perc",
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "time_series",
          "formattedQuery": "SELECT percentile(\"responseTime\", 90) FROM \"requestsRaw\" WHERE  \"testName\" =~ /^$profile$/ AND \"runId\" =~ /^$runid$/ AND \"requestName\" =~ /^$request$/ AND $timeFilter GROUP BY time([[aggregation]]s) fill(null)",
          "groupBy": [
            {
              "params": [
                "$aggregation"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "interval": "[[agr]]s",
          "intervalFactor": 1,
          "measurement": "requestsRaw",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT\n    $timeSeries as t,\n    quantile(0.9)(average_time) as \"90perc\"\nFROM jmresults_statistic\nWHERE\n    $timeFilter\n    AND profile_name = '$profile'\n    and run_id = '$runid'\n    and sample_label = '$request'\nGROUP BY t\nORDER BY t",
          "rawQuery": "SELECT     (intDiv(toUInt32(timestamp_sec), 60) * 60) * 1000 as t,     quantile(0.9)(average_time) as \"90perc\" FROM jmresults_statistic WHERE     timestamp_sec >= toDateTime(1559585668)     AND profile_name = 'TEST'     and run_id = 'TEST'     and sample_label = 'hit_google_stats_to_clickhouse' GROUP BY t ORDER BY t",
          "refId": "B",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "responseTime"
                ],
                "type": "field"
              },
              {
                "params": [
                  "90"
                ],
                "type": "percentile"
              }
            ]
          ],
          "table": "jmresults",
          "tableLoading": false,
          "tags": [
            {
              "key": "requestName",
              "operator": "=~",
              "value": "/^$request$/"
            }
          ]
        },
        {
          "alias": "90 perc",
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "time_series",
          "formattedQuery": "SELECT percentile(\"responseTime\", 90) FROM \"requestsRaw\" WHERE  \"testName\" =~ /^$profile$/ AND \"runId\" =~ /^$runid$/ AND \"requestName\" =~ /^$request$/ AND $timeFilter GROUP BY time([[aggregation]]s) fill(null)",
          "groupBy": [
            {
              "params": [
                "$aggregation"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "interval": "[[agr]]s",
          "intervalFactor": 1,
          "measurement": "requestsRaw",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT\n    $timeSeries as t,\n    quantile(0.95)(average_time) as \"95perc\"\nFROM jmresults_statistic\nWHERE\n    $timeFilter\n    AND profile_name = '$profile'\n    and run_id = '$runid'\n    and sample_label = '$request'\nGROUP BY t\nORDER BY t",
          "rawQuery": "SELECT     (intDiv(toUInt32(timestamp_sec), 60) * 60) * 1000 as t,     quantile(0.95)(average_time) as \"95perc\" FROM jmresults_statistic WHERE     timestamp_sec >= toDateTime(1559585668)     AND profile_name = 'TEST'     and run_id = 'TEST'     and sample_label = 'hit_google_stats_to_clickhouse' GROUP BY t ORDER BY t",
          "refId": "C",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "responseTime"
                ],
                "type": "field"
              },
              {
                "params": [
                  "90"
                ],
                "type": "percentile"
              }
            ]
          ],
          "table": "jmresults",
          "tableLoading": false,
          "tags": [
            {
              "key": "requestName",
              "operator": "=~",
              "value": "/^$request$/"
            }
          ]
        },
        {
          "alias": "90 perc",
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "time_series",
          "formattedQuery": "SELECT percentile(\"responseTime\", 90) FROM \"requestsRaw\" WHERE  \"testName\" =~ /^$profile$/ AND \"runId\" =~ /^$runid$/ AND \"requestName\" =~ /^$request$/ AND $timeFilter GROUP BY time([[aggregation]]s) fill(null)",
          "groupBy": [
            {
              "params": [
                "$aggregation"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "interval": "[[agr]]s",
          "intervalFactor": 1,
          "measurement": "requestsRaw",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT\n    $timeSeries as t,\n    quantile(0.97)(average_time) as \"97perc\"\nFROM jmresults_statistic\nWHERE\n    $timeFilter\n    AND profile_name = '$profile'\n    and run_id = '$runid'\n    and sample_label = '$request'\nGROUP BY t\nORDER BY t",
          "rawQuery": "SELECT     (intDiv(toUInt32(timestamp_sec), 60) * 60) * 1000 as t,     quantile(0.97)(average_time) as \"97perc\" FROM jmresults_statistic WHERE     timestamp_sec >= toDateTime(1559585668)     AND profile_name = 'TEST'     and run_id = 'TEST'     and sample_label = 'hit_google_stats_to_clickhouse' GROUP BY t ORDER BY t",
          "refId": "D",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "responseTime"
                ],
                "type": "field"
              },
              {
                "params": [
                  "90"
                ],
                "type": "percentile"
              }
            ]
          ],
          "table": "jmresults",
          "tableLoading": false,
          "tags": [
            {
              "key": "requestName",
              "operator": "=~",
              "value": "/^$request$/"
            }
          ]
        },
        {
          "alias": "90 perc",
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "time_series",
          "formattedQuery": "SELECT percentile(\"responseTime\", 90) FROM \"requestsRaw\" WHERE  \"testName\" =~ /^$profile$/ AND \"runId\" =~ /^$runid$/ AND \"requestName\" =~ /^$request$/ AND $timeFilter GROUP BY time([[aggregation]]s) fill(null)",
          "groupBy": [
            {
              "params": [
                "$aggregation"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "interval": "[[agr]]s",
          "intervalFactor": 1,
          "measurement": "requestsRaw",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT\n    $timeSeries as t,\n    quantile(0.99)(average_time) as \"99perc\"\nFROM jmresults_statistic\nWHERE\n    $timeFilter\n    AND profile_name = '$profile'\n    and run_id = '$runid'\n    and sample_label = '$request'\nGROUP BY t\nORDER BY t",
          "rawQuery": "SELECT     (intDiv(toUInt32(timestamp_sec), 60) * 60) * 1000 as t,     quantile(0.99)(average_time) as \"99perc\" FROM jmresults_statistic WHERE     timestamp_sec >= toDateTime(1559585668)     AND profile_name = 'TEST'     and run_id = 'TEST'     and sample_label = 'hit_google_stats_to_clickhouse' GROUP BY t ORDER BY t",
          "refId": "E",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "responseTime"
                ],
                "type": "field"
              },
              {
                "params": [
                  "90"
                ],
                "type": "percentile"
              }
            ]
          ],
          "table": "jmresults",
          "tableLoading": false,
          "tags": [
            {
              "key": "requestName",
              "operator": "=~",
              "value": "/^$request$/"
            }
          ]
        },
        {
          "alias": "90 perc",
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "time_series",
          "formattedQuery": "SELECT percentile(\"responseTime\", 90) FROM \"requestsRaw\" WHERE  \"testName\" =~ /^$profile$/ AND \"runId\" =~ /^$runid$/ AND \"requestName\" =~ /^$request$/ AND $timeFilter GROUP BY time([[aggregation]]s) fill(null)",
          "groupBy": [
            {
              "params": [
                "$aggregation"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "interval": "[[agr]]s",
          "intervalFactor": 1,
          "measurement": "requestsRaw",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT\n    $timeSeries as t,\n    max(average_time) as \"max\"\nFROM jmresults_statistic\nWHERE\n    $timeFilter\n    AND profile_name = '$profile'\n    and run_id = '$runid'\n    and sample_label = '$request'\nGROUP BY t\nORDER BY t",
          "rawQuery": "SELECT     (intDiv(toUInt32(timestamp_sec), 60) * 60) * 1000 as t,     max(average_time) as \"max\" FROM jmresults_statistic WHERE     timestamp_sec >= toDateTime(1559585668)     AND profile_name = 'TEST'     and run_id = 'TEST'     and sample_label = 'hit_google_stats_to_clickhouse' GROUP BY t ORDER BY t",
          "refId": "F",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "responseTime"
                ],
                "type": "field"
              },
              {
                "params": [
                  "90"
                ],
                "type": "percentile"
              }
            ]
          ],
          "table": "jmresults",
          "tableLoading": false,
          "tags": [
            {
              "key": "requestName",
              "operator": "=~",
              "value": "/^$request$/"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Response time",
      "tooltip": {
        "msResolution": true,
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "ms",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "content": "",
      "editable": true,
      "error": false,
      "gridPos": {
        "h": 1,
        "w": 12,
        "x": 0,
        "y": 28
      },
      "height": "110",
      "id": 24,
      "links": [],
      "mode": "markdown",
      "options": {},
      "title": "",
      "transparent": true,
      "type": "text"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_JMRESULTS}",
      "editable": true,
      "error": false,
      "fill": 1,
      "grid": {},
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 29
      },
      "height": "300",
      "id": 11,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "show": true,
        "sort": null,
        "sortDesc": null,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "connected",
      "options": {},
      "paceLength": 10,
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Ошибок в сек.",
          "database": "default",
          "dateLoading": false,
          "dateTimeColDataType": "timestamp_sec",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "time_series",
          "formattedQuery": "SELECT sum(\"errorCount\")/$aggregation FROM \"requestsRaw\" WHERE  \"testName\" =~ /^$profile$/ AND \"runId\" =~ /^$runid$/ AND \"requestName\" =~ /^$request$/ AND $timeFilter GROUP BY time([[aggregation]]s) fill(null)",
          "groupBy": [
            {
              "params": [
                "$aggregation"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "interval": "[[agr]]s",
          "intervalFactor": 1,
          "measurement": "requestsRaw",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT\n    $timeSeries as t,\n    sum(errors_count)/$agr as \"EPS\"\nFROM jmresults_statistic\nWHERE $timeFilter\nAND profile_name ='$profile' and run_id='$runid' and sample_label='$request'\nGROUP BY t\nORDER BY t",
          "rawQuery": "SELECT     (intDiv(toUInt32(timestamp_sec), 60) * 60) * 1000 as t,     sum(errors_count)/60 as \"EPS\" FROM jmresults_statistic WHERE timestamp_sec >= toDateTime(1559585668) AND profile_name ='TEST' and run_id='TEST' and sample_label='hit_google_stats_to_clickhouse' GROUP BY t ORDER BY t",
          "refId": "A",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "errorCount"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "table": "jmresults",
          "tableLoading": false,
          "tags": [
            {
              "key": "requestName",
              "operator": "=~",
              "value": "/^$request$/"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Errors Int.",
      "tooltip": {
        "msResolution": false,
        "shared": true,
        "sort": 0,
        "value_type": "cumulative"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": "errors / s",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": "5s",
  "schemaVersion": 18,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": "",
        "current": {},
        "datasource": "${DS_JMRESULTS}",
        "definition": "SELECT DISTINCT profile_name FROM jmresults_statistic",
        "hide": 0,
        "includeAll": false,
        "label": "Profile",
        "multi": false,
        "name": "profile",
        "options": [],
        "query": "SELECT DISTINCT profile_name FROM jmresults_statistic",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 2,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_JMRESULTS}",
        "definition": "SELECT DISTINCT run_id FROM jmresults_statistic where profile_name ='$profile'",
        "hide": 0,
        "includeAll": false,
        "label": "RunId",
        "multi": false,
        "name": "runid",
        "options": [],
        "query": "SELECT DISTINCT run_id FROM jmresults_statistic where profile_name ='$profile'",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 2,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "auto": false,
        "current": {
          "tags": [],
          "text": "60",
          "value": "60"
        },
        "datasource": null,
        "hide": 0,
        "includeAll": false,
        "label": "Aggregation",
        "multi": false,
        "name": "agr",
        "options": [
          {
            "selected": false,
            "text": "1",
            "value": "1"
          },
          {
            "selected": false,
            "text": "10",
            "value": "10"
          },
          {
            "selected": true,
            "text": "60",
            "value": "60"
          },
          {
            "selected": false,
            "text": "1800",
            "value": "1800"
          },
          {
            "selected": false,
            "text": "3600",
            "value": "3600"
          }
        ],
        "query": "1,10,60,1800,3600",
        "refresh": 0,
        "skipUrlSync": false,
        "type": "custom"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_JMRESULTS}",
        "definition": "SELECT DISTINCT sample_label FROM jmresults_statistic where profile_name ='$profile' and run_id='$runid'",
        "hide": 0,
        "includeAll": false,
        "label": "Request name",
        "multi": false,
        "name": "request",
        "options": [],
        "query": "SELECT DISTINCT sample_label FROM jmresults_statistic where profile_name ='$profile' and run_id='$runid'",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "1m",
      "5m",
      "2h"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "browser",
  "title": "JMeter Results from ClickHouse(Eng)",
  "uid": "jmeterhouseeng",
  "version": 3
}