Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 39365e1

Browse files
committed
Some minor fixes in GraphBenchmark
1 parent ff1ee47 commit 39365e1

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/benchmark/GraphBenchmark.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
package benchmark;
22

33
import iguana.utils.input.GraphInput;
4-
import org.apache.commons.cli.*;
4+
import org.apache.commons.cli.ParseException;
55
import org.iguana.grammar.Grammar;
66
import org.iguana.parser.IguanaParser;
77

8-
import java.io.*;
8+
import java.io.File;
9+
import java.io.FileOutputStream;
10+
import java.io.IOException;
11+
import java.io.PrintWriter;
912
import java.util.List;
1013

1114
public class GraphBenchmark {
@@ -27,7 +30,6 @@ public static void main(String[] args) throws IOException {
2730
}
2831
final var benchmark = new GraphBenchmark(settings);
2932
benchmark.benchmark();
30-
return;
3133
}
3234

3335
private final BenchmarkGraphStorage graphStorage;
@@ -39,7 +41,7 @@ public static void main(String[] args) throws IOException {
3941
private final int warmupIterations;
4042
private final int measurementIterations;
4143

42-
private GraphBenchmark(BenchmarkSettings settings) throws FileNotFoundException {
44+
private GraphBenchmark(BenchmarkSettings settings) {
4345
graphStorage = BenchmarkGraphStorage.createBenchmarkStorage(settings.getStorageType());
4446
problem = BenchmarkProblem.createBenchmarkProblem(settings.getProblem());
4547
scenario = BenchmarkScenario.createBenchmarkScenario(settings.getScenario());
@@ -62,7 +64,7 @@ void benchmark() throws IOException {
6264
graphStorage.toString())
6365
);
6466
boolean fileExists = !outFile.createNewFile();
65-
System.out.printf("Benchmarking reachability for %s graph%n", datasetName);
67+
System.out.printf("Benchmarking %s for %s graph%n", problem, datasetName);
6668
try (PrintWriter outStatsTime = new PrintWriter(new FileOutputStream(outFile, true), true)) {
6769
if (!fileExists) {
6870
outStatsTime.println(scenario.getCsvHeader());

0 commit comments

Comments
 (0)