Skip to content

Commit 6257703

Browse files
committed
Improved analysis tool
1 parent 0a33f04 commit 6257703

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/test/java/org/fastfilter/analysis/AnalyzeResults.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package org.fastfilter.analysis;
22

33
import java.io.BufferedReader;
4+
import java.io.File;
5+
import java.io.FileNotFoundException;
46
import java.io.FileReader;
57
import java.io.IOException;
68
import java.io.LineNumberReader;
@@ -66,6 +68,7 @@ public class AnalyzeResults {
6668
"Bloom12", "Bloom12", "Bloom 12",
6769
"Bloom16", "Bloom16", "Bloom 16",
6870
"BlockedBloom", "BlockedBloom", "BlockedBloom",
71+
"BlockedBloom-addAll", "BlockedBloom addAll", "BlockedBloom addAll",
6972
"GCS", "GCS", "Golomb compressed set",
7073
"Xor+8", "Xor+8", "Xor+ 8",
7174
"Xor+16", "Xor+16", "Xor+ 16",
@@ -87,11 +90,18 @@ public class AnalyzeResults {
8790

8891
public static void main(String... args) throws IOException {
8992
Locale.setDefault(Locale.ENGLISH);
90-
new AnalyzeResults().processFile();
93+
String resultFileName = homeDir + "/temp/benchmark-results.txt";
94+
if (args.length > 0) {
95+
resultFileName = args[0];
96+
}
97+
if (new File(resultFileName).exists()) {
98+
throw new FileNotFoundException(resultFileName);
99+
}
100+
new AnalyzeResults().processFile(resultFileName);
91101
}
92102

93-
private void processFile() throws IOException {
94-
LineNumberReader r = new LineNumberReader(new BufferedReader(new FileReader(homeDir + "/temp/results.txt")));
103+
private void processFile(String resultFileName) throws IOException {
104+
LineNumberReader r = new LineNumberReader(new BufferedReader(new FileReader(resultFileName)));
95105
while (true) {
96106
String line = r.readLine();
97107
if (line == null) {

0 commit comments

Comments
 (0)