Skip to content

Commit 8993e26

Browse files
committed
roachtest: more CPU profiling in rebalancing tests
Closes #147487.
1 parent 32b9329 commit 8993e26

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/cmd/roachtest/tests/rebalance_load.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ func registerRebalanceLoad(r registry.Registry) {
9797
settings.ClusterSettings["kv.allocator.load_based_rebalancing"] = rebalanceMode
9898
settings.ClusterSettings["kv.range_split.by_load_enabled"] = "false"
9999

100+
// Take a 10s profile every minute.
101+
settings.ClusterSettings["server.cpu_profile.duration"] = "10s"
102+
settings.ClusterSettings["server.cpu_profile.interval"] = "1m"
103+
settings.ClusterSettings["server.cpu_profile.cpu_usage_combined_threshold"] = "1" // basically always true
104+
settings.ClusterSettings["server.cpu_profile.total_dump_size_limit"] = "256 MiB"
105+
100106
if mixedVersion {
101107
mvt := mixedversion.NewTest(ctx, t, t.L(), c, roachNodes, mixedversion.NeverUseFixtures,
102108
mixedversion.ClusterSettingOption(
@@ -119,8 +125,6 @@ func registerRebalanceLoad(r registry.Registry) {
119125
})
120126
mvt.Run()
121127
} else {
122-
// Note that CPU profiling is already enabled by default, should there be
123-
// a failure it will be available in the artifacts.
124128
c.Start(ctx, t.L(), startOpts, settings, roachNodes)
125129
require.NoError(t, rebalanceByLoad(
126130
ctx, t, t.L(), c, maxDuration,

0 commit comments

Comments
 (0)