Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…to effectfully/builtins/make-all-builtins-strict
  • Loading branch information
effectfully committed Nov 15, 2024
2 parents 1cfcd3e + 1d9a758 commit 6169ff7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/manual-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ jobs:
uses: actions/github-script@main
with:
script: |
const regex = /^\/benchmark\s*(.*?)\s*$/;
const regex = /^\/benchmark\s*([^\s]*)\s*(cap=([0-9]+))?\s*$/;
const comment = context.payload.comment.body;
const match = comment.match(regex)
if (match !== null && match.length == 2)
if (match !== null && match.length == 4 && match[1] !== '') {
core.setOutput('benchmark', match[1]);
else
core.setFailed(`Unable to extract benchmark name from ${comment}`);
core.setOutput('capability_num', match[3] || "");
} else {
core.setFailed(`Unable to extract benchmark name from comment '${comment}'`);
}
- name: Extract Branch Name
id: extract-branch
Expand Down Expand Up @@ -116,6 +118,7 @@ jobs:
nix develop --no-warn-dirty --accept-flake-config --command bash ./scripts/ci-plutus-benchmark.sh
env:
BENCHMARK_NAME: ${{ steps.extract-benchmark.outputs.benchmark }}
CAPABILITY_NUM: ${{ steps.extract-benchmark.outputs.capability_num }}
PR_NUMBER: ${{ github.event.issue.number }}
PR_BRANCH: ${{ steps.extract-branch.outputs.head_ref }}

Expand Down
1 change: 1 addition & 0 deletions plutus-benchmark/bench-compare-markdown
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ paste -d " " "$TMP1" "$TMP2" |
else return (sprintf ("%.1f %s", t, ustr[unit]))
}
function percentage_change (t1, t2, d, sign) {
if (t1==0) return (" - ") # Avoid division by zero, just in case
d = (t2-t1)/t1 * 100
sign = (d<0) ? "" : ((d==0) ? " " : "+") # We get the "-" anyway if d<0
return (sprintf ("%s%.1f%%", sign, d))
Expand Down

0 comments on commit 6169ff7

Please sign in to comment.