From b5311e2999d0c2601cd0d4175c48ed33cbb625c1 Mon Sep 17 00:00:00 2001 From: Pritham Marupaka Date: Mon, 13 Nov 2023 18:08:47 -0500 Subject: [PATCH] update flag name --- ...er-custom-experimental-processor-aware-heap-pct-flag.yml | 2 +- launchlib/config.go | 2 +- launchlib/launcher.go | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/integration_test/testdata/launcher-custom-experimental-processor-aware-heap-pct-flag.yml b/integration_test/testdata/launcher-custom-experimental-processor-aware-heap-pct-flag.yml index f0af476d..56f1e36a 100644 --- a/integration_test/testdata/launcher-custom-experimental-processor-aware-heap-pct-flag.yml +++ b/integration_test/testdata/launcher-custom-experimental-processor-aware-heap-pct-flag.yml @@ -3,4 +3,4 @@ configVersion: 1 jvmOpts: - '-Xmx1g' experimental: - useProcessorAwareInitialHeapPercentage: true + useProcessorAwareInitialHeapSize: true diff --git a/launchlib/config.go b/launchlib/config.go index 2eb85b6d..86cf0b94 100644 --- a/launchlib/config.go +++ b/launchlib/config.go @@ -73,7 +73,7 @@ type CustomLauncherConfig struct { type ExperimentalLauncherConfig struct { // Also disables setting the active processor count JVM argument. - UseProcessorAwareInitialHeapPercentage bool `yaml:"useProcessorAwareInitialHeapPercentage"` + UseProcessorAwareInitialHeapSize bool `yaml:"useProcessorAwareInitialHeapSize"` } type PrimaryCustomLauncherConfig struct { diff --git a/launchlib/launcher.go b/launchlib/launcher.go index d2a794f3..8abb0c8e 100644 --- a/launchlib/launcher.go +++ b/launchlib/launcher.go @@ -333,7 +333,7 @@ func ensureActiveProcessorCount(customConfig *CustomLauncherConfig, args []strin filtered = append(filtered, arg) } - if !hasActiveProcessorCount && !customConfig.Experimental.UseProcessorAwareInitialHeapPercentage { + if !hasActiveProcessorCount && !customConfig.Experimental.UseProcessorAwareInitialHeapSize { processorCountArg, err := getActiveProcessorCountArg(logger) if err == nil { filtered = append(filtered, processorCountArg) @@ -382,10 +382,10 @@ func isInitialRAMPercentage(arg string) bool { return strings.HasPrefix(arg, "-XX:InitialRAMPercentage=") } -// If the experimental `UseProcessorAwareInitialHeapPercentage` is enabled, compute the heap percentage as 75% of the +// If the experimental `UseProcessorAwareInitialHeapSize` is set, compute the heap percentage as 75% of the // heap minus 3mb per processor, with a minimum value of 50%. func computeInitialHeapPercentage(customConfig *CustomLauncherConfig) (float64, error) { - if !customConfig.Experimental.UseProcessorAwareInitialHeapPercentage { + if !customConfig.Experimental.UseProcessorAwareInitialHeapSize { return 75.0, nil }