void () { System.out.println("Setup costs"); long totalSetup = 0; for (ObjectIntMap.Entry<String> entry : TOTAL_SETUP_COST_MILLIS.entries()) { String name = entry.getKey(); int cost = entry.getValue(); long count = TOTAL_SETUP_COUNT.get(name); System.out.printf(" %s: %d ms for %d executions%n", name, cost, count); totalSetup += cost; } System.out.println("Teardown costs"); long totalTeardown = 0; for (ObjectIntMap.Entry<String> entry : TOTAL_TEARDOWN_COST_MILLIS.entries()) { String name = entry.getKey(); int cost = entry.getValue(); long count = TOTAL_TEARDOWN_COUNT.get(name); System.out.printf(" %s: %d ms for %d executions%n", name, cost, count); totalTeardown += cost; } System.out.printf("Total overhead: setup %d ms, teardown %d ms%n", totalSetup, totalTeardown); System.out.printf("##teamcity[buildStatisticValue key='ideaTests.totalSetupMs' value='%d']%n", totalSetup); System.out.printf("##teamcity[buildStatisticValue key='ideaTests.totalTeardownMs' value='%d']%n", totalTeardown); }