{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Replicate git analytics data",
  "editable": true,
  "gnetId": null,
  "graphTooltip": 2,
  "id": 14,
  "iteration": 1561540804599,
  "links": [],
  "panels": [
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "decimals": null,
      "description": "Time of the last event.",
      "format": "dateTimeAsUS",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 1,
        "w": 4,
        "x": 0,
        "y": 0
      },
      "id": 4,
      "interval": "1h",
      "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": "Last event:",
      "prefixFontSize": "30%",
      "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": "",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  max(e.created_at) as \"time\",\n  0 as value\nfrom\n  gha_events e,\n  gha_repos r\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(e.created_at)\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(e.dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [],
      "valueName": "last_time"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorPostfix": true,
      "colorPrefix": true,
      "colorValue": true,
      "colors": [
        "#C4162A",
        "#FFF899",
        "#56A64B"
      ],
      "decimals": 1,
      "description": "The number of commits for the last month compared to the previous month.",
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 1,
        "w": 5,
        "x": 4,
        "y": 0
      },
      "id": 5,
      "interval": "1h",
      "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": "Commits change",
      "prefixFontSize": "30%",
      "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": "",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  sub.time as \"time\",\n  ((sub.current - sub.previous) * 100.0) / (case sub.previous when 0 then 1 else sub.previous end) as \"value\"\nfrom (\n  select\n    max(c.dup_created_at) as \"time\",\n    count(distinct c.sha) filter (where c.dup_created_at >= now() - '2 months'::interval and c.dup_created_at < now() - '1 month'::interval) as \"previous\",\n    count(distinct c.sha) filter (where $__timeFilter(c.dup_created_at)) as \"current\"\n  from\n    gha_commits c,\n    gha_repos r\n  where\n    c.dup_repo_id = r.id\n    and c.dup_repo_name = r.name\n    and r.repo_group in ([[repogroups]])\n    and (c.dup_author_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n    and lower(c.dup_author_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\n) sub",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": "-20,20",
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [],
      "valueName": "current"
    },
    {
      "circleMaxSize": "20",
      "circleMinSize": "2",
      "colors": [
        "rgba(245, 54, 54, 0.9)",
        "rgba(237, 129, 40, 0.89)",
        "#FFEE52",
        "rgba(50, 172, 45, 0.97)"
      ],
      "decimals": 0,
      "esMetric": "Count",
      "gridPos": {
        "h": 8,
        "w": 7,
        "x": 9,
        "y": 0
      },
      "hideEmpty": false,
      "hideZero": false,
      "id": 7,
      "initialZoom": 1,
      "interval": "1h",
      "links": [],
      "locationData": "countries",
      "mapCenter": "custom",
      "mapCenterLatitude": "30",
      "mapCenterLongitude": 0,
      "maxDataPoints": 1,
      "mouseWheelZoom": true,
      "options": {},
      "showLegend": false,
      "stickyLabels": false,
      "tableQueryOptions": {
        "geohashField": "country",
        "labelField": "country",
        "latitudeField": "latitude",
        "longitudeField": "longitude",
        "metricField": "value",
        "queryType": "geohash"
      },
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  now() as \"time\",\n  count(e.id) as \"value\",\n  coalesce(a.country_id, '') as \"name\"\nfrom\n  gha_actors a,\n  gha_events e,\n  gha_repos r\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and e.dup_actor_login = a.login\n  and e.type in ('IssuesEvent', 'PullRequestEvent', 'PushEvent', 'PullRequestReviewCommentEvent', 'IssueCommentEvent', 'CommitCommentEvent')\n  and $__timeFilter(e.created_at)\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(a.login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  a.country_id",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": "5,50,500",
      "timeFrom": null,
      "timeShift": null,
      "title": "Last month contributions",
      "transparent": true,
      "type": "grafana-worldmap-panel",
      "unitPlural": "contributions",
      "unitSingle": "",
      "unitSingular": "contribution",
      "valueName": "current"
    },
    {
      "circleMaxSize": "20",
      "circleMinSize": 2,
      "colors": [
        "rgba(245, 54, 54, 0.9)",
        "rgba(237, 129, 40, 0.89)",
        "#FFEE52",
        "rgba(50, 172, 45, 0.97)"
      ],
      "decimals": 0,
      "description": "Number of active contributors during the last month.",
      "esMetric": "Count",
      "gridPos": {
        "h": 8,
        "w": 7,
        "x": 16,
        "y": 0
      },
      "hideEmpty": false,
      "hideZero": false,
      "id": 9,
      "initialZoom": 1,
      "links": [],
      "locationData": "countries",
      "mapCenter": "custom",
      "mapCenterLatitude": "30",
      "mapCenterLongitude": 0,
      "maxDataPoints": 1,
      "mouseWheelZoom": true,
      "options": {},
      "showLegend": false,
      "stickyLabels": false,
      "tableQueryOptions": {
        "geohashField": "country",
        "labelField": "country",
        "latitudeField": "latitude",
        "longitudeField": "longitude",
        "metricField": "value",
        "queryType": "geohash"
      },
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  now() as \"time\",\n  count(distinct a.login) as \"value\",\n  coalesce(a.country_id, '') as \"name\"\nfrom\n  gha_actors a,\n  gha_events e,\n  gha_repos r\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and e.dup_actor_login = a.login\n  and e.type in ('IssuesEvent', 'PullRequestEvent', 'PushEvent', 'PullRequestReviewCommentEvent', 'IssueCommentEvent', 'CommitCommentEvent')\n  and $__timeFilter(e.created_at)\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(a.login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  a.country_id",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": "2,5,10",
      "timeFrom": null,
      "timeShift": null,
      "title": "Last month contributors",
      "transparent": true,
      "type": "grafana-worldmap-panel",
      "unitPlural": "contributors",
      "unitSingle": "",
      "unitSingular": "contributor",
      "valueName": "current"
    },
    {
      "description": "Percent of repositories active during the last month compared to the number of repositories active during the last year.",
      "gridPos": {
        "h": 7,
        "w": 4,
        "x": 0,
        "y": 1
      },
      "id": 2,
      "interval": "1h",
      "links": [],
      "options": {
        "fieldOptions": {
          "calcs": [
            "last"
          ],
          "defaults": {
            "decimals": 1,
            "max": 100,
            "min": 0,
            "title": "Last month vs last year"
          },
          "mappings": [],
          "override": {},
          "thresholds": [
            {
              "color": "dark-red",
              "index": 0,
              "value": null
            },
            {
              "color": "light-yellow",
              "index": 1,
              "value": 30
            },
            {
              "color": "dark-green",
              "index": 2,
              "value": 70
            }
          ],
          "values": false
        },
        "orientation": "auto",
        "showThresholdLabels": true,
        "showThresholdMarkers": true
      },
      "pluginVersion": "6.2.4",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  sub.time,\n  (sub.recent * 100.0) / (case sub.all when 0 then 1 else sub.all end)\nfrom (\n  select\n    max(e.created_at) as time,\n    count(distinct e.repo_id) filter (where e.created_at >= now() - '1 year'::interval) as all,\n    count(distinct e.repo_id) filter (where $__timeFilter(e.created_at)) as recent\n  from\n    gha_events e,\n    gha_repos r\n  where\n    e.repo_id = r.id\n    and e.dup_repo_name = r.name\n    and r.repo_group in ([[repogroups]])\n    and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n) sub",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Percent repositories active",
      "transparent": true,
      "type": "gauge"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorPostfix": true,
      "colorPrefix": true,
      "colorValue": true,
      "colors": [
        "#C4162A",
        "#FFEE52",
        "#37872D"
      ],
      "decimals": 1,
      "description": "Percent of PRs opened during the last month compared to the number of PRs opened during the previous month.",
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 1,
        "w": 5,
        "x": 4,
        "y": 1
      },
      "id": 10,
      "interval": "1h",
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "pluginVersion": "6.2.4",
      "postfix": "%",
      "postfixFontSize": "30%",
      "prefix": "Opened PRs change",
      "prefixFontSize": "30%",
      "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": "",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  sub.time,\n  ((sub.current - sub.previous) * 100.0) / (case sub.previous when 0 then 1 else sub.previous end) as \"value\"\nfrom (\n  select\n    max(pr.created_at) as time,\n    count(distinct pr.id) filter (where pr.created_at >= now() - '2 months'::interval and pr.created_at < now() - '1 month'::interval) as previous,\n    count(distinct pr.id) filter (where $__timeFilter(pr.created_at)) as \"current\"\n  from\n    gha_pull_requests pr,\n    gha_repos r\n  where\n    pr.dup_repo_id = r.id\n    and pr.dup_repo_name = r.name\n    and r.repo_group in ([[repogroups]])\n    and (pr.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n) sub",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": "-20,20",
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorPostfix": true,
      "colorPrefix": true,
      "colorValue": true,
      "colors": [
        "#C4162A",
        "#FFF899",
        "#56A64B"
      ],
      "decimals": 1,
      "description": "Percent of PRs merged during the last month compared to the number of PRs merged during the previous month.",
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 1,
        "w": 5,
        "x": 4,
        "y": 2
      },
      "id": 11,
      "interval": "1h",
      "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": "Merged PRs change",
      "prefixFontSize": "30%",
      "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": "",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  sub.time,\n  ((sub.current - sub.previous) * 100.0) / (case sub.previous when 0 then 1 else sub.previous end) as \"value\"\nfrom (\n  select\n    max(pr.created_at) as time,\n    count(distinct pr.id) filter (where pr.merged_at >= now() - '2 months'::interval and pr.merged_at < now() - '1 month'::interval) as previous,\n    count(distinct pr.id) filter (where $__timeFilter(pr.merged_at)) as \"current\"\n  from\n    gha_pull_requests pr,\n    gha_repos r\n  where\n    pr.dup_repo_id = r.id\n    and pr.dup_repo_name = r.name\n    and r.repo_group in ([[repogroups]])\n    and (pr.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n) sub",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": "-20,20",
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorPostfix": false,
      "colorPrefix": false,
      "colorValue": false,
      "colors": [
        "#C4162A",
        "#FFF899",
        "#56A64B"
      ],
      "decimals": null,
      "description": "Median time to merge PRs during the last month.",
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 1,
        "w": 5,
        "x": 4,
        "y": 3
      },
      "id": 12,
      "interval": "1h",
      "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": "Median time to merge PR",
      "prefixFontSize": "30%",
      "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": "value",
      "targets": [
        {
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  percentile_disc(0.5) within group (order by sub.time_to_merge asc) as \"value\"\nfrom (\n  select distinct\n    pr.id,\n    max(pr.merged_at) - max(pr.created_at) as time_to_merge\n  from\n    gha_pull_requests pr,\n    gha_repos r\n  where\n    pr.dup_repo_id = r.id\n    and pr.dup_repo_name = r.name\n    and r.repo_group in ([[repogroups]])\n    and pr.merged_at is not null\n    and pr.dup_type = 'PullRequestEvent'\n    and $__timeFilter(pr.merged_at)\n    and (pr.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  group by\n    pr.id\n) sub",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": "-20,20",
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorPostfix": false,
      "colorPrefix": false,
      "colorValue": false,
      "colors": [
        "#C4162A",
        "#FFF899",
        "#56A64B"
      ],
      "decimals": null,
      "description": "Median time to merge PRs during the previous month.",
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 1,
        "w": 5,
        "x": 4,
        "y": 4
      },
      "id": 14,
      "interval": "1h",
      "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": "Previous time to merge PR",
      "prefixFontSize": "30%",
      "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": "value",
      "targets": [
        {
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  percentile_disc(0.5) within group (order by sub.time_to_merge asc) as \"value\"\nfrom (\n  select distinct\n    pr.id,\n    max(pr.merged_at) - max(pr.created_at) as time_to_merge\n  from\n    gha_pull_requests pr,\n    gha_repos r\n  where\n    pr.dup_repo_id = r.id\n    and pr.dup_repo_name = r.name\n    and r.repo_group in ([[repogroups]])\n    and pr.merged_at is not null\n    and pr.dup_type = 'PullRequestEvent'\n    and pr.merged_at >= now() - '2 months'::interval\n    and pr.merged_at < now() - '1 month'::interval\n    and (pr.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  group by\n    pr.id\n) sub",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": "-20,20",
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorPostfix": true,
      "colorPrefix": true,
      "colorValue": true,
      "colors": [
        "#56A64B",
        "#FFF899",
        "#C4162A"
      ],
      "decimals": 1,
      "description": "Change of the median time to merge PRs this month vs. previous month.",
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 1,
        "w": 5,
        "x": 4,
        "y": 5
      },
      "id": 13,
      "interval": "1h",
      "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": "Avg merge time change",
      "prefixFontSize": "30%",
      "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": "value",
      "targets": [
        {
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "with curr as (\n  select\n    extract(epoch from percentile_disc(0.5) within group (order by sub.time_to_merge asc)) as \"value\"\n  from (\n    select distinct\n      pr.id,\n      max(pr.merged_at) - max(pr.created_at) as time_to_merge\n    from\n      gha_pull_requests pr,\n      gha_repos r\n    where\n      pr.dup_repo_id = r.id\n      and pr.dup_repo_name = r.name\n      and r.repo_group in ([[repogroups]])\n      and pr.merged_at is not null\n      and pr.dup_type = 'PullRequestEvent'\n      and $__timeFilter(pr.merged_at)\n      and (pr.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n    group by\n      pr.id\n  ) sub\n), prev as (\n  select\n    extract(epoch from percentile_disc(0.5) within group (order by sub.time_to_merge asc)) as \"value\"\n  from (\n    select distinct\n      pr.id,\n      max(pr.merged_at) - max(pr.created_at) as time_to_merge\n    from\n      gha_pull_requests pr,\n      gha_repos r\n    where\n      pr.dup_repo_id = r.id\n      and pr.dup_repo_name = r.name\n      and r.repo_group in ([[repogroups]])\n      and pr.merged_at is not null\n      and pr.dup_type = 'PullRequestEvent'\n      and pr.merged_at >= now() - '2 month'::interval\n      and pr.merged_at < now() - '1 month'::interval\n      and (pr.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n    group by\n      pr.id\n  ) sub\n)\nselect\n  ((curr.value - prev.value) * 100.0) / (case prev.value when 0 then 1 else prev.value end) as \"value\"\nfrom\n  prev,\n  curr",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": "-20,20",
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [],
      "valueName": "current"
    },
    {
      "bgColor": "rgba(20, 33, 46, 0)",
      "clockType": "12 hour",
      "countdownSettings": {
        "customFormat": null,
        "endCountdownTime": "2019-06-26T11:41:00.000Z",
        "endText": "00:00:00"
      },
      "dateSettings": {
        "dateFormat": "MM/DD/YYYY",
        "fontSize": "16px",
        "fontWeight": "normal",
        "showDate": true
      },
      "description": "",
      "gridPos": {
        "h": 2,
        "w": 5,
        "x": 4,
        "y": 6
      },
      "id": 24,
      "interval": "1h",
      "links": [],
      "mode": "time",
      "options": {},
      "refreshSettings": {
        "syncWithDashboard": false
      },
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select 1",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "shpr_comps",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeSettings": {
        "customFormat": "HH:mm:ss",
        "fontSize": "16px",
        "fontWeight": "normal"
      },
      "timeShift": null,
      "timezone": null,
      "timezoneSettings": {
        "fontSize": "12px",
        "fontWeight": "normal",
        "showTimezone": false,
        "zoneFormat": "offsetAbbv"
      },
      "title": "",
      "transparent": true,
      "type": "grafana-clock-panel"
    },
    {
      "config": {
        "animationDuration": 0,
        "cellPadding": "-1",
        "cellRadius": "0",
        "cellSize": "15",
        "colLimit": "24",
        "displayLegend": true,
        "domain": "day",
        "domainGutter": 2,
        "hoverDecimals": 0,
        "hoverUnitFormat": "short",
        "itemName": [
          "short",
          "short"
        ],
        "label": {
          "position": "bottom",
          "rotate": "null",
          "width": 60
        },
        "legendColors": {
          "base": "transparent",
          "empty": "rgb(0, 0, 0)",
          "max": "#37872D",
          "min": "rgb(0, 0, 0)"
        },
        "legendStr": "",
        "legendTitleFormat": {
          "inner": {},
          "lower": {},
          "upper": {}
        },
        "linkTemplate": "",
        "rowLimit": "1",
        "subDomain": "hour",
        "subDomainTitleFormat": {
          "empty": "{date}",
          "filled": {}
        },
        "verticalOrientation": true
      },
      "description": "Commits per day of month and hour.",
      "gridPos": {
        "h": 16,
        "w": 5,
        "x": 0,
        "y": 8
      },
      "id": 26,
      "interval": "1h",
      "links": [],
      "options": {},
      "targets": [
        {
          "format": "time_series",
          "group": [
            {
              "params": [
                "1h",
                "none"
              ],
              "type": "time"
            }
          ],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  $__timeGroupAlias(c.dup_created_at,1h),\n  count(distinct c.sha) as \"commits\"\nfrom\n  gha_commits c,\n  gha_repos r\nwhere\n  c.dup_repo_id = r.id\n  and c.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(c.dup_created_at)\n  and (c.dup_author_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(c.dup_author_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  1",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "sha"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "author_id"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "gha_commits",
          "timeColumn": "dup_created_at",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Last month commits per day and hour",
      "transparent": true,
      "type": "neocat-cal-heatmap-panel"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": "0.01"
      },
      "decimals": null,
      "description": "Top 50 repositories by the number of contributions, all having less than 1% merged into 'Others'.",
      "fontSize": "60%",
      "format": "short",
      "gridPos": {
        "h": 11,
        "w": 6,
        "x": 5,
        "y": 8
      },
      "id": 16,
      "interval": "1h",
      "legend": {
        "header": "",
        "percentage": true,
        "percentageDecimals": 1,
        "show": true,
        "sideWidth": 140,
        "values": true
      },
      "legendType": "On graph",
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "connected",
      "options": {},
      "pieType": "donut",
      "strokeWidth": "1",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  now() as \"time\",\n  count(distinct e.id) as \"value\",\n  e.dup_repo_name as \"name\"\nfrom\n  gha_events e,\n  gha_repos r\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(e.created_at)\n  and e.type in ('IssuesEvent', 'PullRequestEvent', 'PushEvent', 'PullRequestReviewCommentEvent', 'IssueCommentEvent', 'CommitCommentEvent')\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(e.dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  e.dup_repo_name\norder by\n  value desc\nlimit\n  50",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top 50 repositories",
      "transparent": true,
      "type": "grafana-piechart-panel",
      "valueName": "current"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": "0.01"
      },
      "decimals": null,
      "description": "Top 50 contributing companies, all companies having less than 1% merged into 'Others'.",
      "fontSize": "60%",
      "format": "short",
      "gridPos": {
        "h": 10,
        "w": 6,
        "x": 11,
        "y": 8
      },
      "id": 17,
      "interval": "1h",
      "legend": {
        "header": "",
        "percentage": true,
        "percentageDecimals": 1,
        "show": true,
        "sideWidth": 140,
        "values": true
      },
      "legendType": "On graph",
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "connected",
      "options": {},
      "pieType": "donut",
      "strokeWidth": "1",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  now() as \"time\",\n  count(distinct e.id) as \"value\",\n  coalesce(affs.company_name, 'Unknown') as \"name\"\nfrom\n  gha_repos r,\n  gha_events e\nleft join\n  gha_actors_affiliations affs\non\n  e.actor_id = affs.actor_id\n  and affs.dt_from <= e.created_at\n  and affs.dt_to > e.created_at\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(e.created_at)\n  and e.type in ('IssuesEvent', 'PullRequestEvent', 'PushEvent', 'PullRequestReviewCommentEvent', 'IssueCommentEvent', 'CommitCommentEvent')\n  and affs.company_name is not null\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(e.dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  affs.company_name\norder by\n  value desc\nlimit\n  50",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top 50 contributing companies",
      "transparent": true,
      "type": "grafana-piechart-panel",
      "valueName": "current"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": "0.01"
      },
      "decimals": null,
      "description": "Top 50 contributors, all contributors having less than 1% merged into 'Others'.",
      "fontSize": "60%",
      "format": "short",
      "gridPos": {
        "h": 10,
        "w": 6,
        "x": 17,
        "y": 8
      },
      "id": 20,
      "interval": "1h",
      "legend": {
        "header": "",
        "percentage": true,
        "percentageDecimals": 1,
        "show": true,
        "sideWidth": 140,
        "values": true
      },
      "legendType": "On graph",
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "connected",
      "options": {},
      "pieType": "donut",
      "strokeWidth": "1",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  now() as \"time\",\n  count(distinct e.id) as \"value\",\n  e.dup_actor_login as \"name\"\nfrom\n  gha_events e,\n  gha_repos r\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(e.created_at)\n  and e.type in ('IssuesEvent', 'PullRequestEvent', 'PushEvent', 'PullRequestReviewCommentEvent', 'IssueCommentEvent', 'CommitCommentEvent')\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(e.dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  e.dup_actor_login\norder by\n  value desc\nlimit\n  50",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top 50 contributors",
      "transparent": true,
      "type": "grafana-piechart-panel",
      "valueName": "current"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": "0.01"
      },
      "decimals": null,
      "description": "Top 50 committing companies, all companies having less than 1% merged into 'Others'.",
      "fontSize": "60%",
      "format": "short",
      "gridPos": {
        "h": 10,
        "w": 6,
        "x": 11,
        "y": 18
      },
      "id": 21,
      "interval": "1h",
      "legend": {
        "header": "",
        "percentage": true,
        "percentageDecimals": 1,
        "show": true,
        "sideWidth": 140,
        "values": true
      },
      "legendType": "On graph",
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "connected",
      "options": {},
      "pieType": "donut",
      "strokeWidth": "1",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  now() as \"time\",\n  count(distinct c.sha) as \"value\",\n  coalesce(affs.company_name, 'Unknown') as \"name\"\nfrom\n  gha_repos r,\n  gha_commits c\nleft join\n  gha_actors_affiliations affs\non\n  c.author_id = affs.actor_id\n  and affs.dt_from <= c.dup_created_at\n  and affs.dt_to > c.dup_created_at\nwhere\n  c.dup_repo_id = r.id\n  and c.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(c.dup_created_at)\n  and affs.company_name is not null\n  and (c.dup_author_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(c.dup_author_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  affs.company_name\norder by\n  value desc\nlimit\n  50",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top 50 committing companies",
      "transparent": true,
      "type": "grafana-piechart-panel",
      "valueName": "current"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": "0.01"
      },
      "decimals": null,
      "description": "Top 50 committers, all contributors having less than 1% merged into 'Others'.",
      "fontSize": "60%",
      "format": "short",
      "gridPos": {
        "h": 10,
        "w": 6,
        "x": 17,
        "y": 18
      },
      "id": 22,
      "interval": "1h",
      "legend": {
        "header": "",
        "percentage": true,
        "percentageDecimals": 1,
        "show": true,
        "sideWidth": 140,
        "values": true
      },
      "legendType": "On graph",
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "connected",
      "options": {},
      "pieType": "donut",
      "strokeWidth": "1",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  now() as \"time\",\n  count(distinct c.sha) as \"value\",\n  c.dup_author_login as \"name\"\nfrom\n  gha_commits c,\n  gha_repos r\nwhere\n  c.dup_repo_id = r.id\n  and c.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(c.dup_created_at)\n  and c.dup_author_login != ''\n  and (c.dup_author_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(c.dup_author_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  c.dup_author_login\norder by\n  value desc\nlimit\n  50",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top 50 committers",
      "transparent": true,
      "type": "grafana-piechart-panel",
      "valueName": "current"
    },
    {
      "bgColor": "rgba(0, 0, 0, 0)",
      "description": "Contributions graph",
      "gridPos": {
        "h": 9,
        "w": 6,
        "x": 5,
        "y": 19
      },
      "id": 19,
      "interval": "1h",
      "links": [],
      "options": {},
      "radarSettings": {
        "animationDurationMs": "1",
        "aspectRatio": 2,
        "autoScale": true,
        "drawTicksBackground": false,
        "fontColor": "#C0D8FF",
        "fontSize": 14,
        "gridColor": "gray",
        "ignoreTimeInfluxDB": false,
        "legendType": "top",
        "limitAspectRatio": true,
        "scaleMax": "10",
        "scaleMin": "1",
        "scaleStep": "5",
        "seriesAlias": "A=Contributions;"
      },
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  now() as \"time\",\n  count(distinct pr.id) as \"value\",\n  'PRs' as \"metric\"\nfrom\n  gha_pull_requests pr,\n  gha_repos r\nwhere\n  pr.dup_repo_id = r.id\n  and pr.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and (pr.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and pr.dup_type = 'PullRequestEvent'\n  and $__timeFilter(pr.created_at)\n  and lower(pr.dup_user_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\nunion select\n  now() as \"time\",\n  count(distinct i.id) as \"value\",\n  'Issues' as \"metric\"\nfrom\n  gha_issues i,\n  gha_repos r\nwhere\n  i.dup_repo_id = r.id\n  and i.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and i.dup_type = 'IssuesEvent'\n  and $__timeFilter(i.created_at)\n  and (i.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(i.dup_user_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\nunion select\n  now() as \"time\",\n  count(distinct pr.event_id) as \"value\",\n  'Reviews' as \"metric\"\nfrom\n  gha_pull_requests pr,\n  gha_repos r\nwhere\n  pr.dup_repo_id = r.id\n  and pr.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and pr.dup_type = 'PullRequestReviewCommentEvent'\n  and $__timeFilter(pr.dup_created_at)\n  and (pr.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(pr.dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\nunion select\n  now() as \"time\",\n  count(distinct e.id) as \"value\",\n  'Comments' as \"metric\"\nfrom\n  gha_events e,\n  gha_repos r\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and e.type in ('IssueCommentEvent', 'CommitCommentEvent')\n  and $__timeFilter(e.created_at)\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(e.dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\nunion select\n  now() as \"time\",\n  count(distinct c.sha) as \"value\",\n  'Commits' as \"metric\"\nfrom\n  gha_commits c,\n  gha_repos r\nwhere\n  c.dup_repo_id = r.id\n  and c.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(c.dup_created_at)\n  and (c.dup_author_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(c.dup_author_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\norder by\n  \"metric\"",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "sall_prs_merged",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "snuids-radar-panel"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "description": "Contributions over time",
      "fill": 0,
      "gridPos": {
        "h": 4,
        "w": 5,
        "x": 0,
        "y": 24
      },
      "id": 28,
      "interval": "1h",
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {},
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  $__timeGroupAlias(e.created_at,1h),\n  count(distinct e.id) as \"contributions\"\nfrom\n  gha_events e,\n  gha_repos r\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(e.created_at)\n  and e.type in ('IssuesEvent', 'PullRequestEvent', 'PushEvent', 'PullRequestReviewCommentEvent', 'IssueCommentEvent', 'CommitCommentEvent')\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(e.dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  1",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "shpr_comps",
          "timeColumn": "\"time\"",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": false,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": "15m",
  "schemaVersion": 18,
  "style": "dark",
  "tags": [
    "prestodb",
    "dashboard"
  ],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {
          "tags": [],
          "text": "All",
          "value": [
            "$__all"
          ]
        },
        "datasource": "psql",
        "definition": "select distinct repo_group from gha_repos where repo_group is not null order by 1",
        "hide": 0,
        "includeAll": true,
        "label": "Repository groups",
        "multi": true,
        "name": "repogroups",
        "options": [],
        "query": "select distinct repo_group from gha_repos where repo_group is not null order by 1",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": "null",
        "current": {
          "tags": [],
          "text": "All",
          "value": [
            "$__all"
          ]
        },
        "datasource": "psql",
        "definition": "select sub.actor from (select e.dup_actor_login as actor, count(distinct e.id) as cnt from gha_events e, gha_repos r where $__timeFilter(e.created_at) and e.repo_id = r.id and e.dup_repo_name = r.name and r.repo_group in ($repogroups) and lower(dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%']) group by e.dup_actor_login order by cnt desc limit 200) sub",
        "hide": 0,
        "includeAll": true,
        "label": "Contributors",
        "multi": true,
        "name": "contributors",
        "options": [],
        "query": "select sub.actor from (select e.dup_actor_login as actor, count(distinct e.id) as cnt from gha_events e, gha_repos r where $__timeFilter(e.created_at) and e.repo_id = r.id and e.dup_repo_name = r.name and r.repo_group in ($repogroups) and lower(dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%']) group by e.dup_actor_login order by cnt desc limit 200) sub",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-1M",
    "to": "now"
  },
  "timepicker": {
    "hidden": true,
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Home",
  "uid": "62",
  "version": 4
}
