From 5ff062ac4845b2db9bf7bbb6811ebe5c35796710 Mon Sep 17 00:00:00 2001 From: Michelangelo Riccobene Date: Wed, 7 Feb 2024 18:25:21 +0100 Subject: [PATCH 01/12] add workflow for perf tests --- .github/workflows/rpc-performance-tests.yml | 101 ++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 .github/workflows/rpc-performance-tests.yml diff --git a/.github/workflows/rpc-performance-tests.yml b/.github/workflows/rpc-performance-tests.yml new file mode 100644 index 0000000000..916857412c --- /dev/null +++ b/.github/workflows/rpc-performance-tests.yml @@ -0,0 +1,101 @@ +name: QA - RPC Performance Tests + +on: + pull_request: + branches: + - master + types: + - ready_for_review + - synchronize + +jobs: + performance-test-suite: + runs-on: self-hosted + env: + ERIGON_DATA_DIR: /opt/erigon/datadir + RPC_PAST_TEST_DIR: /opt/rpc-past-tests + + steps: + - name: Check out silkworm repository + uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: "0" + + - name: Checkout rpc-tests repository & install requirements + run: | + rm -rf ${{runner.workspace}}/rpc-tests + git clone https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests + cd ${{runner.workspace}}/rpc-tests + git checkout main + pip3 install -r requirements.txt + + - name: Clean Build Directory + run: rm -rf ${{runner.workspace}}/silkworm/build + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/silkworm/build + + - name: Configure CMake + working-directory: ${{runner.workspace}}/silkworm/build + run: | + cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release + + - name: Build SilkRpc + working-directory: ${{runner.workspace}}/silkworm/build + run: cmake --build . --config Release --target rpcdaemon -j 8 + + - name: Run SilkRpc + working-directory: ${{runner.workspace}}/silkworm/build/cmd + run: | + ./rpcdaemon --datadir $ERIGON_DATA_DIR --api admin,debug,eth,parity,erigon,trace,web3,txpool,ots,net --log.verbosity 1 --erigon_compatibility --jwt ./jwt.hex --skip_protocol_check & + RPC_DAEMON_PID=$! + echo "RPC_DAEMON_PID=$RPC_DAEMON_PID" >> $GITHUB_ENV + + - name: Run integration tests + id: test_step + run: | + set +e # Disable exit on error + + cd ${{runner.workspace}}/rpc-tests/perf + + # Run Erigon, send ctrl-c and check logs + python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 100:10,1000:10 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + #python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + + # Capture monitoring script exit status + perf_exit_status=$? + + # Save test result to a directory with timestamp and commit hash + mv ${{runner.workspace}}/rpc-tests/perf/mainnet/results $RPC_PAST_TEST_DIR/mainnet_$(date +%Y%m%d_%H%M%S)_perf_$(git rev-parse --short HEAD) + + # Check monitoring script exit status + if [ $perf_exit_status -eq 0 ]; then + echo "Tests completed successfully" + echo "TEST_RESULT=success" >> "$GITHUB_OUTPUT" + else + echo "Error detected during tests" + echo "TEST_RESULT=failure" >> "$GITHUB_OUTPUT" + fi + + - name: Stop SilkRpc + working-directory: ${{runner.workspace}}/silkworm/build/cmd + run: | + # Clean up rpcdaemon process if it's still running + if kill -0 $RPC_DAEMON_PID 2> /dev/null; then + echo "Terminating rpc-daemon" + kill $RPC_DAEMON_PID + else + echo "rpc-daemon has already terminated" + fi + + - name: Action for Success + if: steps.test_step.outputs.TEST_RESULT == 'success' + run: echo "::notice::Tests completed successfully" + + - name: Action for Not Success + if: steps.test_step.outputs.TEST_RESULT != 'success' + run: | + echo "::error::Error detected during tests" + exit 1 + From eadd0db42b04fb80fff0d49379617779b0b5ef55 Mon Sep 17 00:00:00 2001 From: Michelangelo Riccobene Date: Wed, 7 Feb 2024 18:55:13 +0100 Subject: [PATCH 02/12] schedule workflow for perf tests --- .github/workflows/rpc-performance-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/rpc-performance-tests.yml b/.github/workflows/rpc-performance-tests.yml index 916857412c..7725c45cd8 100644 --- a/.github/workflows/rpc-performance-tests.yml +++ b/.github/workflows/rpc-performance-tests.yml @@ -5,8 +5,11 @@ on: branches: - master types: + - opened - ready_for_review - synchronize + schedule: + - cron: '0 8 * * 0' # Run every Sunday at 8:00 AM UTC jobs: performance-test-suite: From 5dd6961a6b0685b9c93edd191f32ee6d04dba884 Mon Sep 17 00:00:00 2001 From: Michelangelo Riccobene Date: Wed, 7 Feb 2024 19:19:58 +0100 Subject: [PATCH 03/12] try to set ulimit and port range in the workflow --- .github/workflows/rpc-performance-tests.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rpc-performance-tests.yml b/.github/workflows/rpc-performance-tests.yml index 7725c45cd8..a75d3b977a 100644 --- a/.github/workflows/rpc-performance-tests.yml +++ b/.github/workflows/rpc-performance-tests.yml @@ -55,13 +55,17 @@ jobs: RPC_DAEMON_PID=$! echo "RPC_DAEMON_PID=$RPC_DAEMON_PID" >> $GITHUB_ENV - - name: Run integration tests + - name: Run performances tests id: test_step run: | set +e # Disable exit on error cd ${{runner.workspace}}/rpc-tests/perf + ulimit -c unlimited + ulimit -n 999999 + sudo sysctl -w "net.ipv4.ip_local_port_range=5000 65000" + # Run Erigon, send ctrl-c and check logs python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 100:10,1000:10 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u #python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u @@ -69,6 +73,10 @@ jobs: # Capture monitoring script exit status perf_exit_status=$? + ulimit -c 0 + ulimit -n 1024 + sudo sysctl -w "net.ipv4.ip_local_port_range=32768 60999" + # Save test result to a directory with timestamp and commit hash mv ${{runner.workspace}}/rpc-tests/perf/mainnet/results $RPC_PAST_TEST_DIR/mainnet_$(date +%Y%m%d_%H%M%S)_perf_$(git rev-parse --short HEAD) From 13df52e2a77824a7828d4d4b0033a6a483461342 Mon Sep 17 00:00:00 2001 From: Michelangelo Riccobene Date: Wed, 7 Feb 2024 21:38:51 +0100 Subject: [PATCH 04/12] remove ulimit/port-range settings --- .github/workflows/rpc-performance-tests.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/rpc-performance-tests.yml b/.github/workflows/rpc-performance-tests.yml index a75d3b977a..a882139f3f 100644 --- a/.github/workflows/rpc-performance-tests.yml +++ b/.github/workflows/rpc-performance-tests.yml @@ -62,10 +62,6 @@ jobs: cd ${{runner.workspace}}/rpc-tests/perf - ulimit -c unlimited - ulimit -n 999999 - sudo sysctl -w "net.ipv4.ip_local_port_range=5000 65000" - # Run Erigon, send ctrl-c and check logs python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 100:10,1000:10 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u #python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u @@ -73,10 +69,6 @@ jobs: # Capture monitoring script exit status perf_exit_status=$? - ulimit -c 0 - ulimit -n 1024 - sudo sysctl -w "net.ipv4.ip_local_port_range=32768 60999" - # Save test result to a directory with timestamp and commit hash mv ${{runner.workspace}}/rpc-tests/perf/mainnet/results $RPC_PAST_TEST_DIR/mainnet_$(date +%Y%m%d_%H%M%S)_perf_$(git rev-parse --short HEAD) From a31bb822bb8ff718554771fe35151c0d4e7cfc19 Mon Sep 17 00:00:00 2001 From: Michelangelo Riccobene Date: Wed, 7 Feb 2024 21:56:06 +0100 Subject: [PATCH 05/12] fix command that stores results --- .github/workflows/rpc-performance-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rpc-performance-tests.yml b/.github/workflows/rpc-performance-tests.yml index a882139f3f..402cb5e9e1 100644 --- a/.github/workflows/rpc-performance-tests.yml +++ b/.github/workflows/rpc-performance-tests.yml @@ -70,7 +70,7 @@ jobs: perf_exit_status=$? # Save test result to a directory with timestamp and commit hash - mv ${{runner.workspace}}/rpc-tests/perf/mainnet/results $RPC_PAST_TEST_DIR/mainnet_$(date +%Y%m%d_%H%M%S)_perf_$(git rev-parse --short HEAD) + mv ${{runner.workspace}}/rpc-tests/perf/reports/mainnet $RPC_PAST_TEST_DIR/mainnet_$(date +%Y%m%d_%H%M%S)_perf_$(git rev-parse --short HEAD) # Check monitoring script exit status if [ $perf_exit_status -eq 0 ]; then From 1adb0b1cd8aa3b2d24db0104c656b12ba19e0be2 Mon Sep 17 00:00:00 2001 From: Michelangelo Riccobene Date: Wed, 7 Feb 2024 22:34:53 +0100 Subject: [PATCH 06/12] trigger execution --- .github/workflows/rpc-performance-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rpc-performance-tests.yml b/.github/workflows/rpc-performance-tests.yml index 402cb5e9e1..1400a45c1e 100644 --- a/.github/workflows/rpc-performance-tests.yml +++ b/.github/workflows/rpc-performance-tests.yml @@ -62,7 +62,7 @@ jobs: cd ${{runner.workspace}}/rpc-tests/perf - # Run Erigon, send ctrl-c and check logs + # Run Erigon, send ctrl-c and check logs - python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 100:10,1000:10 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u #python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u From 734fb4d22f324865a281a92af6680422fef5dfcc Mon Sep 17 00:00:00 2001 From: Michelangelo Riccobene Date: Wed, 7 Feb 2024 22:48:53 +0100 Subject: [PATCH 07/12] increase t and r --- .github/workflows/rpc-performance-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rpc-performance-tests.yml b/.github/workflows/rpc-performance-tests.yml index 1400a45c1e..cda843c0e1 100644 --- a/.github/workflows/rpc-performance-tests.yml +++ b/.github/workflows/rpc-performance-tests.yml @@ -62,8 +62,8 @@ jobs: cd ${{runner.workspace}}/rpc-tests/perf - # Run Erigon, send ctrl-c and check logs - - python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 100:10,1000:10 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + # Run Erigon, send ctrl-c and check logs + python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 100:30,1000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u #python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u # Capture monitoring script exit status From b78ae47d8b0521ffa3a14320b3e3bb55497513bb Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Thu, 8 Feb 2024 00:07:55 +0100 Subject: [PATCH 08/12] eth_call full test sequence --- .github/workflows/rpc-performance-tests.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/rpc-performance-tests.yml b/.github/workflows/rpc-performance-tests.yml index cda843c0e1..707c686399 100644 --- a/.github/workflows/rpc-performance-tests.yml +++ b/.github/workflows/rpc-performance-tests.yml @@ -19,13 +19,13 @@ jobs: RPC_PAST_TEST_DIR: /opt/rpc-past-tests steps: - - name: Check out silkworm repository + - name: Checkout Silkworm repository uses: actions/checkout@v3 with: submodules: recursive fetch-depth: "0" - - name: Checkout rpc-tests repository & install requirements + - name: Checkout RPC Tests Repository & Install Requirements run: | rm -rf ${{runner.workspace}}/rpc-tests git clone https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests @@ -44,35 +44,34 @@ jobs: run: | cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release - - name: Build SilkRpc + - name: Build Silkworm RpcDaemon working-directory: ${{runner.workspace}}/silkworm/build run: cmake --build . --config Release --target rpcdaemon -j 8 - - name: Run SilkRpc + - name: Run Silkworm RpcDaemon working-directory: ${{runner.workspace}}/silkworm/build/cmd run: | ./rpcdaemon --datadir $ERIGON_DATA_DIR --api admin,debug,eth,parity,erigon,trace,web3,txpool,ots,net --log.verbosity 1 --erigon_compatibility --jwt ./jwt.hex --skip_protocol_check & RPC_DAEMON_PID=$! echo "RPC_DAEMON_PID=$RPC_DAEMON_PID" >> $GITHUB_ENV - - name: Run performances tests + - name: Run RPC Performances Tests id: test_step run: | set +e # Disable exit on error cd ${{runner.workspace}}/rpc-tests/perf - # Run Erigon, send ctrl-c and check logs - python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 100:30,1000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u - #python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + # Launch the RPC performance test runner + python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u - # Capture monitoring script exit status + # Capture test runner script exit status perf_exit_status=$? # Save test result to a directory with timestamp and commit hash mv ${{runner.workspace}}/rpc-tests/perf/reports/mainnet $RPC_PAST_TEST_DIR/mainnet_$(date +%Y%m%d_%H%M%S)_perf_$(git rev-parse --short HEAD) - # Check monitoring script exit status + # Check test runner script exit status if [ $perf_exit_status -eq 0 ]; then echo "Tests completed successfully" echo "TEST_RESULT=success" >> "$GITHUB_OUTPUT" @@ -81,7 +80,7 @@ jobs: echo "TEST_RESULT=failure" >> "$GITHUB_OUTPUT" fi - - name: Stop SilkRpc + - name: Stop Silkworm RpcDaemon working-directory: ${{runner.workspace}}/silkworm/build/cmd run: | # Clean up rpcdaemon process if it's still running From 0ddb3a4ef9ff161c0a7245bc62505f53e10693b0 Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Thu, 8 Feb 2024 23:32:14 +0100 Subject: [PATCH 09/12] scheduler execution once per day at midnight launch run perf test for eth_getLogs launch run perf test for eth_getBalance launch run perf test for eth_getBlockByHash --- .github/workflows/rpc-performance-tests.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rpc-performance-tests.yml b/.github/workflows/rpc-performance-tests.yml index 707c686399..c82e528dfd 100644 --- a/.github/workflows/rpc-performance-tests.yml +++ b/.github/workflows/rpc-performance-tests.yml @@ -9,7 +9,7 @@ on: - ready_for_review - synchronize schedule: - - cron: '0 8 * * 0' # Run every Sunday at 8:00 AM UTC + - cron: '0 0 * * *' # Run every day at 00:00 AM UTC jobs: performance-test-suite: @@ -63,7 +63,13 @@ jobs: cd ${{runner.workspace}}/rpc-tests/perf # Launch the RPC performance test runner - python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + # python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 1:1,100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + # python3 ./run_perf_tests.py -b mainnet -y eth_getLogs -p pattern/mainnet/stress_test_eth_getLogs_15M.tar -t 1:1,100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + python3 ./run_perf_tests.py -b mainnet -y eth_getLogs -p pattern/mainnet/stress_test_eth_getLogs_15M.tar -t 1:1,100:30 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + # python3 ./run_perf_tests.py -b mainnet -y eth_getBalance -p pattern/mainnet/stress_test_eth_getBalance_15M.tar -t 1:1,100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + python3 ./run_perf_tests.py -b mainnet -y eth_getBalance -p pattern/mainnet/stress_test_eth_getBalance_15M.tar -t 1:1,100:30 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + # python3 ./run_perf_tests.py -b mainnet -y eth_getBlockByHash -p pattern/mainnet/stress_test_eth_getBlockByHash_14M.tar -t 1:1,100:30,1000:20,10000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + python3 ./run_perf_tests.py -b mainnet -y eth_getBlockByHash -p pattern/mainnet/stress_test_eth_getBlockByHash_14M.tar -t 1:1,100:30 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u # Capture test runner script exit status perf_exit_status=$? @@ -100,4 +106,3 @@ jobs: run: | echo "::error::Error detected during tests" exit 1 - From 2698b1f8373199fdc51a02f7116216978aaa8479 Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Fri, 9 Feb 2024 00:20:05 +0100 Subject: [PATCH 10/12] launch run perf test for eth_getBlockByNumber launch run perf test for eth_getTransactionByHash launch run perf test for eth_getTransactionReceipt --- .github/workflows/rpc-performance-tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/rpc-performance-tests.yml b/.github/workflows/rpc-performance-tests.yml index c82e528dfd..20c6f676eb 100644 --- a/.github/workflows/rpc-performance-tests.yml +++ b/.github/workflows/rpc-performance-tests.yml @@ -70,6 +70,12 @@ jobs: python3 ./run_perf_tests.py -b mainnet -y eth_getBalance -p pattern/mainnet/stress_test_eth_getBalance_15M.tar -t 1:1,100:30 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u # python3 ./run_perf_tests.py -b mainnet -y eth_getBlockByHash -p pattern/mainnet/stress_test_eth_getBlockByHash_14M.tar -t 1:1,100:30,1000:20,10000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u python3 ./run_perf_tests.py -b mainnet -y eth_getBlockByHash -p pattern/mainnet/stress_test_eth_getBlockByHash_14M.tar -t 1:1,100:30 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + # python3 ./run_perf_tests.py -b mainnet -y eth_getBlockByNumber -p pattern/mainnet/stress_test_eth_getBlockByNumber_13M.tar -t 1:1,100:30,1000:20,5000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + python3 ./run_perf_tests.py -b mainnet -y eth_getBlockByNumber -p pattern/mainnet/stress_test_eth_getBlockByNumber_13M.tar -t 1:1,100:30 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + # python3 ./run_perf_tests.py -b mainnet -y eth_getTransactionByHash -p pattern/mainnet/stress_test_eth_getTransactionByHash_13M.tar -t 1:1,100:30,1000:20,10000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + python3 ./run_perf_tests.py -b mainnet -y eth_getTransactionByHash -p pattern/mainnet/stress_test_eth_getTransactionByHash_13M.tar -t 1:1,100:30 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + # python3 ./run_perf_tests.py -b mainnet -y eth_getTransactionReceipt -p pattern/mainnet/stress_test_eth_getTransactionReceipt_14M.tar -t 1:1,100:30,1000:20,5000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + python3 ./run_perf_tests.py -b mainnet -y eth_getTransactionReceipt -p pattern/mainnet/stress_test_eth_getTransactionReceipt_14M.tar -t 1:1,100:30 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u # Capture test runner script exit status perf_exit_status=$? From c331f137c5cfc9af2d12c8e732017b86950bb516 Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Sat, 10 Feb 2024 01:27:43 +0100 Subject: [PATCH 11/12] try running full sequences for all tests --- .github/workflows/rpc-performance-tests.yml | 22 ++++++++------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/rpc-performance-tests.yml b/.github/workflows/rpc-performance-tests.yml index 20c6f676eb..5baa15e201 100644 --- a/.github/workflows/rpc-performance-tests.yml +++ b/.github/workflows/rpc-performance-tests.yml @@ -63,24 +63,18 @@ jobs: cd ${{runner.workspace}}/rpc-tests/perf # Launch the RPC performance test runner - # python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 1:1,100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u - # python3 ./run_perf_tests.py -b mainnet -y eth_getLogs -p pattern/mainnet/stress_test_eth_getLogs_15M.tar -t 1:1,100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u - python3 ./run_perf_tests.py -b mainnet -y eth_getLogs -p pattern/mainnet/stress_test_eth_getLogs_15M.tar -t 1:1,100:30 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u - # python3 ./run_perf_tests.py -b mainnet -y eth_getBalance -p pattern/mainnet/stress_test_eth_getBalance_15M.tar -t 1:1,100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u - python3 ./run_perf_tests.py -b mainnet -y eth_getBalance -p pattern/mainnet/stress_test_eth_getBalance_15M.tar -t 1:1,100:30 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u - # python3 ./run_perf_tests.py -b mainnet -y eth_getBlockByHash -p pattern/mainnet/stress_test_eth_getBlockByHash_14M.tar -t 1:1,100:30,1000:20,10000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u - python3 ./run_perf_tests.py -b mainnet -y eth_getBlockByHash -p pattern/mainnet/stress_test_eth_getBlockByHash_14M.tar -t 1:1,100:30 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u - # python3 ./run_perf_tests.py -b mainnet -y eth_getBlockByNumber -p pattern/mainnet/stress_test_eth_getBlockByNumber_13M.tar -t 1:1,100:30,1000:20,5000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u - python3 ./run_perf_tests.py -b mainnet -y eth_getBlockByNumber -p pattern/mainnet/stress_test_eth_getBlockByNumber_13M.tar -t 1:1,100:30 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u - # python3 ./run_perf_tests.py -b mainnet -y eth_getTransactionByHash -p pattern/mainnet/stress_test_eth_getTransactionByHash_13M.tar -t 1:1,100:30,1000:20,10000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u - python3 ./run_perf_tests.py -b mainnet -y eth_getTransactionByHash -p pattern/mainnet/stress_test_eth_getTransactionByHash_13M.tar -t 1:1,100:30 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u - # python3 ./run_perf_tests.py -b mainnet -y eth_getTransactionReceipt -p pattern/mainnet/stress_test_eth_getTransactionReceipt_14M.tar -t 1:1,100:30,1000:20,5000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u - python3 ./run_perf_tests.py -b mainnet -y eth_getTransactionReceipt -p pattern/mainnet/stress_test_eth_getTransactionReceipt_14M.tar -t 1:1,100:30 -r 1 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 1:1,100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + python3 ./run_perf_tests.py -b mainnet -y eth_getLogs -p pattern/mainnet/stress_test_eth_getLogs_15M.tar -t 1:1,100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + python3 ./run_perf_tests.py -b mainnet -y eth_getBalance -p pattern/mainnet/stress_test_eth_getBalance_15M.tar -t 1:1,100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + python3 ./run_perf_tests.py -b mainnet -y eth_getBlockByHash -p pattern/mainnet/stress_test_eth_getBlockByHash_14M.tar -t 1:1,100:30,1000:20,10000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + python3 ./run_perf_tests.py -b mainnet -y eth_getBlockByNumber -p pattern/mainnet/stress_test_eth_getBlockByNumber_13M.tar -t 1:1,100:30,1000:20,5000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + python3 ./run_perf_tests.py -b mainnet -y eth_getTransactionByHash -p pattern/mainnet/stress_test_eth_getTransactionByHash_13M.tar -t 1:1,100:30,1000:20,10000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u + python3 ./run_perf_tests.py -b mainnet -y eth_getTransactionReceipt -p pattern/mainnet/stress_test_eth_getTransactionReceipt_14M.tar -t 1:1,100:30,1000:20,5000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u # Capture test runner script exit status perf_exit_status=$? - # Save test result to a directory with timestamp and commit hash + # Save test results to a directory with timestamp and commit hash mv ${{runner.workspace}}/rpc-tests/perf/reports/mainnet $RPC_PAST_TEST_DIR/mainnet_$(date +%Y%m%d_%H%M%S)_perf_$(git rev-parse --short HEAD) # Check test runner script exit status From c4f987efb8101d25700b61699ffbfdf8acc717f6 Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Mon, 12 Feb 2024 23:55:21 +0100 Subject: [PATCH 12/12] remove execution on PR events --- .github/workflows/rpc-performance-tests.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/rpc-performance-tests.yml b/.github/workflows/rpc-performance-tests.yml index 5baa15e201..6c9c1aa185 100644 --- a/.github/workflows/rpc-performance-tests.yml +++ b/.github/workflows/rpc-performance-tests.yml @@ -1,13 +1,6 @@ name: QA - RPC Performance Tests on: - pull_request: - branches: - - master - types: - - opened - - ready_for_review - - synchronize schedule: - cron: '0 0 * * *' # Run every day at 00:00 AM UTC @@ -28,9 +21,8 @@ jobs: - name: Checkout RPC Tests Repository & Install Requirements run: | rm -rf ${{runner.workspace}}/rpc-tests - git clone https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests + git -c advice.detachedHead=false clone --depth 1 --branch v0.1.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests cd ${{runner.workspace}}/rpc-tests - git checkout main pip3 install -r requirements.txt - name: Clean Build Directory