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

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


*/
void printSummary(String configName, String configBox, ComponentResults componentResults, File outputDir, SubMonitor subMonitor) {
  Iterator scenarios = componentResults.getResults();
  while (scenarios.hasNext()) {
    List highlightedPoints = new ArrayList();
    ScenarioResults scenarioResults = (ScenarioResults) scenarios.next();
    ConfigResults configResults = scenarioResults.getConfigResults(configName);
    if (configResults == null || !configResults.isValid()) continue;

    // get latest points of interest matching
    if (this.pointsOfInterest != null) {
      Iterator buildPrefixes = this.pointsOfInterest.iterator();
      while (buildPrefixes.hasNext()) {
        String buildPrefix = (String) buildPrefixes.next();
        List builds = configResults.getBuilds(buildPrefix);
        if (buildPrefix.indexOf('*') <0 && buildPrefix.indexOf('?') < 0) {
          if (builds.size() > 0) {
            highlightedPoints.add(builds.get(builds.size()-1));
          }
        } else {
          highlightedPoints.addAll(builds);
        }
      }
    }

    String scenarioFileName = scenarioResults.getFileName();
    File outputFile = new File(outputDir, scenarioFileName+".html");
    PrintStream stream = null;
    try {
      stream = new PrintStream(new BufferedOutputStream(new FileOutputStream(outputFile)));
    } catch (FileNotFoundException e) {
      System.err.println("can't create output file" + outputFile); //$NON-NLS-1$
    }
    if (stream == null) {
      stream = System.out;
    }
    stream.print(Utils.HTML_OPEN);
    stream.print(Utils.HTML_DEFAULT_CSS);

    stream.print("<title>" + scenarioResults.getName() + "(" + configBox + ")" + "</title></head>\n"); //$NON-NLS-1$
    stream.print("<h4>Scenario: " + scenarioResults.getName() + " (" + configBox + ")</h4><br>\n"); //$NON-NLS-1$ //$NON-NLS-2$

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


* Print details file of the scenario builds data.
*/
private void printDetails(String configName, String configBox, ComponentResults componentResults, File outputDir) {
  Iterator scenarios = componentResults.getResults();
  while (scenarios.hasNext()) {
    ScenarioResults scenarioResults = (ScenarioResults) scenarios.next();
    ConfigResults configResults = scenarioResults.getConfigResults(configName);
    if (configResults == null || !configResults.isValid()) continue;
    String scenarioName= scenarioResults.getName();
    String scenarioFileName = scenarioResults.getFileName();
    File outputFile = createFile(outputDir, "raw", scenarioFileName, "html");
    PrintStream stream = null;
    try {
      stream = new PrintStream(new BufferedOutputStream(new FileOutputStream(outputFile)));
    } catch (FileNotFoundException e) {
View Full Code Here

  printColumnsTitle(size, performanceResults);

  // Print one line per scenario results
  this.jsIdCount = 0;
  for (int i=0; i<size; i++) {
    ScenarioResults scenarioResults = (ScenarioResults) scenarios.get(i);
    if (!scenarioResults.isValid()) continue;
    this.stream.print("<tr>\n");
    this.stream.print("<td>");
    boolean hasSummary = scenarioResults.hasSummary();
    if (hasSummary) this.stream.print("<b>");
    String scenarioBaseline = scenarioResults.getBaselineBuildName();
    boolean hasBaseline = baselineName.equals(scenarioBaseline);
    if (!hasBaseline) {
      this.stream.print("*");
      this.stream.print(scenarioResults.getShortName());
      this.stream.print(" <small>(vs.&nbsp;");
      this.stream.print(scenarioBaseline);
      this.stream.print(")</small>");
    } else {
      this.stream.print(scenarioResults.getShortName());
    }
    if (hasSummary) this.stream.print("</b>");
    this.stream.print("\n");
    String[] configs = performanceResults.getConfigNames(true/*sort*/);
    int length = configs.length;
View Full Code Here

private int computeSize(List scenarios) {
  int size = scenarios.size();
  int n = 0;
  for (int i=0; i<size; i++) {
    ScenarioResults scenarioResults = (ScenarioResults) scenarios.get(i);
    if (scenarioResults.isValid()) n++;
  }
  return n;
}
View Full Code Here

    Color oldfg= this.gc.getForeground();
    this.gc.setForeground(BLUE);

    // draw scenario title
    int x= titleStart;
    ScenarioResults scenarioResults = (ScenarioResults) configResults.getParent();
    String title = scenarioResults.getLabel() + " (" + this.defaultDimName + ")";
    Point e= this.gc.stringExtent(title);
    this.gc.drawLine(x, labelvpos + e.y - 1, x + e.x, labelvpos + e.y - 1);
    this.gc.drawString(title, x, labelvpos, true);
    this.gc.setForeground(oldfg);
    this.gc.setFont(null);
View Full Code Here

    // TODO use FingerPrintGraph instead
    BarGraph barGraph = null;
    List allResults = new ArrayList();
    String defaultDimName = DB_Results.getDefaultDimension().getName();
    for (int i=0, size=scenarios.size(); i<size; i++) {
      ScenarioResults scenarioResults = (ScenarioResults) scenarios.get(i);
      ConfigResults configResults = scenarioResults.getConfigResults(configName);
      if (configResults == null || !configResults.isValid()) continue;
      double[] results = configResults.getCurrentBuildDeltaInfo();
      double percent = -results[0] * 100.0;
      if (results != null && Math.abs(percent) < 200) {
        String name = scenarioResults.getLabel() + " (" + defaultDimName + ")";
        if (!configResults.getCurrentBuildName().equals(buildName)) {
          continue; // the test didn't run on last build, skip it
        }
        if (!configResults.isBaselined()) {
          name = "*" + name + " (" + configResults.getBaselineBuildName() + ")";
        }
        if (barGraph == null) {
          barGraph = new BarGraph(null);
        }
        barGraph.addItem(name,
            results,
            configName + "/" + scenarioResults.getFileName() + ".html",
            configResults.getCurrentBuildResults().getComment(),
            (Utils.confidenceLevel(results) & Utils.ERR) == 0);

        // add results
        allResults.add(configResults);
View Full Code Here

  }
  List scenarios = new ArrayList();
  if (this.results != null) {
    Iterator iterator = this.results.getResults();
    while (iterator.hasNext()) {
      ScenarioResults scenarioResults = (ScenarioResults) iterator.next();
      if (scenarioResults.hasSummary()) {
        scenarios.add(scenarioResults);
      }
    }
  }
  return scenarios;
View Full Code Here

  List labels = new ArrayList();
  if (this.results != null) {
    AbstractResults[] scenarios = this.results.getChildren();
    int length = scenarios.length;
    for (int i=0; i<length; i++) {
      ScenarioResults scenarioResults = (ScenarioResults) scenarios[i];
      if (!fingerprint || scenarioResults.hasSummary()) {
        labels.add(scenarioResults.getLabel());
      }
    }
  }
  return labels;
}
View Full Code Here

      List scenarioNames = this.performanceResults.getComponentScenarios(componentName);
      int size = scenarioNames.size();
      for (int s=0; s<size; s++) {
        String scenarioName = ((ScenarioResults) scenarioNames.get(s)).getName();
        if (scenarioName == null) continue;
        ScenarioResults scenarioResults = this.performanceResults.getScenarioResults(scenarioName);
        if (scenarioResults != null) {
          stream.print("<tr>\n");
          for (int j=0; j<2; j++) {
            for (int c=0; c<configsLength; c++) {
              printSummaryScenarioLine(j, configs[c], scenarioResults, stream);
View Full Code Here

TOP

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

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.