[ https://issues.apache.org/jira/browse/ARTEMIS-4751?focusedWorklogId=917340&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-917340 ]
ASF GitHub Bot logged work on ARTEMIS-4751: ------------------------------------------- Author: ASF GitHub Bot Created on: 02/May/24 17:28 Start Date: 02/May/24 17:28 Worklog Time Spent: 10m Work Description: gemmellr commented on code in PR #4911: URL: https://github.com/apache/activemq-artemis/pull/4911#discussion_r1588019978 ########## artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/MicrosClock.java: ########## @@ -43,23 +45,28 @@ public static boolean isAvailable() { } public static long now() { - long epochSecond = offset; - long nanoAdjustment = jdk.internal.misc.VM.getNanoTimeAdjustment(epochSecond); + try { + long epochSecond = offset; + Class vm = Class.forName("jdk.internal.misc.VM"); + Method getNanoTimeAdjustment = vm.getMethod("getNanoTimeAdjustment", long.class); + long nanoAdjustment = (long) getNanoTimeAdjustment.invoke(getNanoTimeAdjustment, epochSecond); Review Comment: This might be better done once, e.g during the initial availability checks, and then the Method reused here rather than doing lookups every time, given the aimed usage ? ########## artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile: ########## @@ -37,7 +37,7 @@ HAWTIO_ROLE='${role}' # Java Opts if [ -z "$JAVA_ARGS" ]; then - JAVA_ARGS="-XX:AutoBoxCacheMax=20000 -XX:+PrintClassHistogram -XX:+UseG1GC -XX:+UseStringDeduplication -Xms512M -Xmx${java-memory} -Dhawtio.disableProxy=true -Dhawtio.realm=activemq -Dhawtio.offline=true -Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal -Dhawtio.http.strictTransportSecurity=max-age=31536000;includeSubDomains;preload -Djolokia.policyLocation=${ARTEMIS_INSTANCE_ETC_URI}jolokia-access.xml -Dlog4j2.disableJmx=true ${java-opts}" + JAVA_ARGS="-XX:AutoBoxCacheMax=20000 -XX:+PrintClassHistogram -XX:+UseG1GC -XX:+UseStringDeduplication -Xms512M -Xmx${java-memory} -Dhawtio.disableProxy=true -Dhawtio.realm=activemq -Dhawtio.offline=true -Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal -Dhawtio.http.strictTransportSecurity=max-age=31536000;includeSubDomains;preload -Djolokia.policyLocation=${ARTEMIS_INSTANCE_ETC_URI}jolokia-access.xml -Dlog4j2.disableJmx=true --add-opens java.base/jdk.internal.misc=ALL-UNNAMED ${java-opts}" Review Comment: Hadnt actually considered this possibility...but if doing it, is there a windows equivalent needed somewhere? Issue Time Tracking ------------------- Worklog Id: (was: 917340) Time Spent: 0.5h (was: 20m) > Upgrade to Apache parent 32 > --------------------------- > > Key: ARTEMIS-4751 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4751 > Project: ActiveMQ Artemis > Issue Type: Dependency upgrade > Reporter: Justin Bertram > Assignee: Justin Bertram > Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.20.10#820010)