Remove unused methods

stopCPUProfiling couldn't work anyway and other methods in case required can be replaced by ProfilingUtil.startCPUProfiling or ProfilingUtil.stopCPUProfiling
This commit is contained in:
Maxim.Kolmakov
2019-03-19 16:26:25 +01:00
parent e393bcc0e5
commit c27031c8c1
@@ -1774,38 +1774,6 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
assertTrue(String.valueOf(mean), mean < 10);
}
private static void startCPUProfiling() {
try {
Class<?> aClass = Class.forName("com.intellij.util.ProfilingUtil");
Method method = ObjectUtils.assertNotNull(ReflectionUtil.getDeclaredMethod(aClass, "startCPUProfiling"));
method.invoke(null);
}
catch (Exception e) {
throw new RuntimeException(e);
}
}
private static void stopCPUProfiling() {
try {
Class<?> aClass = Class.forName("com.intellij.util.ProfilingUtil");
Method method = ObjectUtils.assertNotNull(ReflectionUtil.getDeclaredMethod(aClass, "stopCPUProfiling"));
method.invoke(null);
}
catch (Exception e) {
throw new RuntimeException(e);
}
}
private static String captureCPUSnapshot() {
try {
Class<?> aClass = Class.forName("com.intellij.util.ProfilingUtil");
Method method = ObjectUtils.assertNotNull(ReflectionUtil.getDeclaredMethod(aClass, "captureCPUSnapshot"));
return (String)method.invoke(null);
}
catch (Exception e) {
throw new RuntimeException(e);
}
}
public void testPostHighlightingPassRunsOnEveryPsiModification() throws Exception {
PsiFile x = createFile("X.java", "public class X { public static void ffffffffffffff(){} }");
PsiFile use = createFile("Use.java", "public class Use { { <caret>X.ffffffffffffff(); } }");