Bug 79134 - Investigate Ant separate VM tests slow down
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/SeparateVMTests.java b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/SeparateVMTests.java
index 8533fa7..cd7e45f 100644
--- a/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/SeparateVMTests.java
+++ b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/SeparateVMTests.java
@@ -36,6 +36,9 @@
public void testBuild() throws CoreException {
tagAsSummary("Separate JRE Build", Dimension.ELAPSED_PROCESS);
ILaunchConfiguration config= getLaunchConfiguration("echoingSepVM");
+ //possible first time hit of the SWT pieces getting written from the JAR to the
+ //metadata area
+ launchAndTerminate(config, 20000);
for (int i = 0; i < 10; i++) {
launch(config, 10);
}
@@ -52,13 +55,12 @@
assertNotNull("Could not locate launch configuration for " + "echoingSepVM", config);
ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy();
copy.setAttribute(IExternalToolConstants.ATTR_CAPTURE_OUTPUT, false);
- for (int i = 0; i < 10; i++) {
- startMeasuring();
- for (int j = 0; j < i; j++) {
- launchAndTerminate(copy, 20000);
- }
- stopMeasuring();
- }
+ //possible first time hit of the SWT pieces getting written from the JAR to the
+ //metadata area
+ launchAndTerminate(copy, 20000);
+ for (int i = 0; i < 10; i++) {
+ launch(copy, 10);
+ }
commitMeasurements();
assertPerformance();
}
@@ -72,10 +74,13 @@
assertNotNull("Could not locate launch configuration for " + "echoingSepVM", config);
ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy();
copy.setAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, "-debug");
+ //possible first time hit of the SWT pieces getting written from the JAR to the
+ //metadata area
+ launchAndTerminate(copy, 20000);
for (int i = 0; i < 10; i++) {
launch(copy, 10);
}
commitMeasurements();
assertPerformance();
}
-}
\ No newline at end of file
+}