Skip to content

Commit

Permalink
roachtest/tests: fix quantile value in tpce
Browse files Browse the repository at this point in the history
Other tests emitting openmetrics emit quantiles in percentage rather
than absolute value. This change intends to make tpce also emit
percentage value to be more consistent will other roachtests

Epic: none

Release note: None
  • Loading branch information
sambhav-jain-16 committed Nov 15, 2024
1 parent 7d943e9 commit 2bcbfe5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/cmd/roachtest/tests/tpce.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,10 @@ func getOpenMetrics(metrics tpceMetrics, countOfLatencies string, labelString st

buffer.WriteString("# TYPE tpce_latency summary\n")
buffer.WriteString("# HELP tpce_latency Latency metrics for TPC-E transactions\n")
buffer.WriteString(fmt.Sprintf("tpce_latency{%s,quantile=\"0.5\"} %s %d\n", labelString, metrics.P50Latency, now))
buffer.WriteString(fmt.Sprintf("tpce_latency{%s,quantile=\"0.9\"} %s %d\n", labelString, metrics.P90Latency, now))
buffer.WriteString(fmt.Sprintf("tpce_latency{%s,quantile=\"0.99\"} %s %d\n", labelString, metrics.P99Latency, now))
buffer.WriteString(fmt.Sprintf("tpce_latency{%s,quantile=\"1.0\"} %s %d\n", labelString, metrics.PMaxLatency, now))
buffer.WriteString(fmt.Sprintf("tpce_latency{%s,quantile=\"50.0\"} %s %d\n", labelString, metrics.P50Latency, now))
buffer.WriteString(fmt.Sprintf("tpce_latency{%s,quantile=\"90.0\"} %s %d\n", labelString, metrics.P90Latency, now))
buffer.WriteString(fmt.Sprintf("tpce_latency{%s,quantile=\"99.0\"} %s %d\n", labelString, metrics.P99Latency, now))
buffer.WriteString(fmt.Sprintf("tpce_latency{%s,quantile=\"100.0\"} %s %d\n", labelString, metrics.PMaxLatency, now))
buffer.WriteString(fmt.Sprintf("tpce_latency_sum{%s} %d %d\n", labelString, 0, now))
buffer.WriteString(fmt.Sprintf("tpce_latency_count{%s} %s %d\n", labelString, countOfLatencies, now))
buffer.WriteString("# EOF")
Expand Down

0 comments on commit 2bcbfe5

Please sign in to comment.