-
Notifications
You must be signed in to change notification settings - Fork 63
perf(l1,l2): use the new load test for the CI scripts #2467
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
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ec61825
Use the new load test for the CI scripts
Arkenan 2900f3d
go back to perf wait
Arkenan 355e151
Build before execution
Arkenan a28be2f
pin reth version
Arkenan a904da4
older reth version
Arkenan 828e6de
add release flag to ethrex
Arkenan cbd3bda
Add features dev in cargo flamegraph
Arkenan 96ebe95
change genesis to ci for both clients
Arkenan 63af548
Have the watcher fail on error
Arkenan 14f1539
Make the reth job run the watcher from within the context of the ethr…
Arkenan 2e4600e
Remove extra &
Arkenan 032bbea
Merge remote-tracking branch 'origin/main' into load_test_fix_reporter
Arkenan 78df498
publish on main and add todo issue
Arkenan 4b962ce
Merge branch 'main' into load_test_fix_reporter
Arkenan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,8 @@ permissions: | |
id-token: write | ||
|
||
on: | ||
# re-enable this when fixing the workflow | ||
# push: | ||
# branches: ["main"] | ||
push: | ||
branches: ["main"] | ||
workflow_dispatch: | ||
|
||
env: | ||
|
@@ -183,13 +182,6 @@ jobs: | |
${{ env.HOME }}/.cargo/bin/inferno-* | ||
key: ${{ runner.os }}-extra-binaries | ||
|
||
- name: Cache ethrex_l2 | ||
id: cache-ethrex-l2 | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.HOME }}/.cargo/bin/ethrex_l2 | ||
key: ${{ runner.os }}-ethrex-l2-${{ hashFiles('cmd/ethrex_l2/Cargo.lock') }} | ||
|
||
- name: Change perf settings | ||
run: | | ||
sudo sysctl kernel.perf_event_paranoid=-1 | ||
|
@@ -236,30 +228,18 @@ jobs: | |
echo "$HOME/.cargo/bin/inferno-collapse-perf" already found | ||
fi | ||
|
||
- name: Install ethrex_l2 cli | ||
run: | | ||
if [ -f "$HOME/.cargo/bin/ethrex_l2" ]; then | ||
echo "$HOME/.cargo/bin/ethrex_l2" already found | ||
else | ||
cargo install --force --path cmd/ethrex_l2 | ||
fi | ||
ethrex_l2 config create default --default | ||
ethrex_l2 config set default | ||
|
||
# By default ethrex uses revm as evm backend. | ||
- id: generate-flamegraph-ethrex | ||
name: Generate Flamegraph data for Ethrex | ||
shell: bash | ||
run: | | ||
rm -rf target/release/ethrex | ||
cargo build --release --bin ethrex --features dev | ||
CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph -c "record -o perf.data -F997 --call-graph dwarf,16384 -g" \ | ||
--bin ethrex --features dev -- --dev --network /home/runner/work/ethrex/ethrex/test_data/genesis-l2.json --http.port 1729 >/dev/null & | ||
while [ ! -x "./target/release/ethrex" ]; do | ||
echo "Waiting for ethrex binary to be ready..." | ||
sleep 2 | ||
done | ||
--bin ethrex --release --features dev -- \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto. |
||
--dev --network /home/runner/work/ethrex/ethrex/test_data/genesis-l2-ci.json --http.port 1729 >/dev/null & | ||
sleep 10 | ||
echo "Compilation finished. Executing load test..." | ||
echo "Executing load test..." | ||
bash /home/runner/work/ethrex/ethrex/.github/scripts/flamegraph_watcher.sh && | ||
echo "Load test finished" | ||
|
||
|
@@ -293,12 +273,13 @@ jobs: | |
with: | ||
toolchain: ${{ env.RUST_RETH_VERSION }} | ||
|
||
# We need a reth version that requires a rustc version <= 1.82.0 | ||
- name: Checkout reth | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: paradigmxyz/reth | ||
path: "reth" | ||
ref: main | ||
ref: b2ead06d1d0804101de0d1eb3a070e08d8eab857 | ||
|
||
- name: Caching | ||
uses: Swatinem/rust-cache@v2 | ||
|
@@ -316,13 +297,6 @@ jobs: | |
${{ env.HOME }}/.cargo/bin/inferno-* | ||
key: ${{ runner.os }}-extra-binaries | ||
|
||
- name: Cache ethrex_l2 | ||
id: cache-ethrex-l2 | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.HOME }}/.cargo/bin/ethrex_l2 | ||
key: ${{ runner.os }}-ethrex-l2-${{ hashFiles('cmd/ethrex_l2/Cargo.lock') }} | ||
|
||
- name: Change perf settings | ||
run: | | ||
sudo sysctl kernel.perf_event_paranoid=-1 | ||
|
@@ -369,35 +343,22 @@ jobs: | |
echo "$HOME/.cargo/bin/inferno-collapse-perf" already found | ||
fi | ||
|
||
- name: Install ethrex_l2 cli | ||
run: | | ||
if [ -f "$HOME/.cargo/bin/ethrex_l2" ]; then | ||
echo "$HOME/.cargo/bin/ethrex_l2" already found | ||
else | ||
cargo install --force --path cmd/ethrex_l2 | ||
fi | ||
ethrex_l2 config create default --default | ||
ethrex_l2 config set default | ||
|
||
- id: generate-flamegraph-reth | ||
name: Build and test reth | ||
shell: bash | ||
# --dev.block-time 1000ms set to 1000ms to match ethrex block generation time | ||
run: | | ||
cd ./reth | ||
rm -rf target/profiling/reth | ||
CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph -c "record -o perf.data -F997 --call-graph dwarf,16384 -g" \ | ||
--bin reth --profile profiling -- node --chain /home/runner/work/ethrex/ethrex/test_data/genesis-load-test.json --dev \ | ||
cargo build --bin reth --profile profiling | ||
CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph -c "record -o perf.data -F997 --call-graph dwarf,16384 -g" --bin reth --profile profiling -- \ | ||
node --chain /home/runner/work/ethrex/ethrex/test_data/genesis-l2-ci.json --dev \ | ||
--dev.block-time 1000ms --http.port 1729 --txpool.max-pending-txns 100000000 --txpool.max-new-txns 1000000000 \ | ||
--txpool.pending-max-count 100000000 --txpool.pending-max-size 10000000000 --txpool.basefee-max-count 100000000000 \ | ||
--txpool.basefee-max-size 1000000000000 --txpool.queued-max-count 1000000000 >/dev/null & | ||
while [ ! -x "./target/profiling/reth" ]; do | ||
echo "Waiting for reth binary to be ready..." | ||
sleep 10 | ||
done | ||
sleep 30 | ||
echo "Executing load test..." | ||
bash /home/runner/work/ethrex/ethrex/.github/scripts/flamegraph_watcher.sh && | ||
(cd /home/runner/work/ethrex/ethrex; ./.github/scripts/flamegraph_watcher.sh) | ||
echo "Load test finished" | ||
|
||
- name: Generate SVG | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you'll get better results building with: