Changeset 9786 in josm for trunk/test/performance/org/openstreetmap
- Timestamp:
- 2016-02-11T23:37:07+01:00 (9 years ago)
- Location:
- trunk/test/performance/org/openstreetmap/josm
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/performance/org/openstreetmap/josm/PerformanceTestUtils.java
r9773 r9786 3 3 4 4 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 5 6 import org.openstreetmap.josm.io.XmlWriter; 5 7 6 8 /** … … 14 16 */ 15 17 public static class PerformanceTestTimer { 16 private String name;17 private long time;18 private final String name; 19 private final long time; 18 20 private boolean measurementPlotsPlugin = false; 19 21 … … 37 39 long dTime = (System.nanoTime() - time) / 1000000; 38 40 if (measurementPlotsPlugin) { 39 System.out.println(String.format("<measurement><name>%s (ms)</name><value>%.1f</value></measurement>", name, (double) dTime));41 measurementPlotsPluginOutput(name + "(ms)", dTime); 40 42 } else { 41 43 System.out.println("TIMER " + name + ": " + dTime + "ms"); … … 58 60 return new PerformanceTestTimer(name); 59 61 } 62 63 /** 64 * Emit one data value for the Jenkins Measurement Plots Plugin. 65 * 66 * The plugin collects the values over multiple builds and plots them in a diagram. 67 * 68 * @see https://wiki.jenkins-ci.org/display/JENKINS/Measurement+Plots+Plugin 69 * @param name the name / title of the measurement 70 * @param value the value 71 */ 72 public static void measurementPlotsPluginOutput(String name, double value) { 73 System.out.println("<measurement><name>"+XmlWriter.encode(name)+"</name><value>"+value+"</value></measurement>"); 74 } 60 75 }
Note:
See TracChangeset
for help on using the changeset viewer.