relentless/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Relentless load testing and comparison testing tool for HTTP / GRPC.
//!
//! # Usage
//! Main usage of `relentless` is comparison testing for REST API servers with `relentless-http`.
//! Other usages in [More details](#more-details) section.
//!
//! ## Install
//! ```sh
//! cargo install --git https://github.com/hayas1/relentless relentless-http --features cli
//! ```
//! or get binary from [GitHub Releases](https://github.com/hayas1/relentless/releases).
//!
//! ## Prepare Config
//! For example, `compare.yaml`
//! ```yaml
//! name: basic comparison test
//! destinations:
//!   actual: http://localhost:3000
//!   expect: http://localhost:3000
//!
//! testcases:
//!   - target: /
//!   - target: /health
//!   - target: /healthz
//! ```
//!
//! ### Run API for testing
//! Optional: if there is no API for testing, `relentless-http-dev-server` is provided.
//! ```sh
//! cargo install --git https://github.com/hayas1/relentless relentless-http-dev-server
//! relentless-http-dev-server
//! ```
//!
//! ## Run CLI
//! ```sh
//! relentless-http -f compare.yaml
//! ```
//! ```plaintext
//! πŸš€ basic comparison test πŸš€
//!   actual🌐 http://localhost:3000/
//!   expect🌐 http://localhost:3000/
//!   βœ… /
//!   βœ… /health
//!   βœ… /healthz
//!
//! πŸ’₯ summery of all requests in configs πŸ’₯
//!   pass-rt: 3/3=100.00%    rps: 6req/22.37ms=268.23req/s
//!   latency: min=2.774ms mean=8.194ms p50=5.219ms p90=22.127ms p99=22.127ms max=22.127ms
//! ```
//! In this case the `actual` and `expect` are the same server, so the request gets the same response and the test passes. βœ…
//! - Each request is done **concurrently** by default.
//!
//! ### More details
//! | | HTTP | GRPC |
//! | --- | --- | --- |
//! | Docs | [relentless-http](https://hayas1.github.io/relentless/relentless_http/) |[relentless-grpc](https://hayas1.github.io/relentless/relentless_grpc/) |
//!
//! # Documents
//! <https://hayas1.github.io/relentless/relentless>
//!
//! # Testing
//! ## Benchmarks
//! TODO
//!
//! ## Coverage
//! <https://hayas1.github.io/relentless/relentless/tarpaulin-report.html>
//!

pub mod assault;
pub mod error;
pub mod interface;

pub use {error::RelentlessError as Error, error::RelentlessResult as Result};