Skip to content

Commit

Permalink
Suppress warnings in benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
bchapuis committed Oct 13, 2024
1 parent 1f9cc17 commit 5ea6c90
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ examples/openstreetmap/tiles/
examples/transformation/*.pbf

# Benchmarking
baremaps-benchmarking/small/
baremaps-benchmarking/data/

# Docs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
@Measurement(iterations = 1)
public class OvertureMapsBenchmark {

private static Path directory = Path.of("baremaps-benchmarking/data");
private static Path directory = Path.of("baremaps-benchmarking/data/overturemaps");

public static void main(String[] args) throws RunnerException {
Options opt = new OptionsBuilder()
Expand Down Expand Up @@ -80,15 +80,17 @@ public void setup() throws IOException {
}
}

@SuppressWarnings("squid:S1481")
@Benchmark
public void read() {
GeoParquetReader reader = new GeoParquetReader(directory.toUri());
long count = reader.read().count();
reader.read().count();
}

@SuppressWarnings("squid:S1481")
@Benchmark
public void readParallel() {
GeoParquetReader reader = new GeoParquetReader(directory.toUri());
long count = reader.readParallel().count();
reader.readParallel().count();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
public class SmallFileBenchmark {

private Path source = Path.of("baremaps-testing/data/samples/example.parquet").toAbsolutePath();
private Path directory = Path.of("baremaps-benchmarking/small").toAbsolutePath();
private Path directory = Path.of("baremaps-benchmarking/data/small").toAbsolutePath();

public static void main(String[] args) throws RunnerException {
Options opt = new OptionsBuilder()
Expand All @@ -58,17 +58,19 @@ public void setup() throws IOException {
}
}

@SuppressWarnings("squid:S1481")
@Benchmark
public void read() {
GeoParquetReader reader =
new GeoParquetReader(Path.of("baremaps-benchmarking/small/*.parquet").toUri());
long count = reader.read().count();
new GeoParquetReader(Path.of("baremaps-benchmarking/data/small/*.parquet").toUri());
reader.read().count();
}

@SuppressWarnings("squid:S1481")
@Benchmark
public void readParallel() {
GeoParquetReader reader =
new GeoParquetReader(Path.of("baremaps-benchmarking/small/*.parquet").toUri());
long count = reader.readParallel().count();
new GeoParquetReader(Path.of("baremaps-benchmarking/data/small/*.parquet").toUri());
reader.readParallel().count();
}
}

0 comments on commit 5ea6c90

Please sign in to comment.