Files
mev-beta/orig/.claude/commands/analyze-performance.md
Administrator c54c569f30 refactor: move all remaining files to orig/ directory
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>
2025-11-10 10:53:05 +01:00

1.1 KiB

Analyze Performance

Perform a comprehensive performance analysis of the MEV bot: $ARGUMENTS

Analysis Steps:

  1. Memory Profiling: Check for memory leaks and high allocation patterns
  2. CPU Profiling: Identify CPU bottlenecks and hot paths
  3. Goroutine Analysis: Look for goroutine leaks and blocking operations
  4. I/O Performance: Analyze network and disk I/O patterns
  5. Concurrency Issues: Check for race conditions and lock contention

Performance Commands to Run:

# Memory profile
go tool pprof http://localhost:9090/debug/pprof/heap

# CPU profile
go tool pprof http://localhost:9090/debug/pprof/profile?seconds=30

# Goroutine analysis
go tool pprof http://localhost:9090/debug/pprof/goroutine

# Enable race detector
go run -race ./cmd/mev-bot

Analysis Focus Areas:

  • Worker pool efficiency in pkg/market/pipeline.go
  • Event parsing performance in pkg/events/
  • Uniswap math calculations in pkg/uniswap/
  • Memory usage in large transaction processing
  • Rate limiting effectiveness in internal/ratelimit/

Please provide specific performance metrics and recommendations for optimization.