|
17 | 17 |
|
18 | 18 | steps: |
19 | 19 | - uses: actions/checkout@v4 |
20 | | - - name: Fetch submodules |
21 | | - run: git submodule update --init --recursive |
22 | 20 | - uses: actions-rust-lang/setup-rust-toolchain@v1 |
23 | 21 | with: |
24 | 22 | rustflags: '' #Disable. By default this action sets environment variable is set to -D warnings. We manage this in the Makefile |
@@ -54,14 +52,56 @@ jobs: |
54 | 52 | # Automatically push the benchmark result to gh-pages branch |
55 | 53 | # See https://github.com/benchmark-action/github-action-benchmark?tab=readme-ov-file#charts-on-github-pages-1 for more details |
56 | 54 | auto-push: ${{ github.event_name == 'schedule' }} |
| 55 | + |
| 56 | + benchmark-mem: |
| 57 | + runs-on: ubuntu-latest |
| 58 | + |
| 59 | + steps: |
| 60 | + - uses: actions/checkout@v4 |
| 61 | + - uses: actions-rust-lang/setup-rust-toolchain@v1 |
| 62 | + with: |
| 63 | + rustflags: '' #Disable. By default this action sets environment variable is set to -D warnings. We manage this in the Makefile |
| 64 | + - name: Setup build environment |
| 65 | + shell: bash |
| 66 | + run: | |
| 67 | + os=$(echo "$RUNNER_OS" | tr '[:upper:]' '[:lower:]') |
| 68 | + ./scripts/setup-$os.sh |
| 69 | + - name: Build and load shims and wasi-demo-app |
| 70 | + shell: bash |
| 71 | + run: | |
| 72 | + make OPT_PROFILE=release build install test-image load test-image/oci load/oci |
| 73 | + - name: Run Benchmarks |
| 74 | + shell: bash |
| 75 | + run: | |
| 76 | + set -euxo pipefail |
| 77 | + for RUNTIME in wasmtime wasmedge wasmer wamr; do |
| 78 | + sudo ./scripts/benchmark-mem.sh $RUNTIME > bench-mem-$RUNTIME.json |
| 79 | + done |
| 80 | + cat bench-mem-* | jq -s 'flatten(1)' > bench-mem.json |
| 81 | + - name: Store benchmark result |
| 82 | + uses: benchmark-action/[email protected] |
| 83 | + with: |
| 84 | + name: Criterion.rs Benchmark |
| 85 | + tool: 'customSmallerIsBetter' |
| 86 | + output-file-path: bench-mem.json |
| 87 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 88 | + # my experimental local benchmarking seems to have a 20% margin of error. |
| 89 | + # So I set the alert threshold to 130% of the previous benchmark result. |
| 90 | + # If the current benchmark result is more than 130% of the previous benchmark result, it will fail. |
| 91 | + alert-threshold: '130%' |
| 92 | + fail-on-alert: ${{ github.event_name == 'schedule' }} |
| 93 | + alert-comment-cc-users: '@runwasi-committers' |
| 94 | + # Enable Job Summary |
| 95 | + summary-always: true |
| 96 | + # Automatically push the benchmark result to gh-pages branch |
| 97 | + # See https://github.com/benchmark-action/github-action-benchmark?tab=readme-ov-file#charts-on-github-pages-1 for more details |
| 98 | + auto-push: ${{ github.event_name == 'schedule' }} |
57 | 99 |
|
58 | 100 | benchmark-http: |
59 | 101 | runs-on: ubuntu-latest |
60 | 102 |
|
61 | 103 | steps: |
62 | 104 | - uses: actions/checkout@v4 |
63 | | - - name: Fetch submodules |
64 | | - run: git submodule update --init --recursive |
65 | 105 | - uses: actions-rust-lang/setup-rust-toolchain@v1 |
66 | 106 | with: |
67 | 107 | rustflags: '' #Disable. By default this action sets environment variable is set to -D warnings. We manage this in the Makefile |
|
0 commit comments