Changeset 8632 in josm for trunk/test/performance/org
- Timestamp:
- 2015-08-01T17:54:08+02:00 (9 years ago)
- Location:
- trunk/test/performance/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/performance/org/openstreetmap/josm/PerformanceTestUtils.java
r8623 r8632 6 6 * @author Michael Zangl 7 7 */ 8 public class PerformanceTestUtils {8 public final class PerformanceTestUtils { 9 9 /** 10 10 * A timer that measures the time from it's creation to the {@link #done()} call. 11 * @author Michael Zangl11 * @author Michael Zangl 12 12 */ 13 13 public static class PerformanceTestTimer { -
trunk/test/performance/org/openstreetmap/josm/data/osm/KeyValuePerformanceTest.java
r8623 r8632 26 26 private static final int TEST_STRING_COUNT = 10000; 27 27 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}; 29 29 private ArrayList<String> testStrings = new ArrayList<>(); 30 30 private Random random; -
trunk/test/performance/org/openstreetmap/josm/data/osm/OsmDataGenerator.java
r8623 r8632 14 14 * @author Michael Zangl 15 15 */ 16 public class OsmDataGenerator {16 public final class OsmDataGenerator { 17 17 private static final int DEFAULT_KEY_VALUE_RATIO = 3; 18 18 private static final int DEFAULT_NODE_COUNT = 1000; 19 19 private static final String DATA_DIR = "data_nodist" + File.separator + "osmfiles"; 20 20 21 private OsmDataGenerator() { 22 // private constructor for utility classes 23 } 24 21 25 /** 22 26 * A generator that generates test data by filling a data set. 23 27 * @author Michael Zangl 24 28 */ 25 public static abstractclass DataGenerator {29 public abstract static class DataGenerator { 26 30 private String datasetName; 27 31 protected final Random random; … … 57 61 /** 58 62 * Create a random node and add it to the dataset. 59 * @return 63 * @return a random node 60 64 */ 61 65 protected Node createRandomNode(DataSet ds) { … … 94 98 /** 95 99 * A data generator that generates a bunch of random nodes. 96 * @author Michael Zangl100 * @author Michael Zangl 97 101 */ 98 102 public static class NodeDataGenerator extends DataGenerator { … … 100 104 private final int nodeCount; 101 105 102 pr ivateNodeDataGenerator(String datasetName, int nodeCount) {106 protected NodeDataGenerator(String datasetName, int nodeCount) { 103 107 super(datasetName); 104 108 this.nodeCount = nodeCount; … … 124 128 /** 125 129 * A data generator that generates a bunch of random nodes and fills them with keys/values. 126 * @author Michael Zangl127 */ 128 public static class KeyValueDataGenerator extends NodeDataGenerator {130 * @author Michael Zangl 131 */ 132 public static final class KeyValueDataGenerator extends NodeDataGenerator { 129 133 130 134 private static final int VALUE_COUNT = 200;
Note:
See TracChangeset
for help on using the changeset viewer.