Skip to content

Commit 2135bab

Browse files
authored
[libc++] Save benchmark results in a json file (#119761)
When running a benchmark, also save the benchmark results in a JSON file. That is cheap to do and useful to compare benchmark results between different runs.
1 parent 9474e09 commit 2135bab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/utils/libcxx/test/format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def execute(self, test, litConfig):
348348
"%dbg(COMPILED WITH) %{cxx} %s %{flags} %{compile_flags} %{benchmark_flags} %{link_flags} -o %t.exe",
349349
]
350350
if "enable-benchmarks=run" in test.config.available_features:
351-
steps += ["%dbg(EXECUTED AS) %{exec} %t.exe"]
351+
steps += ["%dbg(EXECUTED AS) %{exec} %t.exe --benchmark_out=%T/benchmark-result.json --benchmark_out_format=json"]
352352
return self._executeShTest(test, litConfig, steps)
353353
else:
354354
return lit.Test.Result(

0 commit comments

Comments
 (0)