Fix missing memory snapshot

ProfilingUtil was merged into YourKitProfilerHandler

GitOrigin-RevId: fe60c9a0d1da8196e70036b40612306dfcacdab7
This commit is contained in:
Maxim.Kolmakov
2019-05-27 13:08:40 +03:00
committed by intellij-monorepo-bot
parent 2cbbadd9bb
commit 264daf2d60
@@ -908,14 +908,14 @@ public class PlatformTestUtil {
public static void captureMemorySnapshot() {
try {
Method snapshot = ReflectionUtil.getMethod(Class.forName("com.jetbrains.performancePlugin.utils.ProfilingUtil"), "captureMemorySnapshot");
Method snapshot = ReflectionUtil.getMethod(Class.forName("com.jetbrains.performancePlugin.profilers.YourKitProfilerHandler"), "captureMemorySnapshot");
if (snapshot != null) {
Object path = snapshot.invoke(null);
System.out.println("Memory snapshot captured to '" + path + "'");
}
}
catch (ClassNotFoundException e) {
// ProfilingUtil is missing from the classpath, ignore
// YourKitProfilerHandler is missing from the classpath, ignore
}
catch (Exception e) {
e.printStackTrace(System.err);