Completed clean root directory structure: - Root now contains only: .git, .env, docs/, orig/ - Moved all remaining files and directories to orig/: - Config files (.claude, .dockerignore, .drone.yml, etc.) - All .env variants (except active .env) - Git config (.gitconfig, .github, .gitignore, etc.) - Tool configs (.golangci.yml, .revive.toml, etc.) - Documentation (*.md files, @prompts) - Build files (Dockerfiles, Makefile, go.mod, go.sum) - Docker compose files - All source directories (scripts, tests, tools, etc.) - Runtime directories (logs, monitoring, reports) - Dependency files (node_modules, lib, cache) - Special files (--delete) - Removed empty runtime directories (bin/, data/) V2 structure is now clean: - docs/planning/ - V2 planning documents - orig/ - Complete V1 codebase preserved - .env - Active environment config (not in git) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
69 lines
1.9 KiB
Bash
Executable File
69 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
# Monitor 24-hour test progress
|
|
|
|
LOG_DIR="logs/24h_test"
|
|
PID_FILE="${LOG_DIR}/mev-bot.pid"
|
|
|
|
if [ ! -f "${PID_FILE}" ]; then
|
|
echo "❌ No test running (PID file not found)"
|
|
exit 1
|
|
fi
|
|
|
|
PID=$(cat "${PID_FILE}")
|
|
if ! ps -p "${PID}" > /dev/null 2>&1; then
|
|
echo "❌ Bot not running (PID ${PID} not found)"
|
|
exit 1
|
|
fi
|
|
|
|
# Find latest log
|
|
LATEST_LOG=$(ls -t ${LOG_DIR}/test_*.log 2>/dev/null | head -1)
|
|
|
|
if [ -z "${LATEST_LOG}" ]; then
|
|
echo "❌ No log file found"
|
|
exit 1
|
|
fi
|
|
|
|
echo "📊 MEV Bot 24-Hour Test Monitor"
|
|
echo "================================"
|
|
echo "PID: ${PID}"
|
|
echo "Log: ${LATEST_LOG}"
|
|
echo "Running since: $(ps -o lstart= -p ${PID})"
|
|
echo ""
|
|
|
|
# Stats
|
|
echo "📈 Statistics:"
|
|
BLOCKS=$(grep -c "Processing.*transactions" "${LATEST_LOG}" 2>/dev/null || echo "0")
|
|
DEX=$(grep -c "DEX Transaction detected" "${LATEST_LOG}" 2>/dev/null || echo "0")
|
|
OPPS=$(grep -c "ARBITRAGE OPPORTUNITY" "${LATEST_LOG}" 2>/dev/null || echo "0")
|
|
PROFITABLE=$(grep "ARBITRAGE OPPORTUNITY" "${LATEST_LOG}" 2>/dev/null | grep -c "isExecutable:true" || echo "0")
|
|
|
|
echo " Blocks processed: ${BLOCKS}"
|
|
echo " DEX transactions: ${DEX}"
|
|
echo " Opportunities: ${OPPS}"
|
|
echo " Profitable: ${PROFITABLE}"
|
|
echo ""
|
|
|
|
# Recent activity
|
|
echo "🔍 Recent Activity (last 10 opportunities):"
|
|
grep "ARBITRAGE OPPORTUNITY" "${LATEST_LOG}" 2>/dev/null | tail -10 | while read line; do
|
|
echo " $(echo $line | grep -o 'netProfitETH:[^ ]*' || echo 'N/A')"
|
|
done
|
|
echo ""
|
|
|
|
# Cache metrics
|
|
echo "💾 Cache Metrics:"
|
|
grep "Reserve cache metrics" "${LATEST_LOG}" 2>/dev/null | tail -1 || echo " Not available yet"
|
|
echo ""
|
|
|
|
# Errors
|
|
ERRORS=$(grep -c "\[ERROR\]" "${LATEST_LOG}" 2>/dev/null || echo "0")
|
|
echo "⚠️ Errors: ${ERRORS}"
|
|
if [ "${ERRORS}" -gt "0" ]; then
|
|
echo " Recent errors:"
|
|
grep "\[ERROR\]" "${LATEST_LOG}" 2>/dev/null | tail -3 | sed 's/^/ /'
|
|
fi
|
|
echo ""
|
|
|
|
echo "📝 Live monitoring:"
|
|
echo " tail -f ${LATEST_LOG} | grep -E 'ARBITRAGE|ERROR|Reserve cache'"
|