schema_version: 1
id: tikv-read-iops-ranking-during-incident-window
title: Cluster-scoped TiKV average read IOPS top-3 ranking in the latest completed Beijing 11:00-11:05 window
status: active
owner: codex
evaluation:
  mode: adhoc_evidence
environment:
  profile: stable-dedicated
  cluster_id: '10518506906906971664'
  cluster_type: dedicated
  tidb_version: v8.5.x
time_window:
  resolved_by_output: resolved_window
runtime:
  hooks:
  - id: resolve_runtime_window
    stage: before_acp
    kind: python_script
    path: runtime_hook.py
    output_id: resolved_window
    args:
      - resolve-window
      - --cluster-id
      - '{{environment.cluster_id}}'
      - --local-hour
      - '11'
      - --local-minute
      - '0'
      - --duration-minutes
      - '5'
      - --step-seconds
      - '300'
      - --top-n
      - '3'
  - id: build_runtime_reference
    stage: before_judge
    kind: python_script
    path: runtime_hook.py
    output_id: reference_answer
    args:
      - build-reference
      - --cluster-id
      - '{{environment.cluster_id}}'
      - --start
      - '{{runtime.resolved_window.start}}'
      - --end
      - '{{runtime.resolved_window.end}}'
      - --step-seconds
      - '300'
      - --top-n
      - '3'
prompt:
  text: |
    帮我看一下集群 {{environment.cluster_id}} 在 {{runtime.resolved_window.start}} 到 {{runtime.resolved_window.end}} 这 5 分钟里，哪些 TiKV 节点读盘最重。

    我只关心最后结果：
    1. 帮我按这 5 分钟里每个 TiKV 节点的平均 read IOPS 从高到低排一下，直接给我前 3 个节点和它们各自的平均 read IOPS；
    2. 最终只输出一个 `json` 代码块，字段必须严格为：
       `cluster_id`、`window`、`mapping_strategy`、`evidence_sufficient`、`top_nodes_by_avg_read_iops`
    3. `top_nodes_by_avg_read_iops` 中每个元素必须包含 `tikv_node` 和 `avg_read_iops`，并按 `avg_read_iops` 从高到低排序；
    4. 不要输出额外字段，不要输出额外解释，不要把说明写进 JSON。

    JSON 结构如下：

    ```json
    {
      "cluster_id": "<cluster_id>",
      "window": {
        "start": "2026-01-01T00:00:00Z",
        "end": "2026-01-01T00:05:00Z"
      },
      "mapping_strategy": "node_filter",
      "evidence_sufficient": true,
      "top_nodes_by_avg_read_iops": [
        {
          "tikv_node": "db-tikv-0",
          "avg_read_iops": 12345.67
        }
      ]
    }
    ```

    不要求解释你的分析过程。

    如果证据不足，请明确说明原因，并把 `evidence_sufficient` 设为 `false`，把 `top_nodes_by_avg_read_iops` 设为空数组。
tags:
- storage-performance
- metric-scope
- read-iops
- structured-output
case_tier: P1
cost_tier: low
followup:
  scheduled_max_followups: 0
execution:
  acp_bash_timeout_s: 300
