Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 69664 Details for
Bug 185580
[results] Standard error should be used instead of Student's t-test to identify unreliable performance tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Final patch for new Scenario Status Table look
v10.txt (text/plain), 50.16 KB, created by
Frederic Fusier
on 2007-06-01 03:43:31 EDT
(
hide
)
Description:
Final patch for new Scenario Status Table look
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2007-06-01 03:43:31 EDT
Size:
50.16 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.test.performance.ui >Index: src/org/eclipse/test/performance/ui/Utils.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Utils.java,v >retrieving revision 1.34 >diff -u -r1.34 Utils.java >--- src/org/eclipse/test/performance/ui/Utils.java 15 May 2007 19:23:10 -0000 1.34 >+++ src/org/eclipse/test/performance/ui/Utils.java 1 Jun 2007 07:40:47 -0000 >@@ -20,13 +20,13 @@ > import java.io.InputStream; > import java.io.OutputStream; > import java.io.PrintWriter; >+import java.text.DecimalFormat; > import java.text.NumberFormat; > import java.util.ArrayList; > import java.util.Arrays; > import java.util.Calendar; > import java.util.HashMap; > import java.util.Hashtable; >-import java.util.Map; > import java.util.StringTokenizer; > > import junit.framework.AssertionFailedError; >@@ -43,10 +43,9 @@ > import org.eclipse.test.internal.performance.data.Dim; > import org.eclipse.test.internal.performance.db.DB; > import org.eclipse.test.internal.performance.db.Scenario; >+import org.eclipse.test.internal.performance.db.SummaryEntry; > import org.eclipse.test.internal.performance.db.TimeSeries; > import org.eclipse.test.internal.performance.db.Variations; >-import org.eclipse.test.internal.performance.eval.StatisticsUtil; >-import org.eclipse.test.internal.performance.eval.StatisticsUtil.Percentile; > import org.eclipse.test.performance.Dimension; > > >@@ -57,22 +56,28 @@ > static { > PERCENT_FORMAT.setMaximumFractionDigits(1); > } >- static final NumberFormat DOUBLE_FORMAT = NumberFormat.getNumberInstance(); >+ static final DecimalFormat DEVIATION_FORMAT = (DecimalFormat) NumberFormat.getPercentInstance(); > static { >- DOUBLE_FORMAT.setMaximumIntegerDigits(2); >- DOUBLE_FORMAT.setMaximumFractionDigits(1); >+ DEVIATION_FORMAT.setMaximumFractionDigits(1); >+ DEVIATION_FORMAT.setMinimumFractionDigits(1); >+ DEVIATION_FORMAT.setPositivePrefix("+"); >+ DEVIATION_FORMAT.setNegativePrefix("- "); >+ } >+ static final DecimalFormat STDERR_FORMAT = (DecimalFormat) NumberFormat.getNumberInstance(); >+ static { >+ STDERR_FORMAT.setMaximumFractionDigits(1); >+ STDERR_FORMAT.setMinimumFractionDigits(1); >+ STDERR_FORMAT.setMultiplier(100); > } > public final static String STANDARD_ERROR_THRESHOLD_STRING = PERCENT_FORMAT.format(STANDARD_ERROR_THRESHOLD); >- public final static String STANDARD_ERROR_MESSAGE="Standard error on this test is higher than "+STANDARD_ERROR_THRESHOLD_STRING; > public final static String OK_IMAGE="OK.gif"; > public final static String OK_IMAGE_WARN="OK_caution.gif"; > public final static String FAIL_IMAGE="FAIL.gif"; > public final static String FAIL_IMAGE_WARN="FAIL_caution.gif"; > public final static String FAIL_IMAGE_EXPLAINED="FAIL_greyed.gif"; > public final static int OK = 0; >- public final static int SIGN = 0x1; >+ public final static int WARN = 0x1; > public final static int ERR = 0x2; >-// public final static int TTEST = 0x2; > public final static int DEV = 0x4; > > /** >@@ -207,7 +212,7 @@ > > while (tokenizer.hasMoreTokens()) { > String labelDescriptor = tokenizer.nextToken(); >- String[] elements = labelDescriptor.split(","); >+ String[] elements = labelDescriptor.trim().split(","); > ConfigDescriptor descriptor = new ConfigDescriptor(elements[0], elements[1]); > configMap.put(elements[0], descriptor); > } >@@ -268,11 +273,11 @@ > return componentNames; > } > >- /** >+ /* > * @param fp - > * a FingerPrint object > * @return - an html representation of the fingerprint. >- */ >+ * > public static String getImageMap(FingerPrint fp) { > String componentDescription = fp.configDescriptor.description; > String areas = fp.bar.getAreas(); >@@ -287,6 +292,7 @@ > } > return output; > } >+ */ > > /** > * Utility method to copy a file. >@@ -740,90 +746,86 @@ > out.close(); > } > } >- >- public static double[] resultStats(Variations variations, String scenarioName, String baseline, String config) { >- String OS = "config"; >- >- Variations tmpVariations=(Variations)variations.clone(); >- tmpVariations.put(OS,config); >- Scenario[] currentScenarios = DB.queryScenarios(tmpVariations, scenarioName,OS, null); >- Variations referenceVariations = (Variations) variations.clone(); >- referenceVariations.put(PerformanceTestPlugin.BUILD, baseline); >- referenceVariations.put(OS, config); >- Scenario[] refScenarios = DB.queryScenarios(referenceVariations, >- scenarioName, OS, null); >- >- Map referenceScenariosMap = new HashMap(); >- Map currentScenariosMap = new HashMap(); >- for (int i = 0; i < refScenarios.length; i++) { >- Scenario scenario = refScenarios[i]; >- String name = scenario.getScenarioName(); >- referenceScenariosMap.put(name, scenario); >- } >- >- for (int i = 0; i < currentScenarios.length; i++) { >- Scenario scenario = currentScenarios[i]; >- String name = scenario.getScenarioName(); >- currentScenariosMap.put(name, scenario); >- } >- Percentile percentile = StatisticsUtil.T90; >- Scenario scenario = (Scenario) currentScenariosMap.get(scenarioName); >- >- Scenario reference = (Scenario) referenceScenariosMap.get(scenarioName); >- if (reference != null) { >- // XXX have to find out the relevant dimension >- Dim significanceDimension = (Dim) Dimension.ELAPSED_PROCESS; >- TimeSeries currentSeries = scenario.getTimeSeries(significanceDimension); >- TimeSeries baselineSeries = reference.getTimeSeries(significanceDimension); >- if (currentSeries.getLength() > 0 && baselineSeries.getLength() > 0) { >- return StatisticsUtil.statisticsForTimeSeries(baselineSeries, 0, currentSeries, 0, percentile); >- } >- } >- return null; >+ >+ public static double[] resultsStatistics(TimeSeries timeSeries) { >+ try { >+ double valueRef = timeSeries.getValue(0), value = timeSeries.getValue(1); >+ long countRef = timeSeries.getCount(0), count = timeSeries.getCount(1); >+ double stddevRef = timeSeries.getStddev(0), stddev = timeSeries.getStddev(1); >+ double stderr = (countRef == 1 || count == 1) >+ ? Double.NaN >+ : (Double.isNaN(stddevRef) >+ ? Math.sqrt((stddev * stddev / count)) / valueRef >+ : Math.sqrt((stddevRef * stddevRef / countRef) + (stddev * stddev / count)) / valueRef); >+ return new double[] { >+ (value - valueRef) / valueRef, >+ stderr, >+ }; >+ } >+ catch (ArrayIndexOutOfBoundsException aioobe) { >+ return null; >+ } > } > >- public static boolean hasConfidentResult(Variations variations, String scenarioName, String baseline, String config) { >- double[] resultStats = resultStats(variations, scenarioName, baseline, config); >+ public static boolean hasConfidentResult(TimeSeries timeSeries) { >+ double[] resultStats = resultsStatistics(timeSeries); > return (confidenceLevel(resultStats) & ERR) == 0; > } > public static String failureMessage(Variations variations, String scenarioName, String baseline, String config) { >- return failureMessage(resultStats(variations, scenarioName, baseline, config), true); >+ String current = (String) variations.get(PerformanceTestPlugin.BUILD); >+ Dim significanceDimension = (Dim) Dimension.ELAPSED_PROCESS; >+ Scenario newScenario= DB.getScenarioSeries(scenarioName, variations, PerformanceTestPlugin.BUILD, baseline, current, new Dim[] { significanceDimension }); >+ TimeSeries timeSeries = newScenario.getTimeSeries(significanceDimension); >+ double[] results = resultsStatistics(timeSeries); >+ return failureMessage(results, true); > } > public static String failureMessage(double[] resultStats, boolean full) { > StringBuffer buffer = new StringBuffer(); > int level = confidenceLevel(resultStats); >- boolean signal = (level & SIGN) != 0; >+// boolean isWarn = (level & WARN) != 0; > boolean isErr = (level & ERR) != 0; >- if (full & isErr) { >- buffer.append("*** WARNING *** "); >- buffer.append(STANDARD_ERROR_MESSAGE); >+ if (full) { >+ if (isErr) { >+ buffer.append("*** WARNING *** "); >+ buffer.append(Messages.bind(Messages.standardError, PERCENT_FORMAT.format(resultStats[1]), STANDARD_ERROR_THRESHOLD_STRING)); >+ } >+ return buffer.toString(); > } >- if (!full) buffer.append("<font color=\"#0000FF\" size=\"1\"> "); > if (resultStats != null) { >- double deviation = resultStats[3]==0 ? 0 : -resultStats[3]; >- if (deviation > 0) { >- buffer.append('+'); >- } >- buffer.append(PERCENT_FORMAT.format(deviation)); >- if (signal) { >- buffer.append(" [±"); >- buffer.append(DOUBLE_FORMAT.format(resultStats[2]*100)); >- buffer.append(']'); >+ double deviation = resultStats[0]; >+ if (Double.isNaN(deviation) || Double.isInfinite(deviation)) { >+ buffer.append("<font color=\"red\" size=\"1\"> "); >+ buffer.append("[n/a]"); >+ } else { >+ double stderr = resultStats[1]; >+ deviation = Math.abs(deviation)<0.001 ? 0 : -deviation; >+ buffer.append("<font color=\"#0000FF\" size=\"1\">"); >+ if (Double.isNaN(stderr)) { >+ buffer.append(DEVIATION_FORMAT.format(deviation)); >+ buffer.append("</font><font color=\"#DDDD00\" size=\"1\"> "); >+ buffer.append(" [n/a]"); >+ } else if (Double.isInfinite(stderr)) { >+ buffer.append(DEVIATION_FORMAT.format(deviation)); >+ buffer.append("</font><font color=\"red\" size=\"1\"> "); >+ buffer.append(" [Infinite]"); >+ } else { >+ buffer.append(DEVIATION_FORMAT.format(deviation)); >+ buffer.append(" [±"); >+ buffer.append(STDERR_FORMAT.format(Math.abs(stderr))); >+ buffer.append(']'); >+ } > } >+ buffer.append("</font>"); > } >- if (!full) buffer.append("</font>"); > return buffer.toString(); > } > public static int confidenceLevel(double[] resultStats) { > int level = OK; > if (resultStats != null){ >-// if (resultStats[1] >= 0 && resultStats[0] >= resultStats[1]) { // invalid t-test >-// level |= TTEST; >-// } >- if (resultStats[2] > 0) { // signal standard error higher than 0% (only one iteration) >- level |= SIGN; >+ if (resultStats[1] >= (Utils.STANDARD_ERROR_THRESHOLD/2)) { // warns standard error higher than the half of authorized threshold >+ level |= WARN; > } >- if (resultStats[2] >= Utils.STANDARD_ERROR_THRESHOLD) { // standard error higher than the authorized threshold >+ if (resultStats[1] >= Utils.STANDARD_ERROR_THRESHOLD) { // standard error higher than the authorized threshold > level |= ERR; > } > } >@@ -837,15 +839,13 @@ > String previous = ""; > while (tokenizer.hasMoreTokens()) { > String token = tokenizer.nextToken(); >- if (token.equals("%")) { >- start += previous.length(); >- } else if (token.equals("_")) { >- start++; >- } else { >+ if (!token.equals("%") && !token.equals("_")) { > if (previous.equals("%")) { >- if (name.substring(start).indexOf(token) < 0) return false; >+ int idx = name.substring(start).indexOf(token); >+ if (idx < 0) return false; >+ start += idx; > } else if (previous.equals("_")) { >- if (!name.substring(start).startsWith(token)) return false; >+ if (!name.substring(++start).startsWith(token)) return false; > } > start += token.length(); > } >@@ -861,7 +861,7 @@ > return name.equals(pattern); > } > >- public static String getImage(int confidence, double[] resultStats, boolean hasExplanation) { >+ public static String getImage(int confidence, boolean hasExplanation) { > boolean scenarioFailed = (confidence & DEV) != 0; > String image = null; > >@@ -880,4 +880,73 @@ > } > return image; > } >-} >+ >+ public static boolean hasSummary(SummaryEntry[] summaries, String scenarioName) { >+ int length = summaries == null ? 0 : summaries.length; >+ for (int i=0; i<length; i++) { >+ SummaryEntry summary = summaries[i]; >+ if (summary.scenarioName.equals(scenarioName)) { >+ return true; >+ } >+ } >+ return false; >+ } >+ >+ public static String getScenarioShortName(String scenarioName, int max) { >+ >+ // Remove class name qualification >+ int testSeparator = scenarioName.indexOf('#'); >+ boolean hasClassName = testSeparator >= 0; >+ if (!hasClassName) { >+ testSeparator = scenarioName.lastIndexOf('.'); >+ if (testSeparator <= 0) { >+ if (max > 0 && scenarioName.length() > max) { >+ return "*"+scenarioName.substring(0, max); >+ } >+ return scenarioName; >+ } >+ } >+ int classSeparator = scenarioName.substring(0, testSeparator).lastIndexOf('.'); >+ if (classSeparator < 0) { >+ if (max > 0 && scenarioName.length() > max) { >+ return "*"+scenarioName.substring(0, max); >+ } >+ return scenarioName; >+ } >+ int length = scenarioName.length(); >+ String shortName = scenarioName.substring(classSeparator+1, length); >+ if (!hasClassName && shortName.startsWith("test.")) { // specific case for swt... >+ shortName = shortName.substring(5); >+ } >+ >+ // Remove qualification from test name >+ StringTokenizer tokenizer = new StringTokenizer(shortName, " :,", true); >+ StringBuffer buffer = new StringBuffer(tokenizer.nextToken()); >+ while (tokenizer.hasMoreTokens()) { >+ String token = tokenizer.nextToken(); >+ char fc = token.charAt(0); >+ while (fc == ' ' || fc == ',' || fc == ':') { >+ buffer.append(token); // add the separator >+ token = tokenizer.nextToken(); >+ fc = token.charAt(0); >+ } >+ int last = token .lastIndexOf('.'); >+ if (last >= 3) { >+ int first = token .indexOf('.'); >+ if (first == last) { >+ buffer.append(token); >+ } else { >+// buffer.append(token.substring(0, first)); >+// buffer.append("..."); >+ buffer.append(token.substring(last+1)); >+ } >+ } else { >+ buffer.append(token); >+ } >+ } >+ if (max > 0 && buffer.length() > max) { >+ return "*"+buffer.substring(0, max); >+ } >+ return buffer.toString(); >+ } >+} >\ No newline at end of file >Index: src/org/eclipse/test/performance/ui/ScenarioStatusTable.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/ScenarioStatusTable.java,v >retrieving revision 1.28 >diff -u -r1.28 ScenarioStatusTable.java >--- src/org/eclipse/test/performance/ui/ScenarioStatusTable.java 15 May 2007 19:23:10 -0000 1.28 >+++ src/org/eclipse/test/performance/ui/ScenarioStatusTable.java 1 Jun 2007 07:40:47 -0000 >@@ -10,12 +10,19 @@ > *******************************************************************************/ > package org.eclipse.test.performance.ui; > >+import java.io.PrintStream; > import java.util.ArrayList; > import java.util.Hashtable; >+import java.util.StringTokenizer; > >+import org.eclipse.test.internal.performance.PerformanceTestPlugin; >+import org.eclipse.test.internal.performance.data.Dim; > import org.eclipse.test.internal.performance.db.DB; > import org.eclipse.test.internal.performance.db.Scenario; >+import org.eclipse.test.internal.performance.db.SummaryEntry; >+import org.eclipse.test.internal.performance.db.TimeSeries; > import org.eclipse.test.internal.performance.db.Variations; >+import org.eclipse.test.performance.Dimension; > > public class ScenarioStatusTable { > >@@ -24,18 +31,23 @@ > private String scenarioPattern; > private ArrayList configNames=new ArrayList(); > private Hashtable scenarioComments; >+ private SummaryEntry[] fingerprintEntries; > private final String baseline; > > private class ScenarioStatus{ > Hashtable statusMap; >- String name; >+ String name, shortName; > Hashtable configStatus; >+ Hashtable resultsMap; > boolean hasSlowDownExplanation=false; >+ boolean fingerprint = false; >+ boolean hasBaseline = true; > > public ScenarioStatus(String scenarioName){ >- name=scenarioName; >- statusMap=new Hashtable(); >- configStatus=new Hashtable(); >+ name = scenarioName; >+ statusMap = new Hashtable(); >+ configStatus = new Hashtable(); >+ resultsMap = new Hashtable(); > } > > } >@@ -48,20 +60,20 @@ > * @param scenarioPattern > * @param configDescriptors > */ >- public ScenarioStatusTable(Variations variations,String scenarioPattern,Hashtable configDescriptors,Hashtable scenarioComments, String baseline){ >+ public ScenarioStatusTable(Variations variations,String scenarioPattern,Hashtable configDescriptors,Hashtable scenarioComments, SummaryEntry[] fpSummaries, String baseline){ > configMaps=configDescriptors; > this.variations=variations; > this.scenarioPattern=scenarioPattern; > this.scenarioComments=scenarioComments; > this.baseline= baseline; >+ this.fingerprintEntries = fpSummaries; > } >- >+ > /** >- * Returns HTML representation of scenario status table. >+ * Prints the HTML representation of scenario status table into the given stream. > */ >- public String toString() { >+ public void print(PrintStream stream, boolean filter) { > String OS="config"; >- String htmlTable=""; > Scenario[] scenarios= DB.queryScenarios(variations, scenarioPattern, OS, null); > > if (scenarios != null && scenarios.length > 0) { >@@ -70,23 +82,35 @@ > for (int i= 0; i < scenarios.length; i++) { > Scenario scenario= scenarios[i]; > String scenarioName=scenario.getScenarioName(); >-// if (!Utils.matchPattern(scenarioName, scenarioPattern)) continue; >+ if (filter && !Utils.matchPattern(scenarioName, scenarioPattern)) continue; > // returns the config names. Making assumption that indices in > // the configs array map to the indices of the failure messages. > String[] configs=scenario.getTimeSeriesLabels(); > String[] failureMessages= scenario.getFailureMessages(); > ScenarioStatus scenarioStatus=new ScenarioStatus(scenarioName); >- scenarioStatusList.add(scenarioStatus); >+ scenarioStatus.fingerprint = Utils.hasSummary(this.fingerprintEntries, scenarioName); > > String scenarioComment= (String)scenarioComments.get(scenarioName); > if (scenarioComment != null) > scenarioStatus.hasSlowDownExplanation= true; >- >- for (int j=0;j<configs.length;j++){ >+ >+ int confsLength = configs.length; >+ for (int j=0; j<confsLength; j++){ > if (!configNames.contains(configs[j])) > configNames.add(configs[j]); > >- double[] resultStats = Utils.resultStats(variations, scenarioName, baseline, configs[j]); >+ Variations v = (Variations) variations.clone(); >+ v.put(PerformanceTestPlugin.CONFIG, configs[j]); >+// double[] resultStats = Utils.resultStats(v, scenarioName, baseline, configs[j]); >+ String current = (String) v.get(PerformanceTestPlugin.BUILD); >+ Dim significanceDimension = (Dim) Dimension.ELAPSED_PROCESS; >+ Scenario newScenario= DB.getScenarioSeries(scenarioName, v, PerformanceTestPlugin.BUILD, baseline, current, new Dim[] { significanceDimension }); >+ String[] timeSeriesLabels= newScenario.getTimeSeriesLabels(); >+ TimeSeries timeSeries = newScenario.getTimeSeries(significanceDimension); >+ boolean hasBaseline = timeSeriesLabels.length == 2 && timeSeriesLabels[0].equals(baseline); >+ double[] resultStats = Utils.resultsStatistics(timeSeries); >+ if (resultStats == null) continue; >+ if (resultStats != null && resultStats[1] < 0 && scenarioStatus.hasBaseline) scenarioStatus.hasBaseline = false; > int confidenceLevel = Utils.confidenceLevel(resultStats); > > boolean hasScenarioFailure = failureMessages[j] != null && failureMessages[j].indexOf(configs[j]) != -1; // ensure correct failure message relates to config >@@ -100,46 +124,108 @@ > confidenceLevel |= Utils.DEV; > } > >+ String text = Utils.failureMessage(resultStats, false); >+ if (text == null) continue; > scenarioStatus.configStatus.put(configs[j], new Integer(confidenceLevel)); >- scenarioStatus.statusMap.put(configs[j], new Object[] { buffer.toString(), resultStats }); >+ scenarioStatus.statusMap.put(configs[j], buffer.toString()); >+ scenarioStatus.resultsMap.put(configs[j], text); >+ if (scenarioStatus.shortName == null) { >+ if (hasBaseline) { // baseline is OK >+ scenarioStatus.shortName = Utils.getScenarioShortName(scenarioName, -1); >+ } else { >+ StringBuffer shortName = new StringBuffer("*"); >+ shortName.append(Utils.getScenarioShortName(scenarioName, -1)); >+ shortName.append(" <small>(vs. "); >+ shortName.append(timeSeriesLabels[0]); >+ shortName.append(")</small>"); >+ scenarioStatus.shortName = shortName.toString(); >+ } >+ } >+ >+ if (!scenarioStatusList.contains(scenarioStatus)) { >+ scenarioStatusList.add(scenarioStatus); >+ } > } > } > > String label=null; >- htmlTable=htmlTable.concat("<br><h4>Scenario Status</h4>\n" + >- "The scenario status table shows all scenarios tests result for all performance test machines. It gives a complete but compact view of performance result for the component.<br>\n" + >- "For each test (ie. in each cell of this table), following information are displayed:\n" + >- "<ul>\n" + >- "<li>an icon showing whether the test fails or passes and whether it's reliable or not.<br>\n" + >- "The legend for this icon is:\n" + >- "<ul>\n" + >- "<li>Green (<img src=\""+Utils.OK_IMAGE+"\">): mark a <b>successful result</b>, which means this test has neither significant performance regression nor significant standard error</li>\n" + >- "<li>Red (<img src=\""+Utils.FAIL_IMAGE+"\">): mark a <b>failing result</b>, which means this test shows a significant performance regression (more than 10%)</li>\n" + >- "<li>Gray (<img src=\""+Utils.FAIL_IMAGE_EXPLAINED+"\">): mark a <b>failing result</b> (see above) with a comment explaining this degradation.</li>\n" + >- "<li>Yellow (<img src=\""+Utils.FAIL_IMAGE_WARN+"\"> or <img src=\""+Utils.OK_IMAGE_WARN+"\">): mark a <b>failing or successful result</b> with a significant standard error (more than "+Utils.STANDARD_ERROR_THRESHOLD_STRING+")</li>\n" + >- "<li>\"n/a\": mark a test for with <b>no</b> performance results</li>\n" + >- "</ul></li>\n" + >- "<li>the value of the deviation from the baseline as a percentage (ie. formula is: <code>(build_test_time - baseline_test_time) / baseline_test_time</code>)</li>\n" + >- "<li>the value of the standard error of this deviation as a percentage (ie. formula is: <code>sqrt(build_test_stddev^2 / N + baseline_test_stddev^2 / N) / baseline_test_time</code>)<br>\n" + >- "Note that errors equal to 0 are not shown (tests which have only one iteration).</li>\n" + >- "</ul>" + >- "For failing tests, value of deviation with its standard error is added at the beginning of the error message you can see flying over the corresponding image.<br>\n" + >- "Follow the link on test box corresponding image for detailed results.<br>" + >- "<br>\n"); >+ stream.println("<br><h4>Scenario Status</h4>"); >+ stream.println("The scenario status table shows all scenarios tests result for all performance test machines."); >+ stream.println("It gives a complete but compact view of performance result for the component.<br>"); >+ stream.println("For each test (ie. in each cell of this table), following information are displayed:"); >+ stream.println("<ul>"); >+ stream.println("<li>an icon showing whether the test fails or passes and whether it's reliable or not.<br>"); >+ stream.println("The legend for this icon is:"); >+ stream.println("<ul>"); >+ stream.print("<li>Green (<img src=\""); >+ stream.print(Utils.OK_IMAGE); >+ stream.print("\">): mark a <b>successful result</b>, which means this test has neither significant performance regression nor significant standard error</li>"); >+ stream.print("<li>Red (<img src=\""); >+ stream.print(Utils.FAIL_IMAGE); >+ stream.println("\">): mark a <b>failing result</b>, which means this test shows a significant performance regression (more than 10%)</li>"); >+ stream.print("<li>Gray (<img src=\""); >+ stream.print(Utils.FAIL_IMAGE_EXPLAINED); >+ stream.println("\">): mark a <b>failing result</b> (see above) with a comment explaining this degradation.</li>"); >+ stream.print("<li>Yellow (<img src=\""); >+ stream.print(Utils.FAIL_IMAGE_WARN); >+ stream.print("\"> or <img src=\""); >+ stream.print(Utils.OK_IMAGE_WARN); >+ stream.print("\">): mark a <b>failing or successful result</b> with a significant standard error (more than "); >+ stream.print(Utils.STANDARD_ERROR_THRESHOLD_STRING); >+ stream.println(")</li>"); >+ stream.println("<li>\"n/a\": mark a test for with <b>no</b> performance results</li>"); >+ stream.println("</ul></li>"); >+ stream.println("<li>the value of the deviation from the baseline as a percentage (ie. formula is: <code>(build_test_time - baseline_test_time) / baseline_test_time</code>)<br>"); >+ stream.println("This value may be '<font color=\"red\">[n/a]</font>' when deviation is not a number (<code>NaN</code>) or is infinite, typically when reference value is equals to 0!</li>"); >+ stream.println("<li>the value of the standard error of this deviation as a percentage (ie. formula is: <code>sqrt(build_test_stddev^2 / N + baseline_test_stddev^2 / N) / baseline_test_time</code>)<br>"); >+ stream.println("This value may be '<font color=\"#CCCC00\">[n/a]</font>' when error cannot be computed, typically when the test has only one measure!</li>"); >+ stream.println("</ul>"); >+ stream.println("<u>Hints</u>:<ul>"); >+ stream.println("<li>fly over image of failing tests to see the complete error message</li>"); >+ stream.println("<li>to look at the complete and detailed test results, click on its image</li>"); >+ stream.println("<li>scenario name may be <b>emphazised</b> when the results are also displayed in the fingerprint</li>"); >+ stream.println("<li>scenario name may start with an '*' when the scenario has no results in the last baseline run</li>"); >+ stream.println("</ul>"); >+ stream.println(); >+ stream.println("<table border=\"1\">"); >+ stream.println("<tr>"); >+ stream.print("<td><h4>All "); >+ stream.print(scenarios.length); >+ stream.println(" scenarios</h4></td>"); > >- htmlTable=htmlTable.concat("<table border=\"1\"><tr><td><h4>All "+scenarios.length+" scenarios</h4></td>\n"); > for (int i= 0; i < configNames.size(); i++){ >- label=configNames.get(i).toString(); >- String columnTitle=label; >+ label = configNames.get(i).toString(); >+ String columnTitle = label; > if (configMaps!=null) { > Utils.ConfigDescriptor configDescriptor= (Utils.ConfigDescriptor)configMaps.get(label); >- if (configDescriptor != null) >- columnTitle=configDescriptor.description; >+ if (configDescriptor != null) { >+ int idx = configDescriptor.description.indexOf('('); >+ if (idx < 0) { >+ columnTitle = configDescriptor.description; >+ } else { >+ // first line >+ StringTokenizer tokenizer = new StringTokenizer(configDescriptor.description.substring(0, idx).trim(), " "); >+ StringBuffer buffer = new StringBuffer(tokenizer.nextToken()); >+ while (tokenizer.hasMoreTokens()) { >+ buffer.append(" "); >+ buffer.append(tokenizer.nextToken()); >+ } >+ buffer.append(' '); >+ // second line >+ tokenizer = new StringTokenizer(configDescriptor.description.substring(idx).trim(), " "); >+ buffer.append(tokenizer.nextToken()); >+ while (tokenizer.hasMoreTokens()) { >+ buffer.append(" "); >+ buffer.append(tokenizer.nextToken()); >+ } >+ columnTitle = buffer.toString(); >+ } >+ } > } >- htmlTable=htmlTable.concat("<td><h5>"+columnTitle +"</h5></td>"); >+ stream.print("<td><h5>"); >+ stream.print(columnTitle); >+ stream.println("</h5>"); > } >- >- htmlTable=htmlTable.concat("</tr>\n"); > > // counter for js class Id's > int jsIdCount=0; >@@ -147,61 +233,63 @@ > > ScenarioStatus status=(ScenarioStatus)scenarioStatusList.get(j); > >- htmlTable=htmlTable.concat("<tr><td>"+status.name.substring(status.name.indexOf(".",status.name.indexOf(".test")+1)+1)+"</td>"); >+ stream.println("<tr>"); >+ stream.print("<td>"); >+ if (status.fingerprint) stream.print("<b>"); >+ if (!status.hasBaseline) stream.print("*"); >+// stream.print(status.name.substring(status.name.indexOf(".",status.name.indexOf(".test")+1)+1)); >+ stream.print(status.shortName); >+ if (!status.hasBaseline) stream.print("</i>"); >+ if (status.fingerprint) stream.print("</b>"); >+ stream.println(); > for (int i=0;i<configNames.size();i++){ >- String message=null; > String configName=configNames.get(i).toString(); > String aUrl=configName; >- double[] resultStats = null; >- if(status.statusMap.get(configName)!=null){ >- Object[] statusInfo = (Object[]) status.statusMap.get(configName); >- message = (String) statusInfo[0]; >- resultStats = (double[]) statusInfo[1]; >- } >- > if (status.statusMap.containsKey(configName)){ >+ String message = (String) status.statusMap.get(configName); > int confidence = ((Integer) status.configStatus.get(configName)).intValue(); >- String image = Utils.getImage(confidence, resultStats, status.hasSlowDownExplanation); >- StringBuffer html = new StringBuffer("\n<td><a "); >+ String image = Utils.getImage(confidence, status.hasSlowDownExplanation); >+ stream.print("<td><a "); > if ((confidence & Utils.DEV) == 0 || message.length() == 0){ > // write deviation with error in table when test pass >- html.append("href=\""); >- html.append(aUrl); >- html.append('/'); >- html.append(status.name.replace('#', '.').replace(':', '_').replace('\\', '_')); >- html.append(".html\">\n<img hspace=\"10\" border=\"0\" src=\""); >- html.append(image); >- html.append("\"/></a>"); >+ stream.print("href=\""); >+ stream.print(aUrl); >+ stream.print('/'); >+ stream.print(status.name.replace('#', '.').replace(':', '_').replace('\\', '_')); >+ stream.println(".html\">"); >+ stream.print("<img hspace=\"10\" border=\"0\" src=\""); >+ stream.print(image); >+ stream.println("\"/></a>"); > } else { > // create message with tooltip text including deviation with error plus failure message > jsIdCount+=1; >- html.append("class=\"tooltipSource\" onMouseover=\"show_element('toolTip"); >- html.append(jsIdCount); >- html.append("')\" onMouseout=\"hide_element('toolTip"); >- html.append(jsIdCount); >- html.append("')\" \nhref=\""); >- html.append(aUrl); >- html.append('/'); >- html.append(status.name.replace('#', '.').replace(':', '_').replace('\\', '_')); >- html.append(".html\">\n<img hspace=\"10\" border=\"0\" src=\""); >- html.append(image); >- html.append("\"/>\n<span class=\"hidden_tooltip\" id=\"toolTip"); >- html.append(jsIdCount); >- html.append("\">"); >- html.append(message); >- html.append("</span></a>"); >+ stream.print("class=\"tooltipSource\" onMouseover=\"show_element('toolTip"); >+ stream.print(jsIdCount); >+ stream.print("')\" onMouseout=\"hide_element('toolTip"); >+ stream.print(jsIdCount); >+ stream.print("')\" \nhref=\""); >+ stream.print(aUrl); >+ stream.print('/'); >+ stream.print(status.name.replace('#', '.').replace(':', '_').replace('\\', '_')); >+ stream.println(".html\">"); >+ stream.print("<img hspace=\"10\" border=\"0\" src=\""); >+ stream.print(image); >+ stream.println("\"/>"); >+ stream.print("<span class=\"hidden_tooltip\" id=\"toolTip"); >+ stream.print(jsIdCount); >+ stream.print("\">"); >+ stream.print(message); >+ stream.println("</span></a>"); > } >- html.append(Utils.failureMessage(resultStats, false)); >- html.append("</td>"); >- htmlTable=htmlTable.concat(html.toString()); >+ String results = (String) status.resultsMap.get(configName); >+ if (results != null) stream.println(results); > }else{ >- htmlTable=htmlTable.concat("<td>n/a</td>"); >+ stream.println("<td>n/a"); > } > } >+ stream.flush(); > } >- >- htmlTable=htmlTable.concat("</tr>\n"); >+ stream.println("</table>"); > } >- return htmlTable; >- } >+ } > } >Index: src/org/eclipse/test/performance/ui/FingerPrint.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/FingerPrint.java,v >retrieving revision 1.20 >diff -u -r1.20 FingerPrint.java >--- src/org/eclipse/test/performance/ui/FingerPrint.java 27 Apr 2007 19:07:44 -0000 1.20 >+++ src/org/eclipse/test/performance/ui/FingerPrint.java 1 Jun 2007 07:40:46 -0000 >@@ -19,17 +19,11 @@ > import java.util.Hashtable; > > import org.eclipse.swt.SWT; >-import org.eclipse.swt.events.PaintEvent; >-import org.eclipse.swt.events.PaintListener; > import org.eclipse.swt.graphics.GC; > import org.eclipse.swt.graphics.Image; > import org.eclipse.swt.graphics.ImageData; > import org.eclipse.swt.graphics.ImageLoader; >-import org.eclipse.swt.graphics.Point; >-import org.eclipse.swt.layout.FillLayout; >-import org.eclipse.swt.widgets.Canvas; > import org.eclipse.swt.widgets.Display; >-import org.eclipse.swt.widgets.Shell; > import org.eclipse.test.internal.performance.PerformanceTestPlugin; > import org.eclipse.test.internal.performance.data.Dim; > import org.eclipse.test.internal.performance.db.DB; >@@ -37,9 +31,6 @@ > import org.eclipse.test.internal.performance.db.SummaryEntry; > import org.eclipse.test.internal.performance.db.TimeSeries; > import org.eclipse.test.internal.performance.db.Variations; >-import org.eclipse.test.internal.performance.eval.StatisticsUtil; >-import org.eclipse.test.internal.performance.eval.StatisticsUtil.Percentile; >-import org.eclipse.test.performance.Dimension; > import org.eclipse.test.performance.ui.Utils.ConfigDescriptor; > > >@@ -74,17 +65,16 @@ > if (component==null){ > entries= DB.querySummaries(variations,null); > this.component=""; >- } >- else >+ } else { > entries=DB.querySummaries(variations,component+'%'); >- run(entries); >+ } >+ run(); > } > > /** > * Creates the fingerprint gif, image map and scenario status table for the component. >- * @param entries - the result of a database query for summaries for a specified variation. > */ >- public void run(Object[] entries) { >+ public void run() { > new File(outputDirectory).mkdirs(); > String referenceName=referenceBuildId; > String currentName=currentBuildId; >@@ -101,12 +91,12 @@ > > if (entries != null) { > for (int i= 0; i < entries.length; i++) { >- SummaryEntry se= (SummaryEntry)entries[i]; >- if (se.comment==null) >- add(bar, se.shortName, new Dim[] { se.dimension }, se.scenarioName); >+ SummaryEntry summary = entries[i]; >+ if (summary.comment==null) >+ add(summary.shortName, new Dim[] { summary.dimension }, summary.scenarioName); > else{ >- setComment(se.scenarioName, se.comment); >- add(bar, se.shortName, new Dim[] { se.dimension }, se.scenarioName,se.comment); >+ setComment(summary.scenarioName, summary.comment); >+ add(summary.shortName, new Dim[] { summary.dimension }, summary.scenarioName, summary.comment); > } > } > } >@@ -115,7 +105,7 @@ > > if (component=="") > outName= "FP_"+referenceName + '_' + currentBuildId+"."+configDescriptor.name; >- save(bar, outputDirectory + '/' + outName); >+ save(outputDirectory + '/' + outName); > > //show(bar); > >@@ -127,11 +117,11 @@ > scenarioComments.put(scenario,comment); > } > >- private void add(BarGraph bar, String name, Dim[] dims, String scenarioName) { >- add (bar,name,dims,scenarioName,null); >+ private void add(String name, Dim[] dims, String scenarioName) { >+ add (name,dims,scenarioName,null); > } > >- private void add(BarGraph bar, String name, Dim[] dims, String scenarioName,String comment) { >+ private void add(String name, Dim[] dims, String scenarioName, String comment) { > String refData= ""; > Scenario scenario= DB.getScenarioSeries(scenarioName, variations, PerformanceTestPlugin.BUILD, referenceBuildId, currentBuildId, dims); > String[] timeSeriesLabels= scenario.getTimeSeriesLabels(); >@@ -153,7 +143,8 @@ > double percent= 0.0; > boolean hasConfidentResult= true; > if (l > 1) { >- hasConfidentResult= Utils.hasConfidentResult(variations, scenario.getScenarioName(),referenceBuildId,configDescriptor.name); >+// hasConfidentResult= Utils.hasConfidentResult(variations, scenario.getScenarioName(),referenceBuildId,configDescriptor.name); >+ hasConfidentResult= Utils.hasConfidentResult(timeSeries); > /*if (!rejectNullHypothesis) { > NumberFormat percentFormatter= NumberFormat.getPercentInstance(); > String statisticsComment= "There is not enough evidence to reject the null hypothesis at the " + percentFormatter.format(percentile.inside()) + "level"; >@@ -178,7 +169,7 @@ > > } > >- private void save(BarGraph bar, String output) { >+ private void save(String output) { > > //if (bar.getFItems().size()==0) > //return; >@@ -217,7 +208,7 @@ > > /* > * Displays bar graph in window >- */ >+ * > private void show(final BarGraph bar) { > Display display= new Display(); > >@@ -246,4 +237,23 @@ > public String getOutName() { > return outName; > } >+ */ >+ >+ /** >+ * @return - an html representation of the fingerprint. >+ */ >+ public String getImageMap() { >+ String componentDescription = this.configDescriptor.description; >+ String areas = this.bar.getAreas(); >+ if (areas == null) >+ areas = ""; >+ String output = ""; >+ if (new File(this.outputDirectory, this.outName + ".gif").exists()) { >+ output = "<h4>" + componentDescription + "</h4>"; >+ output = output.concat("<img src=\"" + this.outName + ".gif\" usemap=\"#" + this.outName + "\">" + "<map name=\"" + this.outName + "\">" + areas + "</map>\n"); >+ } else { >+ output = output.concat("<br><br>There is no fingerprint for " + componentDescription + "<br><br>\n"); >+ } >+ return output; >+ } > } >Index: src/org/eclipse/test/performance/ui/ScenarioResults.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/ScenarioResults.java,v >retrieving revision 1.32 >diff -u -r1.32 ScenarioResults.java >--- src/org/eclipse/test/performance/ui/ScenarioResults.java 15 May 2007 19:23:10 -0000 1.32 >+++ src/org/eclipse/test/performance/ui/ScenarioResults.java 1 Jun 2007 07:40:47 -0000 >@@ -15,7 +15,6 @@ > import java.io.FileNotFoundException; > import java.io.FileOutputStream; > import java.io.PrintStream; >-import java.text.NumberFormat; > import java.util.ArrayList; > import java.util.HashMap; > import java.util.Hashtable; >@@ -48,7 +47,7 @@ > * > * @param scenarios - > * the array of Scenario objects for which to generate results. >- * @param reference - >+ * @param baseline - > * the reference build ID > * @param current - > * the current buildID >Index: src/org/eclipse/test/performance/ui/Main.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Main.java,v >retrieving revision 1.40 >diff -u -r1.40 Main.java >--- src/org/eclipse/test/performance/ui/Main.java 15 May 2007 19:23:10 -0000 1.40 >+++ src/org/eclipse/test/performance/ui/Main.java 1 Jun 2007 07:40:46 -0000 >@@ -25,6 +25,7 @@ > import org.eclipse.core.runtime.Platform; > > import org.eclipse.test.internal.performance.db.Scenario; >+import org.eclipse.test.internal.performance.db.SummaryEntry; > import org.eclipse.test.internal.performance.db.Variations; > import org.eclipse.test.performance.ui.Utils.ConfigDescriptor; > >@@ -48,14 +49,21 @@ > private Hashtable fingerPrints = new Hashtable(); > private Hashtable scenarioComments=new Hashtable(); > private Hashtable rawDataTables=new Hashtable(); >+ private boolean local = false; > > public Object run(Object args) throws Exception { > parse(args); > >- Enumeration configIds=configDescriptors.keys(); >- >- while (configIds.hasMoreElements()){ >- generate((ConfigDescriptor)configDescriptors.get(configIds.nextElement())); >+ if (this.local) { >+ int length = configNames.length; >+ for (int i=0; i<length; i++) { >+ generate((ConfigDescriptor)configDescriptors.get(configNames[i])); >+ } >+ } else { >+ Enumeration configIds=configDescriptors.keys(); >+ while (configIds.hasMoreElements()){ >+ generate((ConfigDescriptor)configDescriptors.get(configIds.nextElement())); >+ } > } > > Utils.printVariabilityTable(rawDataTables,output+"/cvsummary.html",configDescriptors); >@@ -87,36 +95,64 @@ > os.println(Utils.HTML_DEFAULT_CSS); > os.println("<body>"); > Hashtable fps = (Hashtable) fingerPrints.get(component); >- Enumeration configs = fps.keys(); > > int baselineUnderScoreIndex=baseline.indexOf("_"); > int currentUnderScoreIndex=currentBuildId.indexOf("_"); > > String baselineName=(baselineUnderScoreIndex!=-1)?baseline.substring(0, baseline.indexOf("_")):baseline; > String currentName=(currentUnderScoreIndex!=-1)?currentBuildId.substring(0, currentBuildId.indexOf("_")):currentBuildId; >- String title = "<h3>Performance of " + component + ": " >- + currentName + " relative to " >- + baselineName >- + "</h3>"; >- if (component.equals("global")) >- title = "<h3>Performance of " + currentName >- + " relative to " >- + baselineName >- + "</h3>"; >- os.println(title); >+ boolean isGlobal = component.equals("global"); >+ StringBuffer title = new StringBuffer("<h3>Performance of "); >+ if (!isGlobal) { >+ title.append(component); >+ title.append(": "); >+ } >+ title.append(currentName); >+ title.append(" relative to "); >+ title.append(baselineName); >+ title.append( "</h3>"); >+ os.println(title.toString()); > > //print the html representation of fingerprint for each config >+ Enumeration configs = fps.keys(); >+ SummaryEntry[] fpSummaries = null; > while (configs.hasMoreElements()) { > String config = configs.nextElement().toString(); >- FingerPrint fp = (FingerPrint) fps.get(config); >- os.println(Utils.getImageMap(fp)); >- } >- if (component != "") { >- //print the component scenario status table beneath the fingerprint >+ FingerPrint fingerPrint = (FingerPrint) fps.get(config); >+ os.println(fingerPrint.getImageMap()); >+ if (fpSummaries == null) { >+ fpSummaries = fingerPrint.entries; >+ } >+ } >+ if (isGlobal) { >+ if (this.local) { >+ os.println("<table border=0 cellpadding=2 cellspacing=5 width=\"100%\">"); >+ os.println("<tbody><tr> <td colspan=3 align=\"left\" bgcolor=\"#0080c0\" valign=\"top\"><b><font color=\"#ffffff\" face=\"Arial,Helvetica\">"); >+ os.println("Detailed performance data grouped by scenario prefix</font></b></td></tr></tbody></table>"); >+ os.println("<a href=\"org.eclipse.ant.php?\">org.eclipse.ant*</a><br>"); >+ os.println("<a href=\"org.eclipse.compare.php?\">org.eclipse.compare*</a><br>"); >+ os.println("<a href=\"org.eclipse.core.php?\">org.eclipse.core*</a><br>"); >+ os.println("<a href=\"org.eclipse.help.php?\">org.eclipse.help*</a><br>"); >+ os.println("<a href=\"org.eclipse.jdt.core.php?\">org.eclipse.jdt.core*</a><br>"); >+ os.println("<a href=\"org.eclipse.jdt.debug.php?\">org.eclipse.jdt.debug*</a><br>"); >+ os.println("<a href=\"org.eclipse.jdt.text.php?\">org.eclipse.jdt.text*</a><br>"); >+ os.println("<a href=\"org.eclipse.jdt.ui.php?\">org.eclipse.jdt.ui*</a><br>"); >+ os.println("<a href=\"org.eclipse.jface.php?\">org.eclipse.jface*</a><br>"); >+ os.println("<a href=\"org.eclipse.osgi.php?\">org.eclipse.osgi*</a><br>"); >+ os.println("<a href=\"org.eclipse.pde.ui.php?\">org.eclipse.pde.ui*</a><br>"); >+ os.println("<a href=\"org.eclipse.swt.php?\">org.eclipse.swt*</a><br>"); >+ os.println("<a href=\"org.eclipse.team.php?\">org.eclipse.team*</a><br>"); >+ os.println("<a href=\"org.eclipse.ua.php?\">org.eclipse.ua*</a><br>"); >+ os.println("<a href=\"org.eclipse.ui.php?\">org.eclipse.ui*</a><br><p><br><br>"); >+ } >+ } else if (component.length() > 0) { >+ // print the component scenario status table beneath the fingerprint > variations.put("config", "%"); >- ScenarioStatusTable sst = new ScenarioStatusTable(variations, component + "%", configDescriptors,scenarioComments, baseline); >-// ScenarioStatusTable sst = new ScenarioStatusTable(variations, this.scenarioFilter, configDescriptors,scenarioComments, baseline); >- os.println(sst.toString()); >+ boolean filter = this.local && this.scenarioFilter != null; // use scenario filter to minimize DB requests while testing... >+ ScenarioStatusTable sst = filter >+ ? new ScenarioStatusTable(variations, this.scenarioFilter, configDescriptors,scenarioComments, fpSummaries, baseline) >+ : new ScenarioStatusTable(variations, component + "%", configDescriptors,scenarioComments, fpSummaries, baseline); >+ sst.print(os, filter); > } > > os.println(Utils.HTML_CLOSE); >@@ -292,8 +328,7 @@ > System.out.println("Missing value for -config.properties parameter"); > printUsage(); > } >- configDescriptors = Utils >- .getConfigDescriptors(configProperties); >+ configDescriptors = Utils.getConfigDescriptors(configProperties); > i++; > continue; > } >@@ -318,6 +353,11 @@ > i++; > continue; > } >+ if (arg.equals("-local")) { >+ this.local = true; >+ i++; >+ continue; >+ } > > i++; > } >Index: src/org/eclipse/test/performance/ui/messages.properties >=================================================================== >RCS file: src/org/eclipse/test/performance/ui/messages.properties >diff -N src/org/eclipse/test/performance/ui/messages.properties >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/test/performance/ui/messages.properties 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,14 @@ >+############################################################################### >+# Copyright (c) 2000, 2007 IBM Corporation and others. >+# All rights reserved. This program and the accompanying materials >+# are made available under the terms of the Eclipse Public License v1.0 >+# which accompanies this distribution, and is available at >+# http://www.eclipse.org/legal/epl-v10.html >+# >+# Contributors: >+# IBM Corporation - initial API and implementation >+############################################################################### >+ >+### Performance Tests Messages. >+ >+standardError = Standard error on this test is {0} (should be less than {1} to become reliable!) >Index: src/org/eclipse/test/performance/ui/Messages.java >=================================================================== >RCS file: src/org/eclipse/test/performance/ui/Messages.java >diff -N src/org/eclipse/test/performance/ui/Messages.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/test/performance/ui/Messages.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,75 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2007 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.test.performance.ui; >+ >+import java.text.MessageFormat; >+ >+import org.eclipse.osgi.util.NLS; >+ >+public class Messages extends NLS { >+ >+ private static final String BUNDLE_NAME = "org.eclipse.test.performance.ui.messages";//$NON-NLS-1$ >+ >+ private Messages() { >+ // Do not instantiate >+ } >+ >+ public static String standardError; >+ >+ static { >+ NLS.initializeMessages(BUNDLE_NAME, Messages.class); >+ } >+ >+ /** >+ * Bind the given message's substitution locations with the given string values. >+ * >+ * @param message the message to be manipulated >+ * @return the manipulated String >+ */ >+ public static String bind(String message) { >+ return bind(message, null); >+ } >+ >+ /** >+ * Bind the given message's substitution locations with the given string values. >+ * >+ * @param message the message to be manipulated >+ * @param binding the object to be inserted into the message >+ * @return the manipulated String >+ */ >+ public static String bind(String message, Object binding) { >+ return bind(message, new Object[] {binding}); >+ } >+ >+ /** >+ * Bind the given message's substitution locations with the given string values. >+ * >+ * @param message the message to be manipulated >+ * @param binding1 An object to be inserted into the message >+ * @param binding2 A second object to be inserted into the message >+ * @return the manipulated String >+ */ >+ public static String bind(String message, Object binding1, Object binding2) { >+ return bind(message, new Object[] {binding1, binding2}); >+ } >+ >+ /** >+ * Bind the given message's substitution locations with the given string values. >+ * >+ * @param message the message to be manipulated >+ * @param bindings An array of objects to be inserted into the message >+ * @return the manipulated String >+ */ >+ public static String bind(String message, Object[] bindings) { >+ return MessageFormat.format(message, bindings); >+ } >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 185580
:
65941
|
65944
|
66443
|
67299
|
67300
|
69335
|
69336
|
69354
|
69557
|
69664
|
69665
|
69708
|
69726
|
69728
|
70131
|
70174