{
  "annotations": [
    {
      "kind": "AnnotationQuery",
      "spec": {
        "builtIn": true,
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "query": {
          "datasource": {
            "name": "-- Grafana --"
          },
          "group": "grafana",
          "kind": "DataQuery",
          "spec": {},
          "version": "v0"
        }
      }
    }
  ],
  "cursorSync": "Crosshair",
  "editable": true,
  "elements": {
    "panel-4": {
      "kind": "Panel",
      "spec": {
        "data": {
          "kind": "QueryGroup",
          "spec": {
            "queries": [
              {
                "kind": "PanelQuery",
                "spec": {
                  "hidden": false,
                  "query": {
                    "datasource": {
                      "name": "ceczcsck1b20wb"
                    },
                    "group": "grafana-clickhouse-datasource",
                    "kind": "DataQuery",
                    "spec": {
                      "editorType": "sql",
                      "format": 0,
                      "meta": {
                        "builderOptions": {
                          "columns": [],
                          "database": "",
                          "limit": 1000,
                          "mode": "list",
                          "queryType": "table",
                          "table": ""
                        }
                      },
                      "pluginVersion": "4.17.0",
                      "queryType": "timeseries",
                      "rawSql": "WITH viable AS (\n    SELECT\n        repository.pushed_at AS pushed_ts,\n        toUnixTimestamp(head_commit.timestamp) AS commit_ts,\n        repository.full_name AS repo\n    FROM push\n    WHERE repository.full_name = '$repository'\n      AND ref = 'refs/heads/viable/strict'\n      AND head_commit.id != ''\n),\nmain AS (\n    SELECT\n        repository.pushed_at AS pushed_ts,\n        toUnixTimestamp(head_commit.timestamp) AS commit_ts,\n        repository.full_name AS repo\n    FROM push\n    WHERE repository.full_name = '$repository'\n      AND ref = 'refs/heads/main'\n      AND head_commit.id != ''\n)\nSELECT fromUnixTimestamp(pushed_ts) AS pushed_time, lag_minutes, trend_7d_avg\nFROM (\n    SELECT\n        m.pushed_ts,\n        (toInt64(m.commit_ts) - toInt64(nullIf(v.commit_ts, 0))) / 60.0 AS lag_minutes,\n        avg(lag_minutes) OVER (\n            ORDER BY m.pushed_ts\n            RANGE BETWEEN 604800 PRECEDING AND CURRENT ROW\n        ) AS trend_7d_avg\n    FROM main m\n    ASOF LEFT JOIN viable v\n        ON m.repo = v.repo AND m.pushed_ts >= v.pushed_ts\n)\nWHERE $__timeFilter(pushed_time)\nORDER BY pushed_time ASC"
                    },
                    "version": "v0"
                  },
                  "refId": "Drift"
                }
              }
            ],
            "queryOptions": {},
            "transformations": []
          }
        },
        "description": "How long it takes viable/strict to catch up to main.",
        "id": 4,
        "links": [],
        "title": "viable/strict Lag [repository]",
        "vizConfig": {
          "group": "timeseries",
          "kind": "VizConfig",
          "spec": {
            "fieldConfig": {
              "defaults": {
                "color": {
                  "mode": "thresholds",
                  "seriesBy": "last"
                },
                "min": 0,
                "unit": "m",
                "custom": {
                  "drawStyle": "line",
                  "fillOpacity": 15,
                  "gradientMode": "scheme",
                  "lineInterpolation": "linear",
                  "lineWidth": 1,
                  "pointSize": 5,
                  "showPoints": "never",
                  "thresholdsStyle": {
                    "mode": "dashed"
                  }
                },
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": 0
                    },
                    {
                      "color": "#EAB839",
                      "value": 240
                    },
                    {
                      "color": "red",
                      "value": 1440
                    }
                  ]
                }
              },
              "overrides": [
                {
                  "matcher": {
                    "id": "byName",
                    "options": "trend_7d_avg",
                    "scope": "series"
                  },
                  "properties": [
                    {
                      "id": "custom.lineInterpolation",
                      "value": "smooth"
                    },
                    {
                      "id": "color",
                      "value": {
                        "fixedColor": "blue",
                        "mode": "fixed"
                      }
                    },
                    {
                      "id": "custom.fillOpacity",
                      "value": 0
                    },
                    {
                      "id": "custom.lineWidth",
                      "value": 2
                    }
                  ]
                }
              ]
            },
            "options": {
              "legend": {
                "calcs": [],
                "displayMode": "list",
                "placement": "bottom",
                "showLegend": false
              },
              "tooltip": {
                "hideZeros": false,
                "mode": "multi",
                "sort": "none"
              }
            }
          },
          "version": "13.1.0-25668120414"
        }
      }
    },
    "panel-5": {
      "kind": "Panel",
      "spec": {
        "data": {
          "kind": "QueryGroup",
          "spec": {
            "queries": [
              {
                "kind": "PanelQuery",
                "spec": {
                  "hidden": false,
                  "query": {
                    "datasource": {
                      "name": "ceczcsck1b20wb"
                    },
                    "group": "grafana-clickhouse-datasource",
                    "kind": "DataQuery",
                    "spec": {
                      "editorType": "sql",
                      "format": 0,
                      "meta": {
                        "builderOptions": {
                          "columns": [],
                          "database": "",
                          "limit": 1000,
                          "mode": "list",
                          "queryType": "table",
                          "table": ""
                        }
                      },
                      "pluginVersion": "4.17.0",
                      "queryType": "timeseries",
                      "rawSql": "SELECT\n    revert_day,\n    prs_reverted,\n    sum(prs_reverted) OVER (\n        ORDER BY toUnixTimestamp(revert_day) ASC\n        RANGE BETWEEN 6 * 24 * 60 * 60 PRECEDING AND CURRENT ROW\n    ) / 7.0 AS trend_7d_avg\nFROM (\n    SELECT\n        toStartOfDay(head_commit.timestamp) AS revert_day,\n        COUNT() AS prs_reverted\n    FROM push\n    WHERE\n        repository.full_name = '$repository'\n        AND ref IN ('refs/heads/master', 'refs/heads/main')\n        AND (\n            head_commit.message LIKE 'Revert %'\n            OR head_commit.message LIKE 'Back out%'\n        )\n        AND $__timeFilter(head_commit.timestamp)\n    GROUP BY revert_day\n)\nORDER BY revert_day DESC"
                    },
                    "version": "v0"
                  },
                  "refId": "A"
                }
              }
            ],
            "queryOptions": {},
            "transformations": []
          }
        },
        "description": "",
        "id": 5,
        "links": [],
        "title": "Daily PR Reverts [repository]",
        "vizConfig": {
          "group": "timeseries",
          "kind": "VizConfig",
          "spec": {
            "fieldConfig": {
              "defaults": {
                "color": {
                  "mode": "thresholds",
                  "seriesBy": "last"
                },
                "custom": {
                  "axisBorderShow": false,
                  "axisCenteredZero": false,
                  "axisColorMode": "text",
                  "axisLabel": "",
                  "axisPlacement": "auto",
                  "barAlignment": 0,
                  "barWidthFactor": 0.5,
                  "drawStyle": "bars",
                  "fillOpacity": 50,
                  "gradientMode": "scheme",
                  "hideFrom": {
                    "legend": false,
                    "tooltip": false,
                    "viz": false
                  },
                  "insertNulls": false,
                  "lineInterpolation": "linear",
                  "lineStyle": {
                    "fill": "solid"
                  },
                  "lineWidth": 1,
                  "pointSize": 5,
                  "scaleDistribution": {
                    "type": "linear"
                  },
                  "showPoints": "auto",
                  "showValues": false,
                  "spanNulls": false,
                  "stacking": {
                    "group": "A",
                    "mode": "none"
                  },
                  "thresholdsStyle": {
                    "mode": "dashed"
                  }
                },
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": 0
                    },
                    {
                      "color": "#EAB839",
                      "value": 1
                    },
                    {
                      "color": "red",
                      "value": 10
                    }
                  ]
                }
              },
              "overrides": [
                {
                  "matcher": {
                    "id": "byName",
                    "options": "trend_7d_avg",
                    "scope": "series"
                  },
                  "properties": [
                    {
                      "id": "custom.drawStyle",
                      "value": "line"
                    },
                    {
                      "id": "custom.lineInterpolation",
                      "value": "smooth"
                    },
                    {
                      "id": "color",
                      "value": {
                        "fixedColor": "blue",
                        "mode": "fixed"
                      }
                    },
                    {
                      "id": "custom.fillOpacity",
                      "value": 0
                    },
                    {
                      "id": "custom.lineWidth",
                      "value": 2
                    },
                    {
                      "id": "custom.showPoints",
                      "value": "never"
                    }
                  ]
                }
              ]
            },
            "options": {
              "annotations": {
                "clustering": -1,
                "multiLane": false
              },
              "legend": {
                "calcs": [],
                "displayMode": "list",
                "placement": "bottom",
                "showLegend": false
              },
              "tooltip": {
                "hideZeros": false,
                "mode": "multi",
                "sort": "none"
              }
            }
          },
          "version": "13.1.0-25668120414"
        }
      }
    },
    "panel-6": {
      "kind": "Panel",
      "spec": {
        "data": {
          "kind": "QueryGroup",
          "spec": {
            "queries": [
              {
                "kind": "PanelQuery",
                "spec": {
                  "hidden": false,
                  "query": {
                    "datasource": {
                      "name": "ceczcsck1b20wb"
                    },
                    "group": "grafana-clickhouse-datasource",
                    "kind": "DataQuery",
                    "spec": {
                      "editorType": "sql",
                      "format": 0,
                      "meta": {
                        "builderOptions": {
                          "columns": [],
                          "database": "",
                          "limit": 1000,
                          "mode": "list",
                          "queryType": "table",
                          "table": ""
                        }
                      },
                      "pluginVersion": "4.17.0",
                      "queryType": "timeseries",
                      "rawSql": "  WITH commits AS (\n      SELECT\n          commit.id AS commit_sha,\n          commit.timestamp AS commit_time\n      FROM default.push\n      ARRAY JOIN commits AS commit\n      WHERE\n          repository.full_name = '$repository'\n          AND ref = 'refs/heads/main'\n  ),\n  blocking_runs AS (\n      SELECT id\n      FROM default.workflow_run\n      WHERE\n          head_branch = 'main'\n          AND event = 'push'\n          AND path IN (\n              -- Core\n              '.github/workflows/lint.yml',\n              '.github/workflows/pull.yml',\n              '.github/workflows/trunk.yml',\n              '.github/workflows/inductor.yml',\n              '.github/workflows/inductor-periodic.yml',\n              '.github/workflows/inductor-unittest.yml',\n              '.github/workflows/periodic.yml',\n              '.github/workflows/slow.yml',\n              '.github/workflows/dynamo-unittest.yml',\n              -- Modern hardware\n              '.github/workflows/rocm-mi300.yml',\n              '.github/workflows/rocm-mi355.yml',\n              '.github/workflows/xpu.yml',\n              '.github/workflows/mac-mps.yml',\n              '.github/workflows/tsan.yml',\n              '.github/workflows/inductor-rocm-mi300.yml',\n              '.github/workflows/inductor-rocm-mi355.yml',\n              -- Distributed\n              '.github/workflows/b200-distributed.yml',\n              '.github/workflows/h100-distributed.yml',\n              -- Adjacent / integrations\n              '.github/workflows/dtensor.yml',\n              '.github/workflows/inductor-pallas.yml',\n              '.github/workflows/vllm.yml',\n              '.github/workflows/torchtitan.yml'\n          )\n  )\n  \nSELECT\n    commits.commit_time AS commit_time,\n    round((countIf(default.workflow_job.conclusion = 'failure') / count()) * 100.0, 2) AS failure_percent,\n    avg(failure_percent) OVER (ORDER BY toUnixTimestamp(commits.commit_time) ASC RANGE BETWEEN 6 * 24 * 60 * 60 PRECEDING AND CURRENT ROW) AS trend_7d_avg\nFROM default.workflow_job\nINNER JOIN commits ON commits.commit_sha = default.workflow_job.head_sha\nINNER JOIN blocking_runs ON blocking_runs.id = default.workflow_job.run_id\nWHERE\n    default.workflow_job.run_attempt = 1\n    AND $__timeFilter(commits.commit_time)\nGROUP BY commits.commit_sha, commits.commit_time\nORDER BY commit_time ASC"
                    },
                    "version": "v0"
                  },
                  "refId": "A"
                }
              }
            ],
            "queryOptions": {},
            "transformations": []
          }
        },
        "description": "",
        "id": 6,
        "links": [],
        "title": "Workflow Failure Percent / Main Commit [repository]",
        "vizConfig": {
          "group": "timeseries",
          "kind": "VizConfig",
          "spec": {
            "fieldConfig": {
              "defaults": {
                "color": {
                  "fixedColor": "rgba(242, 73, 92, 0.75)",
                  "mode": "fixed"
                },
                "custom": {
                  "axisBorderShow": false,
                  "axisCenteredZero": false,
                  "axisColorMode": "text",
                  "axisLabel": "",
                  "axisPlacement": "auto",
                  "barAlignment": 0,
                  "barWidthFactor": 0.6,
                  "drawStyle": "line",
                  "fillOpacity": 50,
                  "gradientMode": "none",
                  "hideFrom": {
                    "legend": false,
                    "tooltip": false,
                    "viz": false
                  },
                  "insertNulls": false,
                  "lineInterpolation": "linear",
                  "lineStyle": {
                    "fill": "solid"
                  },
                  "lineWidth": 1,
                  "pointSize": 5,
                  "scaleDistribution": {
                    "type": "linear"
                  },
                  "showPoints": "auto",
                  "showValues": false,
                  "spanNulls": false,
                  "stacking": {
                    "group": "A",
                    "mode": "none"
                  },
                  "thresholdsStyle": {
                    "mode": "off"
                  }
                },
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": 0
                    }
                  ]
                }
              },
              "overrides": [
                {
                  "matcher": {
                    "id": "byName",
                    "options": "trend_7d_avg",
                    "scope": "series"
                  },
                  "properties": [
                    {
                      "id": "custom.drawStyle",
                      "value": "line"
                    },
                    {
                      "id": "custom.lineInterpolation",
                      "value": "smooth"
                    },
                    {
                      "id": "custom.fillOpacity",
                      "value": 0
                    },
                    {
                      "id": "custom.lineWidth",
                      "value": 2
                    },
                    {
                      "id": "color",
                      "value": {
                        "fixedColor": "blue",
                        "mode": "fixed"
                      }
                    },
                    {
                      "id": "custom.showPoints",
                      "value": "never"
                    }
                  ]
                }
              ]
            },
            "options": {
              "annotations": {
                "clustering": -1,
                "multiLane": false
              },
              "legend": {
                "calcs": [],
                "displayMode": "list",
                "placement": "bottom",
                "showLegend": false
              },
              "tooltip": {
                "hideZeros": false,
                "mode": "multi",
                "sort": "none"
              }
            }
          },
          "version": "13.1.0-25668120414"
        }
      }
    },
    "panel-7": {
      "kind": "Panel",
      "spec": {
        "data": {
          "kind": "QueryGroup",
          "spec": {
            "queries": [
              {
                "kind": "PanelQuery",
                "spec": {
                  "hidden": false,
                  "query": {
                    "datasource": {
                      "name": "ceczcsck1b20wb"
                    },
                    "group": "grafana-clickhouse-datasource",
                    "kind": "DataQuery",
                    "spec": {
                      "editorType": "sql",
                      "format": 0,
                      "meta": {
                        "builderOptions": {
                          "columns": [],
                          "database": "",
                          "limit": 1000,
                          "mode": "list",
                          "queryType": "table",
                          "table": ""
                        }
                      },
                      "pluginVersion": "4.17.0",
                      "queryType": "timeseries",
                      "rawSql": "WITH\n  commits AS (\n    SELECT\n      toStartOfDay(head_commit.timestamp) AS day,\n      head_commit.id AS sha\n    FROM push\n    WHERE repository.full_name = '$repository'\n      AND ref IN ('refs/heads/master', 'refs/heads/main')\n      AND $__timeFilter(head_commit.timestamp)\n  ),\n  all_runs AS (\n    SELECT workflow_run.id AS id, commits.day AS day, commits.sha AS sha\n    FROM workflow_run FINAL\n    JOIN commits ON workflow_run.head_sha = commits.sha\n    WHERE lower(workflow_run.name) IN ('lint', 'pull', 'trunk', 'linux-aarch64')\n      AND workflow_run.event != 'workflow_run'\n      AND workflow_run.id IN (\n        SELECT id FROM materialized_views.workflow_run_by_head_sha\n        WHERE head_sha IN (SELECT sha FROM commits)\n      )\n  ),\n  all_jobs AS (\n    SELECT all_runs.day AS day, all_runs.sha AS sha, workflow_job.conclusion AS conclusion,\n      ROW_NUMBER() OVER (PARTITION BY workflow_job.name, workflow_job.head_sha\n                         ORDER BY workflow_job.run_attempt DESC) AS row_num\n    FROM workflow_job FINAL\n    JOIN all_runs ON all_runs.id = workflow_job.run_id\n    WHERE workflow_job.name NOT IN ('ciflow_should_run', 'generate-test-matrix')\n      AND workflow_job.name NOT LIKE '%rerun_disabled_tests%'\n      AND workflow_job.name NOT LIKE '%mem_leak_check%'\n      AND workflow_job.name NOT LIKE '%unstable%'\n      AND workflow_job.id IN (\n        SELECT id FROM materialized_views.workflow_job_by_head_sha\n        WHERE head_sha IN (SELECT sha FROM commits)\n      )\n  ),\n  per_commit AS (\n    SELECT day, sha,\n      max(row_num = 1 AND conclusion IN ('failure', 'timed_out', 'cancelled')) AS broken_trunk_red\n    FROM all_jobs\n    GROUP BY day, sha\n    HAVING COUNT(*) > 10 AND countIf(conclusion = '') = 0\n  ),\n  daily AS (\n    SELECT day,\n      countIf(broken_trunk_red) AS red_count,\n      COUNT(*) AS commit_count\n    FROM per_commit\n    GROUP BY day\n  )\nSELECT\n  day AS time,\n  red_count * 100.0 / commit_count AS red_percent,\n  sum(red_count) OVER w * 100.0 / sum(commit_count) OVER w AS trend_7d_avg\nFROM daily\nWINDOW w AS (\n  ORDER BY toUnixTimestamp(day) ASC\n  RANGE BETWEEN 6 * 86400 PRECEDING AND CURRENT ROW\n)\nORDER BY day ASC"
                    },
                    "version": "v0"
                  },
                  "refId": "A"
                }
              }
            ],
            "queryOptions": {},
            "transformations": []
          }
        },
        "description": "Share of main commits classified as red on the trunk-blocking workflows (Lint, pull, trunk, linux-aarch64). A commit is red if any job's latest run_attempt is failure/timed_out/cancelled. Commits with pending jobs or fewer than 10 jobs are excluded. Mirrors the test-infra HUD '% commits red on main (broken trunk)' definition.",
        "id": 7,
        "links": [],
        "title": "% Commits Red on Main (broken trunk) [repository]",
        "vizConfig": {
          "group": "timeseries",
          "kind": "VizConfig",
          "spec": {
            "fieldConfig": {
              "defaults": {
                "color": {
                  "mode": "thresholds",
                  "seriesBy": "last"
                },
                "min": 0,
                "unit": "percent",
                "custom": {
                  "axisBorderShow": false,
                  "axisCenteredZero": false,
                  "axisColorMode": "text",
                  "axisLabel": "",
                  "axisPlacement": "auto",
                  "barAlignment": 0,
                  "barWidthFactor": 0.6,
                  "drawStyle": "line",
                  "fillOpacity": 27,
                  "gradientMode": "scheme",
                  "hideFrom": {
                    "legend": false,
                    "tooltip": false,
                    "viz": false
                  },
                  "insertNulls": false,
                  "lineInterpolation": "linear",
                  "lineStyle": {
                    "fill": "solid"
                  },
                  "lineWidth": 1,
                  "pointSize": 5,
                  "scaleDistribution": {
                    "type": "linear"
                  },
                  "showPoints": "never",
                  "showValues": false,
                  "spanNulls": false,
                  "stacking": {
                    "group": "A",
                    "mode": "none"
                  },
                  "thresholdsStyle": {
                    "mode": "dashed"
                  }
                },
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": 0
                    },
                    {
                      "color": "#EAB839",
                      "value": 10
                    },
                    {
                      "color": "red",
                      "value": 50
                    }
                  ]
                }
              },
              "overrides": [
                {
                  "matcher": {
                    "id": "byName",
                    "options": "trend_7d_avg",
                    "scope": "series"
                  },
                  "properties": [
                    {
                      "id": "custom.drawStyle",
                      "value": "line"
                    },
                    {
                      "id": "custom.lineInterpolation",
                      "value": "smooth"
                    },
                    {
                      "id": "custom.fillOpacity",
                      "value": 0
                    },
                    {
                      "id": "custom.lineWidth",
                      "value": 2
                    },
                    {
                      "id": "color",
                      "value": {
                        "fixedColor": "blue",
                        "mode": "fixed"
                      }
                    },
                    {
                      "id": "custom.showPoints",
                      "value": "never"
                    }
                  ]
                }
              ]
            },
            "options": {
              "annotations": {
                "clustering": -1,
                "multiLane": false
              },
              "legend": {
                "calcs": [],
                "displayMode": "list",
                "placement": "bottom",
                "showLegend": false
              },
              "tooltip": {
                "hideZeros": false,
                "mode": "multi",
                "sort": "none"
              }
            }
          },
          "version": "13.1.0-25668120414"
        }
      }
    },
    "panel-8": {
      "kind": "Panel",
      "spec": {
        "data": {
          "kind": "QueryGroup",
          "spec": {
            "queries": [
              {
                "kind": "PanelQuery",
                "spec": {
                  "hidden": false,
                  "query": {
                    "datasource": {
                      "name": "ceczcsck1b20wb"
                    },
                    "group": "grafana-clickhouse-datasource",
                    "kind": "DataQuery",
                    "spec": {
                      "editorType": "sql",
                      "format": 0,
                      "meta": {
                        "builderOptions": {
                          "columns": [],
                          "database": "",
                          "limit": 1000,
                          "mode": "list",
                          "queryType": "table",
                          "table": ""
                        }
                      },
                      "pluginVersion": "4.17.0",
                      "queryType": "timeseries",
                      "rawSql": "WITH per_name AS (\n    SELECT\n        toStartOfDay(workflow.created_at) AS day,\n        lower(workflow.name) AS name,\n        quantileExact(0.5)(DATE_DIFF('second', workflow.created_at, workflow.updated_at)) AS p50_sec\n    FROM default.workflow_run workflow FINAL\n    WHERE\n        workflow.conclusion = 'success'\n        AND workflow.run_attempt = 1\n        AND lower(workflow.name) IN ('pull', 'trunk', 'docs-build')\n        AND workflow.repository.full_name = '$repository'\n        AND $__timeFilter(workflow.created_at)\n        AND workflow.id IN (\n            SELECT id FROM materialized_views.workflow_run_by_created_at\n            WHERE created_at >= $__fromTime AND created_at <= $__toTime\n        )\n    GROUP BY day, name\n),\ndaily AS (\n    SELECT day, max(p50_sec) AS pull_trunk_docs_tts\n    FROM per_name\n    GROUP BY day\n)\nSELECT\n    day AS time,\n    pull_trunk_docs_tts,\n    avg(pull_trunk_docs_tts) OVER (\n        ORDER BY toUnixTimestamp(day) ASC\n        RANGE BETWEEN 6 * 86400 PRECEDING AND CURRENT ROW\n    ) AS trend_7d_avg\nFROM daily\nORDER BY day ASC"
                    },
                    "version": "v0"
                  },
                  "refId": "A"
                }
              }
            ],
            "queryOptions": {},
            "transformations": []
          }
        },
        "description": "Daily p50 TTS = max of the per-workflow p50s (pull, trunk, docs-build) over successful attempt-1 runs — HUD's 'p50 pull, trunk, docs-build TTS' bucketed by day. Blue = 7d avg. Thresholds: amber = target 3h, red = 4.5h. Repo-scoped, so reads higher than HUD's headline (which pools executorch + tokenizers).",
        "id": 8,
        "links": [],
        "title": "p50 pull, trunk, docs-build TTS [repository]",
        "vizConfig": {
          "group": "timeseries",
          "kind": "VizConfig",
          "spec": {
            "fieldConfig": {
              "defaults": {
                "color": {
                  "mode": "thresholds",
                  "seriesBy": "last"
                },
                "min": 0,
                "unit": "s",
                "custom": {
                  "drawStyle": "line",
                  "fillOpacity": 15,
                  "gradientMode": "scheme",
                  "lineInterpolation": "linear",
                  "lineWidth": 1,
                  "pointSize": 5,
                  "showPoints": "never",
                  "thresholdsStyle": {
                    "mode": "dashed"
                  }
                },
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": 0
                    },
                    {
                      "color": "#EAB839",
                      "value": 10800
                    },
                    {
                      "color": "red",
                      "value": 16200
                    }
                  ]
                }
              },
              "overrides": [
                {
                  "matcher": {
                    "id": "byName",
                    "options": "trend_7d_avg",
                    "scope": "series"
                  },
                  "properties": [
                    {
                      "id": "custom.lineInterpolation",
                      "value": "smooth"
                    },
                    {
                      "id": "color",
                      "value": {
                        "fixedColor": "blue",
                        "mode": "fixed"
                      }
                    },
                    {
                      "id": "custom.fillOpacity",
                      "value": 0
                    },
                    {
                      "id": "custom.lineWidth",
                      "value": 2
                    }
                  ]
                }
              ]
            },
            "options": {
              "legend": {
                "calcs": [],
                "displayMode": "list",
                "placement": "bottom",
                "showLegend": false
              },
              "tooltip": {
                "hideZeros": false,
                "mode": "multi",
                "sort": "none"
              }
            }
          },
          "version": "13.1.0-25668120414"
        }
      }
    },
    "panel-9": {
      "kind": "Panel",
      "spec": {
        "data": {
          "kind": "QueryGroup",
          "spec": {
            "queries": [
              {
                "kind": "PanelQuery",
                "spec": {
                  "hidden": false,
                  "query": {
                    "datasource": {
                      "name": "ceczcsck1b20wb"
                    },
                    "group": "grafana-clickhouse-datasource",
                    "kind": "DataQuery",
                    "spec": {
                      "editorType": "sql",
                      "format": 0,
                      "meta": {
                        "builderOptions": {
                          "columns": [],
                          "database": "",
                          "limit": 1000,
                          "mode": "list",
                          "queryType": "table",
                          "table": ""
                        }
                      },
                      "pluginVersion": "4.17.0",
                      "queryType": "timeseries",
                      "rawSql": "SELECT\n    day AS time,\n    pull_tts,\n    avg(pull_tts) OVER (\n        ORDER BY toUnixTimestamp(day) ASC\n        RANGE BETWEEN 6 * 86400 PRECEDING AND CURRENT ROW\n    ) AS trend_7d_avg\nFROM (\n    SELECT\n        toStartOfDay(workflow.created_at) AS day,\n        quantileExact(0.5)(DATE_DIFF('second', workflow.created_at, workflow.updated_at)) AS pull_tts\n    FROM default.workflow_run workflow FINAL\n    WHERE\n        workflow.conclusion = 'success'\n        AND workflow.run_attempt = 1\n        AND lower(workflow.name) = 'pull'\n        AND workflow.repository.full_name = '$repository'\n        AND $__timeFilter(workflow.created_at)\n        AND workflow.id IN (\n            SELECT id FROM materialized_views.workflow_run_by_created_at\n            WHERE created_at >= $__fromTime AND created_at <= $__toTime\n        )\n    GROUP BY day\n)\nORDER BY day ASC"
                    },
                    "version": "v0"
                  },
                  "refId": "A"
                }
              }
            ],
            "queryOptions": {},
            "transformations": []
          }
        },
        "description": "Daily p50 TTS of the pull workflow over successful attempt-1 runs — HUD's 'p50 pull TTS' bucketed by day. Blue = 7d avg. Thresholds: amber = target 90m, red = 2.75h. Repo-scoped, so reads higher than HUD's headline (which pools executorch).",
        "id": 9,
        "links": [],
        "title": "p50 pull TTS [repository]",
        "vizConfig": {
          "group": "timeseries",
          "kind": "VizConfig",
          "spec": {
            "fieldConfig": {
              "defaults": {
                "color": {
                  "mode": "thresholds",
                  "seriesBy": "last"
                },
                "min": 0,
                "unit": "s",
                "custom": {
                  "drawStyle": "line",
                  "fillOpacity": 15,
                  "gradientMode": "scheme",
                  "lineInterpolation": "linear",
                  "lineWidth": 1,
                  "pointSize": 5,
                  "showPoints": "never",
                  "thresholdsStyle": {
                    "mode": "dashed"
                  }
                },
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": 0
                    },
                    {
                      "color": "#EAB839",
                      "value": 5400
                    },
                    {
                      "color": "red",
                      "value": 9900
                    }
                  ]
                }
              },
              "overrides": [
                {
                  "matcher": {
                    "id": "byName",
                    "options": "trend_7d_avg",
                    "scope": "series"
                  },
                  "properties": [
                    {
                      "id": "custom.lineInterpolation",
                      "value": "smooth"
                    },
                    {
                      "id": "color",
                      "value": {
                        "fixedColor": "blue",
                        "mode": "fixed"
                      }
                    },
                    {
                      "id": "custom.fillOpacity",
                      "value": 0
                    },
                    {
                      "id": "custom.lineWidth",
                      "value": 2
                    }
                  ]
                }
              ]
            },
            "options": {
              "legend": {
                "calcs": [],
                "displayMode": "list",
                "placement": "bottom",
                "showLegend": false
              },
              "tooltip": {
                "hideZeros": false,
                "mode": "multi",
                "sort": "none"
              }
            }
          },
          "version": "13.1.0-25668120414"
        }
      }
    }
  },
  "layout": {
    "kind": "GridLayout",
    "spec": {
      "items": [
        {
          "kind": "GridLayoutItem",
          "spec": {
            "element": {
              "kind": "ElementReference",
              "name": "panel-4"
            },
            "height": 10,
            "width": 8,
            "x": 0,
            "y": 0
          }
        },
        {
          "kind": "GridLayoutItem",
          "spec": {
            "element": {
              "kind": "ElementReference",
              "name": "panel-5"
            },
            "height": 10,
            "width": 8,
            "x": 0,
            "y": 10
          }
        },
        {
          "kind": "GridLayoutItem",
          "spec": {
            "element": {
              "kind": "ElementReference",
              "name": "panel-6"
            },
            "height": 10,
            "width": 8,
            "x": 16,
            "y": 0
          }
        },
        {
          "kind": "GridLayoutItem",
          "spec": {
            "element": {
              "kind": "ElementReference",
              "name": "panel-7"
            },
            "height": 10,
            "width": 8,
            "x": 8,
            "y": 0
          }
        },
        {
          "kind": "GridLayoutItem",
          "spec": {
            "element": {
              "kind": "ElementReference",
              "name": "panel-8"
            },
            "height": 10,
            "width": 8,
            "x": 8,
            "y": 10
          }
        },
        {
          "kind": "GridLayoutItem",
          "spec": {
            "element": {
              "kind": "ElementReference",
              "name": "panel-9"
            },
            "height": 10,
            "width": 8,
            "x": 16,
            "y": 10
          }
        }
      ]
    }
  },
  "links": [],
  "liveNow": false,
  "preload": false,
  "tags": [],
  "timeSettings": {
    "autoRefresh": "",
    "autoRefreshIntervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "fiscalYearStartMonth": 0,
    "from": "now-6M",
    "hideTimepicker": false,
    "timezone": "browser",
    "to": "now"
  },
  "title": "PyTorch DevX",
  "variables": [
    {
      "kind": "CustomVariable",
      "spec": {
        "name": "repository",
        "label": "Repository",
        "query": "pytorch/pytorch,pytorch/executorch",
        "current": {
          "text": "pytorch/pytorch",
          "value": "pytorch/pytorch"
        },
        "options": [
          {
            "selected": true,
            "text": "pytorch/pytorch",
            "value": "pytorch/pytorch"
          },
          {
            "selected": false,
            "text": "pytorch/executorch",
            "value": "pytorch/executorch"
          }
        ],
        "multi": false,
        "includeAll": false,
        "allowCustomValue": false,
        "hide": "dontHide",
        "skipUrlSync": false
      }
    }
  ]
}
