Changeset 9771 in josm for trunk/test/performance/org/openstreetmap/josm/gui
- Timestamp:
- 2016-02-09T18:58:37+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java
r9458 r9771 101 101 data.generateDataSet(); 102 102 CssGenerator css = new CssGenerator(data).addKeyValueRules(TEST_RULE_COUNT); 103 runTest(data, css, "only key=value rules"); 103 runTest(data, css, "only key=value rules", false); 104 104 } 105 105 … … 112 112 data.generateDataSet(); 113 113 CssGenerator css = new CssGenerator(data).addHasKeyRules(TEST_RULE_COUNT); 114 runTest(data, css, "only has key rules"); 114 runTest(data, css, "only has key rules", false); 115 115 } 116 116 … … 123 123 data.generateDataSet(); 124 124 CssGenerator css = new CssGenerator(data).addKeyRegexpRules(TEST_RULE_COUNT); 125 runTest(data, css, "regular expressions"); 125 runTest(data, css, "regular expressions", true); 126 126 } 127 127 … … 134 134 data.generateDataSet(); 135 135 CssGenerator css = new CssGenerator(data).addIsTrueRules(TEST_RULE_COUNT); 136 runTest(data, css, "is true"); 136 runTest(data, css, "is true", false); 137 137 } 138 138 139 private void runTest(KeyValueDataGenerator data, CssGenerator css, String description) { 139 private void runTest(KeyValueDataGenerator data, CssGenerator css, String description, boolean measurementPlotsPlugin) { 140 140 MapCSSStyleSource source = new MapCSSStyleSource(css.getCss()); 141 141 PerformanceTestTimer timer = PerformanceTestUtils.startTimer("MapCSSStyleSource#loadStyleSource(...) for " + description); … … 143 143 timer.done(); 144 144 145 timer = PerformanceTestUtils.startTimer(APPLY_CALLS + "x MapCSSStyleSource#apply(...) for " + description); 145 if (measurementPlotsPlugin) { 146 timer = PerformanceTestUtils.startTimer(description); 147 timer.setMeasurementPlotsPluginOutput(true); 148 } else { 149 timer = PerformanceTestUtils.startTimer(APPLY_CALLS + "x MapCSSStyleSource#apply(...) for " + description); 150 } 146 151 for (int i = 0; i < APPLY_CALLS; i++) { 147 152 MultiCascade mc = new MultiCascade();
Note:
See TracChangeset
for help on using the changeset viewer.