Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add logging #949

Merged
merged 8 commits into from
Feb 28, 2023
Merged

add logging #949

merged 8 commits into from
Feb 28, 2023

Conversation

cyfml
Copy link
Contributor

@cyfml cyfml commented Feb 24, 2023

This PR is to add some logs in both the JSON serializer and the report viewer code.

@tsaglam tsaglam added enhancement Issue/PR that involves features, improvements and other changes minor Minor issue/feature/contribution/change labels Feb 24, 2023
Copy link
Member

@tsaglam tsaglam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an example log when running the jar:

Click to show...
$ java -jar jplag-l.jar sub
2023-02-28-04:23:01_814 [main] [INFO] LanguageLoader - Available languages: '[C/C++ Scanner [basic markup], C# 6 Parser, EMF metamodel, Go Parser, Javac based AST plugin, Kotlin Parser, Python3 Parser, R Parser, Rust Language Module, Scala parser, SchemeR4RS Parser [basic markup], Swift Parser, Text Parser (naive)]'
2023-02-28-04:23:01_833 [main] [INFO] ParallelComparisonStrategy - Start comparing...
2023-02-28-04:23:02_266 [ForkJoinPool.commonPool-worker-4] [INFO] ParallelComparisonStrategy - Comparing first-fourth: 0.04410646387832699
2023-02-28-04:23:02_266 [ForkJoinPool.commonPool-worker-1] [INFO] ParallelComparisonStrategy - Comparing third-fourth: 0.08782104391052195
2023-02-28-04:23:02_266 [ForkJoinPool.commonPool-worker-5] [INFO] ParallelComparisonStrategy - Comparing first-second: 0.038620689655172416
2023-02-28-04:23:02_267 [main] [INFO] ParallelComparisonStrategy - Comparing first-fifth: 0.010501750291715286
2023-02-28-04:23:02_267 [ForkJoinPool.commonPool-worker-7] [INFO] ParallelComparisonStrategy - Comparing third-first: 0.02644836272040302
2023-02-28-04:23:02_266 [ForkJoinPool.commonPool-worker-2] [INFO] ParallelComparisonStrategy - Comparing second-fifth: 0.12397820163487738
2023-02-28-04:23:02_267 [ForkJoinPool.commonPool-worker-3] [INFO] ParallelComparisonStrategy - Comparing third-second: 0.05961251862891207
2023-02-28-04:23:02_267 [ForkJoinPool.commonPool-worker-6] [INFO] ParallelComparisonStrategy - Comparing third-fifth: 0.074719800747198
2023-02-28-04:23:02_268 [ForkJoinPool.commonPool-worker-4] [INFO] ParallelComparisonStrategy - Comparing second-fourth: 0.018709073900841908
2023-02-28-04:23:02_269 [main] [INFO] ParallelComparisonStrategy - Comparing fourth-fifth: 0.0900225056264066
2023-02-28-04:23:02_271 [main] [INFO] JPlag - Total time for comparing submissions: 0 sec
2023-02-28-04:23:02_272 [main] [INFO] ClusteringFactory - Calculating clusters via spectral clustering with cumulative distribution function pre-processing...
2023-02-28-04:23:02_571 [main] [INFO] ClusteringFactory - 0 clusters were found:
2023-02-28-04:23:02_654 [main] [INFO] ReportObjectFactory - Start writing report files...
2023-02-28-04:23:02_655 [main] [INFO] DirectoryManager - Start creating the output directory...
2023-02-28-04:23:02_656 [main] [INFO] ReportObjectFactory - Start copying submission files to the output directory...
2023-02-28-04:23:02_707 [main] [INFO] ReportObjectFactory - Start writing comparisons...
2023-02-28-04:23:02_770 [main] [INFO] ReportObjectFactory - Total Comparisons: 10. Shown Comparisons: 10. Missing Comparisons: 0.
2023-02-28-04:23:02_770 [main] [INFO] ReportObjectFactory - Start writing overview...
2023-02-28-04:23:02_794 [main] [INFO] ReportObjectFactory - Zipping report files...
2023-02-28-04:23:02_829 [main] [INFO] DirectoryManager - Successfully zipped report files: result.zip
2023-02-28-04:23:02_829 [main] [INFO] DirectoryManager - Display the results with the report viewer at https://jplag.github.io/JPlag/

The issue that I see is that a lot of the log noise is now from the report generation. Some of the new log messages I like. Some I do not. Maybe we can improve this.

@tsaglam tsaglam added the report-viewer PR / Issue deals (partly) with the report viewer and thus involves web-dev technologies label Feb 28, 2023
cyfml and others added 7 commits February 28, 2023 16:41
…ager.java

Co-authored-by: Timur Sağlam <timur.saglam@kit.edu>
…tFactory.java

Co-authored-by: Timur Sağlam <timur.saglam@kit.edu>
…tFactory.java

Co-authored-by: Timur Sağlam <timur.saglam@kit.edu>
…tFactory.java

Co-authored-by: Timur Sağlam <timur.saglam@kit.edu>
Copy link
Member

@tsaglam tsaglam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

72.0% 72.0% Coverage
0.0% 0.0% Duplication

@tsaglam tsaglam merged commit 57cc823 into jplag:develop Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue/PR that involves features, improvements and other changes minor Minor issue/feature/contribution/change report-viewer PR / Issue deals (partly) with the report viewer and thus involves web-dev technologies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants