Search in sources :

Example 1 with PerformanceTestRunner

use of org.eclipse.core.tests.harness.PerformanceTestRunner in project rt.equinox.framework by eclipse.

the class StatePerformanceTest method testResolution.

private void testResolution(int stateSize, int repetitions, String localName, String degradation) {
    final State originalState = buildRandomState(stateSize);
    PerformanceTestRunner runner = new PerformanceTestRunner() {

        protected void test() {
            originalState.resolve(false);
        }
    };
    runner.setRegressionReason(degradation);
    runner.run(this, localName, 10, repetitions);
}
Also used : PerformanceTestRunner(org.eclipse.core.tests.harness.PerformanceTestRunner) State(org.eclipse.osgi.service.resolver.State)

Example 2 with PerformanceTestRunner

use of org.eclipse.core.tests.harness.PerformanceTestRunner in project rt.equinox.framework by eclipse.

the class StatePerformanceTest method testCreation.

public void testCreation() {
    final int stateSize = 5000;
    new PerformanceTestRunner() {

        protected void test() {
            buildRandomState(stateSize);
        }
    }.run(this, 10, 10);
}
Also used : PerformanceTestRunner(org.eclipse.core.tests.harness.PerformanceTestRunner)

Example 3 with PerformanceTestRunner

use of org.eclipse.core.tests.harness.PerformanceTestRunner in project rt.equinox.framework by eclipse.

the class StatePerformanceTest method testStoreAndRetrieve.

public void testStoreAndRetrieve() {
    int stateSize = 5000;
    final State originalState = buildRandomState(stateSize);
    PerformanceTestRunner runner = new PerformanceTestRunner() {

        protected void test() {
            try {
                storeAndRetrieve(originalState);
            } catch (IOException e) {
                CoreTest.fail("", e);
            }
        }
    };
    runner.setRegressionReason(DEGREDATION_STORE_RETRIEVE);
    runner.run(this, 10, 10);
}
Also used : PerformanceTestRunner(org.eclipse.core.tests.harness.PerformanceTestRunner) State(org.eclipse.osgi.service.resolver.State)

Example 4 with PerformanceTestRunner

use of org.eclipse.core.tests.harness.PerformanceTestRunner in project rt.equinox.framework by eclipse.

the class CaseMapPerformanceTest method doTestMap.

private void doTestMap(final Map<String, Object> map, final int numKeys) {
    fillMap(map, numKeys);
    new PerformanceTestRunner() {

        protected void test() {
            doMapGet(map, numKeys);
        }
    }.run(this, 10, 10000);
}
Also used : PerformanceTestRunner(org.eclipse.core.tests.harness.PerformanceTestRunner)

Example 5 with PerformanceTestRunner

use of org.eclipse.core.tests.harness.PerformanceTestRunner in project rt.equinox.framework by eclipse.

the class StateUsesPerformanceTest method doUsesResolution.

private void doUsesResolution(int stateSize, int repetitions, String localName, String degradation) throws BundleException {
    final State originalState = buildRandomState(stateSize);
    addUsesBundles(originalState);
    PerformanceTestRunner runner = new PerformanceTestRunner() {

        protected void test() {
            originalState.resolve(false);
        }
    };
    runner.setRegressionReason(degradation);
    runner.run(this, localName, 10, repetitions);
}
Also used : PerformanceTestRunner(org.eclipse.core.tests.harness.PerformanceTestRunner) State(org.eclipse.osgi.service.resolver.State)

Aggregations

PerformanceTestRunner (org.eclipse.core.tests.harness.PerformanceTestRunner)5 State (org.eclipse.osgi.service.resolver.State)3