Linear

Increase QPS linearly; rate for any time is calculated using equation qps = ax + b, where x being time(in seconds) passed since the start of the test.

fielddata typeDescription
afloatSlope of the line
buint32Intercept
maxuint32max 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 generated RPS will be [1, 5, 7, 9, 11, 12, 12, 12, 12, 12]