Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add performance tests #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Sep 24, 2020
24 changes: 24 additions & 0 deletions .github/workflows/perf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Performance

on: [pull_request]

jobs:
perf:
runs-on: Ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Run Benchmark
run: |
git clone https://github.com/kylef/swiftenv.git ~/.swiftenv
export SWIFTENV_ROOT="$HOME/.swiftenv"
export PATH="$SWIFTENV_ROOT/bin:$PATH"
eval "$(swiftenv init -)"
swiftenv install $TOOLCHAIN_DOWNLOAD
make perf-tester
node ci/perf-tester
env:
TOOLCHAIN_DOWNLOAD: https://github.com/swiftwasm/swift/releases/download/swift-wasm-5.3-SNAPSHOT-2020-08-10-a/swift-wasm-5.3-SNAPSHOT-2020-08-10-a-linux.tar.gz
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 8 additions & 2 deletions IntegrationTests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@ node_modules: package-lock.json
build_rt: node_modules
cd ../Runtime && npm run build

.PHONY: benchmark
benchmark: build_rt dist/BenchmarkTests.wasm
.PHONY: benchmark_setup
benchmark_setup: build_rt dist/BenchmarkTests.wasm

.PHONY: run_benchmark
run_benchmark:
node bin/benchmark-tests.js

.PHONY: benchmark
benchmark: benchmark_setup run_benchmark

.PHONY: test
test: build_rt dist/PrimaryTests.wasm
node bin/primary-tests.js
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,14 @@ test:
CONFIGURATION=debug make test && \
CONFIGURATION=release make test

.PHONY: benchmark_setup
benchmark_setup:
cd IntegrationTests && make benchmark_setup

.PHONY: run_benchmark
run_benchmark:
cd IntegrationTests && make -s run_benchmark

.PHONY: perf-tester
perf-tester:
cd ci/perf-tester && npm install
Loading