mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
ci: various speed optimizations (#2867)
This commit is contained in:
2
.github/scripts/compare_iai.sh
vendored
2
.github/scripts/compare_iai.sh
vendored
@ -3,4 +3,4 @@
|
||||
# This script should be run on the main branch, after running the iai benchmarks on the target branch.
|
||||
|
||||
# If the main branch has a better iai performance, exits in error. It ignores L2 differences, since they seem hard to stabilize across runs.
|
||||
cargo bench --package reth-db --bench iai | tee /dev/tty | awk '/((L1)|(Ins)|(RAM)|(Est))+.*\(\+[1-9]+[0-9]*\..*%\)/{f=1} END{exit f}'
|
||||
cargo bench --package reth-db --bench iai --manifest-path pr/Cargo.toml | tee /dev/tty | awk '/((L1)|(Ins)|(RAM)|(Est))+.*\(\+[1-9]+[0-9]*\..*%\)/{f=1} END{exit f}'
|
||||
41
.github/workflows/bench.yml
vendored
41
.github/workflows/bench.yml
vendored
@ -15,40 +15,45 @@ jobs:
|
||||
iai:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install Valgrind
|
||||
run: |
|
||||
sudo apt install valgrind
|
||||
- name: Checkout main sources
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: main
|
||||
path: main
|
||||
|
||||
- name: Checkout PR sources
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: main
|
||||
clean: false
|
||||
path: pr
|
||||
|
||||
- name: Install Valgrind
|
||||
run: |
|
||||
sudo apt install valgrind
|
||||
|
||||
- name: Install toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: |
|
||||
main -> target
|
||||
pr -> target
|
||||
cache-on-failure: true
|
||||
|
||||
- name: Generate test vectors
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: run
|
||||
args: --bin reth -- test-vectors tables
|
||||
run: |
|
||||
cargo run --bin reth --manifest-path main/Cargo.toml -- test-vectors tables
|
||||
cp -r testdata main
|
||||
mv testdata pr
|
||||
|
||||
- name: Set main baseline
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: bench
|
||||
args: --package reth-db --bench iai
|
||||
|
||||
- name: Checkout main sources
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
clean: false
|
||||
run: cargo bench --package reth-db --bench iai --manifest-path main/Cargo.toml
|
||||
|
||||
- name: Compare PR benchmark
|
||||
shell: 'script -q -e -c "bash {0}"' # required to workaround /dev/tty not being available
|
||||
run: |
|
||||
./.github/scripts/compare_iai.sh
|
||||
./pr/.github/scripts/compare_iai.sh
|
||||
|
||||
# Checks that benchmarks not run in CI compile
|
||||
bench-check:
|
||||
|
||||
7
.github/workflows/integration.yml
vendored
7
.github/workflows/integration.yml
vendored
@ -64,10 +64,7 @@ jobs:
|
||||
flags: integration-tests
|
||||
|
||||
sync:
|
||||
name: sync / 100k blocks (${{ matrix.profile }})
|
||||
strategy:
|
||||
matrix:
|
||||
profile: [release, dev]
|
||||
name: sync / 100k blocks
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
RUST_LOG: info,sync=error
|
||||
@ -87,7 +84,7 @@ jobs:
|
||||
|
||||
- name: Run sync (${{ matrix.profile }})
|
||||
run: |
|
||||
cargo run --profile ${{ matrix.profile }} \
|
||||
cargo run --profile release --features jemalloc,only-info-logs \
|
||||
--bin reth -- node \
|
||||
--debug.tip 0x91c90676cab257a59cd956d7cb0bceb9b1a71d79755c23c7277a0697ccfaf8c4 \
|
||||
--debug.max-block 100000 \
|
||||
|
||||
2
.github/workflows/unit.yml
vendored
2
.github/workflows/unit.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
partition: [1, 2, 3]
|
||||
partition: [1, 2, 3, 4]
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v3
|
||||
|
||||
Reference in New Issue
Block a user