Changeset 10674 in josm for trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java
- Timestamp:
- 2016-07-29T22:15:28+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java
r10222 r10674 104 104 data.generateDataSet(); 105 105 CssGenerator css = new CssGenerator(data).addKeyValueRules(TEST_RULE_COUNT); 106 runTest(data, css, "only key=value rules" , false);106 runTest(data, css, "only key=value rules"); 107 107 } 108 108 … … 115 115 data.generateDataSet(); 116 116 CssGenerator css = new CssGenerator(data).addHasKeyRules(TEST_RULE_COUNT); 117 runTest(data, css, "only has key rules" , false);117 runTest(data, css, "only has key rules"); 118 118 } 119 119 … … 126 126 data.generateDataSet(); 127 127 CssGenerator css = new CssGenerator(data).addKeyRegexpRules(TEST_RULE_COUNT); 128 runTest(data, css, "regular expressions" , true);128 runTest(data, css, "regular expressions"); 129 129 } 130 130 … … 137 137 data.generateDataSet(); 138 138 CssGenerator css = new CssGenerator(data).addIsTrueRules(TEST_RULE_COUNT); 139 runTest(data, css, "is true" , false);139 runTest(data, css, "is true"); 140 140 } 141 141 142 private void runTest(KeyValueDataGenerator data, CssGenerator css, String description , boolean measurementPlotsPlugin) {142 private void runTest(KeyValueDataGenerator data, CssGenerator css, String description) { 143 143 MapCSSStyleSource source = new MapCSSStyleSource(css.getCss()); 144 144 PerformanceTestTimer timer = PerformanceTestUtils.startTimer("MapCSSStyleSource#loadStyleSource(...) for " + description); … … 146 146 timer.done(); 147 147 148 if (measurementPlotsPlugin) { 149 timer = PerformanceTestUtils.startTimer(description); 150 timer.setMeasurementPlotsPluginOutput(true); 151 } else { 152 timer = PerformanceTestUtils.startTimer(APPLY_CALLS + "x MapCSSStyleSource#apply(...) for " + description); 153 } 148 timer = PerformanceTestUtils.startTimer(APPLY_CALLS + "x MapCSSStyleSource#apply(...) for " + description); 154 149 for (int i = 0; i < APPLY_CALLS; i++) { 155 150 MultiCascade mc = new MultiCascade();
Note:
See TracChangeset
for help on using the changeset viewer.