From 4c3861ae1f44449a652b88c6776f0430d0f0cc11 Mon Sep 17 00:00:00 2001 From: PiotrAniola82 Date: Thu, 19 Dec 2024 13:19:31 +0100 Subject: [PATCH 1/2] Don't display the GC chart if there are no verbosegc files Signed-off-by: PiotrAniola82 --- .../data/jquery/wait2scripts.js | 4 +- src/javacore_analyser/data/xml/report.xsl | 46 +++++++++++-------- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/javacore_analyser/data/jquery/wait2scripts.js b/src/javacore_analyser/data/jquery/wait2scripts.js index 4f3ae30..0dbcf1f 100644 --- a/src/javacore_analyser/data/jquery/wait2scripts.js +++ b/src/javacore_analyser/data/jquery/wait2scripts.js @@ -99,7 +99,9 @@ const loadChartGC = function() { } const sysResourceE3Elem = document.getElementById('systemresources_myChartGC'); - sysResourceE3Elem.classList.remove('hide'); + if (sysResourceE3Elem) { + sysResourceE3Elem.classList.remove('hide'); + } const ctx = document.getElementById('myChartGC'); diff --git a/src/javacore_analyser/data/xml/report.xsl b/src/javacore_analyser/data/xml/report.xsl index af92f90..df49d47 100644 --- a/src/javacore_analyser/data/xml/report.xsl +++ b/src/javacore_analyser/data/xml/report.xsl @@ -355,25 +355,33 @@

Garbage Collection Activity

What does this chart tell me? - -
- -
+ + + +
+ +
+
+ +
+ No verbosegc logs were provided +
+

CPU Load

What does this chart tell me? From f053bbcca7fe9818f8b75ea189688f75e193e5d3 Mon Sep 17 00:00:00 2001 From: PiotrAniola82 Date: Thu, 19 Dec 2024 14:37:02 +0100 Subject: [PATCH 2/2] Don't display the GC chart if there are no collections within javacore time limits Signed-off-by: PiotrAniola82 --- .../data/jquery/wait2scripts.js | 2 +- src/javacore_analyser/data/xml/report.xsl | 36 +++++++++++-------- src/javacore_analyser/javacore_set.py | 4 +++ src/javacore_analyser/verbose_gc.py | 1 - 4 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/javacore_analyser/data/jquery/wait2scripts.js b/src/javacore_analyser/data/jquery/wait2scripts.js index 0dbcf1f..e2a9c84 100644 --- a/src/javacore_analyser/data/jquery/wait2scripts.js +++ b/src/javacore_analyser/data/jquery/wait2scripts.js @@ -127,7 +127,7 @@ const loadChartGC = function() { startingPoint = timestamp; if(endingPoint < timestamp) - endingPoint > timestamp; + endingPoint = timestamp; } coresTimeRange['startTime'] = startingPoint; diff --git a/src/javacore_analyser/data/xml/report.xsl b/src/javacore_analyser/data/xml/report.xsl index df49d47..8aa9aa0 100644 --- a/src/javacore_analyser/data/xml/report.xsl +++ b/src/javacore_analyser/data/xml/report.xsl @@ -357,25 +357,33 @@ What does this chart tell me? -