Skip to content

Update README.md

Update README.md #34

Workflow file for this run

name: Benchmark Rust version
on: [push, pull_request]
env:
toolchain: nightly-2022-08-22
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
benchmark:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{env.toolchain}}
components: rustfmt, clippy
default: true
- name: Build benchmark
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features --manifest-path rust/Cargo.toml
- name: Run benchmark
working-directory: rust
run: cargo bench --bench bench -- --output-format bencher | tee out.txt
- name: Prepare benchmark results
run: |
git config --global user.email "[email protected]"
git config --global user.name "LinksPlatformBencher"
cd rust
pip install numpy matplotlib
python3 out.py
cd ..
git fetch
git checkout gh-pages
mv -f rust/bench_rust.png Docs
mv -f rust/bench_rust_log_scale.png Docs
git add Docs
git commit -m "Publish new benchmark results"
git push origin gh-pages
- name: Save benchmark results
uses: actions/upload-artifact@v4
with:
name: Benchmark results
path: |
rust/bench_rust.png
rust/bench_rust_log_scale.png