Linear
Increase connection pool size linearly; rate for any time is calculated using equation connection_count = ax + b
,
where x
being time(in seconds) passed since the start of the test.
field | data type | Description |
---|---|---|
a | float | Slope of the line |
b | uint32 | Intercept |
max | uint32 | max QPS |
Example
extern crate overload_http;
extern crate serde_json;
use overload_http::RateSpecEnum;
let req = r###"
{
"Linear": {
"a": 2,
"b": 1,
"max": 12
}
}
"###;
let result = serde_json::from_str::<RateSpecEnum>(req);
assert!(result.is_ok());
If a test runs for 10 seconds, the number of connections will be [1, 5, 7, 9, 11, 12, 12, 12, 12, 12]