void () { myFixture.configureByFile(getTestName(true) + "/.eslintrc.json"); PsiFile psiFile = myFixture.getFile(); PlatformTestUtil.startPerformanceTest(getTestName(true), (int)TimeUnit.SECONDS.toMillis(15), () -> { for (int i = 0; i < 10; i++) { myFixture.doHighlighting(); Assert.assertTrue(psiFile instanceof JsonFile); final JsonValue value = ((JsonFile)psiFile).getTopLevelValue(); Assert.assertTrue(value instanceof JsonObject); final JsonProperty rules = ((JsonObject)value).findProperty("rules"); Assert.assertNotNull(rules); Assert.assertTrue(rules.getValue() instanceof JsonObject); final JsonProperty camelcase = ((JsonObject)rules.getValue()).findProperty("camelcase"); Assert.assertNotNull(camelcase); final PsiFile dummyFile = PsiFileFactory.getInstance(getProject()) .createFileFromText("1.json", JsonFileType.INSTANCE, "{\"a\": " + (i % 2 == 0 ? 1 : 2) + "}"); final JsonProperty a = ((JsonObject)((JsonFile)dummyFile).getTopLevelValue()).findProperty("a"); Assert.assertNotNull(a); WriteCommandAction.runWriteCommandAction(getProject(), (Runnable)() -> camelcase.getValue().replace(a.getValue())); myFixture.doHighlighting(); } }).assertTiming(); }