Package org.eclipse.test.internal.performance.results.db

Examples of org.eclipse.test.internal.performance.results.db.BuildResults


  final String defaultBaselinePrefix = DB_Results.getDbBaselinePrefix();
  Iterator builds = configResults.getResults();
  List lastSevenNightlyBuilds = configResults.lastNightlyBuildNames(7);
  buildLoop: while (builds.hasNext()) {
    BuildResults buildResults = (BuildResults) builds.next();
    String buildID = buildResults.getName();
    int underscoreIndex = buildID.indexOf('_');
    String label = (underscoreIndex != -1 && buildID.equals(current)) ? buildID.substring(0, underscoreIndex) : buildID;
    if (buildID.startsWith(defaultBaselinePrefix)) {
      label = defaultBaselinePrefix+buildID.charAt(defaultBaselinePrefix.length())+buildID.substring(underscoreIndex);
    }

    double value = buildResults.getValue(dim.getId());

    if (buildID.equals(current)) {
      Color color = black;
      if (buildID.startsWith("N"))
        color = yellow;
View Full Code Here


    String failureMessage = Utils.failureMessage(configResults.getCurrentBuildDeltaInfo(), true);
     if (failureMessage != null){
         stream.print("<table><tr><td><b>"+failureMessage+"</td></tr></table>\n");
     }

     BuildResults currentBuildResults = configResults.getCurrentBuildResults();
     String comment = currentBuildResults.getComment();
    if (comment != null) {
      stream.print("<p><b>Note:</b><br>\n");
      stream.print(comment + "</p>\n");
    }
View Full Code Here

  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
View Full Code Here

  ConfigResults configResults = scenarioResults.getConfigResults(config);
  if (configResults == null || !configResults.isValid()) {
    this.stream.print("<td>n/a</td>");
    return;
  }
  BuildResults currentBuildResults = configResults.getCurrentBuildResults();
  String failure = currentBuildResults.getFailure();
  double[] deviation = configResults.getCurrentBuildDeltaInfo();
  int confidence = Utils.confidenceLevel(deviation);
  boolean hasFailure = failure != null;
  String comment = currentBuildResults.getComment();
  String image = Utils.getImage(confidence, hasFailure, comment != null);
  this.stream.print("<td><a ");
  if (!hasFailure|| (confidence & Utils.NAN) != 0 || failure.length() == 0){
    // write deviation with error in table when test pass
    this.stream.print("href=\"");
View Full Code Here

    // get builds info
    ConfigResults configResults = this.results[i];
    this.areas[i] = new BarGraphArea(configResults);
    BarGraphArea graphArea = this.areas[i];
    BuildResults currentBuildResults = configResults.getCurrentBuildResults();
    double currentValue = currentBuildResults.getValue();
    double currentError = currentBuildResults.getError();
    double error = configResults.getError();
    boolean singleTest = Double.isNaN(error);
    boolean isSignificant = singleTest || error < Utils.STANDARD_ERROR_THRESHOLD;
    boolean isCommented = currentBuildResults.getComment() != null;
    BuildResults baselineBuildResults = configResults.getBaselineBuildResults();
    double baselineValue = baselineBuildResults.getValue();
    double baselineError = baselineBuildResults.getError();

    // draw baseline build bar
    Color whiteref = (Color) this.resources.get("whiteref");
    if (whiteref == null) {
      whiteref = new Color(DEFAULT_DISPLAY, 240, 240, 248);
      this.resources.put("whiteref", whiteref);
    }
    this.gc.setBackground(whiteref);
    double baselineGraphValue = kind == TIME_LOG ? Math.log(baselineValue) : baselineValue;
    int baselineBarLength= (int) (baselineGraphValue / max * this.graphWidth);
    int baselineErrorLength= (int) (baselineError / max * this.graphWidth / 2);
    int labelxpos = MARGIN + baselineBarLength;
    if (kind == TIME_LOG || baselineErrorLength <= 1) {
      this.gc.fillRectangle(MARGIN, y + (GAP/2), baselineBarLength, BAR_HEIGHT);
      Rectangle rec = new Rectangle(MARGIN, y + (GAP/2), baselineBarLength, BAR_HEIGHT);
      this.gc.drawRectangle(rec);
      graphArea.addArea(rec, "Time for baseline build "+baselineBuildResults.getName()+": "+Util.timeString((long)baselineValue));
    } else {
      int wr = baselineBarLength - baselineErrorLength;
      Rectangle recValue = new Rectangle(MARGIN, y + (GAP/2), wr, BAR_HEIGHT);
      this.gc.fillRectangle(recValue);
      this.gc.setBackground(YELLOW);
      Rectangle recError = new Rectangle(MARGIN+wr, y + (GAP/2), baselineErrorLength*2, BAR_HEIGHT);
      this.gc.fillRectangle(recError);
      Rectangle rec = new Rectangle(MARGIN, y + (GAP/2), baselineBarLength+baselineErrorLength, BAR_HEIGHT);
      this.gc.drawRectangle(rec);
      StringBuffer tooltip = new StringBuffer("Time for baseline build ");
      tooltip.append(baselineBuildResults.getName());
      tooltip.append(": ");
      tooltip.append(Util.timeString((long)baselineValue));
      tooltip.append(" [&#177;");
      tooltip.append(Util.timeString((long)baselineError));
      tooltip.append(']');
View Full Code Here

  // Set maximum of values
  this.maxValue = 0.0;
  this.minValue = Double.MAX_VALUE;
  for (int i= 0; i<this.count; i++) {
    BuildResults baselineBuildResults = this.results[i].getBaselineBuildResults();
    double value = baselineBuildResults.getValue();
    double error = baselineBuildResults.getError();
    if (!Double.isNaN(error)) value += Math.abs(error);
    if (value < 1000000 && value > this.maxValue) {
      this.maxValue = value;
    }
    if (value < this.minValue) {
      this.minValue = value;
    }
    BuildResults currentBuildResults = this.results[i].getCurrentBuildResults();
    value = currentBuildResults.getValue();
    error = currentBuildResults.getError();
    if (!Double.isNaN(error)) value += Math.abs(error);
    if (value < 1000000 && value > this.maxValue) {
      this.maxValue = value;
    }
    if (value < this.minValue) {
View Full Code Here

int initStatus(BuildResults buildResults) {
  this.status = READ;
  double buildValue = buildResults.getValue();
  ConfigResults configResults = (ConfigResults) buildResults.getParent();
  BuildResults baselineResults = configResults.getBaselineBuildResults(buildResults.getName());
  double baselineValue = baselineResults.getValue();
  double delta = (baselineValue - buildValue) / baselineValue;
  if (Double.isNaN(delta)) {
    this.status |= NO_BASELINE;
  }
  long baselineCount = baselineResults.getCount();
  long currentCount = buildResults.getCount();
  double error = Double.NaN;
  if (baselineCount == 1 || currentCount == 1) {
    this.status |= SINGLE_RUN;
  } else {
    double ttestValue = Util.computeTTest(baselineResults, buildResults);
    int degreeOfFreedom = (int) (baselineResults.getCount()+buildResults.getCount()-2);
    if (ttestValue >= 0 && StatisticsUtil.getStudentsT(degreeOfFreedom, StatisticsUtil.T90) >= ttestValue) {
      this.status |= STUDENT_TTEST;
    }
    double baselineError = baselineResults.getError();
    double currentError = buildResults.getError();
    error = Double.isNaN(baselineError)
        ? currentError / baselineValue
        : Math.sqrt(baselineError*baselineError + currentError*currentError) / baselineValue;
    if (error > 0.03) {
View Full Code Here

  List builds = this.configResults.getBuildsMatchingPrefixes(this.buildPrefixes);
  Collections.reverse(builds);
  int size = builds.size();
  for (int i=0; i<size; i++) {
    BuildResults buildResults = (BuildResults) builds.get(i);
    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>");
View Full Code Here

TOP

Related Classes of org.eclipse.test.internal.performance.results.db.BuildResults

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.