问题
Is it possible to configure VisualVM to automatically save snapshots/history of every java application that is running for both the monitor and the profiler tabs?
I have several applications that run on a nightly basis, and I would like to collect the profiler and the monitor information about them from VisualVM for additional evaluation the morning after they run.
I tried to find some plugins to VisualVM, and also tried to find a way to configure it in eclipse and use it in JUnits, but I could not find any options.
I am using VisualVM 1.3.8 if this matters
回答1:
I've been searching for the same tool, but it doesn't appear to exist for VisualVM. There's an alterante included in JDK 7u40 or later, Java Mission Control and Flight Recorder, which might give you the functionality needed. Note: You'll have to add the needed arguments to the JVM for flight recorder to be enabled.
https://docs.oracle.com/javacomponents/jmc-5-4/jfr-runtime-guide/run.htm
来源:https://stackoverflow.com/questions/33897983/auto-save-profiler-snapshots-in-visualvm