Created
July 3, 2024 00:29
-
-
Save esshka/d378866f11e3588929b0fef8caf0bf53 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import 'java.lang.management.ManagementFactory) | |
(import 'com.sun.management.HotSpotDiagnosticMXBean) | |
(let [server (ManagementFactory/getPlatformMBeanServer) | |
bean-name "com.sun.management:type=HotSpotDiagnostic" | |
bean (ManagementFactory/newPlatformMXBeanProxy server bean-name HotSpotDiagnosticMXBean) | |
live-objects-only? false] | |
(.dumpHeap bean "dump.hprof" live-objects-only?)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment