A lightweight, concurrent HTTP load testing tool built in Go. This project was completed as part of the Coding Challenges - Build Your Own Load Tester.
-
Install Go (version 1.16 or higher)
# For Ubuntu/Debian sudo apt-get install golang-go # For MacOS brew install go # For Windows # Download from https://go.dev/dl/
-
Clone the repository
git clone [your-repository-url] cd [repository-name]
Test a single endpoint:
go run . -u https://api.example.comSend 100 concurrent POST requests with a JSON payload:
go run . -u https://api.example.com/users \ -m POST \ -bd '{"name": "test"}' \ -c 100Test multiple endpoints defined in a file with 10 concurrent requests:
go run . -f urls.txt -c 10 -n 5-u URL to test (required if not using -f) -m HTTP method (GET, POST, PUT, PATCH, DELETE) -bd Request body for POST/PUT/PATCH methods -n Number of requests per URL (default: 1) -c Number of concurrent requests (default: 1) -f File containing URLs to test GET https://api.example.com POST https://api.example.com/users {"name": "test"} PUT https://api.example.com/users/1 {"name": "updated"} DELETE https://api.example.com/users/1 - Concurrent request execution using Go routines
- Support for all standard HTTP methods (GET, POST, PUT, PATCH, DELETE)
- URL validation and sanitization
- Batch processing from file input
- Configurable request concurrency and count
- Request timing analysis
- Total request time
- Time to First Byte (TTFB)
- Time to Last Byte (TTLB)
- Response statistics
- Success/failure rate
- Status code distribution
- Request per second calculation
- Performance summary
- Min/Max/Mean timing calculations
- Concurrent request handling stats
- Error rate analysis
- Network error detection
- Invalid URL detection
- Malformed request handling
- Connection timeout management