Repository: risingwavelabs/risingwave
File: grafana/dashboard/dev/streaming_fragments.py (Python)

Code before:
                        )
                    ],
                    ["fragment_id", "Value"],
                    dict.fromkeys(["Time"], True),
                    {"Value": "rate"},
                    "",
                    {"rate": "percent"},
                ),
                panels.table_info(
                    "Top Fragments by Idle Time",
                    "Top 10 fragments with the highest idle time rate (%).",
                    [
                        panels.table_target(
                            _fragment_topk_percent_expr(
                                f"{idle_duration_expr} / 1000000000"
                            )
                        )
                    ],
                    ["fragment_id", "Value"],
                    dict.fromkeys(["Time"], True),
                    {"Value": "rate"},
                    "",
                    {"rate": "percent"},
                ),
                panels.table_info(
                    "Top Fragments by Scheduling Delay",
                    "Top 10 fragments with the highest scheduling delay rate (%).",
                    [
                        panels.table_target(
                            _fragment_topk_percent_expr(
                                f"{scheduled_duration_expr} / 1000000000"
                            )
                        )
                    ],
                    ["fragment_id", "Value"],
                    dict.fromkeys(["Time"], True),
                    {"Value": "rate"},
                    "",
                    {"rate": "percent"},
                ),
                panels.subheader("Busy Rate (IO + CPU Usage) by Fragment"),
                panels.timeseries_percentage(
                    "Actor Busy Rate",
                    "The rate that an actor is busy, i.e. the rate that an actor is not blocked by its downstream or upstream.",
                    [
                        _actor_busy_rate_target(panels, "$__rate_interval"),
                    ],
                ),
                panels.timeseries_percentage(
                    "Actor Busy Rate (10m)",
                    "The rate that an actor is busy, i.e. the rate that an actor is not blocked by its downstream or upstream, over the last 10 minutes.",

Review comment (suggestion):
The table title "Top Fragments by Scheduling Delay" is incomplete. Consider renaming to "Top Fragments by Scheduling Delay Rate" to match the description and be consistent with other table titles.
```suggestion
                    "Top Fragments by Scheduling Delay Rate",
```

Code after:
                        )
                    ],
                    ["id", "Value"],
                    dict.fromkeys(["Time", "fragment_id"], True),
                    {"Value": "rate"},
                    {"rate": "percent"},
                ),
                panels.table_info(
                    "Top Fragments by CPU Rate",
                    "Top 10 fragments with the highest peak CPU rate (%).",
                    [
                        panels.table_target(
                            topk_percent_expr(
                                _fragment_peak_rate_with_id_at_step(
                                    poll_duration_expr
                                )
                            )
                        )
                    ],
                    ["id", "Value"],
                    dict.fromkeys(["Time", "fragment_id"], True),
                    {"Value": "rate"},
                    {"rate": "percent"},
                ),
                panels.table_info(
                    "Top Fragments by Idle Rate",
                    "Top 10 fragments with the highest peak idle rate (%).",
                    [
                        panels.table_target(
                            topk_percent_expr(
                                _fragment_peak_rate_with_id_at_step(
                                    idle_duration_expr
                                )
                            )
                        )
                    ],
                    ["id", "Value"],
                    dict.fromkeys(["Time", "fragment_id"], True),
                    {"Value": "rate"},
                    {"rate": "percent"},
                ),
                panels.table_info(
                    "Top Fragments by Scheduling Delay Rate",
                    "Top 10 fragments with the highest peak scheduling delay rate (%).",
                    [
                        panels.table_target(
                            topk_percent_expr(
                                _fragment_peak_rate_with_id_at_step(
                                    scheduled_duration_expr
                                )
                            )