From 61fd934754a2f5afde8785d4cfb1390b8ad7deee Mon Sep 17 00:00:00 2001
From: Michael Zangl <michael.zangl@student.kit.edu>
Date: Mon, 20 Jul 2015 14:56:33 +0200
Subject: [PATCH 3/4] Added count of apply calls to output.
---
.../josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java b/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java
index 8b28279..e828005 100644
|
a
|
b
|
public class MapCSSStyleSourceFilterTest {
|
| 60 | 60 | public CssGenerator addIsTrueRules(int count) { |
| 61 | 61 | for (int i = 0; i < count; i++) { |
| 62 | 62 | String key = generator.randomKey(); |
| 63 | | // TODO |
| 64 | 63 | addRule("node[\"" + key + "\"?]"); |
| 65 | 64 | } |
| 66 | 65 | return this; |
| … |
… |
public class MapCSSStyleSourceFilterTest {
|
| 75 | 74 | } |
| 76 | 75 | } |
| 77 | 76 | |
| 78 | | private static final int APPLY_CALLS = 1000000; |
| | 77 | private static final int APPLY_CALLS = 100000; |
| 79 | 78 | |
| 80 | 79 | /** |
| 81 | 80 | * Prepare the test. |
| … |
… |
public class MapCSSStyleSourceFilterTest {
|
| 135 | 134 | source.loadStyleSource(); |
| 136 | 135 | timer.done(); |
| 137 | 136 | |
| 138 | | timer = PerformanceTestUtils.startTimer("MapCSSStyleSource#apply(...) for " + description); |
| | 137 | timer = PerformanceTestUtils.startTimer(APPLY_CALLS + "x MapCSSStyleSource#apply(...) for " + description); |
| 139 | 138 | for (int i = 0; i < APPLY_CALLS; i++) { |
| 140 | 139 | MultiCascade mc = new MultiCascade(); |
| 141 | 140 | source.apply(mc, data.randomNode(), 1, false); |