Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moeen/load-test
An HTTP concurrent load tester with graceful shutdown
https://github.com/moeen/load-test
concurrency golang graceful-shutdown http load-testing
Last synced: 5 days ago
JSON representation
An HTTP concurrent load tester with graceful shutdown
- Host: GitHub
- URL: https://github.com/moeen/load-test
- Owner: moeen
- Created: 2023-01-22T12:23:33.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-22T12:27:16.000Z (almost 2 years ago)
- Last Synced: 2024-06-20T16:46:51.808Z (5 months ago)
- Topics: concurrency, golang, graceful-shutdown, http, load-testing
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Load Test
Load test given URL concurrently and print the returned status codes.## Build
Build the cmd:
```sh
go build -o load-test
```## Usage
```
Usage: load-test [options] [http[s]://]hostname[:port]/pathOptions:
-requests Number of requests to make. Default is 500.
-concurrency Number of multiple requests to make at a time. Default is 100.
-method HTTP Method. Default is GET.
-user-agent User-Agent header to send requests with. Default is moeen/load-test.
-time-out Timeout for HTTP requests (in seconds). Use 0 for no timeouts. Default is 10 seconds.
```### Example
Running 100 requests with 20 concurrent requests:
```sh
./load-test -requests 100 -concurrency 20 "https://jsonplaceholder.typicode.com/todos/1"
```## Run Uint Tests
```sh
## Run the tests and save the coverage result
go test -coverprofile=coverage.out ./...## Analyze the result and see the coverage
go tool cover -func=coverage.out
```## TODO
- [ ] Support HTTP Body
- [ ] Support Basic Authentication
- [ ] Support Custom Headers