Search in sources :

Example 1 with Dimension

use of org.eclipse.test.performance.Dimension in project webtools.servertools by eclipse.

the class PublishTestCase method testPublish.

public void testPublish() throws Exception {
    Dimension[] dims = new Dimension[] { Dimension.ELAPSED_PROCESS, Dimension.USED_JAVA_HEAP };
    tagAsSummary("Publish to Tomcat", dims);
    IServer server = AbstractTomcatServerTestCase.server;
    IServerWorkingCopy wc = server.createWorkingCopy();
    int size = CreateModulesTestCase.NUM_MODULES;
    IModule[] modules = new IModule[size];
    for (int i = 0; i < size; i++) modules[i] = ModuleHelper.getModule(CreateModulesTestCase.WEB_MODULE_NAME + i);
    wc.modifyModules(modules, null, null);
    wc.save(true, null);
    startMeasuring();
    server.publish(IServer.PUBLISH_FULL, null);
    stopMeasuring();
    commitMeasurements();
    assertPerformance();
}
Also used : IServer(org.eclipse.wst.server.core.IServer) IModule(org.eclipse.wst.server.core.IModule) IServerWorkingCopy(org.eclipse.wst.server.core.IServerWorkingCopy) Dimension(org.eclipse.test.performance.Dimension)

Example 2 with Dimension

use of org.eclipse.test.performance.Dimension in project webtools.servertools by eclipse.

the class PublishHugeModuleTestCase method testHugePublish.

public void testHugePublish() throws Exception {
    Dimension[] dims = new Dimension[] { Dimension.ELAPSED_PROCESS, Dimension.USED_JAVA_HEAP };
    tagAsSummary("Publish huge module to Tomcat", dims);
    IServer server = AbstractTomcatServerTestCase.server;
    IServerWorkingCopy wc = server.createWorkingCopy();
    // remove previous apps
    IModule[] remove = server.getModules();
    wc.modifyModules(null, remove, null);
    wc.save(true, null);
    server.publish(IServer.PUBLISH_FULL, null);
    for (int i = 0; i < 5; i++) {
        // add huge app
        IModule[] add = new IModule[1];
        add[0] = ModuleHelper.getModule(CreateHugeModuleTestCase.WEB_MODULE_NAME);
        wc.modifyModules(add, null, null);
        wc.save(true, null);
        // publish huge app
        startMeasuring();
        server.publish(IServer.PUBLISH_FULL, null);
        stopMeasuring();
        // remove huge app and republish
        remove = server.getModules();
        wc.modifyModules(null, add, null);
        wc.save(true, null);
        server.publish(IServer.PUBLISH_FULL, null);
    }
    commitMeasurements();
    assertPerformance();
}
Also used : IServer(org.eclipse.wst.server.core.IServer) IModule(org.eclipse.wst.server.core.IModule) IServerWorkingCopy(org.eclipse.wst.server.core.IServerWorkingCopy) Dimension(org.eclipse.test.performance.Dimension)

Example 3 with Dimension

use of org.eclipse.test.performance.Dimension in project webtools.servertools by eclipse.

the class AddRemoveModulesWizard2TestCase method testAddRemoveModulesWizard.

public void testAddRemoveModulesWizard() throws Exception {
    Dimension[] dims = new Dimension[] { Dimension.ELAPSED_PROCESS, Dimension.USED_JAVA_HEAP };
    tagAsSummary("Add/remove modules wizard", dims);
    IModule module = ModuleHelper.getModule(CreateModulesTestCase.WEB_MODULE_NAME + "0");
    for (int i = 0; i < 5; i++) {
        startMeasuring();
        WizardTestCase.testRoS(module);
        stopMeasuring();
    }
    commitMeasurements();
    assertPerformance();
}
Also used : IModule(org.eclipse.wst.server.core.IModule) Dimension(org.eclipse.test.performance.Dimension)

Example 4 with Dimension

use of org.eclipse.test.performance.Dimension in project webtools.servertools by eclipse.

the class AddRemoveModulesWizardTestCase method testAddRemoveModulesWizard.

public void testAddRemoveModulesWizard() throws Exception {
    Dimension[] dims = new Dimension[] { Dimension.ELAPSED_PROCESS, Dimension.USED_JAVA_HEAP };
    tagAsSummary("Add/remove modules wizard", dims);
    IModule module = ModuleHelper.getModule(CreateModulesTestCase.WEB_MODULE_NAME + "0");
    startMeasuring();
    WizardTestCase.testRoS(module);
    stopMeasuring();
    commitMeasurements();
    assertPerformance();
}
Also used : IModule(org.eclipse.wst.server.core.IModule) Dimension(org.eclipse.test.performance.Dimension)

Example 5 with Dimension

use of org.eclipse.test.performance.Dimension in project webtools.servertools by eclipse.

the class OpenEditorAgainTestCase method testOpenEditor.

public void testOpenEditor() throws Exception {
    Dimension[] dims = new Dimension[] { Dimension.ELAPSED_PROCESS, Dimension.USED_JAVA_HEAP };
    tagAsSummary("Open Tomcat editor again", dims);
    for (int i = 0; i < 5; i++) {
        startMeasuring();
        IServer server = getFirstServer(getServerTypeId());
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        IEditorPart editor = page.openEditor(new ServerEditorInput(server.getId()), SERVER_EDITOR_ID, true);
        stopMeasuring();
        page.closeEditor(editor, false);
    }
    commitMeasurements();
    assertPerformance();
}
Also used : IServer(org.eclipse.wst.server.core.IServer) ServerEditorInput(org.eclipse.wst.server.ui.internal.editor.ServerEditorInput) IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) Dimension(org.eclipse.test.performance.Dimension) IEditorPart(org.eclipse.ui.IEditorPart)

Aggregations

Dimension (org.eclipse.test.performance.Dimension)9 IModule (org.eclipse.wst.server.core.IModule)4 IServer (org.eclipse.wst.server.core.IServer)3 IServerWorkingCopy (org.eclipse.wst.server.core.IServerWorkingCopy)2 SQLException (java.sql.SQLException)1 Timestamp (java.sql.Timestamp)1 ArrayList (java.util.ArrayList)1 StringTokenizer (java.util.StringTokenizer)1 DataPoint (org.eclipse.test.internal.performance.data.DataPoint)1 Dim (org.eclipse.test.internal.performance.data.Dim)1 Scalar (org.eclipse.test.internal.performance.data.Scalar)1 StatisticsSession (org.eclipse.test.internal.performance.eval.StatisticsSession)1 IEditorPart (org.eclipse.ui.IEditorPart)1 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)1 ModuleFactory (org.eclipse.wst.server.core.internal.ModuleFactory)1 ServerEditorInput (org.eclipse.wst.server.ui.internal.editor.ServerEditorInput)1