Ignore:
Timestamp:
2016-02-09T18:58:37+01:00 (6 years ago)
Author:
bastiK
Message:

add test output for the Jenkins Measurement Plots Plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java

    r9458 r9771  
    101101        data.generateDataSet();
    102102        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);
    104104    }
    105105
     
    112112        data.generateDataSet();
    113113        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);
    115115    }
    116116
     
    123123        data.generateDataSet();
    124124        CssGenerator css = new CssGenerator(data).addKeyRegexpRules(TEST_RULE_COUNT);
    125         runTest(data, css, "regular expressions");
     125        runTest(data, css, "regular expressions", true);
    126126    }
    127127
     
    134134        data.generateDataSet();
    135135        CssGenerator css = new CssGenerator(data).addIsTrueRules(TEST_RULE_COUNT);
    136         runTest(data, css, "is true");
     136        runTest(data, css, "is true", false);
    137137    }
    138138
    139     private void runTest(KeyValueDataGenerator data, CssGenerator css, String description) {
     139    private void runTest(KeyValueDataGenerator data, CssGenerator css, String description, boolean measurementPlotsPlugin) {
    140140        MapCSSStyleSource source = new MapCSSStyleSource(css.getCss());
    141141        PerformanceTestTimer timer = PerformanceTestUtils.startTimer("MapCSSStyleSource#loadStyleSource(...) for " + description);
     
    143143        timer.done();
    144144
    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        }
    146151        for (int i = 0; i < APPLY_CALLS; i++) {
    147152            MultiCascade mc = new MultiCascade();
Note: See TracChangeset for help on using the changeset viewer.