Step/Staircase QPS
Increase or decrease connection pool size in steps.
field | Description | data type |
---|---|---|
steps | Array of Step | Step |
Step
field | Description | data type |
---|---|---|
start | Start of the step | [uint32] |
end | end of the step | [uint32] |
qps | QPS during this step | [uint32] |
Example
extern crate overload_http;
extern crate serde_json;
use overload_http::RateSpecEnum;
let req = r###"
{
"Steps" : {
"steps": [
{
"start": 0,
"end": 5,
"rate": 1
},
{
"start": 6,
"end": 8,
"rate": 4
},
{
"start": 9,
"end": 10,
"rate": 7
}
]
}
}
"###;
let result = serde_json::from_str::<RateSpecEnum>(req);
assert!(result.is_ok());
If the test run for 15 seconds, from 0 to 5th seconds, 1 connection will be used, from 6th to 8th seconds, it'll be 4, from 9 to 10th and 11th to 15th seconds, 7 connections will be used.