Skip to content

Commit

Permalink
chore(metrics): add pmax in batch latency histogram (#17034)
Browse files Browse the repository at this point in the history
  • Loading branch information
KeXiangWang authored May 31, 2024
1 parent 5fa10ff commit 5b2319a
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 48 deletions.
2 changes: 1 addition & 1 deletion docker/dashboards/risingwave-dev-dashboard.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docker/dashboards/risingwave-user-dashboard.json

Large diffs are not rendered by default.

38 changes: 16 additions & 22 deletions grafana/risingwave-dev-dashboard.dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -1863,35 +1863,29 @@ def section_frontend(outer_panels):
"Query Latency (Distributed Query Mode)",
"",
[
panels.target(
f"histogram_quantile(0.5, sum(rate({metric('distributed_query_latency_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
"p50 - {{%s}} @ {{%s}}" % (COMPONENT_LABEL, NODE_LABEL),
),
panels.target(
f"histogram_quantile(0.9, sum(rate({metric('distributed_query_latency_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
"p90 - {{%s}} @ {{%s}}" % (COMPONENT_LABEL, NODE_LABEL),
),
panels.target(
f"histogram_quantile(0.95, sum(rate({metric('distributed_query_latency_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
"p99 - {{%s}} @ {{%s}}" % (COMPONENT_LABEL, NODE_LABEL),
*quantile(
lambda quantile, legend: panels.target(
f"histogram_quantile({quantile}, sum(rate({metric('distributed_query_latency_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
f"p{legend}"
+ " - {{%s}} @ {{%s}}"
% (COMPONENT_LABEL, NODE_LABEL),
),
[50, 90, 99, "max"],
),
],
),
panels.timeseries_latency(
"Query Latency (Local Query Mode)",
"",
[
panels.target(
f"histogram_quantile(0.5, sum(rate({metric('frontend_latency_local_execution_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
"p50 - {{%s}} @ {{%s}}" % (COMPONENT_LABEL, NODE_LABEL),
),
panels.target(
f"histogram_quantile(0.9, sum(rate({metric('frontend_latency_local_execution_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
"p90 - {{%s}} @ {{%s}}" % (COMPONENT_LABEL, NODE_LABEL),
),
panels.target(
f"histogram_quantile(0.95, sum(rate({metric('frontend_latency_local_execution_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
"p99 - {{%s}} @ {{%s}}" % (COMPONENT_LABEL, NODE_LABEL),
*quantile(
lambda quantile, legend: panels.target(
f"histogram_quantile({quantile}, sum(rate({metric('frontend_latency_local_execution_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
f"p{legend}"
+ " - {{%s}} @ {{%s}}"
% (COMPONENT_LABEL, NODE_LABEL),
),
[50, 90, 99, "max"],
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion grafana/risingwave-dev-dashboard.json

Large diffs are not rendered by default.

38 changes: 16 additions & 22 deletions grafana/risingwave-user-dashboard.dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,35 +785,29 @@ def section_batch(outer_panels):
"Query Latency in Distributed Execution Mode",
"",
[
panels.target(
f"histogram_quantile(0.5, sum(rate({metric('distributed_query_latency_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
"p50 - {{%s}} @ {{%s}}" % (COMPONENT_LABEL, NODE_LABEL),
),
panels.target(
f"histogram_quantile(0.9, sum(rate({metric('distributed_query_latency_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
"p90 - {{%s}} @ {{%s}}" % (COMPONENT_LABEL, NODE_LABEL),
),
panels.target(
f"histogram_quantile(0.95, sum(rate({metric('distributed_query_latency_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
"p99 - {{%s}} @ {{%s}}" % (COMPONENT_LABEL, NODE_LABEL),
*quantile(
lambda quantile, legend: panels.target(
f"histogram_quantile({quantile}, sum(rate({metric('distributed_query_latency_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
f"p{legend}"
+ " - {{%s}} @ {{%s}}"
% (COMPONENT_LABEL, NODE_LABEL),
),
[50, 90, 99, "max"],
),
],
),
panels.timeseries_latency(
"Query Latency in Local Execution Mode",
"",
[
panels.target(
f"histogram_quantile(0.5, sum(rate({metric('frontend_latency_local_execution_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
"p50 - {{%s}} @ {{%s}}" % (COMPONENT_LABEL, NODE_LABEL),
),
panels.target(
f"histogram_quantile(0.9, sum(rate({metric('frontend_latency_local_execution_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
"p90 - {{%s}} @ {{%s}}" % (COMPONENT_LABEL, NODE_LABEL),
),
panels.target(
f"histogram_quantile(0.95, sum(rate({metric('frontend_latency_local_execution_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
"p99 - {{%s}} @ {{%s}}" % (COMPONENT_LABEL, NODE_LABEL),
*quantile(
lambda quantile, legend: panels.target(
f"histogram_quantile({quantile}, sum(rate({metric('frontend_latency_local_execution_bucket')}[$__rate_interval])) by (le, {COMPONENT_LABEL}, {NODE_LABEL}))",
f"p{legend}"
+ " - {{%s}} @ {{%s}}"
% (COMPONENT_LABEL, NODE_LABEL),
),
[50, 90, 99, "max"],
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion grafana/risingwave-user-dashboard.json

Large diffs are not rendered by default.

0 comments on commit 5b2319a

Please sign in to comment.