From 919441c9d05664efcf489e8ade5672bd18a1500b Mon Sep 17 00:00:00 2001 From: Tim Kuehn Date: Sun, 31 Jan 2016 22:14:43 -0800 Subject: [PATCH 1/3] 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(); } From 6e49bcdae9d591b05db172a1e253885279c86f8d Mon Sep 17 00:00:00 2001 From: Tim Kuehn Date: Sun, 31 Jan 2016 22:20:43 -0800 Subject: [PATCH 2/3] Amend some documentation --- tarpc/src/macros.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tarpc/src/macros.rs b/tarpc/src/macros.rs index 582cb48..656c63c 100644 --- a/tarpc/src/macros.rs +++ b/tarpc/src/macros.rs @@ -132,11 +132,11 @@ macro_rules! request_variant { /// /// The following items are expanded in the enclosing module: /// -/// * `Service` -- the trait defining the rpc service -/// * `Client` -- a client that makes synchronous requests to the rpc server -/// * `AsyncClient` -- a client that makes asynchronous requests to the rpc server -/// * `Future` -- a generic type returned by `AsyncClient`'s rpc's -/// * `serve` -- the function that starts the rpc server +/// * `Service` -- the trait defining the RPC service +/// * `Client` -- a client that makes synchronous requests to the RPC server +/// * `AsyncClient` -- a client that makes asynchronous requests to the RPC server +/// * `Future` -- a handle for asynchronously retrieving the result of an RPC +/// * `serve` -- the function that starts the RPC server /// /// **Warning**: In addition to the above items, there are a few expanded items that /// are considered implementation details. As with the above items, shadowing @@ -154,7 +154,7 @@ macro_rules! service { rpc $fn_name:ident( $( $arg:ident : $in_:ty ),* ) -> $out:ty; )* ) => { - #[doc="The provided RPC service."] + #[doc="Defines the RPC service"] pub trait Service: Send + Sync { $( $(#[$attr])* From e4b483304d87d39480785feb210deb4717a01f6f Mon Sep 17 00:00:00 2001 From: Tim Kuehn Date: Sun, 31 Jan 2016 22:35:13 -0800 Subject: [PATCH 3/3] Use wildcard dep for now --- tarpc/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tarpc/Cargo.toml b/tarpc/Cargo.toml index 2d9d7a2..37ed583 100644 --- a/tarpc/Cargo.toml +++ b/tarpc/Cargo.toml @@ -11,5 +11,5 @@ bincode = "*" serde_macros = "*" log = "*" env_logger = "*" -scoped-pool = "0.1.4" +scoped-pool = "*" lazy_static = "*"