Skip to content

Commit f34f403

Browse files
committed
handle merge with main
1 parent d9fbd93 commit f34f403

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3025
-1678
lines changed

Diff for: .github/scripts/flamegraph_watcher.sh

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
3+
# This script sends 171 * <iterations> transactions to a test account, per defined private key
4+
# then polls the account balance until the expected balance has been reached
5+
# and then kills the process. It also measures the elapsed time of the test and
6+
# outputs it to Github Action's outputs.
7+
iterations=3500
8+
value=1
9+
account=0x33c6b73432B3aeA0C1725E415CC40D04908B85fd
10+
end_val=$((171 * $iterations * $value))
11+
12+
start_time=$(date +%s)
13+
ethrex_l2 test load --path /home/runner/work/ethrex/ethrex/test_data/private_keys.txt -i $iterations -v --value $value --to $account >/dev/null
14+
15+
output=$(ethrex_l2 info -b -a $account --wei 2>&1)
16+
echo "balance: $output"
17+
while [[ $output -lt $end_val ]]; do
18+
sleep 2
19+
output=$(ethrex_l2 info -b -a $account --wei 2>&1)
20+
echo "balance: $output"
21+
done
22+
end_time=$(date +%s)
23+
elapsed=$((end_time - start_time))
24+
25+
minutes=$((elapsed / 60))
26+
seconds=$((elapsed % 60))
27+
output=$(ethrex_l2 info -b -a $account --wei 2>&1)
28+
echo "Balance of $output reached in $minutes min $seconds s, killing process"
29+
30+
echo killing "$PROGRAM"
31+
sudo pkill "$PROGRAM"
32+
33+
while pgrep -l "perf" >/dev/null; do
34+
echo "perf still alive, waiting for it to exit..."
35+
sleep 10
36+
done
37+
echo "perf exited"
38+
39+
# We need this for the following job, to add to the static page
40+
echo "time=$minutes minutes $seconds seconds" >>"$GITHUB_OUTPUT"

Diff for: .github/scripts/publish_link_flamegraphs.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
curl -XPOST -H "Content-type: application/json" -d '{
2+
"blocks": [
3+
{
4+
"type": "header",
5+
"text": {
6+
"type": "plain_text",
7+
"text": "🔥 Daily Flamegraph Report"
8+
}
9+
},
10+
{
11+
"type": "divider"
12+
},
13+
{
14+
"type": "section",
15+
"text": {
16+
"type": "mrkdwn",
17+
"text": "Flamegraphs are available at *<https://lambdaclass.github.io/ethrex/|https://lambdaclass.github.io/ethrex/>*\n
18+
• *<https://lambdaclass.github.io/ethrex/flamegraph_ethrex.svg/flamegraph_ethrex.svg|Ethrex>*\n
19+
• *<https://lambdaclass.github.io/ethrex/flamegraph_reth.svg/flamegraph_reth.svg|Reth>*\n"
20+
}
21+
},
22+
],
23+
"unfurl_links": true,
24+
"unfurl_media": true
25+
}' "$1"

Diff for: .github/workflows/daily_reports.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,24 @@ jobs:
198198
|| secrets.LEVM_SLACK_WEBHOOK
199199
}}
200200
run: sh .github/scripts/publish_levm_ef_tests.sh "$SLACK_WEBHOOK"
201+
202+
flamegraphs-page:
203+
name: Post to Slack link to Flamegraphs Page
204+
runs-on: ubuntu-latest
205+
steps:
206+
- name: Post message to slack
207+
env:
208+
SLACK_WEBHOOKS: >
209+
${{ github.event_name == 'workflow_dispatch'
210+
&& secrets.TEST_CHANNEL_SLACK
211+
|| format(
212+
'{0} {1} {2}',
213+
secrets.ETHREX_L1_SLACK_WEBHOOK,
214+
secrets.ETHREX_L2_SLACK_WEBHOOK,
215+
secrets.LEVM_SLACK_WEBHOOK
216+
)
217+
}}
218+
run: |
219+
for webhook in $SLACK_WEBHOOKS; do
220+
sh .github/scripts/publish_link_flamegraphs.sh "$webhook"
221+
done

0 commit comments

Comments
 (0)