Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fbielejec/load-test
High-throughput tool for testing APIs.
https://github.com/fbielejec/load-test
benchmarking grpc rust websocket
Last synced: 16 days ago
JSON representation
High-throughput tool for testing APIs.
- Host: GitHub
- URL: https://github.com/fbielejec/load-test
- Owner: fbielejec
- License: mit
- Created: 2020-11-28T13:03:05.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-24T09:46:16.000Z (about 3 years ago)
- Last Synced: 2025-01-04T01:39:37.175Z (21 days ago)
- Topics: benchmarking, grpc, rust, websocket
- Language: Rust
- Homepage:
- Size: 82 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [load-test](https://github.com/fbielejec/ws-load-test)
load-test is a high-throughput tool for testing APIs.
It will open a specified number concurrent connections to the endpoint and start flooding it with PING requests, collecting measured time until the response arrives.
Load-test comes in two flavours:
- websocket client
- gRPC client## Blog Article:
* [Blog article](https://www.blog.nodrama.io/rust-websocket/)
## Usage
**INSTALLATION**:
```bash
cargo install load-test --git https://github.com/fbielejec/load-test.git
```
This will download, compile, and install the `ws-load-test` and `grpc-load-test` binaries into your `PATH`**FLAGS:**
- `-h, --help` Prints help information
- `-V, --version` Prints version information**OPTIONS:**
- `-c, --connections` the number of concurrent connections to open
- `-g, --gateway` the URL of the websocket gateway endpoint
- `-v, --verbose` verbosity: info | debug | warn | error## Building from source
Compile release binaries:
```bash
cargo build --release --bin ws-load-test
cargo build --release --bin grpc-load-test
```Run:
```bash
./target/release/ws-load-test --url ws://localhost:3001 -c 1000
./target/release/grpc-load-test --url http2://localhost:50051 -c 1000
```## Development
Measurements and the reported statistics (count, min, mean, max) are collected across all client connection tasks using Rust port of
[High Dynamic Range Histograms](https://github.com/HdrHistogram/HdrHistogram_rust), a low-latency, high-range histogram implementation.Concurrent tasks (WS connections) rely on the [async-std](https://github.com/async-rs/async-std) asynchronous runtime, which chooses how to run them, i.e. how many threads to start and how to distribute tasks on them.
### watch, build and run
Example:
```bash
cargo watch -s "cargo run --bin ws-load-test -- --url ws://echo.websocket.org -v info -c 10"
```