javacore-analyser 2.0rc1__tar.gz → 2.1.0.dev66__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- javacore_analyser-2.1.0.dev66/.travis.yml +28 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/CONTRIBUTING.md +22 -3
- javacore_analyser-2.1.0.dev66/Dockerfile +15 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/PKG-INFO +25 -15
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/README.md +21 -12
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/pyproject.toml +4 -4
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/requirements.txt +2 -2
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/abstract_snapshot_collection.py +2 -2
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/constants.py +2 -1
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/expand.js +2 -0
- javacore_analyser-2.1.0.dev66/src/javacore_analyser/data/html/processing_data.html +17 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/jquery/search.js +22 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/jquery/wait2scripts.js +27 -5
- javacore_analyser-2.1.0.dev66/src/javacore_analyser/data/xml/javacores/javacore.xsl +174 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/xml/report.xsl +1 -1
- javacore_analyser-2.1.0.dev66/src/javacore_analyser/data/xml/threads/thread.xsl +213 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/javacore.py +5 -3
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/javacore_analyser_batch.py +34 -14
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/javacore_analyser_web.py +58 -26
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/javacore_set.py +78 -43
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/snapshot_collection_collection.py +5 -3
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/stack_trace.py +2 -2
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/stack_trace_element.py +1 -1
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/templates/index.html +9 -4
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/thread_snapshot.py +3 -2
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/tips.py +5 -3
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/verbose_gc.py +4 -1
- javacore_analyser-2.0rc1/.travis.yml +0 -10
- javacore_analyser-2.0rc1/src/javacore_analyser/data/xml/javacores/javacore.xsl +0 -165
- javacore_analyser-2.0rc1/src/javacore_analyser/data/xml/threads/thread.xsl +0 -204
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/.github/dco.yml +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/.gitignore +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/CHANGELOG.md +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/CODE_OF_CONDUCT.md +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/LICENSE +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/MAINTAINERS.md +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/REQUIREMENTS.md +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/SECURITY.md +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/docs/ClassDiagram.png +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/docs/dom_example.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/__init__.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/code_snapshot_collection.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/jquery/chart.js +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/jquery/chartjs-adapter-date-fns.bundle.min.js +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/jquery/jq.css +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/jquery/jquery.mark.min.js +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/jquery/jquery.min.js +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/jquery/jquery.tablesorter.min.js +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/jquery/jquery.tablesorter.widgets.min.js +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/jquery/sorting.js +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/jquery/theme.blue.css +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/jquery/theme.default.min.css +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/style.css +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/xml/index.xml +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/xml/javacores/javacore.xml +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/xml/threads/thread.xml +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/java_thread.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/logging_utils.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/snapshot_collection.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/stack_trace_kind.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/__init__.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/archives/archive_without_javacores.zip +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/archives/javacores/aaa-javacore.20220606.114458.32888.0001.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/archives/javacores/aaa-javacore.20220606.114502.32888.0002.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/archives/javacores-corrupted.zip +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/archives/javacores-starting-aaa.zip +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/archives/javacores.7z +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/archives/javacores.tar.bz2 +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/archives/javacores.tar.gz +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/archives/javacores.tgz +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/archives/javacores.zip +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/archives/javacores_with_invalid_chars.zip +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/issue129/javacore.20230602.091848.83156.0001.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/issue129/javacore.20230602.091853.83156.0002.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/javacore.20220606.114458.32888.0001.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/javacore.20220606.114502.32888.0002.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/javacore.20220606.114506.32888.0003.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/javacore.20220606.114513.32888.0004.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/javacore.20220606.114516.32888.0005.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/javacore.20220606.114900.32888.0006.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/javacore.20220606.114907.32888.0007.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/javacore.20220606.114912.32888.0008.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/javacore.20220606.114931.32888.0009.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/javacore.20220606.114947.32888.0010.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/javacore.20220606.114948.32888.0011.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/javacore.20220606.114949.32888.0012.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/javacore.wrong.corr +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/verbosegc.230105.19308.txt.001 +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/verbosegc.230413.19984.txt.001 +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/javacores/verbosegc.230420.33424.txt.001 +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/quotationMarks/javacore.20230830.134339.30220.0001.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/quotationMarks/javacore.20230830.134339.30220.0002.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/verboseGc/verbosegc.230105.19308.txt.001 +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/verboseGc/verbosegc.230413.19984.txt.001 +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/verboseGc/verbosegc.230420.33424.txt.001 +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/verboseGcJavacores/javacore.20230602.091848.83156.0001.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/verboseGcJavacores/javacore.20230602.091853.83156.0002.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/verboseGcJavacores/javacore.20230602.092423.83156.0003.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/verboseGcJavacores/javacore.20230602.092537.83156.0004.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/verboseGcJavacores/javacore.20230602.092604.83156.0005.txt +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/verboseGcJavacores/verbosegc.230602.61164.txt.001 +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/verboseGcJavacores/verbosegc.230602.83156.txt.001 +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/data/verboseGcJavacores.zip +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/test_code_snapshot_collection.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/test_gc_collection.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/test_java_thread.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/test_javacore.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/test_javacore_analyser.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/test_javacore_set.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/test_stack_trace.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/test_stack_trace_element.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/test_thread_snapshot.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/test_tips.py +0 -0
- {javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/test/test_verbose_gc_parser.py +0 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
language: python
|
2
|
+
python:
|
3
|
+
- "3.9"
|
4
|
+
before_install:
|
5
|
+
- pip install 'urllib3<2.0' #Enforce SSL version to be able to run twine
|
6
|
+
- pip install -U pytest
|
7
|
+
- pip install -U build
|
8
|
+
- pip install -U twine
|
9
|
+
- pip install codecov
|
10
|
+
install:
|
11
|
+
- pip install -r requirements.txt
|
12
|
+
- pip install .
|
13
|
+
env:
|
14
|
+
global:
|
15
|
+
- PYTHONPATH=src:test
|
16
|
+
script:
|
17
|
+
- pytest
|
18
|
+
- python -m build
|
19
|
+
after_success:
|
20
|
+
- codecov
|
21
|
+
deploy:
|
22
|
+
provider: script
|
23
|
+
#script: python -m twine upload --skip-existing --verbose --password $TWINE_TEST_TOKEN --repository testpypi dist/* #test instance
|
24
|
+
script: python -m twine upload --skip-existing --verbose --password $TWINE_PROD_TOKEN dist/* #production instance.
|
25
|
+
on:
|
26
|
+
all_branches: true # uncomment for testing purposes
|
27
|
+
# branch: prod # uncomment on production
|
28
|
+
# tags: true # uncomment on production
|
@@ -85,9 +85,9 @@ Change the second parameter to the directory where you want the output report be
|
|
85
85
|
|
86
86
|
To run web application:
|
87
87
|
1. Right click on **javacore_analyser_web.py** directory in **Project** view and select **Modify Run Configuration...**.
|
88
|
-
2. Add the following
|
89
|
-
|
90
|
-
|
88
|
+
2. Add the following parameters:
|
89
|
+
**debug=True reports_dir=/tmp/web_reports**
|
90
|
+
|
91
91
|
You can change the report dir to the location when you want to store the report.
|
92
92
|
The application will start on http://localhost:5000
|
93
93
|
|
@@ -96,6 +96,25 @@ To run web application:
|
|
96
96
|
Follow the steps from [Packaging projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/).
|
97
97
|
Currently Chris has an API keys for test and production pypi
|
98
98
|
|
99
|
+
## Build container localy
|
100
|
+
To build a container:
|
101
|
+
`podman build -t javacore-analyser .`
|
102
|
+
|
103
|
+
or
|
104
|
+
|
105
|
+
`docker build -t javacore-analyser .`
|
106
|
+
|
107
|
+
To start the container:
|
108
|
+
`podman run -it --rm --name javacore-analyser --mount type=bind,src="local-dir-on-fs",target=/reports -p 5001:5000 javacore-analyser`
|
109
|
+
|
110
|
+
or
|
111
|
+
|
112
|
+
`docker run -it --rm --name javacore-analyser --mount type=bind,src="local-dir-on-fs",target=/reports -p 5001:5000 javacore-analyser`
|
113
|
+
|
114
|
+
`src` parameter specifies where you want to store reports locally
|
115
|
+
`-p` specifies port mapping. The application in container is running on port 5000. You can map it to another port on
|
116
|
+
your machine (5001 in this example).
|
117
|
+
|
99
118
|
## Testing
|
100
119
|
As default the tests in Pycharm are ran in the current selected directory. However we want to run them in main
|
101
120
|
directory of the tool (**javacore-analyser** directory, not **test** directory).
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#
|
2
|
+
# Copyright IBM Corp. 2024 - 2024
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
4
|
+
#
|
5
|
+
|
6
|
+
FROM python:3
|
7
|
+
|
8
|
+
EXPOSE 5000/tcp
|
9
|
+
ENV REPORTS_DIR=/reports
|
10
|
+
RUN mkdir /reports
|
11
|
+
VOLUME ["/reports"]
|
12
|
+
|
13
|
+
RUN pip install --no-cache-dir javacore-analyser
|
14
|
+
|
15
|
+
CMD [ "javacore_analyser_web" ]
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: javacore_analyser
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.1.0.dev66
|
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
|
@@ -209,6 +209,7 @@ License: Apache License
|
|
209
209
|
See the License for the specific language governing permissions and
|
210
210
|
limitations under the License.
|
211
211
|
|
212
|
+
License-File: LICENSE
|
212
213
|
Classifier: Development Status :: 5 - Production/Stable
|
213
214
|
Classifier: Environment :: Console
|
214
215
|
Classifier: Environment :: Web Environment
|
@@ -226,12 +227,12 @@ Classifier: Programming Language :: Python :: 3.11
|
|
226
227
|
Classifier: Programming Language :: Python :: 3.12
|
227
228
|
Classifier: Programming Language :: Python :: 3.13
|
228
229
|
Requires-Python: >=3.9
|
229
|
-
Requires-Dist: dicttoxml
|
230
230
|
Requires-Dist: flask
|
231
231
|
Requires-Dist: importlib-resources
|
232
232
|
Requires-Dist: lxml
|
233
233
|
Requires-Dist: py7zr
|
234
234
|
Requires-Dist: pyana
|
235
|
+
Requires-Dist: tqdm
|
235
236
|
Requires-Dist: waitress
|
236
237
|
Description-Content-Type: text/markdown
|
237
238
|
|
@@ -280,9 +281,7 @@ This is recommended for geeks only:
|
|
280
281
|
#### Running cmd application:
|
281
282
|
1. Install application if not done yet
|
282
283
|
2. Activate your created virtual environment according to activate Virtual Environment according to [Creating virtual environments](https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments)
|
283
|
-
3.
|
284
|
-
`pip install requirements.txt`
|
285
|
-
4. Run the following command from cmd: `javacore-analyser-batch <input-data> <generated-reports-dir>`
|
284
|
+
3. Run the following command from cmd: `javacore-analyser-batch <input-data> <generated-reports-dir>`
|
286
285
|
Where `<input-data>` is one of the following:
|
287
286
|
* The directory containing javacores and optionally verbose gc
|
288
287
|
* Archive (7z, zip, tar.gz, tar.bz2) containing the same
|
@@ -292,17 +291,28 @@ You can type the following command to obtain the help:
|
|
292
291
|
|
293
292
|
#### Running web application:
|
294
293
|
1. Repeat steps 1-3 from cmd application
|
295
|
-
2.
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
The first parameter sets where the reports need to be stored. If not set, then the `reports` dir will be created in current location.
|
301
|
-
The first parameter set the port to use by application. If not specified, 5000 will be used.
|
302
|
-
3. Execute the following command from cmd:
|
303
|
-
`javacore_analyser_web`
|
294
|
+
2. Execute the following command from cmd:
|
295
|
+
`javacore_analyser_web --port=500 --reports-dir=/data/reports_dir`
|
296
|
+
|
297
|
+
The first parameter set the port to use by application. If not specified, 5000 will be used.
|
298
|
+
The second parameter sets where the reports need to be stored. If not set, then the `reports` dir will be created in current location.
|
304
299
|
|
305
300
|
Now you can type (http://localhost:5000/).
|
301
|
+
|
302
|
+
### Running container image
|
303
|
+
There is an unofficial Docker/Podman container managed by one of projects developers. Use the following command
|
304
|
+
to start it:
|
305
|
+
|
306
|
+
`podman run -it --rm --name javacore-analyser --mount type=bind,src="/local-reports-dir",target=/reports -p 5001:5000 ghcr.io/kkazmierczyk/javacore-analyser:latest`
|
307
|
+
|
308
|
+
or
|
309
|
+
`docker run -it --rm --name javacore-analyser --mount type=bind,src="/local-reports-dir",target=/reports -p 5001:5000 ghcr.io/kkazmierczyk/javacore-analyser:latest`
|
310
|
+
|
311
|
+
The `mount` option specifies where you want locally to store the reports. The reports in the container are stored in
|
312
|
+
`/reports` directory. If you remove mount option, the application will work but the reports will not persist after
|
313
|
+
restart.
|
314
|
+
The application is running in the container on port 5000. By using `-p 5001:5000` option, you specify to map container
|
315
|
+
port 5000 to port 5001 on your machine. Therefore the application will be available under `http://localhost:5001/`.
|
306
316
|
|
307
317
|
<!-- The following are OPTIONAL, but strongly suggested to have in your repository. -->
|
308
318
|
<!--
|
@@ -43,9 +43,7 @@ This is recommended for geeks only:
|
|
43
43
|
#### Running cmd application:
|
44
44
|
1. Install application if not done yet
|
45
45
|
2. Activate your created virtual environment according to activate Virtual Environment according to [Creating virtual environments](https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments)
|
46
|
-
3.
|
47
|
-
`pip install requirements.txt`
|
48
|
-
4. Run the following command from cmd: `javacore-analyser-batch <input-data> <generated-reports-dir>`
|
46
|
+
3. Run the following command from cmd: `javacore-analyser-batch <input-data> <generated-reports-dir>`
|
49
47
|
Where `<input-data>` is one of the following:
|
50
48
|
* The directory containing javacores and optionally verbose gc
|
51
49
|
* Archive (7z, zip, tar.gz, tar.bz2) containing the same
|
@@ -55,17 +53,28 @@ You can type the following command to obtain the help:
|
|
55
53
|
|
56
54
|
#### Running web application:
|
57
55
|
1. Repeat steps 1-3 from cmd application
|
58
|
-
2.
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
The first parameter sets where the reports need to be stored. If not set, then the `reports` dir will be created in current location.
|
64
|
-
The first parameter set the port to use by application. If not specified, 5000 will be used.
|
65
|
-
3. Execute the following command from cmd:
|
66
|
-
`javacore_analyser_web`
|
56
|
+
2. Execute the following command from cmd:
|
57
|
+
`javacore_analyser_web --port=500 --reports-dir=/data/reports_dir`
|
58
|
+
|
59
|
+
The first parameter set the port to use by application. If not specified, 5000 will be used.
|
60
|
+
The second parameter sets where the reports need to be stored. If not set, then the `reports` dir will be created in current location.
|
67
61
|
|
68
62
|
Now you can type (http://localhost:5000/).
|
63
|
+
|
64
|
+
### Running container image
|
65
|
+
There is an unofficial Docker/Podman container managed by one of projects developers. Use the following command
|
66
|
+
to start it:
|
67
|
+
|
68
|
+
`podman run -it --rm --name javacore-analyser --mount type=bind,src="/local-reports-dir",target=/reports -p 5001:5000 ghcr.io/kkazmierczyk/javacore-analyser:latest`
|
69
|
+
|
70
|
+
or
|
71
|
+
`docker run -it --rm --name javacore-analyser --mount type=bind,src="/local-reports-dir",target=/reports -p 5001:5000 ghcr.io/kkazmierczyk/javacore-analyser:latest`
|
72
|
+
|
73
|
+
The `mount` option specifies where you want locally to store the reports. The reports in the container are stored in
|
74
|
+
`/reports` directory. If you remove mount option, the application will work but the reports will not persist after
|
75
|
+
restart.
|
76
|
+
The application is running in the container on port 5000. By using `-p 5001:5000` option, you specify to map container
|
77
|
+
port 5000 to port 5001 on your machine. Therefore the application will be available under `http://localhost:5001/`.
|
69
78
|
|
70
79
|
<!-- The following are OPTIONAL, but strongly suggested to have in your repository. -->
|
71
80
|
<!--
|
@@ -8,9 +8,9 @@ requires = ["hatchling", "versioningit"]
|
|
8
8
|
build-backend = "hatchling.build"
|
9
9
|
|
10
10
|
[project]
|
11
|
-
|
11
|
+
dynamic = ["version"]
|
12
12
|
name = "javacore_analyser"
|
13
|
-
version = "2.0rc1"
|
13
|
+
#version = "2.0rc1"
|
14
14
|
authors = [
|
15
15
|
{ name="Krzysztof Kazmierczyk", email="kazm@ibm.com" },
|
16
16
|
{ name="Piotr Aniola", email="Piotr.Aniola@ibm.com" },
|
@@ -40,13 +40,13 @@ classifiers = [
|
|
40
40
|
"Natural Language :: English",
|
41
41
|
]
|
42
42
|
dependencies = [
|
43
|
-
"dicttoxml",
|
44
43
|
"py7zr",
|
45
44
|
"lxml",
|
46
45
|
"pyana",
|
47
46
|
"importlib-resources",
|
48
47
|
"flask",
|
49
|
-
"waitress"
|
48
|
+
"waitress",
|
49
|
+
"tqdm"
|
50
50
|
]
|
51
51
|
|
52
52
|
[project.scripts]
|
@@ -59,7 +59,7 @@ class AbstractSnapshotCollection(abc.ABC):
|
|
59
59
|
self.thread_snapshots.append(snapshot)
|
60
60
|
|
61
61
|
def index_of(self, snapshot):
|
62
|
-
for i in range(len(self.
|
62
|
+
for i in range(len(self.thread_snapshots)):
|
63
63
|
if self.thread_snapshots[i] == snapshot: return i
|
64
64
|
return -1
|
65
65
|
|
@@ -142,7 +142,7 @@ class AbstractSnapshotCollection(abc.ABC):
|
|
142
142
|
result = 0
|
143
143
|
for i in self.thread_snapshots:
|
144
144
|
el = i.get_java_stack_depth()
|
145
|
-
if el>result:
|
145
|
+
if el > result:
|
146
146
|
result = el
|
147
147
|
return result
|
148
148
|
|
{javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/constants.py
RENAMED
@@ -30,10 +30,11 @@ ENCODING = '1TICHARSET'
|
|
30
30
|
DATA_OUTPUT_SUBDIR = '/data/'
|
31
31
|
DEFAULT_FILE_DELIMITER = ';'
|
32
32
|
|
33
|
-
MIN_JAVACORE_SIZE = 5 * 1024
|
33
|
+
MIN_JAVACORE_SIZE = 5 * 1024 # Minimal Javacore size in bytes
|
34
34
|
|
35
35
|
DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
|
36
36
|
|
37
37
|
# Web application constants
|
38
38
|
DEFAULT_REPORTS_DIR = "reports"
|
39
39
|
DEFAULT_PORT = 5000
|
40
|
+
TEMP_DIR = "temp_data" # Folder to store temporary data for creating reports
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<!--
|
4
|
+
# Copyright IBM Corp. 2024 - 2024
|
5
|
+
# SPDX-License-Identifier: Apache-2.0
|
6
|
+
-->
|
7
|
+
|
8
|
+
<html lang="en">
|
9
|
+
<head>
|
10
|
+
<meta http-equiv="refresh" content="30" /> <!-- Refresh this page every 30s until generated page appears -->
|
11
|
+
<meta charset="UTF-8">
|
12
|
+
<title>The page is being generated</title>
|
13
|
+
</head>
|
14
|
+
<body>
|
15
|
+
<h1>The page is being generated. Once it is ready, it will appear here.</h1>
|
16
|
+
</body>
|
17
|
+
</html>
|
@@ -49,10 +49,32 @@ $(function() {
|
|
49
49
|
searchInNode(rootNode, searchTerm);
|
50
50
|
}
|
51
51
|
|
52
|
+
function processChild(child) {
|
53
|
+
try {
|
54
|
+
if (isDomNode(child) && child.classList.contains('toggle_expand')) {
|
55
|
+
for (i = 0; i < child.childNodes.length; ++i) {
|
56
|
+
grandchild = child.childNodes[i];
|
57
|
+
if (isDomNode(grandchild) && grandchild.text == '[+] Expand') {
|
58
|
+
grandchild.text = '[-] Collapse';
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
} catch(err) {
|
63
|
+
console.log(err);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
52
67
|
function searchInNode(node, searchTerm) {
|
53
68
|
if (!isDomNode(node)) return;
|
54
69
|
if (node.textContent.toUpperCase().match(searchTerm.toUpperCase())) {
|
55
70
|
// expand the node here
|
71
|
+
if (!node.classList.contains('show-all')) {
|
72
|
+
node.classList.add('show-all');
|
73
|
+
for (i = 0; i < node.childNodes.length; ++i) {
|
74
|
+
child = node.childNodes[i];
|
75
|
+
processChild(child);
|
76
|
+
}
|
77
|
+
}
|
56
78
|
if (node.getAttribute('style') && node.style.display == "none") {
|
57
79
|
node.style.display = "";
|
58
80
|
}
|
@@ -145,12 +145,34 @@ const loadChartGC = function() {
|
|
145
145
|
});
|
146
146
|
|
147
147
|
// 3. find the HEAP_SIZE
|
148
|
-
const MB_SIZE = Math.pow(1024, 2)
|
148
|
+
const MB_SIZE = Math.pow(1024, 2);
|
149
|
+
let heapAsString = document.getElementById('sys_info_table').rows[2].cells[1].innerHTML;
|
149
150
|
let HEAP_SIZE;
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
151
|
+
let heapUnit = heapAsString.slice(-1).toLowerCase();
|
152
|
+
|
153
|
+
if(!isNaN(Number(heapUnit))) {
|
154
|
+
HEAP_SIZE = Number(heapAsString);
|
155
|
+
}
|
156
|
+
else {
|
157
|
+
|
158
|
+
switch (heapUnit) {
|
159
|
+
case "g":
|
160
|
+
HEAP_SIZE =
|
161
|
+
Number(heapAsString.slice(0, -1)) * MB_SIZE * 1024;
|
162
|
+
break;
|
163
|
+
case "m":
|
164
|
+
HEAP_SIZE =
|
165
|
+
Number(heapAsString.slice(0, -1)) * MB_SIZE;
|
166
|
+
break;
|
167
|
+
case "k":
|
168
|
+
HEAP_SIZE =
|
169
|
+
Number(heapAsString.slice(0, -1)) * 1024;
|
170
|
+
break;
|
171
|
+
default:
|
172
|
+
console.log("Hmm, what now .. heap unit undefined!");
|
173
|
+
break;
|
174
|
+
}
|
175
|
+
}
|
154
176
|
|
155
177
|
// 4. create input data for GC chart
|
156
178
|
// start with gc collection done after the first javacore creation
|
@@ -0,0 +1,174 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
|
3
|
+
<!--
|
4
|
+
# Copyright IBM Corp. 2024 - 2024
|
5
|
+
# SPDX-License-Identifier: Apache-2.0
|
6
|
+
-->
|
7
|
+
|
8
|
+
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
9
|
+
<xsl:template match="text()"/> <!-- these are not the nodes you're looking for -->
|
10
|
+
<xsl:template match="/">
|
11
|
+
<html height="100%">
|
12
|
+
<head>
|
13
|
+
<link rel="stylesheet" href="../data/style.css"/>
|
14
|
+
<link rel="stylesheet" href="../data/jquery/jq.css" />
|
15
|
+
<link rel="stylesheet" href="../data/jquery/theme.blue.css" />
|
16
|
+
<link rel="stylesheet" href="../data/jquery/theme.default.min.css" />
|
17
|
+
<script type="text/javascript" src="../data/jquery/jquery.min.js"> _ </script>
|
18
|
+
<script type="text/javascript" src="../data/jquery/jquery.tablesorter.min.js"> _ </script>
|
19
|
+
<script type="text/javascript" src="../data/jquery/jquery.tablesorter.widgets.min.js"> _ </script>
|
20
|
+
<script type="text/javascript" src="../data/jquery/wait2scripts.js"> _ </script>
|
21
|
+
<script type="text/javascript" src="../data/jquery/sorting.js"> _ </script>
|
22
|
+
<script type="text/javascript" src="../data/expand.js"> _ </script>
|
23
|
+
<script src="../data/jquery/jquery.mark.min.js"> _ </script>
|
24
|
+
<script type="text/javascript" src="../data/jquery/search.js"> _ </script>
|
25
|
+
</head>
|
26
|
+
|
27
|
+
<body id="doc_body" height="100%">
|
28
|
+
<div class="searchbar">
|
29
|
+
<input id="search-input" type="search" />
|
30
|
+
<button data-search="search" id="search-button">Search</button>
|
31
|
+
<button data-search="next">Next</button>
|
32
|
+
<button data-search="prev">Prev</button>
|
33
|
+
<button data-search="clear">✖</button>
|
34
|
+
</div>
|
35
|
+
<div class="content">
|
36
|
+
<p class="right"><a href="../index.html"> Back to Main page </a></p>
|
37
|
+
<h2>Wait Report for: <b>{id}</b></h2>
|
38
|
+
<div id="all_threads">
|
39
|
+
<table id="javacore_threads_table" class="tablesorter_blue">
|
40
|
+
<thead>
|
41
|
+
<tr>
|
42
|
+
<th class="sixty">Thread name</th>
|
43
|
+
<th>Total CPU usage (s)</th>
|
44
|
+
<th>% CPU usage</th>
|
45
|
+
<th>Memory allocated since last GC (MB)</th>
|
46
|
+
<th>Java stack depth</th>
|
47
|
+
<th>Status</th>
|
48
|
+
</tr>
|
49
|
+
</thead>
|
50
|
+
<tbody>
|
51
|
+
<xsl:for-each select="//Thread/all_snapshot_collection/snapshot_collection/stack[file_name='{id}']">
|
52
|
+
<xsl:variable name="i" select="position()" />
|
53
|
+
<tr>
|
54
|
+
<td class="left">
|
55
|
+
<div>
|
56
|
+
<xsl:attribute name="id">
|
57
|
+
<xsl:value-of select="concat('stack',$i)"/>
|
58
|
+
</xsl:attribute>
|
59
|
+
<a target="_blank">
|
60
|
+
<xsl:attribute name="href">
|
61
|
+
<xsl:value-of select="concat('../threads/thread_', thread_hash, '.html')"/>
|
62
|
+
</xsl:attribute>
|
63
|
+
<xsl:value-of select="thread_name"/>
|
64
|
+
</a>
|
65
|
+
<xsl:choose>
|
66
|
+
<xsl:when test="stack_depth > 0">
|
67
|
+
<div>
|
68
|
+
<div class="toggle_expand">
|
69
|
+
<a href="javaScript:;" class="show">[+] Expand</a> <!-- "show" class is used in expand.js -->
|
70
|
+
</div>
|
71
|
+
<p class="stacktrace">
|
72
|
+
<xsl:for-each select="*[starts-with(name(), 'line')]">
|
73
|
+
<span>
|
74
|
+
<xsl:attribute name="class">
|
75
|
+
<xsl:value-of select="@kind"/>
|
76
|
+
</xsl:attribute>
|
77
|
+
<xsl:value-of select="current()"/>
|
78
|
+
</span>
|
79
|
+
<br/>
|
80
|
+
</xsl:for-each>
|
81
|
+
</p>
|
82
|
+
</div>
|
83
|
+
</xsl:when>
|
84
|
+
<xsl:otherwise>
|
85
|
+
No stack
|
86
|
+
</xsl:otherwise>
|
87
|
+
</xsl:choose>
|
88
|
+
</div>
|
89
|
+
</td>
|
90
|
+
<td>
|
91
|
+
<xsl:choose>
|
92
|
+
<xsl:when test="cpu_usage >= 0">
|
93
|
+
<xsl:value-of select='format-number(cpu_usage, "0.00")'/>
|
94
|
+
</xsl:when>
|
95
|
+
<xsl:otherwise>
|
96
|
+
<div class="warning">[!]
|
97
|
+
<span class="warningtooltip">Error computing CPU usage, javacores may be corrupted</span>
|
98
|
+
</div>
|
99
|
+
</xsl:otherwise>
|
100
|
+
</xsl:choose>
|
101
|
+
</td>
|
102
|
+
<td>
|
103
|
+
<xsl:choose>
|
104
|
+
<xsl:when test="cpu_percentage >= 0">
|
105
|
+
<xsl:value-of select='format-number(cpu_percentage, "0.0")'/>
|
106
|
+
</xsl:when>
|
107
|
+
<xsl:otherwise>
|
108
|
+
<div class="warning">[!]
|
109
|
+
<span class="warningtooltip">Error computing CPU percentage, javacores may be corrupted</span>
|
110
|
+
</div>
|
111
|
+
</xsl:otherwise>
|
112
|
+
</xsl:choose>
|
113
|
+
</td>
|
114
|
+
<td><xsl:value-of select='format-number(allocated_memory div 1024 div 1024, "0.00")'/></td>
|
115
|
+
<td><xsl:value-of select='java_stack_depth'/></td>
|
116
|
+
<xsl:choose>
|
117
|
+
<xsl:when test="state='CW'">
|
118
|
+
<td class="waiting">Waiting on condition</td>
|
119
|
+
</xsl:when>
|
120
|
+
<xsl:when test="state='R'">
|
121
|
+
<td class="runnable">Runnable</td>
|
122
|
+
</xsl:when>
|
123
|
+
<xsl:when test="state='P'">
|
124
|
+
<td class="parked">
|
125
|
+
<xsl:choose>
|
126
|
+
<xsl:when test="blocked_by=''">
|
127
|
+
Parked
|
128
|
+
</xsl:when>
|
129
|
+
<xsl:otherwise>
|
130
|
+
<a target="_blank">
|
131
|
+
<xsl:attribute name="href">
|
132
|
+
<xsl:value-of select="concat('../threads/thread_', blocked_by/@thread_hash, '.html')"/>
|
133
|
+
</xsl:attribute>
|
134
|
+
<xsl:attribute name="title">
|
135
|
+
<xsl:value-of select="blocked_by/@name" />
|
136
|
+
</xsl:attribute>
|
137
|
+
Parked on <xsl:value-of select="blocked_by/@thread_id"/>
|
138
|
+
</a>
|
139
|
+
</xsl:otherwise>
|
140
|
+
</xsl:choose>
|
141
|
+
</td>
|
142
|
+
</xsl:when>
|
143
|
+
<xsl:when test="state='B'">
|
144
|
+
<td class="blocked">
|
145
|
+
<a target="_blank">
|
146
|
+
<xsl:attribute name="href">
|
147
|
+
<xsl:value-of select="concat('../threads/thread_', blocked_by/@thread_hash, '.html')"/>
|
148
|
+
</xsl:attribute>
|
149
|
+
<xsl:attribute name="title">
|
150
|
+
<xsl:value-of select="blocked_by/@name" />
|
151
|
+
</xsl:attribute>
|
152
|
+
Blocked by <xsl:value-of select="blocked_by/@thread_id"/>
|
153
|
+
</a>
|
154
|
+
</td>
|
155
|
+
</xsl:when>
|
156
|
+
<xsl:otherwise>
|
157
|
+
<td><xsl:value-of select="state"/></td>
|
158
|
+
</xsl:otherwise>
|
159
|
+
</xsl:choose>
|
160
|
+
</tr>
|
161
|
+
</xsl:for-each>
|
162
|
+
</tbody>
|
163
|
+
</table>
|
164
|
+
</div>
|
165
|
+
</div>
|
166
|
+
</body>
|
167
|
+
<script type="text/javascript" src="../data/expand.js"> _ <!-- underscore character is required to prevent converting to <script /> which does not work --> </script>
|
168
|
+
</html>
|
169
|
+
<xsl:call-template name="expand_it"/>
|
170
|
+
</xsl:template>
|
171
|
+
<xsl:template name="expand_it">
|
172
|
+
<script language="JavaScript"></script>
|
173
|
+
</xsl:template>
|
174
|
+
</xsl:stylesheet>
|
{javacore_analyser-2.0rc1 → javacore_analyser-2.1.0.dev66}/src/javacore_analyser/data/xml/report.xsl
RENAMED
@@ -748,7 +748,7 @@
|
|
748
748
|
|
749
749
|
<p></p>
|
750
750
|
<div class="margined">
|
751
|
-
<a href="https://
|
751
|
+
<a href="https://github.com/IBM/javacore-analyser/wiki" target="_blank">Documentation</a>
|
752
752
|
</div>
|
753
753
|
<div class="margined">
|
754
754
|
In case of any issues with the tool use Slack group:
|