Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ocadaruma committed Mar 8, 2024
1 parent 1b03705 commit b470607
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public final class Main implements Callable<Integer> {
defaultValue = "text")
private String resultFormat;

@Option(names = "--file", description = "Result file to write output to. If not specified, output to stdout")
private Path resultFile;
@Option(names = "--output", description = "Result file to write output to. If not specified, output to stdout")
private Path resultOutput;

@Option(names = "--file-name-only",
description = "Trim file paths in result from its path to filename only")
Expand Down Expand Up @@ -171,8 +171,8 @@ public Integer call() throws Exception {
@SuppressWarnings("OptionalGetWithoutIsPresent")
BenchmarkResult sum = results.stream().reduce(BenchmarkResult::plus).get();
BenchmarkResult result = sum.div(results.size());
if (resultFile != null) {
try (FileOutputStream fos = new FileOutputStream(resultFile.toFile())) {
if (resultOutput != null) {
try (FileOutputStream fos = new FileOutputStream(resultOutput.toFile())) {
resultFormat.print(config, fos, result);
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion cb/run-bm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function run_with_opts() {
--file-name-only \
--warmup 10000000 \
--param=decaton.max.pending.records=10000 \
--file=$tmp \
--output=$tmp \
"$@"
mv $tmp $out_dir/$name-benchmark.json
}
Expand Down

0 comments on commit b470607

Please sign in to comment.