add throughput benchmark

This commit is contained in:
Sean McArthur
2019-02-20 11:57:47 -08:00
parent 5322fe042d
commit abf58fd841
+14
View File
@@ -0,0 +1,14 @@
#![feature(test)]
extern crate test;
extern crate want;
#[bench]
fn throughput(b: &mut test::Bencher) {
let (mut gv, mut tk) = want::new();
b.iter(move || {
tk.want();
assert!(gv.poll_want().unwrap().is_ready());
});
}