Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions run_and_post_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,30 @@ DEBUG_FILE=""
declare -A STEP_TIMES
SCRIPT_START_TIME=$(date +%s.%N)

# Cleanup function
cleanup() {
debug_log "Script cleanup initiated"

# Stop and delete the gas-execution-client container
if docker ps -a --format "table {{.Names}}" | grep -q "gas-execution-client"; then
debug_log "Stopping gas-execution-client container..."
docker stop gas-execution-client 2>/dev/null || true
debug_log "Removing gas-execution-client container..."
docker rm gas-execution-client 2>/dev/null || true
else
debug_log "gas-execution-client container not found"
fi

# Remove script/*/execution-data folders
debug_log "Removing script/*/execution-data folders..."
find scripts/ -type d -name "execution-data" -exec rm -r {} + 2>/dev/null || true

debug_log "Script cleanup completed"
}

# Set up signal handlers for cleanup
trap cleanup EXIT INT TERM

# Debug logging function
debug_log() {
if [ "$DEBUG" = true ]; then
Expand Down Expand Up @@ -88,6 +112,8 @@ print_timing_summary() {
fi
}



# Parse command line arguments
while [[ $# -gt 0 ]]; do
case "$1" in
Expand Down
Loading