Skip to content

Commit

Permalink
fix: if unavailable JMX module is simply ignored from the Profiler
Browse files Browse the repository at this point in the history
Fixed issue #1164
  • Loading branch information
lvca committed Jul 10, 2023
1 parent c3149fd commit 2f35b20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion engine/src/main/java/com/arcadedb/Profiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public synchronized JSONObject toJSON() {
json.put("jvmSafePointCount", new JSONObject().put("count", hotSpotRunTime.getSafepointCount()));
json.put("jvmAvgSafePointTime", new JSONObject().put("value", hotSpotRunTime.getTotalSafepointTime() / (float) hotSpotRunTime.getSafepointCount()));

} catch (final Exception e) {
} catch (final Throwable e) {
// JMX NOT AVAILABLE, AVOID OS DATA
}

Expand Down
10 changes: 3 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,6 @@
<arg>--add-exports</arg>
<arg>java.management/sun.management=ALL-UNNAMED</arg>
</compilerArgs>
<!-- <compilerArgs>-->
<!-- <arg>&#45;&#45;add-modules</arg>-->
<!-- <arg>jdk.hotspot.agent</arg>-->
<!-- <arg>&#45;&#45;add-exports</arg>-->
<!-- <arg>jdk.hotspot.agent/sun.jvm.hotspot.tools=ALL-UNNAMED</arg>-->
<!-- <arg>-proc:none</arg>-->
<!-- </compilerArgs>-->
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -187,6 +180,9 @@
</org.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener>
<polyglot.engine.WarnInterpreterOnly>false</polyglot.engine.WarnInterpreterOnly>
</systemPropertyVariables>
<argLine>
--add-exports=java.management/sun.management=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 2f35b20

Please sign in to comment.