Index: trunk/src/org/openstreetmap/josm/data/validation/ValidationTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/ValidationTask.java	(revision 17616)
+++ trunk/src/org/openstreetmap/josm/data/validation/ValidationTask.java	(revision 17617)
@@ -8,4 +8,6 @@
 import org.openstreetmap.josm.gui.PleaseWaitRunnable;
 import org.openstreetmap.josm.gui.layer.ValidatorLayer;
+import org.openstreetmap.josm.gui.progress.ProgressMonitor;
+import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
 import org.openstreetmap.josm.gui.util.GuiHelper;
 
@@ -36,5 +38,12 @@
                           Collection<OsmPrimitive> validatedPrimitives,
                           Collection<OsmPrimitive> formerValidatedPrimitives) {
-        super(tr("Validating"), false /*don't ignore exceptions */);
+        this(new PleaseWaitProgressMonitor(tr("Validating")), tests, validatedPrimitives, formerValidatedPrimitives);
+    }
+
+    protected ValidationTask(ProgressMonitor progressMonitor,
+                             Collection<Test> tests,
+                             Collection<OsmPrimitive> validatedPrimitives,
+                             Collection<OsmPrimitive> formerValidatedPrimitives) {
+        super(tr("Validating"), progressMonitor, false /*don't ignore exceptions */);
         this.validatedPrimitives = validatedPrimitives;
         this.formerValidatedPrimitives = formerValidatedPrimitives;
@@ -94,3 +103,11 @@
         }
     }
+
+    /**
+     * Gets the validation errors accumulated until this moment.
+     * @return The list of errors
+     */
+    public List<TestError> getErrors() {
+        return errors;
+    }
 }
Index: trunk/test/performance/org/openstreetmap/josm/PerformanceTestUtils.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/PerformanceTestUtils.java	(revision 17616)
+++ trunk/test/performance/org/openstreetmap/josm/PerformanceTestUtils.java	(revision 17617)
@@ -37,5 +37,7 @@
     public static DataSet getNeubrandenburgDataSet() throws IOException, IllegalDataException {
         try (InputStream in = Compression.getUncompressedFileInputStream(new File(DATA_FILE))) {
-            return OsmReader.parseDataSet(in, NullProgressMonitor.INSTANCE);
+            DataSet dataSet = OsmReader.parseDataSet(in, NullProgressMonitor.INSTANCE);
+            dataSet.setName(DATA_FILE);
+            return dataSet;
         }
     }
Index: trunk/test/performance/org/openstreetmap/josm/data/validation/ValidationTaskPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/data/validation/ValidationTaskPerformanceTest.java	(revision 17617)
+++ trunk/test/performance/org/openstreetmap/josm/data/validation/ValidationTaskPerformanceTest.java	(revision 17617)
@@ -0,0 +1,67 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.data.validation;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.PerformanceTestUtils;
+import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.validation.tests.ApiCapabilitiesTest;
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.gui.layer.OsmDataLayer;
+import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+/**
+ * Performance test of {@code ValidationTask}.
+ */
+class ValidationTaskPerformanceTest {
+
+    private List<org.openstreetmap.josm.data.validation.Test> tests;
+
+    /**
+     * Setup test.
+     */
+    @RegisterExtension
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules test = new JOSMTestRules().projection().territories().preferences();
+
+    /**
+     * Setup test.
+     *
+     * @throws Exception if any error occurs
+     */
+    @BeforeEach
+    void setUp() throws Exception {
+        tests = OsmValidator.getTests().stream().filter(test -> !(test instanceof ApiCapabilitiesTest)).collect(Collectors.toList());
+        OsmValidator.initialize();
+        OsmValidator.initializeTests(tests);
+
+        DataSet dataSet = PerformanceTestUtils.getNeubrandenburgDataSet();
+        // some tests obtain the active dataset
+        MainApplication.getLayerManager().addLayer(new OsmDataLayer(dataSet, dataSet.getName(), null));
+    }
+
+    /**
+     * Runs the validation task on a test dataset.
+     */
+    @Test
+    void test() {
+        DataSet dataSet = MainApplication.getLayerManager().getActiveDataSet();
+        Collection<OsmPrimitive> primitives = dataSet.allPrimitives();
+
+        PerformanceTestUtils.runPerformanceTest("ValidationTask#realRun on " + dataSet.getName(), () -> {
+            ValidationTask validationTask = new ValidationTask(NullProgressMonitor.INSTANCE, tests, primitives, primitives);
+            validationTask.realRun();
+            assertTrue(validationTask.getErrors().size() > 3000);
+        });
+    }
+}
Index: trunk/test/performance/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerPerformanceTest.java	(revision 17616)
+++ trunk/test/performance/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerPerformanceTest.java	(revision 17617)
@@ -39,5 +39,6 @@
     @Test
     void testCity() {
-        tagChecker.visit(dsCity.allPrimitives());
+        PerformanceTestUtils.runPerformanceTest("MapCSSTagChecker on " + dsCity.getName(),
+                () -> tagChecker.visit(dsCity.allPrimitives()));
     }
 }
