@Test public void canScaleTo25ProjectsOfAtLeast250ClassesEach() { assertThat(files.size(), greaterThan(250)); long timestamp = System.currentTimeMillis(); createProjects(); // We should be able to do this in 35 seconds on a 2.4ghz MBP. 60 sec is just for test // consistency assertThat(System.currentTimeMillis() - timestamp, lessThan(300000L)); timestamp = System.currentTimeMillis(); updateProjects(); // We should be able to do this in 3 seconds on a 2.4ghz MBP. 10 sec is just for test // consistency assertThat(System.currentTimeMillis() - timestamp, lessThan(10000L)); }
public static void main(String[] args) throws IOException { // At last count, we could do this in 22 seconds on a 2.4ghz MacBookPro. // Although, it looks like when you run it in the test it runs a little slower LargeWorkspacePerformanceSimulation testHarness = new LargeWorkspacePerformanceSimulation(true); testHarness.inContext(); System.out.println("File Count: " + testHarness.files.size()); System.out.println("Max Memory " + humanReadable(Runtime.getRuntime().maxMemory())); long timestamp = System.currentTimeMillis(); System.out.println("Creating Projects..."); testHarness.createProjects(); System.out.println("Created in " + (System.currentTimeMillis() - timestamp) + "ms"); System.out.println("Updating Projects..."); timestamp = System.currentTimeMillis(); testHarness.updateProjects(); System.out.println(); long time = System.currentTimeMillis() - timestamp; System.out.println( "Updated " + PROJECT_COUNT + " projects " + UPDATE_COUNT + " times in " + time + "ms"); }