-
Notifications
You must be signed in to change notification settings - Fork 157
46 lines (44 loc) · 1.55 KB
/
bench.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Ledger Benchmarks
on:
push:
branches:
- master
- nc/bench-tx
permissions:
contents: write
deployments: write
jobs:
benchmark:
name: cardano-ledger benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v15
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://cache.iog.io https://cache.nixos.org/
- name: Build benchmarks
run: nix build .#cardano-ledger-test:bench:bench
- name: Run benchmark
run: |
cd libs/cardano-ledger-test
../../result/bin/bench "applyTxBenchmarks" --json bench.json
- name: Transform results
run: |
nix-env -i jq -f '<nixpkgs>'
jq -f .github/tools/extract_criterion.jq < libs/cardano-ledger-test/bench.json > output.json
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Haskell Benchmark
tool: 'customSmallerIsBetter'
output-file-path: output.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@nc6'