From 919441c9d05664efcf489e8ade5672bd18a1500b Mon Sep 17 00:00:00 2001 From: Tim Kuehn Date: Sun, 31 Jan 2016 22:14:43 -0800 Subject: [PATCH] Document the benchmark --- tarpc/src/macros.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tarpc/src/macros.rs b/tarpc/src/macros.rs index 46e04ff..582cb48 100644 --- a/tarpc/src/macros.rs +++ b/tarpc/src/macros.rs @@ -428,6 +428,12 @@ mod test { futures.push(client.hello("Bob".into())); count += 1; if count % concurrency == 0 { + // We can't block on each rpc call, otherwise we'd be + // benchmarking latency instead of throughput. It's also + // not ideal to call more than one rpc per iteration, because + // it makes the output of the bencher harder to parse (you have + // to mentally divide the number by `concurrency` to get + // the ns / iter for one rpc for f in futures.drain(..) { f.get().unwrap(); }