diff --git a/pkg/server/profiler/cpuprofile_test.go b/pkg/server/profiler/cpuprofile_test.go index ab87ce0e0694..f059057c2021 100644 --- a/pkg/server/profiler/cpuprofile_test.go +++ b/pkg/server/profiler/cpuprofile_test.go @@ -31,7 +31,6 @@ func TestCPUProfiler(t *testing.T) { sv.Init(ctx, s.Version) cpuProfileInterval.Override(ctx, sv, time.Hour) cpuUsageCombined.Override(ctx, sv, 80) - cpuProfileEnabled.Override(ctx, sv, true) pastTime := time.Date(2023, 1, 1, 1, 1, 1, 1, time.UTC) cases := []struct { name string diff --git a/pkg/server/profiler/cpuprofiler.go b/pkg/server/profiler/cpuprofiler.go index a10edbdd1214..9d49bc4a723d 100644 --- a/pkg/server/profiler/cpuprofiler.go +++ b/pkg/server/profiler/cpuprofiler.go @@ -61,15 +61,6 @@ var cpuProfileDuration = settings.RegisterDurationSetting( 10*time.Second, settings.PositiveDuration, ) -var cpuProfileEnabled = settings.RegisterBoolSetting( - settings.TenantWritable, - "server.cpu_profile.enabled", - "a bool which indicates whether cpu profiles should be taken by the cpu profiler. "+ - "in order to have the profiler function, server.cpu_profile.cpu_usage_combined_threshold "+ - "must also be set to a realistic value", - false, -) - const cpuProfFileNamePrefix = "cpuprof" // CPUProfiler is used to take CPU profiles. @@ -116,9 +107,6 @@ func (cp *CPUProfiler) MaybeTakeProfile(ctx context.Context, currentCpuUsage int logcrash.ReportPanic(ctx, &cp.st.SV, p, 1) } }() - if !cpuProfileEnabled.Get(&cp.st.SV) { - return - } cp.profiler.maybeTakeProfile(ctx, currentCpuUsage, cp.takeCPUProfile) }