A high-performance, concurrent website load testing tool with zero linter issues, clean architecture, and comprehensive automation. Built with modern Go practices and designed for production environments.
This is a complete modernization of the original gnulnx/goperf project, featuring clean architecture, dependency injection, comprehensive automation, and zero code quality issues.
- Original Project: gnulnx/goperf
- This Fork: Gosayram/goperf
- Current Version: v0.1.0
- Code Quality: π Zero linter issues (150+ issues resolved)
- π Zero Linter Issues - Comprehensive code quality improvements (150+ issues resolved)
- ποΈ Clean Architecture - SOLID principles with dependency injection
- π§ Interface-Driven Design - Easily extensible and testable components
- π Professional Documentation - GoDoc comments for all exported functions
- π« Zero Magic Numbers - All constants properly defined with descriptive names
- π¦ Go Modules - Modern dependency management (Go 1.24+)
- π·οΈ Semantic Versioning - Proper release management with CHANGELOG.md
- π¨ Professional Makefile - 50+ automation targets for development
- π§ͺ Comprehensive Testing - Unit tests, benchmarks, and integration tests
- π Linter Integration - golangci-lint with zero tolerance for issues
- π‘οΈ Security Audit Passed - Removed suspicious IPs and fake domains
- π Safe Defaults - localhost:8080 instead of suspicious external IPs
- β‘ Resource Management - Proper HTTP body closure and error handling
- π Graceful Shutdown - Clean resource cleanup and signal handling
- βοΈ Multi-Source Configuration - CLI flags, environment variables, config files
- π Multiple Output Formats - JSON, CSV, HTML, plain text
- π Advanced Load Testing - Stress testing, benchmark suites, custom scenarios
- π Web Interface - Browser-based testing dashboard
- π Structured Logging - Better debugging and monitoring
# Clone the repository
git clone https://github.com/Gosayram/goperf.git
cd goperf
# Quick build and run
make build
make version# Install development tools automatically
make install-tools
# Run comprehensive checks (formatting, linting, testing)
make check-all
# Build for multiple platforms
make build-cross# Simple load test with Makefile automation
make load-test-quick
# Custom load test
./bin/goperf -url https://httpbin.org/get -users 10 -sec 30
# Stress testing
make load-test-stress# Comprehensive benchmark suite
make benchmark-app
# Test with different intensities
make load-test # Standard test (10 users, 30s)
make load-test-quick # Quick test (5 users, 10s)
make load-test-stress # Stress test (50 users, 60s)# Fetch and analyze single page
make run-fetch
# Start web server for browser testing
make run-web
# Development mode with auto-reload
make devThis modernized version follows clean architecture principles:
goperf/
βββ cmd/ # π Application entry point (46 lines vs 213 original)
β βββ main.go # Clean main with dependency injection
βββ core/ # ποΈ Core application logic
β βββ app.go # Application coordinator with graceful shutdown
β βββ config.go # Multi-source configuration management
β βββ container.go # Dependency injection container
β βββ constants.go # Named constants (zero magic numbers)
βββ interfaces/ # π Business logic contracts
β βββ client.go # HTTP client interface
β βββ parser.go # Asset parser interface
β βββ metrics.go # Metrics collection interface
β βββ formatter.go # Output formatting interface
βββ implementations/ # π οΈ Mock implementations for testing
βββ httputils/ # π HTTP utilities with constants
βββ perf/ # π Performance testing engine
βββ request/ # π Request handling with proper constants
βββ Makefile # π¨ 50+ professional automation targets
Our comprehensive Makefile provides 50+ automation targets:
make build # Build for current platform
make build-cross # Build for Linux, macOS, Windows
make run-load # Quick load test
make run-web # Start web interfacemake check-all # Comprehensive quality checks
make fmt # Format code
make lint # Run linter (zero issues guaranteed)
make vet # Run go vet
make staticcheck # Advanced static analysismake test # Run all tests
make test-coverage # Test with coverage report
make benchmark-app # Performance benchmarks
make load-test-suite # Complete load testing suitemake version # Show version info
make bump-patch # Increment patch version
make bump-minor # Increment minor version
make bump-major # Increment major version-url string Target URL for testing
-users int Number of concurrent users (default: 1)
-sec int Test duration in seconds (default: 10)
-fetch Fetch mode - analyze single request
-web Start web server mode
-port int Web server port (default: 8080)
-timeout duration Request timeout (default: 30s)
-json Output in JSON format
-verbose Enable verbose loggingexport GOPERF_URL="https://example.com"
export GOPERF_USERS=50
export GOPERF_DURATION=60
export GOPERF_TIMEOUT=30s
export GOPERF_OUTPUT_FORMAT="json"# goperf.yaml
target:
url: "https://example.com"
timeout: "30s"
load:
users: 50
duration: 60
output:
format: "json"
verbose: true
security:
max_redirects: 10
verify_ssl: true- π High Concurrency - Leverages Go goroutines for maximum performance
- π Real Browser Simulation - Fetches CSS, JavaScript, and image assets
- πͺ Session Management - Maintains cookies across requests
- π Comprehensive Metrics - Latency, throughput, success rates
- π Asset Analysis - Detailed breakdown of page resources
- π Multiple Formats - JSON, CSV, HTML, plain text
- π Detailed Metrics - Request/response times, byte counts, status codes
- π¨ Color-Coded Output - Easy-to-read terminal output
- π Performance Charts - Visual representation of results
- π Export Options - Save results to files
- π§ Dependency Injection - Modular, testable architecture
- π§ͺ Mock Implementations - Built-in testing capabilities
- π Graceful Shutdown - Proper cleanup on interruption
- π‘οΈ Error Handling - Comprehensive error management with context
- π Structured Logging - Debug-friendly output with levels
# Our zero-tolerance quality pipeline
make check-all # Format + Vet + Lint + Staticcheck + Build + Test
# Individual quality checks
make fmt # Code formatting
make imports # Import organization
make vet # Go vet static analysis
make lint # golangci-lint (zero issues)
make staticcheck # Advanced static analysis# Comprehensive testing
make test # Unit tests
make test-coverage # Coverage report
make benchmark-app # Performance benchmarks
make integration-test # Integration tests
# Load testing suites
make load-test-quick # 5 users, 10 seconds
make load-test # 10 users, 30 seconds
make load-test-stress # 50 users, 60 seconds# Build for all platforms
make build-cross
# Individual platform builds
make build-linux
make build-windows
make build-darwinGoPerf provides comprehensive performance analysis:
- Response Times: Average, minimum, maximum latency
- Throughput: Requests per second across all users
- Success Rate: Percentage of successful requests
- Resource Usage: CPU, memory, network utilization
- Asset Breakdown: Individual timing for CSS, JS, images
- HTTP Status: Detailed status code distribution
We welcome contributions! Our development process emphasizes code quality:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes with zero linter issues:
make check-all - Add tests for new functionality
- Update documentation as needed
- Submit a pull request
- π Zero linter issues - Use
make lintbefore committing - π GoDoc comments - Document all exported functions
- π« No magic numbers - Use named constants
- π§ͺ Test coverage - Add tests for new features
- π Professional documentation - Update README and CHANGELOG
# Setup development environment
git clone https://github.com/Gosayram/goperf.git
cd goperf
# Install tools and dependencies
make install-tools
make deps
# Verify setup
make check-all
make buildThis project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Original Project: gnulnx/goperf - Foundation for this modernization
- Go Community: Best practices and modern development patterns
- Clean Architecture: Principles by Robert C. Martin
- Contributors: Community feedback and contributions
- Code Quality: π 0 linter issues (resolved 150+ issues)
- Architecture: Clean architecture with 4 core interfaces
- Test Coverage: Comprehensive test suite with benchmarks
- Documentation: Professional GoDoc comments throughout
- Automation: 50+ Makefile targets for development workflow
- Platforms: Cross-platform builds (Linux, macOS, Windows)
GoPerf v0.1.0 - Built with β€οΈ for modern Go development. Zero compromises on code quality.
Ready for production use with enterprise-grade quality standards.