Support for Heap after GC stats (correction after backport to 1.2.0) (#1315)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
This commit is contained in:
parent
80388a8a29
commit
180db5cd09
server/src/main/java/org/opensearch/monitor/jvm
|
@ -500,7 +500,7 @@ public class JvmStats implements Writeable, ToXContentFragment {
|
||||||
max = in.readVLong();
|
max = in.readVLong();
|
||||||
peakUsed = in.readVLong();
|
peakUsed = in.readVLong();
|
||||||
peakMax = in.readVLong();
|
peakMax = in.readVLong();
|
||||||
if (in.getVersion().onOrAfter(Version.V_2_0_0)) {
|
if (in.getVersion().onOrAfter(Version.V_1_2_0)) {
|
||||||
lastGcStats = new MemoryPoolGcStats(in);
|
lastGcStats = new MemoryPoolGcStats(in);
|
||||||
} else {
|
} else {
|
||||||
lastGcStats = new MemoryPoolGcStats(0, 0);
|
lastGcStats = new MemoryPoolGcStats(0, 0);
|
||||||
|
@ -514,7 +514,7 @@ public class JvmStats implements Writeable, ToXContentFragment {
|
||||||
out.writeVLong(max);
|
out.writeVLong(max);
|
||||||
out.writeVLong(peakUsed);
|
out.writeVLong(peakUsed);
|
||||||
out.writeVLong(peakMax);
|
out.writeVLong(peakMax);
|
||||||
if (out.getVersion().onOrAfter(Version.V_2_0_0)) {
|
if (out.getVersion().onOrAfter(Version.V_1_2_0)) {
|
||||||
lastGcStats.writeTo(out);
|
lastGcStats.writeTo(out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue