void () { final StringBuilder source = new StringBuilder(""" public class ChainedMethodCallsPerformance { void x() { new StringBuilder() """); for (int i = 0; i < 400; i++) { source.append(" .append(").append(i).append(")\n"); } source.append(" }\n" + "}"); myFixture.configureByText("ChainedMethodCallsPerformance.java", source.toString()); final SearchConfiguration configuration = new SearchConfiguration("Chained method call", "test"); final MatchOptions options = configuration.getMatchOptions(); options.setFileType(JavaFileType.INSTANCE); options.fillSearchCriteria("'_x.'y('_z)"); options.setRecursiveSearch(true); StructuralSearchProfileActionProvider.createNewInspection(configuration, myFixture.getProject()); final InspectionProfileImpl profile = InspectionProfileManager.getInstance(myFixture.getProject()).getCurrentProfile(); final ToolsImpl tools = profile.getToolsOrNull("SSBasedInspection", myFixture.getProject()); final SSBasedInspection inspection = (SSBasedInspection)tools.getTool().getTool(); final PsiFile file = myFixture.getFile(); PlatformTestUtil.startPerformanceTest("Chained method call inspection performance", 1500, () -> InspectionEngine.inspectEx( Collections.singletonList(new LocalInspectionToolWrapper(inspection)), file, file.getTextRange(), file.getTextRange(), true, false, true, new DaemonProgressIndicator(), PairProcessor.alwaysTrue())).assertTiming(); }