Skip to content

Commit 84ecdb6

Browse files
apollo_dashboard: format p2p and tokio panels (#10187)
1 parent 1475f91 commit 84ecdb6

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

crates/apollo_dashboard/resources/dev_grafana.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@
11341134
},
11351135
{
11361136
"title": "Number of sent messages",
1137-
"description": "Count of the sent p2p messages",
1137+
"description": "Count of the sent p2p messages (10m window)",
11381138
"type": "timeseries",
11391139
"exprs": [
11401140
"increase(apollo_mempool_p2p_num_sent_messages{cluster=~\"$cluster\", namespace=~\"$namespace\"}[10m])"
@@ -1143,7 +1143,7 @@
11431143
},
11441144
{
11451145
"title": "Number of received messages",
1146-
"description": "Count of the received p2p messages",
1146+
"description": "Count of the received p2p messages (10m window)",
11471147
"type": "timeseries",
11481148
"exprs": [
11491149
"increase(apollo_mempool_p2p_num_received_messages{cluster=~\"$cluster\", namespace=~\"$namespace\"}[10m])"
@@ -3432,11 +3432,11 @@
34323432
"Tokio Runtime Metrics": {
34333433
"panels": [
34343434
{
3435-
"title": "Tokio total busy duration",
3435+
"title": "Increase of Tokio total busy duration (1m window)",
34363436
"description": "The amount of time worker threads were busy (in microseconds)",
34373437
"type": "timeseries",
34383438
"exprs": [
3439-
"tokio_total_busy_duration{cluster=~\"$cluster\", namespace=~\"$namespace\"}"
3439+
"increase(tokio_total_busy_duration{cluster=~\"$cluster\", namespace=~\"$namespace\"}[1m])"
34403440
],
34413441
"extra_params": {
34423442
"unit": "µs",

crates/apollo_dashboard/src/panels/mempool_p2p.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn get_panel_mempool_p2p_num_connected_peers() -> Panel {
2323
fn get_panel_mempool_p2p_num_sent_messages() -> Panel {
2424
Panel::new(
2525
"Number of sent messages",
26-
"Count of the sent p2p messages",
26+
format!("Count of the sent p2p messages ({DEFAULT_DURATION} window)"),
2727
increase(&MEMPOOL_P2P_NUM_SENT_MESSAGES, DEFAULT_DURATION),
2828
PanelType::TimeSeries,
2929
)
@@ -32,7 +32,7 @@ fn get_panel_mempool_p2p_num_sent_messages() -> Panel {
3232
fn get_panel_mempool_p2p_num_received_messages() -> Panel {
3333
Panel::new(
3434
"Number of received messages",
35-
"Count of the received p2p messages",
35+
format!("Count of the received p2p messages ({DEFAULT_DURATION} window)"),
3636
increase(&MEMPOOL_P2P_NUM_RECEIVED_MESSAGES, DEFAULT_DURATION),
3737
PanelType::TimeSeries,
3838
)

crates/apollo_dashboard/src/panels/tokio.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ use apollo_monitoring_endpoint::tokio_metrics::{
1111
};
1212

1313
use crate::dashboard::{Panel, PanelType, Row, Unit};
14+
use crate::query_builder::increase;
1415
const TOKIO_PANEL_LEGENDS: &[&str] = &["{{pod}}"];
1516

1617
fn get_panel_tokio_total_busy_duration_micros() -> Panel {
1718
Panel::new(
18-
"Tokio total busy duration",
19+
"Increase of Tokio total busy duration (1m window)",
1920
TOKIO_TOTAL_BUSY_DURATION_MICROS.get_description(),
20-
TOKIO_TOTAL_BUSY_DURATION_MICROS.get_name_with_filter().to_string(),
21+
increase(&TOKIO_TOTAL_BUSY_DURATION_MICROS, "1m"),
2122
PanelType::TimeSeries,
2223
)
2324
.with_legends(TOKIO_PANEL_LEGENDS.to_vec())

0 commit comments

Comments
 (0)