forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
roachtest/cdc: export stats for initial scan test to roachperf
This change updates the cdc/initial_scan_only test to produce a `stats.json` artifact to be consumed by roachprod. This file contains stats for p99 foreground latency, changefeed throughput, and CPU usage. Release note: None
- Loading branch information
1 parent
596c25e
commit ee0fa07
Showing
4 changed files
with
91 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright 2022 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
package tests | ||
|
||
import "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/clusterstats" | ||
|
||
var ( | ||
// sqlServiceLatency is the sql_service_latency_bucket prometheus metric. | ||
sqlServiceLatency = clusterstats.ClusterStat{LabelName: "node", Query: "sql_service_latency_bucket"} | ||
// sqlServiceLatencyAgg is the P99 latency of foreground SQL traffic across all nodes measured in ms. | ||
sqlServiceLatencyAgg = clusterstats.AggQuery{ | ||
Stat: sqlServiceLatency, | ||
Query: "histogram_quantile(0.99, sum by(le) (rate(sql_service_latency_bucket[2m]))) / (1000*1000)", | ||
Tag: "P99 Foreground Latency (ms)", | ||
} | ||
|
||
// changefeedThroughput is the changefeed_emitted_bytes prometheus metric. | ||
changefeedThroughput = clusterstats.ClusterStat{LabelName: "node", Query: "changefeed_emitted_bytes"} | ||
// changefeedThroughputAgg is the total rate of bytes being emitted by a cluster measured in MB/s. | ||
changefeedThroughputAgg = clusterstats.AggQuery{ | ||
Stat: changefeedThroughput, | ||
Query: "sum(rate(changefeed_emitted_bytes[1m]) / (1000 * 1000))", | ||
Tag: "Throughput (MBps)", | ||
} | ||
|
||
// cpuUsage is the sys_cpu_combined_percent_normalized prometheus metric per mode. | ||
cpuUsage = clusterstats.ClusterStat{LabelName: "node", Query: "sys_cpu_combined_percent_normalized"} | ||
// cpuUsageAgg is the average CPU usage across all nodes. | ||
cpuUsageAgg = clusterstats.AggQuery{ | ||
Stat: cpuUsage, | ||
Query: "avg(sys_cpu_combined_percent_normalized) * 100", | ||
Tag: "CPU Utilization (%)", | ||
} | ||
) |