Add benchcomp parser for kani perf tests#2327
Conversation
438e1ab to
049eca4
Compare
|
Can we add a test in CI to make sure the parser will not be broken by future PRs that modify Kani's output? |
f8fbc52 to
83ef6b0
Compare
|
@qinheping I've added a unit test. Regression test has the following problems:
If there's an easy way to write a regression test so that it passes fairly quickly, I'd be happy to do that. |
83ef6b0 to
17d9a8e
Compare
|
@karkhaz thank you for the unit test!
The current unit test check that the parser works correctly on the output given by the current Kani. I suggest to run Kani on two benchmarks (one success and one fail) and dump the output before testing the parser. For example, add the following commands in https://github.com/karkhaz/kani/blob/kk-wip-benchcomp/tools/benchcomp/test/run And then run the parser on Also, do we have a plan to integrate all benchcomp tests in CI? |
zhassan-aws
left a comment
There was a problem hiding this comment.
LGTM modulo @qinheping's comments.
17d9a8e to
004d55a
Compare
This visualization prints the results to stdout as a YAML file. This is useful for piping benchcomp output into other scripts, and also for parsing the output of regression tests.
004d55a to
0da05fb
Compare
This commit adds a parser that emits CBMC-generated metrics to
benchcomp. It is intended to be run in a kani checkout after running
`kani-perf.sh`. A minimal working example would be to run `benchcomp` in
a directory containing the following benchcomp.yaml:
variants:
kani_0.17:
config:
directory: ~/src/kani
command_line: git checkout .; git checkout kani-0.17.0 && rm -rf target && cargo build-dev && ./scripts/kani-perf.sh ; true
kani_0.24:
config:
directory: ~/src/kani
command_line: git checkout .; git checkout main; rm -rf target && cargo build-dev && ./scripts/kani-perf.sh ; true
run:
suites:
kani_perf:
parser:
module: kani_perf
variants:
- kani_0.17
- kani_0.24
This commit also contains minor fixes to ensure that the test suite runs
to completion even if it exited with a non-zero return code.
0da05fb to
4c6d12a
Compare
|
@qinheping Thank you, I removed the unit test as it's not as useful as the regression test. |
|
@qinheping I'll post an Action that uses this feature as soon as this is merged, blocking CI required this and the error_on_regression patch. |
This commit adds a parser that emits CBMC-generated metrics to benchcomp. It is intended to be run in a kani checkout after running
kani-perf.sh. A minimal working example would be to runbenchcompin a directory containing the following benchcomp.yaml:This commit also contains minor fixes to ensure that the test suite runs to completion even if it exited with a non-zero return code.
Testing:
Running as indicated in the commit message should write a
result.yamlfile to the current directory.No
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.