Package org.eclipse.test.internal.performance.data

Examples of org.eclipse.test.internal.performance.data.Sample


    map = new HashMap<Dimension, Scalar>();
    map.put(Dimension.CPU_TIME, new Scalar((Dim) Dimension.CPU_TIME, (long) performanceResult.getTime() * 1000));
    points[1] = new DataPoint(1, map);

    final Sample sample = new Sample(scenarioId, System.currentTimeMillis(), Collections.EMPTY_MAP, points);
    sample.tagAsSummary(true, performanceResult.getName(), new Dimension[] {Dimension.CPU_TIME}, 0, null);
    Variations variations = PerformanceTestPlugin.getVariations();
    variations.put("browser", suiteName);
    DB.store(variations, sample);

    PerformanceMeter meter = new InternalPerformanceMeter(scenarioId) {
View Full Code Here


   */
  public Sample getSample() {
      if (fDataPoints != null) {
          HashMap runProperties= new HashMap();
          collectRunInfo(runProperties);
          return new Sample(getScenarioName(), fStartTime, runProperties, (DataPoint[]) fDataPoints.toArray(new DataPoint[fDataPoints.size()]));
      }
      return null;
  }
View Full Code Here

  /*
   * @see org.eclipse.test.internal.performance.InternalPerformanceMeter#getSample()
   */
  public Sample getSample() {
      if (fDataPoints != null)
          return new Sample(getScenarioName(), fStartTime, new HashMap(), (DataPoint[]) fDataPoints.toArray(new DataPoint[fDataPoints.size()]));
      return null;
  }
View Full Code Here

  /*
   * @see org.eclipse.test.performance.PerformanceMeter#commit()
   */
  public void commit() {
    Sample sample= getSample();
    if (sample != null) {
      if (fSummaryDimensions != null) {
        sample.tagAsSummary(fSummaryIsGlobal, fShortName, fSummaryDimensions, fCommentType, fComment);
      } else if (this.fComment != null) {
        sample.setComment(this.fCommentType, this.fComment);
      }
      Variations variations= PerformanceTestPlugin.getVariations();
      if (variations != null)
        DB.store(variations, sample);
      if (!DB.isActive() || System.getProperty(VERBOSE_PERFORMANCE_METER_PROPERTY) != null) {
View Full Code Here

        for (int i= 0; i < fStartTime.size(); i++) {
          data[2*i]= createDataPoint(BEFORE, InternalDimensions.SYSTEM_TIME, ((Long) fStartTime.get(i)).longValue());
          data[2*i+1]= createDataPoint(AFTER, InternalDimensions.SYSTEM_TIME, ((Long) fStopTime.get(i)).longValue());
        }
       
        return new Sample(getScenarioName(), fStartDate, properties, data);
    }
View Full Code Here

   
      if (!(performanceMeter instanceof InternalPerformanceMeter))
          return// we cannot handle this.
     
        InternalPerformanceMeter ipm= (InternalPerformanceMeter) performanceMeter;
      Sample session= ipm.getSample();
    Assert.assertTrue("metering session is null", session != null); //$NON-NLS-1$
      String scenarioName= session.getScenarioID();
   
    // determine all dimensions we need
    HashSet allDimensions= new HashSet();
    for (int i= 0; i < fCheckers.length; i++) {
      AssertChecker chk= fCheckers[i];
      Dim[] dims= chk.getDimensions();
      for (int j= 0; j < dims.length; j++)
        allDimensions.add(dims[j]);
    }
   
    // get data for this session
    DataPoint[] sessionDatapoints;
    Variations config= PerformanceTestPlugin.getVariations();
    if (config != null)
        sessionDatapoints= DB.queryDataPoints(config, scenarioName, allDimensions);
    else
      sessionDatapoints= session.getDataPoints();
      if (sessionDatapoints == null || sessionDatapoints.length == 0) {
          PerformanceTestPlugin.logWarning("no session data named '" + config + "' found"); //$NON-NLS-1$ //$NON-NLS-2$
          return;
      }
View Full Code Here

  /*
   * @see org.eclipse.test.performance.PerformanceMeter#commit()
   */
  public void commit() {
    Sample sample= getSample();
    if (sample != null) {
      if (fSummaryDimensions != null) {
        sample.tagAsSummary(fSummaryIsGlobal, fShortName, fSummaryDimensions, fCommentType, fComment);
      } else if (this.fComment != null) {
        sample.setComment(this.fCommentType, this.fComment);
      }
      Variations variations= PerformanceTestPlugin.getVariations();
      if (variations != null)
        DB.store(variations, sample);
      if (!DB.isActive() || System.getProperty(VERBOSE_PERFORMANCE_METER_PROPERTY) != null) {
View Full Code Here

TOP

Related Classes of org.eclipse.test.internal.performance.data.Sample

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.