javacore-analyser 2.4.0.dev21__py3-none-any.whl → 2.4.1.dev12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- javacore_analyser/java_thread.py +8 -0
- javacore_analyser/javacore_analyser_batch.py +21 -0
- javacore_analyser/javacore_analyser_web.py +10 -0
- javacore_analyser/stack_trace.py +2 -1
- {javacore_analyser-2.4.0.dev21.dist-info → javacore_analyser-2.4.1.dev12.dist-info}/METADATA +1 -1
- {javacore_analyser-2.4.0.dev21.dist-info → javacore_analyser-2.4.1.dev12.dist-info}/RECORD +9 -9
- {javacore_analyser-2.4.0.dev21.dist-info → javacore_analyser-2.4.1.dev12.dist-info}/WHEEL +0 -0
- {javacore_analyser-2.4.0.dev21.dist-info → javacore_analyser-2.4.1.dev12.dist-info}/entry_points.txt +0 -0
- {javacore_analyser-2.4.0.dev21.dist-info → javacore_analyser-2.4.1.dev12.dist-info}/licenses/LICENSE +0 -0
javacore_analyser/java_thread.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
#
|
5
5
|
from javacore_analyser.abstract_snapshot_collection import AbstractSnapshotCollection
|
6
6
|
from javacore_analyser.properties import Properties
|
7
|
+
from javacore_analyser.stack_trace import StackTrace
|
7
8
|
|
8
9
|
|
9
10
|
class Thread(AbstractSnapshotCollection):
|
@@ -21,6 +22,7 @@ class Thread(AbstractSnapshotCollection):
|
|
21
22
|
if self.get_avg_mem() // (1024 * 1024) > 0: return True # memory in megabytes
|
22
23
|
if len(self.get_blocker_threads()) > 0: return True
|
23
24
|
if len(self.get_blocking_threads()) > 0: return True
|
25
|
+
if self.has_tall_stacks(): return True
|
24
26
|
return False
|
25
27
|
|
26
28
|
def get_hash(self):
|
@@ -144,3 +146,9 @@ class Thread(AbstractSnapshotCollection):
|
|
144
146
|
|
145
147
|
def get_id(self):
|
146
148
|
return self.get_hash()
|
149
|
+
|
150
|
+
def has_tall_stacks(self):
|
151
|
+
for snapshot in self.thread_snapshots:
|
152
|
+
if snapshot.stack_trace and snapshot.stack_trace.get_java_stack_depth() > StackTrace.TRUNCATION_DEPTH:
|
153
|
+
return True
|
154
|
+
return False
|
@@ -146,7 +146,17 @@ def generate_javecore_set_data(files):
|
|
146
146
|
javacores_temp_dir.cleanup()
|
147
147
|
|
148
148
|
|
149
|
+
# Assisted by watsonx Code Assistant
|
149
150
|
def create_output_files_structure(output_dir):
|
151
|
+
"""
|
152
|
+
Creates the output report directory structure and copies necessary files.
|
153
|
+
|
154
|
+
Args:
|
155
|
+
output_dir (str): The output directory path.
|
156
|
+
|
157
|
+
Returns:
|
158
|
+
None
|
159
|
+
"""
|
150
160
|
if not os.path.isdir(output_dir):
|
151
161
|
os.mkdir(output_dir)
|
152
162
|
data_output_dir = os.path.normpath(os.path.join(output_dir, 'data'))
|
@@ -164,7 +174,18 @@ def create_output_files_structure(output_dir):
|
|
164
174
|
os.path.join(output_dir, "index.html"))
|
165
175
|
|
166
176
|
|
177
|
+
# Assisted by watsonx Code Assistant
|
167
178
|
def generate_error_page(output_dir, exception):
|
179
|
+
"""
|
180
|
+
Generate an error page with a stacktrace.
|
181
|
+
|
182
|
+
Args:
|
183
|
+
output_dir (str): The directory where the error page will be saved.
|
184
|
+
exception (Exception): The exception that caused the error.
|
185
|
+
|
186
|
+
Returns:
|
187
|
+
None
|
188
|
+
"""
|
168
189
|
error_page_text = importlib_resources.read_text("javacore_analyser", "data/html/error.html")
|
169
190
|
tb = traceback.format_exc()
|
170
191
|
file = os.path.join(output_dir, "index.html")
|
@@ -52,7 +52,17 @@ def dir_listing(path):
|
|
52
52
|
|
53
53
|
|
54
54
|
@app.route('/zip/<path:path>')
|
55
|
+
# Assisted by watsonx Code Assistant
|
55
56
|
def compress(path):
|
57
|
+
"""
|
58
|
+
Compress a directory and return the compressed file as an attachment.
|
59
|
+
|
60
|
+
Args:
|
61
|
+
path (str): The path to the directory to compress.
|
62
|
+
|
63
|
+
Returns:
|
64
|
+
send_from_directory: The compressed file as an attachment.
|
65
|
+
"""
|
56
66
|
temp_zip_dir = tempfile.TemporaryDirectory()
|
57
67
|
try:
|
58
68
|
temp_zip_dir_name = temp_zip_dir.name
|
javacore_analyser/stack_trace.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright IBM Corp. 2024 -
|
2
|
+
# Copyright IBM Corp. 2024 - 2025
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
4
4
|
#
|
5
5
|
|
@@ -10,6 +10,7 @@ from javacore_analyser.stack_trace_kind import StackTraceKind
|
|
10
10
|
class StackTrace:
|
11
11
|
java_stack_depth: int
|
12
12
|
EMPTY_STACK = "No stack"
|
13
|
+
TRUNCATION_DEPTH = 50 # as per https://github.ibm.com/IOT-ELM-Poznan/Wait2/issues/430
|
13
14
|
|
14
15
|
"""
|
15
16
|
how many first lines of the stack need to be equal
|
{javacore_analyser-2.4.0.dev21.dist-info → javacore_analyser-2.4.1.dev12.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: javacore_analyser
|
3
|
-
Version: 2.4.
|
3
|
+
Version: 2.4.1.dev12
|
4
4
|
Summary: The tool to review IBM Javacore files
|
5
5
|
Project-URL: Homepage, https://github.com/IBM/javacore-analyser
|
6
6
|
Project-URL: Issues, https://github.com/IBM/javacore-analyser/issues
|
@@ -4,16 +4,16 @@ javacore_analyser/abstract_snapshot_collection.py,sha256=jGfd2XgujurRlKgEtlJjqNJ
|
|
4
4
|
javacore_analyser/code_snapshot_collection.py,sha256=yag25_O1JOQjz2uIK2gQzaTvovINnJ4ClnNhmrbC0Fg,2776
|
5
5
|
javacore_analyser/constants.py,sha256=7-gbGLzUMIMe2UvmLT17ymmy_r_izadpAyhrEKFonP8,1054
|
6
6
|
javacore_analyser/har_file.py,sha256=grXpfIyPek9xQ5jp3_AYOB5JDELd17o4O4rYELxWO7w,2131
|
7
|
-
javacore_analyser/java_thread.py,sha256=
|
7
|
+
javacore_analyser/java_thread.py,sha256=J_i2O87ws8LcwUHHDBE-pcFe-bV764iOO0PU_59ckVE,5780
|
8
8
|
javacore_analyser/javacore.py,sha256=oqJ-nKkZvq8xk_zlF9Z4dX61isqLRndSVLnQob_KUG4,7006
|
9
|
-
javacore_analyser/javacore_analyser_batch.py,sha256=
|
10
|
-
javacore_analyser/javacore_analyser_web.py,sha256=
|
9
|
+
javacore_analyser/javacore_analyser_batch.py,sha256=hLd4J_Q7JiZlkKp57KirK3_WtMaLuLC-X293a0bA8fU,8393
|
10
|
+
javacore_analyser/javacore_analyser_web.py,sha256=L3-BG5ljYllPkwHfKHL_yvG6m0cUjkDFdxpd6qsQDH8,6269
|
11
11
|
javacore_analyser/javacore_set.py,sha256=5x16j8KfA_DXD3FlvKlRHfRJ2B1rj5j2EkMfb2dV3dg,33341
|
12
12
|
javacore_analyser/logging_utils.py,sha256=vLob0ikezysjGv9XGqv9GbLekxu4eO_csq22M-gtLiQ,966
|
13
13
|
javacore_analyser/properties.py,sha256=SVxe86mL4DM_vkPEBT-V0_xDeIbXp2vjYE1aD-Z_UCQ,805
|
14
14
|
javacore_analyser/snapshot_collection.py,sha256=fLEnwg9-cOjVVUUludtzI7R2yO9BBVgJgxkhvqG5QDg,443
|
15
15
|
javacore_analyser/snapshot_collection_collection.py,sha256=1PV1TX4QQk01dAbX-k-kTpgKr6Il867Bw6X7HHBuv-Q,1346
|
16
|
-
javacore_analyser/stack_trace.py,sha256=
|
16
|
+
javacore_analyser/stack_trace.py,sha256=RLCbC8hLPSE_HOb3vNVP2YA38fGJMK3oB8wkrcpaf4s,1755
|
17
17
|
javacore_analyser/stack_trace_element.py,sha256=pZPrK1ACBUDE7YsVOFhTfewXequ1m5P-B0N-9RuhkWo,1143
|
18
18
|
javacore_analyser/stack_trace_kind.py,sha256=lOdfb_F3XrwDLciPk_ZgM_fmMn5JoXsIUjr7pjvmU4M,157
|
19
19
|
javacore_analyser/thread_snapshot.py,sha256=yp7uJwF5adMN2UAhOn-lLtSP2X3j8utUfafjyKu8r4E,13252
|
@@ -43,8 +43,8 @@ javacore_analyser/data/xml/javacores/javacore.xsl,sha256=puJl7CDR7FACAHbb2lTKHiw
|
|
43
43
|
javacore_analyser/data/xml/threads/thread.xml,sha256=6dG89Whx1_kpEYVS_F6Upa2XuXnXorlQATFc8kD5Mfc,280
|
44
44
|
javacore_analyser/data/xml/threads/thread.xsl,sha256=1tg5tImtr1gyZ8Q61tqIukNtm1fQ6R8YoKC3EgIjLRA,14084
|
45
45
|
javacore_analyser/templates/index.html,sha256=c40-JY3eXG9NzPVMy14VSZFj1Yq7cuUDVUg5BWa2WY0,2466
|
46
|
-
javacore_analyser-2.4.
|
47
|
-
javacore_analyser-2.4.
|
48
|
-
javacore_analyser-2.4.
|
49
|
-
javacore_analyser-2.4.
|
50
|
-
javacore_analyser-2.4.
|
46
|
+
javacore_analyser-2.4.1.dev12.dist-info/METADATA,sha256=dhoPkcEsi4esNZblFoVzXwMznt3hsMm4f4KAWNCzgSY,22743
|
47
|
+
javacore_analyser-2.4.1.dev12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
48
|
+
javacore_analyser-2.4.1.dev12.dist-info/entry_points.txt,sha256=W3S799zI58g5-jWMsC3wY9xksz21LPEMYOILv8sayfM,160
|
49
|
+
javacore_analyser-2.4.1.dev12.dist-info/licenses/LICENSE,sha256=xllut76FgcGL5zbIRvuRc7aezPbvlMUTWJPsVr2Sugg,11358
|
50
|
+
javacore_analyser-2.4.1.dev12.dist-info/RECORD,,
|
File without changes
|
{javacore_analyser-2.4.0.dev21.dist-info → javacore_analyser-2.4.1.dev12.dist-info}/entry_points.txt
RENAMED
File without changes
|
{javacore_analyser-2.4.0.dev21.dist-info → javacore_analyser-2.4.1.dev12.dist-info}/licenses/LICENSE
RENAMED
File without changes
|