aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dev/morling/onebrc
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/dev/morling/onebrc')
-rw-r--r--src/main/java/dev/morling/onebrc/CreateMeasurements3.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/dev/morling/onebrc/CreateMeasurements3.java b/src/main/java/dev/morling/onebrc/CreateMeasurements3.java
index 65589da..23b1b74 100644
--- a/src/main/java/dev/morling/onebrc/CreateMeasurements3.java
+++ b/src/main/java/dev/morling/onebrc/CreateMeasurements3.java
@@ -69,8 +69,8 @@ public class CreateMeasurements3 {
// Use a public list of city names and concatenate them all into a long string,
// which we'll use as a "source of city name randomness"
var bigName = new StringBuilder(1 << 20);
- // Source: https://simplemaps.com/data/world-cities
try (var rows = new BufferedReader(new FileReader("data/weather_stations.csv"));) {
+ rows.readLine(); // Skip the attribution line
while (true) {
var row = rows.readLine();
if (row == null) {
@@ -84,6 +84,7 @@ public class CreateMeasurements3 {
var minLen = Integer.MAX_VALUE;
var maxLen = Integer.MIN_VALUE;
try (var rows = new BufferedReader(new FileReader("data/weather_stations.csv"))) {
+ rows.readLine(); // Skip the attribution line
final var nameSource = new StringReader(bigName.toString());
final var buf = new char[MAX_NAME_LEN];
final var rnd = ThreadLocalRandom.current();