summaryrefslogtreecommitdiffstats
path: root/benches
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-03-15 22:38:23 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-03-15 22:38:23 -0700
commit8383e8bf7ab972daaaa502c2aea73577c3bda3db (patch)
tree86269c94b26985713623c85c72b0ff702341984d /benches
parentc80953f0783c7fa43e1b751b0caca236bb928791 (diff)
Remove deprecated benchmark
Diffstat (limited to 'benches')
-rw-r--r--benches/latency.rs38
1 files changed, 0 insertions, 38 deletions
diff --git a/benches/latency.rs b/benches/latency.rs
index 2097fab0..8415b363 100644
--- a/benches/latency.rs
+++ b/benches/latency.rs
@@ -14,7 +14,6 @@ use futures::sync::oneshot;
use futures::sync::mpsc;
use futures::{Future, Poll, Sink, Stream};
use test::Bencher;
-use tokio_core::channel::Sender;
use tokio_core::net::UdpSocket;
use tokio_core::reactor::Core;
@@ -96,43 +95,6 @@ fn udp_echo_latency(b: &mut Bencher) {
}
#[bench]
-fn tokio_channel_latency(b: &mut Bencher) {
- let (tx, rx) = oneshot::channel();
-
- let child = thread::spawn(move || {
- let mut l = Core::new().unwrap();
- let handle = l.handle();
-
- let (in_tx, in_rx) = tokio_core::channel::channel(&handle).unwrap();
- let (out_tx, out_rx) = tokio_core::channel::channel(&handle).unwrap();
- tx.complete((in_tx, out_rx));
-
- let server = out_tx.send_all(in_rx);
-
- l.run(server).unwrap();
- });
-
- let (in_tx, out_rx) = rx.wait().unwrap();
- let mut rx_iter = out_rx.wait();
-
- // warmup phase; for some reason initial couple of runs are much slower
- //
- // TODO: Describe the exact reasons; caching? branch predictor? lazy closures?
- for _ in 0..8 {
- Sender::send(&in_tx, 1usize).unwrap();
- let _ = rx_iter.next();
- }
-
- b.iter(|| {
- Sender::send(&in_tx, 1usize).unwrap();
- let _ = rx_iter.next();
- });
-
- drop(in_tx);
- child.join().unwrap();
-}
-
-#[bench]
fn futures_channel_latency(b: &mut Bencher) {
let (mut in_tx, in_rx) = mpsc::channel(32);
let (out_tx, out_rx) = mpsc::channel::<_>(32);