Skip to content

Commit

Permalink
chore(protocol/migrations_sol): adds time tracking
Browse files Browse the repository at this point in the history
To measure how long it takes to run the entire script from start to finish.
  • Loading branch information
arthurgousset committed May 21, 2024
1 parent cd987f3 commit a12fb19
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail

# Keeping track of start time to measure how long it takes to run the script entirely
START_TIME=$SECONDS

# Compile everything
forge build
time forge build

export ANVIL_PORT=8546

Expand Down Expand Up @@ -70,4 +73,8 @@ echo "Compiling with libraries... "
time forge build $LIBRARIES

# run migrations
time forge script migrations_sol/Migration.s.sol --tc Migration --rpc-url http://127.0.0.1:$ANVIL_PORT -vvv $BROADCAST --non-interactive --sender $FROM_ACCOUNT --unlocked $LIBRARIES || echo "Migration script failed"
time forge script migrations_sol/Migration.s.sol --tc Migration --rpc-url http://127.0.0.1:$ANVIL_PORT -vvv $BROADCAST --non-interactive --sender $FROM_ACCOUNT --unlocked $LIBRARIES || echo "Migration script failed"

# Keeping track of the finish time to measure how long it takes to run the script entirely
ELAPSED_TIME=$(($SECONDS - $START_TIME))
echo "Total elapsed time: $ELAPSED_TIME seconds"

0 comments on commit a12fb19

Please sign in to comment.