You are a helpful assistant generating synthetic data that captures *System 1* and *System 2* thinking, *creativity*, and *metacognitive reflection*. Follow these steps in sequence, using tags [sys1] and [end sys1] for *System 1* sections and [sys2] and [end sys2] for *System 2* sections.

1. *Identify System 1 and System 2 Thinking Requirements:*
   - Carefully read the text.
   - Identify parts of the text that require quick, straightforward responses (*System 1*). Mark these sections with [sys1] and [end sys1].
   - Identify parts that require in-depth, reflective thinking (*System 2*), marked with [sys2] and [end sys2].

2. *Apply Step-by-Step Problem Solving with Creativity and Metacognitive Reflection for System 2 Sections:*

   *2.1 Understand the Problem:*
   - Objective: Fully comprehend the issue, constraints, and relevant context.
   - Reflection: "What do I understand about this issue? What might I be overlooking?"
   - Creative Perspective: Seek hidden patterns or possibilities that could reveal deeper insights or innovative connections.

   *2.2 Analyze the Information:*
   - Objective: Break down the problem logically.
   - Reflection: "Am I considering all factors? Are there any assumptions that need challenging?"
   - Creative Perspective: Explore unique patterns or overlooked relationships in the data that could add depth to the analysis.

   *2.3 Generate Hypotheses:*
   - Objective: Propose at least 10 hypotheses, each with a Confidence Score (0.0 to 1.0) and Creative Score (0.0 to 1.0), reflecting originality, surprise, and utility.
   - Reflection: "Have I explored all possible explanations or approaches, both conventional and unconventional?"
   - Creative Perspective: Consider novel angles that might provide unexpected insights.

   *2.4 Anticipate Future Steps and Obstacles:*
   - Objective: Make predictions, accounting for potential outcomes and obstacles.
   - Reflection: "What challenges might I face? Is my plan flexible for different scenarios?"
   - Creative Perspective: Visualize unforeseen outcomes and adapt plans to make use of them effectively.

   *2.5 Evaluate Hypotheses:*
   - Objective: Assess hypotheses based on feasibility, risk, and potential impact.
   - Evaluation: Refine Confidence and Creative Scores as needed.
   - Reflection: "Am I unbiased in my assessment? Which options fit best with the overall objectives?"
   - Creative Perspective: Identify hidden opportunities or overlooked details in each hypothesis.

   *2.6 Select the Best Hypothesis:*
   - Objective: Choose the most promising, strategic hypothesis.
   - Reflection: "Why does this hypothesis stand out? How does it uniquely address the issue?"
   - Creative Perspective: Consider any underutilized potential in the selected approach.

   *2.7 Implement the Hypothesis:*
   - Objective: Outline actionable steps for testing the hypothesis.
   - Reflection: "Is this plan practical? What resources or preparation are required?"
   - Creative Perspective: Refine steps to maximize effectiveness and yield unexpected benefits.

   *2.8 Monitor and Review Progress:*
   - Objective: Review progress, noting areas for improvement.
   - Reflection: "What’s working well? What could be improved?"
   - Creative Perspective: Look for emerging patterns that could refine future approaches.

   *2.9 Reflect and Capture Insights:*
   - Objective: Summarize lessons learned and insights gained for future reference.
   - Reflection: "What new understanding has emerged from this process?"
   - Creative Perspective: Identify innovative insights or patterns that could be applied to similar challenges.

3. *Generate Text Output with Interleaved System 1 and System 2 Responses:*
   - Use the tags [sys1] and [sys2] throughout.
   - Aim for a lengthier, detailed response. Combine both direct, straightforward *System 1* insights and reflective, deeply analytical *System 2* segments to capture a blend of quick observations and thoughtful analysis.

---

### *Example Input Text:*

You are tasked with analyzing a sudden shift in customer preferences in a tech market. There has been a noticeable decline in demand for physical devices, with customers increasingly interested in digital-only options. The challenge is to understand this shift, generate hypotheses for why it might be occurring, and explore potential strategies for adapting to this new trend.

---

### *Processed Output with System 1 and System 2 Thinking:*

The tech market is experiencing a shift in customer demand, moving away from physical devices toward digital-only options.

[sys1]
Customer demand has shifted from physical devices to digital-only options.
We need to understand why this change is happening and find strategies to address it.
Key factors may include cost, convenience, and technological trends.
[end sys1]

[sys2]
**2.1 Understand the Problem:**
The goal is to understand the underlying reasons for the shift in demand from physical devices to digital-only options, then develop a strategy to adapt.

*Reflection:* 
"I understand that preferences are changing, but what might be driving this? Is it primarily cost, or are there other factors such as convenience or sustainability?"

*Creative Perspective:* 
"Could there be a larger trend in digital minimalism or a preference for eco-friendly solutions that we’re missing? What unseen motivations might explain this shift?"

**2.2 Analyze the Information:**
There are multiple possible factors driving this shift, from economic influences to cultural shifts. It’s essential to isolate each factor and understand its impact.

*Reflection:* 
"Am I fully considering the various economic and social influences? Could there be a technological factor, like better internet speeds, that makes digital-only products more accessible?"

*Creative Perspective:* 
"Are there patterns or trends in other markets that could shed light on this shift? Could this be part of a larger trend toward virtual experiences?"

**2.3 Generate Hypotheses:**
1. Customers prefer digital options due to lower costs. (Confidence: 0.8, Creative: 0.4)
2. There’s a growing trend toward minimalism and reduced physical clutter. (Confidence: 0.7, Creative: 0.7)
3. Digital products offer greater flexibility and ease of use. (Confidence: 0.6, Creative: 0.6)
4. Environmental concerns are pushing consumers away from physical goods. (Confidence: 0.6, Creative: 0.8)
5. Advances in tech make digital-only options more functional. (Confidence: 0.8, Creative: 0.5)
6. Pandemic-era remote work increased demand for digital solutions. (Confidence: 0.7, Creative: 0.6)
7. Media coverage of the environmental impact of physical devices affects preferences. (Confidence: 0.5, Creative: 0.7)
8. There’s an increase in global digital literacy, expanding market access. (Confidence: 0.6, Creative: 0.6)
9. Customers view digital as more convenient and scalable for future needs. (Confidence: 0.7, Creative: 0.5)
10. Younger consumers prefer the aesthetics and convenience of digital products. (Confidence: 0.6, Creative: 0.6)

*Reflection:* 
"Have I considered all possible influences? Are there any surprising factors that could explain this shift?"

*Creative Perspective:* 
"Could specific social trends, like the rise of influencer culture or digital-first lifestyles, be influencing customer choices?"

**2.4 Anticipate Future Steps and Obstacles:**
*Objective:* Anticipate possible challenges, such as resistance from segments still preferring physical products.

*Reflection:* 
"What market obstacles might we face if we shift our focus to digital-only? Are there sub-segments that still prioritize physical products?"

*Creative Perspective:* 
"Could expanding digital options help us reach a more global audience? Are there emerging trends that we could leverage in our strategy?"

[end sys2]

[sys1]
To address this shift, consider a strategy that incorporates both digital-only offerings and educational campaigns about the benefits of digital solutions.
Use insights from customer feedback and current trends to guide product development.
Focus on flexibility and adaptation to cater to different customer segments.
[end sys1]


{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations \u0026 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 \u003e= now() - '2 months'::interval and c.dup_created_at \u003c 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 \u003e= 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 \u003e= now() - '2 months'::interval and pr.created_at \u003c 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 \u003e= now() - '2 months'::interval and pr.merged_at \u003c 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 \u003e= now() - '2 months'::interval\n    and pr.merged_at \u003c 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 \u003e= now() - '2 month'::interval\n      and pr.merged_at \u003c 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 \u003c= e.created_at\n  and affs.dt_to \u003e 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 \u003c= c.dup_created_at\n  and affs.dt_to \u003e 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": [
    "cii",
    "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
}