Examples of Dim


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

  // Result dimensions
  Dimension[] dimensions = PerformanceTestPlugin.getResultsDimensions();
  int length = dimensions.length;
  for (int i = 0; i < length; i++) {
    Dim dim = (Dim) dimensions[i];
    defaultPreferences.put(PRE_RESULTS_DIMENSION + "." + i, dim.getName());
  }

  // Filters
  defaultPreferences.putBoolean(PRE_FILTER_ADVANCED_SCENARIOS, IPerformancesConstants.DEFAULT_FILTER_ADVANCED_SCENARIOS);
  defaultPreferences.putBoolean(PRE_FILTER_OLD_BUILDS, IPerformancesConstants.DEFAULT_FILTER_OLD_BUILDS);
View Full Code Here

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

  stream.print(buildResults.getName());
  if (buildResults.isBaseline()) stream.print(" (reference)");
  stream.print("</td>");
  int dimLength = this.dimensions.length;
  for (int d=0; d<dimLength; d++) {
    Dim dim = this.dimensions[d];
    int dim_id = dim.getId();
    double stddev = buildResults.getDeviation(dim_id);
    String displayValue = dim.getDisplayValue(buildResults.getValue(dim_id));
    stream.print("<td>");
    stream.print(displayValue);
    if (stddev < 0) {
      stream.print(" [n/a]\n");
    } else if (stddev > 0) {
      stream.print(" [");
      stream.print(dim.getDisplayValue(stddev));
      stream.print("]");
    }
    stream.print( "</td>");
  }
  stream.print("</tr>\n");
View Full Code Here

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

*/
private void printDifferenceLine(PrintStream stream, ConfigResults configResults) {
  stream.print("<tr><td>*Delta</td>");
  int dimLength = this.dimensions.length;
  for (int d=0; d<dimLength; d++) {
    Dim currentDim = this.dimensions[d];
    int dim_id = currentDim.getId();
    BuildResults currentBuild = configResults.getCurrentBuildResults();
    BuildResults baselineBuild = configResults.getBaselineBuildResults();

    // Compute difference values
    double baselineValue = baselineBuild.getValue(dim_id);
    double diffValue = baselineValue - currentBuild.getValue(dim_id);
    double diffPercentage =  baselineValue == 0 ? 0 : Math.round(diffValue / baselineValue * 1000) / 10.0;
    String diffDisplayValue = currentDim.getDisplayValue(diffValue);

    // Set colors
    String fontColor = "";
    if (diffPercentage > 10) {
      fontColor = "#006600"// green
View Full Code Here

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

      // Print build result table
      stream.print("<table border=\"1\">\n"); //$NON-NLS-1$
      stream.print("<tr><td><b>Build Id</b></td>"); //$NON-NLS-1$
      int dimLength = this.dimensions.length;
      for (int d=0; d<dimLength; d++) {
        Dim dim = this.dimensions[d];
        stream.print("<td><a href=\"#" + dim.getLabel() + "\"><b>" + dim.getName() + "</b></a></td>");
      }
      stream.print("</tr>\n");

      // Write build lines
      printTableLine(stream, currentBuildResults);
      printTableLine(stream, configResults.getBaselineBuildResults());

      // Write difference line
      printDifferenceLine(stream, configResults);

      // End of table
      stream.print("</table>\n");
      stream.print("*Delta values in red and green indicate degradation > 10% and improvement > 10%,respectively.<br><br>\n");
      stream.print("<br><hr>\n\n");

      // print text legend.
      stream.print("Black and yellow points plot values measured in integration and last seven nightly builds.<br>\n" + "Magenta points plot the repeated baseline measurement over time.<br>\n"
          + "Boxed points represent previous releases, milestone builds, current reference and current build.<br><br>\n"
          + "Hover over any point for build id and value.\n");

      // print image maps of historical
      for (int d=0; d<dimLength; d++) {
        Dim dim = this.dimensions[d];
        TimeLineGraph lineGraph = getLineGraph(scenarioResults, configResults, dim, highlightedPoints, this.buildIDStreamPatterns);
        if (subMonitor.isCanceled()) throw new OperationCanceledException();

        String dimShortName = dim.getLabel();
        String imgFileName = scenarioFileName + "_" + dimShortName;
        File imgFile = createFile(outputDir, "graphs", imgFileName, "gif");
        saveGraph(lineGraph, imgFile);
        stream.print("<br><a name=\"" + dimShortName + "\"></a>\n");
        stream.print("<br><b>" + dim.getName() + "</b><br>\n");
        stream.print(dim.getDescription() + "<br><br>\n");
        stream.print("<img src=\"graphs/");
        stream.print(imgFile.getName());
        stream.print("\" usemap=\"#" + lineGraph.fTitle + "\">");
        stream.print("<map name=\"" + lineGraph.fTitle + "\">");
        stream.print(lineGraph.getAreas());
View Full Code Here

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

              HashMap map= new HashMap();
              ResultSet rs2= fSQL.queryScalars(datapoint_id);
            while (rs2.next()) {
                  int dim_id= rs2.getInt(1);
                  long value= rs2.getBigDecimal(2).longValue();
                  Dim dim= Dim.getDimension(dim_id);
                  if (dim != null) {
                      if (dimSet == null || dimSet.contains(dim))
                          map.put(dim, new Scalar(dim, value));
                  }
            }
View Full Code Here

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

    this.stream.print("<tr><td>");
    this.stream.print(buildResults.getName());
    this.stream.print("</td>");
    int dimLength = this.dimensions.length;
    for (int d=0; d<dimLength; d++) {
      Dim dimension = this.dimensions[d];
      int dim_id = dimension.getId();
      double value = buildResults.getValue(dim_id);
      printDimTitle(dimension.getName());
      String displayValue = dimension.getDisplayValue(value);
      this.stream.print(displayValue);
      if (this.debug) System.out.print("\t"+displayValue);
      this.stream.print("</td>");
    }
    if (this.debug) System.out.println();
View Full Code Here

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

/*
* Set the build value from database information.
*/
void setValue(int dim_id, int step, long value) {
  int length = DB_Results.getDimensions().length;
  Dim dimension = (Dim) PerformanceTestPlugin.getDimension(dim_id);
  int idx = 0;
  if (this.dimensions == null){
    this.dimensions = new Dim[length];
    this.average = new double[length];
    this.stddev = new double[length];
View Full Code Here

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

                StatisticsSession stats= new StatisticsSession(dataPoints);
                Dim[] dims= dataPoints[0].getDimensions();

                int datapoint_id= fSQL.createDataPoint(sample_id, 0, InternalPerformanceMeter.AVERAGE);
                for (int i= 0; i < dims.length; i++) {
                    Dim dim= dims[i];
                    fSQL.insertScalar(datapoint_id, dim.getId(), (long) stats.getAverage(dim));
                }
               
                datapoint_id= fSQL.createDataPoint(sample_id, 0, InternalPerformanceMeter.STDEV);
                for (int i= 0; i < dims.length; i++) {
                    Dim dim= dims[i];
                    // see StatisticsSession
                    long value= Double.doubleToLongBits(stats.getStddev(dim));
                    fSQL.insertScalar(datapoint_id, dim.getId(), value);
                }
               
                datapoint_id= fSQL.createDataPoint(sample_id, 0, InternalPerformanceMeter.SIZE);
                for (int i= 0; i < dims.length; i++) {
                    Dim dim= dims[i];
                    fSQL.insertScalar(datapoint_id, dim.getId(), stats.getCount(dim));
                }
        } else {
        for (int i= 0; i < dataPoints.length; i++) {
            DataPoint dp= dataPoints[i];
                int datapoint_id= fSQL.createDataPoint(sample_id, i, dp.getStep());
View Full Code Here

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

        String spaces= "                                                                                                       "; //$NON-NLS-1$

        ps.println("(average over " + n + " samples):"); //$NON-NLS-1$ //$NON-NLS-2$
        for (int i= 0; i < dimensions.length; i++) {
          Dim dimension= dimensions[i];
          double mean= s.getAverage(dimension);

          String nameString= "  " + dimension.getName() + ":"; //$NON-NLS-1$ //$NON-NLS-2$
          String meanString= dimension.getDisplayValue(mean);
          int align= firstNonDigit(meanString);
          int endIndex = 30 - align - nameString.length();
          if (endIndex > 0) meanString= spaces.substring(0, endIndex) + meanString;

          align= nameString.length() + meanString.length();

          Percentile percentile= StatisticsUtil.T95;
          double[] confidenceInterval= s.getConfidenceInterval(dimension, percentile);

          StringBuffer printBuffer;
          if (n <= 2) {
            printBuffer = new StringBuffer(" (no confidence)"); //$NON-NLS-1$
          } else {
            printBuffer = new StringBuffer();
            int ns = align;
            while (ns++ < 40) printBuffer.append(' ');
            printBuffer.append(format.format(new Object[] {new Double(percentile.inside()), dimension.getDisplayValue(confidenceInterval[0]), dimension.getDisplayValue(confidenceInterval[1])}));
          }

          align+= printBuffer.length();
          try {
            while (align++ < 70) printBuffer.append(' ');
            printBuffer.append(checkSampleSize(s, sample, dimension));
          } catch (CoreException x) {
            badDimensions.add(dimension);
            continue;
          }

          ps.print(nameString);
          ps.print(meanString);
          ps.println(printBuffer);
        }
       
        if (!badDimensions.isEmpty()) {
          ps.print("  Dimensions with unusable statistical properties: "); //$NON-NLS-1$
          for (Iterator iter= badDimensions.iterator(); iter.hasNext();) {
            Dim dimension= (Dim) iter.next();
            ps.print(dimension.getName());
            if (iter.hasNext())
              ps.print(", "); //$NON-NLS-1$
          }
          ps.println();
        }
View Full Code Here

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

      Dim[] dimensions= dataPoints[0].getDimensions();
      Arrays.sort(dimensions, new DimensionComparator());
      if (dimensions.length > 0) {
        /* print dimensions */
        for (int d= 0; d < dimensions.length; d++) {
          Dim dimension= dimensions[d];
          ps.print(dimension.getName());
          ps.print(SEPARATOR);
        }
        ps.println("scenario"); //$NON-NLS-1$
       
        for (int p= 0; p < dataPoints.length - 1; p+=2) {
          DataPoint before= dataPoints[p];
          DataPoint after= dataPoints[p + 1];
          for (int d= 0; d < dimensions.length; d++) {
            Dim dimension= dimensions[d];
            long valBefore= before.getScalar(dimension).getMagnitude();
            long valAfter= after.getScalar(dimension).getMagnitude();
            ps.print(valAfter - valBefore);
            ps.print(SEPARATOR);
          }
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.