|
| 1 | +# Compare CBMC performance of selected benchmarks across two versions of CBMC, |
| 2 | +# erroring out on regression. This config file is to be used together with the |
| 3 | +# set-up in performance.yaml, because it assumes that there are two CBMC |
| 4 | +# checkouts in the 'old' and 'new' directories; benchcomp compares the |
| 5 | +# performance of these two checkouts. |
| 6 | +# |
| 7 | +# This configuration file is based on Benchcomp's perf-regression.yaml that |
| 8 | +# ships with Kani. |
| 9 | + |
| 10 | +variants: |
| 11 | + aws-c-common@old: |
| 12 | + config: |
| 13 | + command_line: cd verification/cbmc/proofs && export PATH=/home/runner/work/cbmc/cbmc/old/build/bin:$PATH && |
| 14 | + ./run-cbmc-proofs.py |
| 15 | + directory: /home/runner/work/cbmc/cbmc/aws-c-common.git |
| 16 | + env: {} |
| 17 | + aws-c-common@new: |
| 18 | + config: |
| 19 | + command_line: cd verification/cbmc/proofs && export PATH=/home/runner/work/cbmc/cbmc/new/build/bin:$PATH && |
| 20 | + ./run-cbmc-proofs.py |
| 21 | + directory: /home/runner/work/cbmc/cbmc/aws-c-common.git |
| 22 | + env: {} |
| 23 | + |
| 24 | +run: |
| 25 | + suites: |
| 26 | + aws-c-common: |
| 27 | + parser: |
| 28 | + command: /home/runner/work/cbmc/cbmc/new/.github/workflows/benchcomp-parse_cbmc.py |
| 29 | + variants: |
| 30 | + - aws-c-common@old |
| 31 | + - aws-c-common@new |
| 32 | + |
| 33 | +visualize: |
| 34 | + - type: dump_yaml |
| 35 | + out_file: '-' |
| 36 | + |
| 37 | + - type: dump_markdown_results_table |
| 38 | + out_file: '-' |
| 39 | + extra_columns: |
| 40 | + |
| 41 | + # For these two metrics, display the difference between old and new and |
| 42 | + # embolden if the absolute difference is more than 10% of the old value |
| 43 | + number_vccs: |
| 44 | + - column_name: diff old → new |
| 45 | + text: > |
| 46 | + lambda b: "" if b["aws-c-common@new"] == b["aws-c-common@old"] |
| 47 | + else ("**" if abs((b["aws-c-common@new"]-b["aws-c-common@old"])/b["aws-c-common@old"]) > 0.1 else "") |
| 48 | + + ("+" if b["aws-c-common@new"] > b["aws-c-common@old"] else "") |
| 49 | + + str(b["aws-c-common@new"] - b["aws-c-common@old"]) |
| 50 | + + ("**" if abs((b["aws-c-common@new"]-b["aws-c-common@old"])/b["aws-c-common@old"]) > 0.1 else "") |
| 51 | + number_program_steps: |
| 52 | + - column_name: diff old → new |
| 53 | + text: > |
| 54 | + lambda b: "" if b["aws-c-common@new"] == b["aws-c-common@old"] |
| 55 | + else ("**" if abs((b["aws-c-common@new"]-b["aws-c-common@old"])/b["aws-c-common@old"]) > 0.1 else "") |
| 56 | + + ("+" if b["aws-c-common@new"] > b["aws-c-common@old"] else "") |
| 57 | + + str(b["aws-c-common@new"] - b["aws-c-common@old"]) |
| 58 | + + ("**" if abs((b["aws-c-common@new"]-b["aws-c-common@old"])/b["aws-c-common@old"]) > 0.1 else "") |
| 59 | +
|
| 60 | + # For 'runtime' metrics, display the % change from old to new, emboldening |
| 61 | + # cells whose absolute change is >50% |
| 62 | + solver_runtime: |
| 63 | + - column_name: "% change old → new" |
| 64 | + text: > |
| 65 | + lambda b: "" if b["aws-c-common@new"] == b["aws-c-common@old"] |
| 66 | + else ("**" if abs((b["aws-c-common@new"]-b["aws-c-common@old"])/b["aws-c-common@old"]) > 0.5 else "") |
| 67 | + + ("+" if b["aws-c-common@new"] > b["aws-c-common@old"] else "") |
| 68 | + + "%.3f%%" % ((b["aws-c-common@new"] - b["aws-c-common@old"]) * 100 / b["aws-c-common@old"]) |
| 69 | + + ("**" if abs((b["aws-c-common@new"]-b["aws-c-common@old"])/b["aws-c-common@old"]) > 0.5 else "") |
| 70 | + verification_time: |
| 71 | + - column_name: "% change old → new" |
| 72 | + text: > |
| 73 | + lambda b: "" if b["aws-c-common@new"] == b["aws-c-common@old"] |
| 74 | + else ("**" if abs((b["aws-c-common@new"]-b["aws-c-common@old"])/b["aws-c-common@old"]) > 0.5 else "") |
| 75 | + + ("+" if b["aws-c-common@new"] > b["aws-c-common@old"] else "") |
| 76 | + + "%.3f%%" % ((b["aws-c-common@new"] - b["aws-c-common@old"]) * 100 / b["aws-c-common@old"]) |
| 77 | + + ("**" if abs((b["aws-c-common@new"]-b["aws-c-common@old"])/b["aws-c-common@old"]) > 0.5 else "") |
| 78 | + symex_runtime: |
| 79 | + - column_name: "% change old → new" |
| 80 | + text: > |
| 81 | + lambda b: "" if b["aws-c-common@new"] == b["aws-c-common@old"] |
| 82 | + else ("**" if abs((b["aws-c-common@new"]-b["aws-c-common@old"])/b["aws-c-common@old"]) > 0.5 else "") |
| 83 | + + ("+" if b["aws-c-common@new"] > b["aws-c-common@old"] else "") |
| 84 | + + "%.3f%%" % ((b["aws-c-common@new"] - b["aws-c-common@old"]) * 100 / b["aws-c-common@old"]) |
| 85 | + + ("**" if abs((b["aws-c-common@new"]-b["aws-c-common@old"])/b["aws-c-common@old"]) > 0.5 else "") |
| 86 | +
|
| 87 | + # For success metric, display some text if success has changed |
| 88 | + success: |
| 89 | + - column_name: change |
| 90 | + text: > |
| 91 | + lambda b: "" if b["aws-c-common@new"] == b["aws-c-common@old"] |
| 92 | + else "❌ newly failing" if b["aws-c-common@old"] |
| 93 | + else "✅ newly passing" |
| 94 | +
|
| 95 | + - type: error_on_regression |
| 96 | + variant_pairs: [[aws-c-common@old, aws-c-common@new]] |
| 97 | + checks: |
| 98 | + - metric: success |
| 99 | + # Compare the old and new variants of each benchmark. The |
| 100 | + # benchmark has regressed if the lambda returns true. |
| 101 | + test: "lambda old, new: False if not old else not new" |
| 102 | + - metric: solver_runtime |
| 103 | + test: "lambda old, new: False if new < 10 else new/old > 1.5" |
| 104 | + - metric: symex_runtime |
| 105 | + test: "lambda old, new: False if new < 10 else new/old > 1.5" |
0 commit comments