Skip to content

Commit

Permalink
Add VisualVM profiler, increase JVM server memory
Browse files Browse the repository at this point in the history
VisualVM is a visual tool integrating several commandline JDK tools and lightweight profiling capabilities. It is a part of the JDK distribution and is available in the bin directory of the JDK installation.

This will help developers to profile the application and identify performance bottlenecks, as well as memory leaks on small applications.
  • Loading branch information
garrettsummerfi3ld committed Mar 18, 2024
1 parent 8293a66 commit 74d6a19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
},
],
"java.test.defaultConfig": "WPIlibUnitTests",
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable"
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx8G -Xms100m -Xlog:disable"
}
7 changes: 7 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ deploy {
// getTargetTypeClass is a shortcut to get the class type using a string

frcJava(getArtifactTypeClass('FRCJavaArtifact')) {
// Enable VisualVM connection
jvmArgs.add("-Dcom.sun.management.jmxremote=true")
jvmArgs.add("-Dcom.sun.management.jmxremote.port=1198")
jvmArgs.add("-Dcom.sun.management.jmxremote.local.only=false")
jvmArgs.add("-Dcom.sun.management.jmxremote.ssl=false")
jvmArgs.add("-Dcom.sun.management.jmxremote.authenticate=false")
jvmArgs.add("-Djava.rmi.server.hostname=10.87.19.2")
}

// Static files artifact
Expand Down

0 comments on commit 74d6a19

Please sign in to comment.