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.
|
# 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.
|
# 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:
|
iai:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Install Valgrind
|
- name: Checkout main sources
|
||||||
run: |
|
uses: actions/checkout@v3
|
||||||
sudo apt install valgrind
|
with:
|
||||||
|
ref: main
|
||||||
|
path: main
|
||||||
|
|
||||||
- name: Checkout PR sources
|
- name: Checkout PR sources
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
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
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
|
workspaces: |
|
||||||
|
main -> target
|
||||||
|
pr -> target
|
||||||
cache-on-failure: true
|
cache-on-failure: true
|
||||||
|
|
||||||
- name: Generate test vectors
|
- name: Generate test vectors
|
||||||
uses: actions-rs/cargo@v1
|
run: |
|
||||||
with:
|
cargo run --bin reth --manifest-path main/Cargo.toml -- test-vectors tables
|
||||||
command: run
|
cp -r testdata main
|
||||||
args: --bin reth -- test-vectors tables
|
mv testdata pr
|
||||||
|
|
||||||
- name: Set main baseline
|
- name: Set main baseline
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo bench --package reth-db --bench iai --manifest-path main/Cargo.toml
|
||||||
with:
|
|
||||||
command: bench
|
|
||||||
args: --package reth-db --bench iai
|
|
||||||
|
|
||||||
- name: Checkout main sources
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
clean: false
|
|
||||||
|
|
||||||
- name: Compare PR benchmark
|
- name: Compare PR benchmark
|
||||||
shell: 'script -q -e -c "bash {0}"' # required to workaround /dev/tty not being available
|
shell: 'script -q -e -c "bash {0}"' # required to workaround /dev/tty not being available
|
||||||
run: |
|
run: |
|
||||||
./.github/scripts/compare_iai.sh
|
./pr/.github/scripts/compare_iai.sh
|
||||||
|
|
||||||
# Checks that benchmarks not run in CI compile
|
# Checks that benchmarks not run in CI compile
|
||||||
bench-check:
|
bench-check:
|
||||||
|
|||||||
7
.github/workflows/integration.yml
vendored
7
.github/workflows/integration.yml
vendored
@ -64,10 +64,7 @@ jobs:
|
|||||||
flags: integration-tests
|
flags: integration-tests
|
||||||
|
|
||||||
sync:
|
sync:
|
||||||
name: sync / 100k blocks (${{ matrix.profile }})
|
name: sync / 100k blocks
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
profile: [release, dev]
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
RUST_LOG: info,sync=error
|
RUST_LOG: info,sync=error
|
||||||
@ -87,7 +84,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run sync (${{ matrix.profile }})
|
- name: Run sync (${{ matrix.profile }})
|
||||||
run: |
|
run: |
|
||||||
cargo run --profile ${{ matrix.profile }} \
|
cargo run --profile release --features jemalloc,only-info-logs \
|
||||||
--bin reth -- node \
|
--bin reth -- node \
|
||||||
--debug.tip 0x91c90676cab257a59cd956d7cb0bceb9b1a71d79755c23c7277a0697ccfaf8c4 \
|
--debug.tip 0x91c90676cab257a59cd956d7cb0bceb9b1a71d79755c23c7277a0697ccfaf8c4 \
|
||||||
--debug.max-block 100000 \
|
--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
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
partition: [1, 2, 3]
|
partition: [1, 2, 3, 4]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user