Changeset 8632 in josm for trunk/test/performance/org


Ignore:
Timestamp:
2015-08-01T17:54:08+02:00 (9 years ago)
Author:
Don-vip
Message:

update Checkstyle to 6.8.1, update Eclipse project, fix checkstyle issues

Location:
trunk/test/performance/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/performance/org/openstreetmap/josm/PerformanceTestUtils.java

    r8623 r8632  
    66 * @author Michael Zangl
    77 */
    8 public class PerformanceTestUtils {
     8public final class PerformanceTestUtils {
    99    /**
    1010     * A timer that measures the time from it's creation to the {@link #done()} call.
    11     * @author Michael Zangl
     11     * @author Michael Zangl
    1212     */
    1313    public static class PerformanceTestTimer {
  • trunk/test/performance/org/openstreetmap/josm/data/osm/KeyValuePerformanceTest.java

    r8623 r8632  
    2626    private static final int TEST_STRING_COUNT = 10000;
    2727    private static final int STRING_INTERN_TESTS = 5000000;
    28     private static final double[] TAG_NODE_RATIOS = new double[] { .05, .3, 3, 20, 200 };
     28    private static final double[] TAG_NODE_RATIOS = new double[] {.05, .3, 3, 20, 200};
    2929    private ArrayList<String> testStrings = new ArrayList<>();
    3030    private Random random;
  • trunk/test/performance/org/openstreetmap/josm/data/osm/OsmDataGenerator.java

    r8623 r8632  
    1414 * @author Michael Zangl
    1515 */
    16 public class OsmDataGenerator {
     16public final class OsmDataGenerator {
    1717    private static final int DEFAULT_KEY_VALUE_RATIO = 3;
    1818    private static final int DEFAULT_NODE_COUNT = 1000;
    1919    private static final String DATA_DIR = "data_nodist" + File.separator + "osmfiles";
    2020
     21    private OsmDataGenerator() {
     22        // private constructor for utility classes
     23    }
     24
    2125    /**
    2226     * A generator that generates test data by filling a data set.
    2327     * @author Michael Zangl
    2428     */
    25     public static abstract class DataGenerator {
     29    public abstract static class DataGenerator {
    2630        private String datasetName;
    2731        protected final Random random;
     
    5761        /**
    5862         * Create a random node and add it to the dataset.
    59          * @return
     63         * @return a random node
    6064         */
    6165        protected Node createRandomNode(DataSet ds) {
     
    9498    /**
    9599     * A data generator that generates a bunch of random nodes.
    96     * @author Michael Zangl
     100     * @author Michael Zangl
    97101     */
    98102    public static class NodeDataGenerator extends DataGenerator {
     
    100104        private final int nodeCount;
    101105
    102         private NodeDataGenerator(String datasetName, int nodeCount) {
     106        protected NodeDataGenerator(String datasetName, int nodeCount) {
    103107            super(datasetName);
    104108            this.nodeCount = nodeCount;
     
    124128    /**
    125129     * A data generator that generates a bunch of random nodes and fills them with keys/values.
    126     * @author Michael Zangl
    127      */
    128     public static class KeyValueDataGenerator extends NodeDataGenerator {
     130     * @author Michael Zangl
     131     */
     132    public static final class KeyValueDataGenerator extends NodeDataGenerator {
    129133
    130134        private static final int VALUE_COUNT = 200;
Note: See TracChangeset for help on using the changeset viewer.