Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2010-05-04 11:11:35 -0400
committerThomas Watson2010-05-04 11:11:35 -0400
commitc54eb480894ee3376a0df5185655c6a516704001 (patch)
treeb85d974837e8d79edc54e09358dcaf89edc8db8d
parentddf02838bcf03d588cf33f65a9651d95b2b1b583 (diff)
downloadrt.equinox.framework-c54eb480894ee3376a0df5185655c6a516704001.tar.gz
rt.equinox.framework-c54eb480894ee3376a0df5185655c6a516704001.tar.xz
rt.equinox.framework-c54eb480894ee3376a0df5185655c6a516704001.zip
Bug 311546 [perfs] Regression for StatePerformanceTest#testResolution100()
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/StatePerformanceTest.java9
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/StateUsesPerformanceTest.java24
2 files changed, 21 insertions, 12 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/StatePerformanceTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/StatePerformanceTest.java
index fb34770c4..f592456a3 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/StatePerformanceTest.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/StatePerformanceTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,6 +19,9 @@ import org.eclipse.osgi.service.resolver.State;
public class StatePerformanceTest extends BasePerformanceTest {
+ // TODO this should be removed in 3.7
+ public final static String PERFORMANCE_BUG311546_EXPLANATION = "Performance decrease caused improvements in memory usage. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=269185 for details."; //$NON-NLS-1$
+
public static Test suite() {
return new TestSuite(StatePerformanceTest.class);
}
@@ -55,7 +58,7 @@ public class StatePerformanceTest extends BasePerformanceTest {
}
public void testResolution100() throws IOException {
- testResolution(100, 500, null, null);
+ testResolution(100, 500, null, PERFORMANCE_BUG311546_EXPLANATION);
}
public void testResolution1000() throws IOException {
@@ -63,7 +66,7 @@ public class StatePerformanceTest extends BasePerformanceTest {
}
public void testResolution500() throws IOException {
- testResolution(500, 50, null, null);
+ testResolution(500, 50, null, PERFORMANCE_BUG311546_EXPLANATION);
}
public void testResolution5000() throws IOException {
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/StateUsesPerformanceTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/StateUsesPerformanceTest.java
index 89d233258..6a985eedd 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/StateUsesPerformanceTest.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/StateUsesPerformanceTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -28,29 +28,35 @@ public class StateUsesPerformanceTest extends BasePerformanceTest {
super(name);
}
- private void doUsesResolution(int stateSize, int repetitions, String localName) throws BundleException {
+ private void doUsesResolution(int stateSize, int repetitions, String localName, String degradation) throws BundleException {
final State originalState = buildRandomState(stateSize);
addUsesBundles(originalState);
- new PerformanceTestRunner() {
+ PerformanceTestRunner runner = new PerformanceTestRunner() {
protected void test() {
originalState.resolve(false);
}
- }.run(this, localName, 10, repetitions);
+ };
+ runner.setRegressionReason(degradation);
+ runner.run(this, localName, 10, repetitions);
+
}
public void testUsesResolution00100() throws BundleException {
- doUsesResolution(100, 100, null);
+ doUsesResolution(100, 100, null, StatePerformanceTest.PERFORMANCE_BUG311546_EXPLANATION);
}
+
public void testUsesResolution00500() throws BundleException {
- doUsesResolution(500, 10, null);
+ doUsesResolution(500, 10, null, StatePerformanceTest.PERFORMANCE_BUG311546_EXPLANATION);
}
+
public void testUsesResolution01000() throws BundleException {
- doUsesResolution(1000, 10, null);
+ doUsesResolution(1000, 10, null, null);
}
+
public void testUsesResolution05000() throws BundleException {
- doUsesResolution(5000, 1, null);
+ doUsesResolution(5000, 1, null, null);
}
-
+
private void addUsesBundles(State state) throws BundleException {
int id = state.getBundles().length + 500;
Hashtable manifest = new Hashtable();

Back to the top