Examples of Performance


Examples of br.com.pgxp.statixnate.business.implementation.Performance

  try {

      Date data = Data.parseDateHour(Data.parseDateHour(Data.getDataAtual()).substring(0, 10) + " 00:00:00:000");
     
      Performance perf = new Performance();
      perf.avaliacaoHibernate(HibernateUtil.currentSessionFactory().getStatistics(), false, CICLO, TEMPO, "e-Car " +Data.parseDateHourMinuteSecond(Data.getDataAtual()).toString());

      org.apache.log4j.Logger.getLogger(this.getClass()).info("Verificando performance" + Data.getDataAtual() + " " + Data.getHoraAtual(true));
     
  } catch (Exception e) {
      org.apache.log4j.Logger.getLogger(this.getClass()).error(e);
View Full Code Here

Examples of jodd.json.model.cat.Performance

    List<Performance> performances = catalog.getPerformances();
    assertNotNull(performances);
    assertEquals(243, performances.size());

    Performance performance = performances.get(0);
    assertEquals(138586341, performance.getEventId().longValue());
    assertEquals(339887544, performance.getId().longValue());
    assertNull(performance.getLogo());
    assertNull(performance.getName());
    List<Price> prices = performance.getPrices();
    assertEquals(2, prices.size());
    Price price = prices.get(0);
    assertEquals(90250, price.getAmount());
    assertEquals(337100890, price.getAudienceSubCategoryId().longValue());
    assertEquals(338937295, price.getSeatCategoryId().longValue());
    List<SeatCategory> seatCategories = performance.getSeatCategories();
    assertEquals(2, seatCategories.size());
    SeatCategory seatCategory = seatCategories.get(0);
    assertEquals(338937295, seatCategory.getSeatCategoryId().longValue());
    List<Area> areas = seatCategory.getAreas();
    assertEquals(11, areas.size());
    Area area = areas.get(0);
    assertEquals(205705999, area.getAreaId().longValue());
    assertEquals(0, area.getBlockIds().length);
    JDateTime start = performance.getStart();
    assertEquals(1372701600000L, start.getTimeInMillis());
    assertEquals("PLEYEL_PLEYEL", performance.getVenueCode());

    // seatCategoryNames

    map = catalog.getSeatCategoryNames();
    assertEquals(64, map.size());
View Full Code Here

Examples of org.apache.niolex.commons.test.Performance

    @Test
    public void testSetUseFasterAccess() throws Exception {
        System.out.print("Slower ");
        setUseFasterAccess(false);
        clearMethodsCache();
        Performance pf = new Performance(3000, 100) {

            @Override
            protected void run() {
                Person e = parseOne(single_p_data, Person.class);
                assertEquals(e.getId(), 45 + i);
            }
        };
        pf.start();
        System.out.print("Faster ");
        setUseFasterAccess(true);
        clearMethodsCache();
        pf = new Performance(3000, 100) {

            @Override
            protected void run() {
                Person e = parseOne(single_p_data, Person.class);
                assertEquals(e.getId(), 45 + i);
            }
        };
        pf.start();
    }
View Full Code Here

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

Examples of org.eclipse.test.performance.Performance

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

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

Examples of org.eclipse.test.performance.Performance

  @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

Examples of org.eclipse.test.performance.Performance

        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

Examples of org.eclipse.test.performance.Performance

        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

Examples of org.jamesii.perfdb.jdbc.Performance

  public Performance getEntity() throws Exception {
    RuntimeConfiguration rtConfig = (new RTConfigTest()).getConnectedEntity();
    rtConfig.create();
    PerformanceType pm = (new PerfMeasureTest()).getConnectedEntity();
    pm.create();
    return new Performance(null, pm, 0.5);
  }
View Full Code Here

Examples of org.jboss.arquillian.performance.annotation.Performance

    private void verifyPerformance(Test event) throws PerformanceException {
        TestResult result = testResultInst.get();
        if(result != null)
        {
            //check if we have set a threshold
            Performance performance = null;
            Annotation[] annotations =  event.getTestMethod().getDeclaredAnnotations();
            for(Annotation a : annotations)
                if(a.annotationType().getName().equals(Performance.class.getCanonicalName()))
                    performance = (Performance) a;

            if(performance != null)
            {
                //System.out.println("For test: "+event.toString()+", it took: "+(result.getEnd()-result.getStart()));
                if(performance.time() > 0 &&
                        performance.time() < (result.getEnd()-result.getStart()))
                {
                    result.setStatus(TestResult.Status.FAILED);
                    result.setThrowable(
                            new PerformanceException("The test didnt finish within the specified time: "
                                    +performance.time()+"ms, it took "+(result.getEnd()-result.getStart())+"ms."));
                }

                // fetch suiteResult, get the correct classResult and append the test to that
                // classResult.
                PerformanceSuiteResult suiteResult = suiteResultInst.get();
                if(suiteResult != null) {
                    suiteResult.getResult(event.getTestClass().getName()).addMethodResult(
                            new PerformanceMethodResult(
                                    performance.time(),
                                    (result.getEnd()-result.getStart()),
                                    event.getTestMethod()));
                }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.