Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove single quotes from JVM settings section #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class JavaHeapConfiguration : DocumentSection {
if (parsedJvmSettings.newGenSize < 2_000_000_000 && parsedJvmSettings.heapSize >= 4_000_000_000) {
// New Gen size is too small
recs.immediate(RecommendationType.CONFIGURATION,"""
We recommend allocating up to 50% of the total heap size to the new gen, especially in read heavy workloads. The current heap's new generation size is smaller than optimal (${ByteCountHelper.humanReadableByteCount(parsedJvmSettings.newGenSize, ByteCountHelperUnits.BINARY)}).
We recommend allocating up to 50% of the total heap size to the new gen, especially in read heavy workloads. The current new generation size is smaller than optimal (${ByteCountHelper.humanReadableByteCount(parsedJvmSettings.newGenSize, ByteCountHelperUnits.BINARY)}).
""".trimIndent()
)
}
Expand All @@ -91,7 +91,7 @@ class JavaHeapConfiguration : DocumentSection {
// G1GC recommendations
if (ByteCountHelper.parseHumanReadableByteCountToLong("${cluster.nodes.first().osConfiguration.memInfo.memTotal} kB") < 40_000_000_000) {
// Available RAM is too small for G1
recs.immediate(RecommendationType.CONFIGURATION,"G1 ideally requires at least 20GiB of heap space to perform efficiently and you currently don't have enough RAM to use such heap sizes. We recommend using CMS instead which usually performs better than G1 when tuned appropriately.")
recs.immediate(RecommendationType.CONFIGURATION,"G1 ideally requires at least 20GiB of heap space to perform efficiently and you currently do not have enough RAM to use such heap sizes. We recommend using CMS instead which usually performs better than G1 when tuned appropriately.")
}
if (ByteCountHelper.parseHumanReadableByteCountToLong("${cluster.nodes.first().osConfiguration.memInfo.memTotal} kB") >= 40_000_000_000 && parsedJvmSettings.heapSize < 20_000_000_000) {
// Available RAM is too small for G1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ internal class JavaHeapConfigurationTest {
val template = jvm.getDocument(cluster, searcher, recs, ExecutionProfile.default())
assertThat(recs.size).isEqualTo(1)
assertThat(recs[0].priority).isEqualTo(RecommendationPriority.IMMEDIATE)
assertThat(recs[0].longForm).isEqualTo("We recommend allocating up to 50% of the total heap size to the new gen, especially in read heavy workloads. The current heap's new generation size is smaller than optimal (1.0 GiB).")
assertThat(recs[0].longForm).isEqualTo("We recommend allocating up to 50% of the total heap size to the new gen, especially in read heavy workloads. The current new generation size is smaller than optimal (1.0 GiB).")
assertThat(template).isEqualTo(lowNewGenTemplate)
}

Expand Down Expand Up @@ -230,7 +230,7 @@ internal class JavaHeapConfigurationTest {
jvm.getDocument(cluster, searcher, recs, ExecutionProfile.default())
assertThat(recs.size).isEqualTo(1)
assertThat(recs[0].priority).isEqualTo(RecommendationPriority.IMMEDIATE)
assertThat(recs[0].longForm).isEqualTo("G1 ideally requires at least 20GiB of heap space to perform efficiently and you currently don't have enough RAM to use such heap sizes. We recommend using CMS instead which usually performs better than G1 when tuned appropriately.")
assertThat(recs[0].longForm).isEqualTo("G1 ideally requires at least 20GiB of heap space to perform efficiently and you currently do not have enough RAM to use such heap sizes. We recommend using CMS instead which usually performs better than G1 when tuned appropriately.")
}

@Test
Expand Down
Loading