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>
1.4 KiB
1.4 KiB
Analyze Bottlenecks
Analyze performance bottlenecks in the following area: $ARGUMENTS
Analysis Steps:
- CPU Profiling: Identify CPU-intensive functions and hot paths
- Memory Profiling: Check for memory leaks and high allocation patterns
- Goroutine Analysis: Look for goroutine leaks and blocking operations
- I/O Performance: Analyze network and disk I/O patterns
- Concurrency Issues: Check for race conditions and lock contention
Profiling Commands:
# CPU profile with detailed analysis
go tool pprof -top -cum http://localhost:9090/debug/pprof/profile?seconds=60
# Memory profile with allocation details
go tool pprof -alloc_space http://localhost:9090/debug/pprof/heap
# Goroutine blocking profile
go tool pprof http://localhost:9090/debug/pprof/block
# Mutex contention profile
go tool pprof http://localhost:9090/debug/pprof/mutex
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/
Output Requirements:
- Detailed bottleneck analysis with percentages
- Flame graphs and performance visualizations
- Root cause identification for top bottlenecks
- Optimization recommendations with expected impact
- Priority ranking of issues