surge
Serve static web pages using local files
TLDR
Upload a new site to surge.sh
Deploy site to custom domain (note that the DNS records must point to the surge.sh subdomain)
List your surge projects
Remove a project
SYNOPSIS
surge [options]
PARAMETERS
-n
Specify the total number of requests to send.
-c
Specify the number of concurrent requests to make.
-t
Specify the maximum time to run the test for (in seconds).
-T
Specify timeout for each request (in seconds).
-f
Read URLs from the specified file, one URL per line.
-m
Specify HTTP method to use. Defaults to GET.
-H
Add custom HTTP header to the request.
-d
Send POST data. Requires -m POST.
-k
Disable SSL certificate validation.
-v
Verbose output (show each request).
-q
Quiet mode (suppress output during the test).
-h
Show help message and exit.
DESCRIPTION
Surge is a command-line utility designed for HTTP load testing and benchmarking.
It's used to simulate multiple concurrent users accessing a website or API endpoint to evaluate its performance under stress. Surge takes a URL or a list of URLs as input and sends a specified number of requests concurrently.
It then collects statistics such as request latency, throughput, and error rates. This data is used to identify performance bottlenecks and determine the system's capacity. Surge is relatively lightweight and easy to use, making it a valuable tool for developers and system administrators who need to quickly assess the performance of their web applications. Its features include: generating reports about HTTP response codes, time spend on the request and data transfer.
CAVEATS
Surge may not accurately simulate real-world user behavior due to its simple request patterns. It's best used for quickly identifying performance bottlenecks rather than simulating complex user interactions.
EXAMPLE USAGE
Example 1: Load test a single URL with 1000 requests and 50 concurrent users:
surge -n 1000 -c 50 http://example.com
Example 2: Read URLs from a file and load test with a timeout of 10 seconds:
surge -f urls.txt -t 10