#const #vector #array

no-std cliff

Find the load at which a benchmark falls over

5 unstable releases

0.3.2 Jul 31, 2020
0.3.1 Jun 4, 2020
0.3.0 Apr 23, 2020
0.2.0 Apr 21, 2020
0.1.0 Apr 21, 2020

#253 in Profiling

MIT/Apache

27KB
377 lines

Crates.io Documentation Build Status Codecov

Find the load at which a benchmark falls over.

Most good benchmarks allow you to vary the offered load to the system, and then give you output that indicate whether the system-under-test is keeping up. This could be dropped packets, latency spikes, or whatever else is appropriate for the problem domain. Now, you want to find out how far you can push your system until it falls over. How do you do that?

This crate provides one answer: exponential search. The idea is simple: first, you double offered load until the system falls over. As long as the system keeps up, you raise the lower bound of your estimate for the maximum tolerated load. When the system no longer keeps up, that gives you an upper limit on the throughput your system can support. At that point, you perform a binary search between the upper and lower bounds, tightening the range until you reach the fidelity you want.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps