Changeset 18870 in josm for trunk/test/performance/org
- Timestamp:
- 2023-10-16T15:19:07+02:00 (15 months ago)
- Location:
- trunk/test/performance/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/performance/org/openstreetmap/josm/data/osm/KeyValuePerformanceTest.java
r18690 r18870 17 17 import org.junit.jupiter.api.Test; 18 18 import org.junit.jupiter.api.Timeout; 19 import org.junit.jupiter.api.extension.RegisterExtension;20 19 import org.openstreetmap.josm.PerformanceTestUtils; 21 20 import org.openstreetmap.josm.PerformanceTestUtils.PerformanceTestTimer; 22 21 import org.openstreetmap.josm.data.osm.OsmDataGenerator.KeyValueDataGenerator; 23 import org.openstreetmap.josm.testutils. JOSMTestRules;22 import org.openstreetmap.josm.testutils.annotations.Projection; 24 23 25 24 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 29 28 * @author Michael Zangl 30 29 */ 30 @Projection 31 31 @Timeout(value = 15, unit = TimeUnit.MINUTES) 32 32 class KeyValuePerformanceTest { … … 40 40 41 41 /** 42 * Prepare the test.43 */44 @RegisterExtension45 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")46 public JOSMTestRules test = new JOSMTestRules().projection();47 48 /**49 42 * See if there is a big difference between Strings that are interned and those that are not. 50 43 */ -
trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRendererPerformanceTestParent.java
r18690 r18870 17 17 import org.junit.jupiter.api.Test; 18 18 import org.junit.jupiter.api.Timeout; 19 import org.openstreetmap.josm.JOSMFixture;20 19 import org.openstreetmap.josm.PerformanceTestUtils; 21 20 import org.openstreetmap.josm.data.Bounds; … … 25 24 import org.openstreetmap.josm.io.Compression; 26 25 import org.openstreetmap.josm.io.OsmReader; 26 import org.openstreetmap.josm.testutils.annotations.Projection; 27 import org.openstreetmap.josm.testutils.annotations.Territories; 27 28 28 29 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 31 32 * Abstract superclass of {@code StyledMapRendererPerformanceTest} and {@code WireframeMapRendererPerformanceTest}. 32 33 */ 34 @Projection 35 @Territories 33 36 @Timeout(value = 15, unit = TimeUnit.MINUTES) 34 37 abstract class AbstractMapRendererPerformanceTestParent { … … 49 52 50 53 protected static void load() throws Exception { 51 JOSMFixture.createPerformanceTestFixture().init(true);52 54 img = new BufferedImage(IMG_WIDTH, IMG_HEIGHT, BufferedImage.TYPE_INT_ARGB); 53 55 g = (Graphics2D) img.getGraphics(); -
trunk/test/performance/org/openstreetmap/josm/gui/mappaint/MapRendererPerformanceTest.java
r18690 r18870 19 19 import java.util.Locale; 20 20 import java.util.Map; 21 import java.util.concurrent.TimeUnit; 21 22 import java.util.stream.Collectors; 22 23 … … 26 27 import org.junit.jupiter.api.BeforeAll; 27 28 import org.junit.jupiter.api.Test; 28 import org.junit.jupiter.api.extension.RegisterExtension; 29 import org.openstreetmap.josm.JOSMFixture; 29 import org.junit.jupiter.api.Timeout; 30 30 import org.openstreetmap.josm.PerformanceTestUtils; 31 31 import org.openstreetmap.josm.TestUtils; … … 44 44 import org.openstreetmap.josm.gui.mappaint.mapcss.Selector; 45 45 import org.openstreetmap.josm.gui.mappaint.styleelement.StyleElement; 46 import org.openstreetmap.josm.testutils.JOSMTestRules; 46 import org.openstreetmap.josm.testutils.annotations.BasicPreferences; 47 import org.openstreetmap.josm.testutils.annotations.Main; 48 import org.openstreetmap.josm.testutils.annotations.Projection; 49 import org.openstreetmap.josm.testutils.annotations.Territories; 47 50 48 51 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 51 54 * Performance test of map renderer. 52 55 */ 56 @BasicPreferences 57 @Main 58 @Projection 59 @Territories 60 @Timeout(value = 15, unit = TimeUnit.MINUTES) 53 61 public class MapRendererPerformanceTest { 54 62 … … 82 90 83 91 /** 84 * Setup tests85 */86 @RegisterExtension87 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")88 public JOSMTestRules josmTestRules = new JOSMTestRules().main().projection().preferences().timeout(15 * 60 * 1000);89 90 /**91 92 * Initializes test environment. 92 93 * @throws Exception if any error occurs … … 94 95 @BeforeAll 95 96 public static void load() throws Exception { 96 JOSMFixture.createPerformanceTestFixture().init(true);97 98 97 img = new BufferedImage(IMG_WIDTH, IMG_HEIGHT, BufferedImage.TYPE_INT_ARGB); 99 98 g = (Graphics2D) img.getGraphics(); -
trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSPerformanceTest.java
r17615 r18870 11 11 12 12 import org.junit.jupiter.api.Test; 13 import org.junit.jupiter.api.BeforeAll;14 import org.openstreetmap.josm.JOSMFixture;15 13 import org.openstreetmap.josm.PerformanceTestUtils; 16 14 import org.openstreetmap.josm.data.Bounds; … … 22 20 import org.openstreetmap.josm.gui.mappaint.MapRendererPerformanceTest; 23 21 import org.openstreetmap.josm.io.IllegalDataException; 22 import org.openstreetmap.josm.testutils.annotations.Projection; 24 23 25 24 /** … … 28 27 * 29 28 */ 29 @Projection 30 30 class MapCSSPerformanceTest { 31 31 … … 46 46 "Please update configuration settings in the unit test file."); 47 47 } 48 }49 50 /**51 * Setup test.52 */53 @BeforeAll54 public static void createJOSMFixture() {55 JOSMFixture.createPerformanceTestFixture().init(true);56 48 } 57 49 -
trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java
r18690 r18870 4 4 import java.util.concurrent.TimeUnit; 5 5 6 import org.junit.jupiter.api.BeforeAll;7 6 import org.junit.jupiter.api.Test; 8 7 import org.junit.jupiter.api.Timeout; 9 import org.openstreetmap.josm.JOSMFixture;10 8 import org.openstreetmap.josm.PerformanceTestUtils; 11 9 import org.openstreetmap.josm.PerformanceTestUtils.PerformanceTestTimer; … … 13 11 import org.openstreetmap.josm.data.osm.OsmDataGenerator.KeyValueDataGenerator; 14 12 import org.openstreetmap.josm.gui.mappaint.MultiCascade; 13 import org.openstreetmap.josm.testutils.annotations.Projection; 15 14 16 15 /** … … 18 17 * @author Michael Zangl 19 18 */ 19 @Projection 20 20 @Timeout(value = 15, unit = TimeUnit.MINUTES) 21 21 class MapCSSStyleSourceFilterTest { … … 82 82 83 83 /** 84 * Prepare the test.85 */86 @BeforeAll87 public static void createJOSMFixture() {88 JOSMFixture.createPerformanceTestFixture().init(true);89 }90 91 /**92 84 * Time how long it takes to evaluate [key=value] rules 93 85 */
Note:
See TracChangeset
for help on using the changeset viewer.