Package org.eclipse.test.performance

Examples of org.eclipse.test.performance.Performance


    setUpAuthorization();
  }

  @Test
  public void testCreateProject() throws IOException, SAXException, JSONException {
    Performance performance = Performance.getDefault();
    PerformanceMeter meter = performance.createPerformanceMeter("SimpleServerStressTest#testCreateProject");
    //create workspace
    String workspaceName = SimpleServerStressTest.class.getName() + "#testCreateProject";
    createWorkspace(workspaceName);
    final int PROJECT_COUNT = 1000;//increase this value for a real stress test
    meter.start();
View Full Code Here


      public Sample getSample() {
        return sample;
      }
    };

    Performance perf = Performance.getDefault();
    perf.assertPerformanceInRelativeBand(meter, Dimension.CPU_TIME, -10, 10);
  }
View Full Code Here

  @Test
  public void testCreateUsers() throws IOException, SAXException {
    WebConversation webConversation = new WebConversation();
    webConversation.setExceptionsThrownOnErrorStatus(false);

    Performance performance = Performance.getDefault();
    PerformanceMeter meter = performance.createPerformanceMeter("SimpleServerUserStressTest#testCreateUsers");
    final int USER_COUNT = 10001;
    meter.start();
    long start = System.currentTimeMillis();
    for (int i = 0; i < USER_COUNT; i++) {
View Full Code Here

        assertEquals("|"+BUILD+"=base||"+CONFIG+"=test||jvm=sun142|", PerformanceTestPlugin.getAssertAgainst().toExactMatchString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    }
   
    public void testAssertPerformance() throws SQLException {

        Performance perf= Performance.getDefault();
       
        // set the variation for the reference data
        System.setProperty("eclipse.perf.config", CONFIG+"=test;"+BUILD+"=ref"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

        // store a reference value
        TestPerformanceMeter pm1= new TestPerformanceMeter(SCENARIO_NAME_0);
    pm1.addPair(InternalDimensions.CPU_TIME, 100, 1000);
    pm1.addPair(InternalDimensions.WORKING_SET, 1000, 2000);

    pm1.start();
    pm1.stop();
    pm1.commit();
    pm1.dispose();
   
    String build= "001"; //$NON-NLS-1$
        // set the variation for the this run
        System.setProperty("eclipse.perf.config", CONFIG+"=test;"+BUILD+"="+build); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        // assert that this run's values are compared against reference data
        System.setProperty("eclipse.perf.assertAgainst", BUILD+"=ref"); //$NON-NLS-1$ //$NON-NLS-2$
   
        // store a reference value
        TestPerformanceMeter pm2= new TestPerformanceMeter(SCENARIO_NAME_0);
    pm2.addPair(InternalDimensions.CPU_TIME, 100, 1100);
    pm2.addPair(InternalDimensions.WORKING_SET, 1000, 2000);
   
    pm2.start();
    pm2.stop();
    pm2.commit();
    boolean failed= false;
    try {
            perf.assertPerformanceInRelativeBand(pm2, InternalDimensions.CPU_TIME, -5, +5);
        } catch (AssertionFailedError e) {
            failed= true;
        }
    pm2.dispose();
   
View Full Code Here

        assertTrue(failed);
    }

    public void testBasicDBFunctionality() {
       
        Performance perf= Performance.getDefault();
       
        TestPerformanceMeter pm1= new TestPerformanceMeter(SCENARIO_NAME_1);
    pm1.addPair(InternalDimensions.CPU_TIME, 100, 1000);
    pm1.addPair(InternalDimensions.WORKING_SET, 1000, 2000);
    pm1.start();
    pm1.stop();
    pm1.commit();
    pm1.dispose();
   
    TestPerformanceMeter pm2= new TestPerformanceMeter(SCENARIO_NAME_2);
    pm2.addPair(InternalDimensions.CPU_TIME, 100, 1000);
    pm2.addPair(InternalDimensions.WORKING_SET, 1000, 2000);
    perf.tagAsGlobalSummary(pm2, SHORT_NAME_2, new Dimension[] { Dimension.CPU_TIME, Dimension.USED_JAVA_HEAP } );
    pm2.start();
    pm2.stop();
    pm2.commit();
    pm2.dispose();

    TestPerformanceMeter pm3= new TestPerformanceMeter(SCENARIO_NAME_3);
    pm3.addPair(InternalDimensions.CPU_TIME, 100, 1000);
    pm3.addPair(InternalDimensions.WORKING_SET, 1000, 2000);
    perf.tagAsGlobalSummary(pm3, SHORT_NAME_3, Dimension.CPU_TIME);
    pm3.start();
    pm3.stop();
    pm3.commit();
    pm3.dispose();

    TestPerformanceMeter pm4= new TestPerformanceMeter(SCENARIO_NAME_4);
    pm4.addPair(InternalDimensions.CPU_TIME, 100, 1000);
    pm4.addPair(InternalDimensions.WORKING_SET, 1000, 2000);
    perf.tagAsSummary(pm4, SHORT_NAME_4, Dimension.USED_JAVA_HEAP);
    pm4.start();
    pm4.stop();
    pm4.commit();
    pm4.dispose();
View Full Code Here

TOP

Related Classes of org.eclipse.test.performance.Performance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.