Skip to content

Commit

Permalink
Remove single quotes from JVM settings section
Browse files Browse the repository at this point in the history
  • Loading branch information
rzvoncek committed Dec 11, 2024
1 parent d82a791 commit a9ba83f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit a9ba83f

Please sign in to comment.