Skip to main content

bench_client

Function bench_client 

Source
pub fn bench_client<'a, Client, Input, Output>(
    clients: &Cluster<'a, Client>,
    num_clients_per_node: Singleton<usize, Cluster<'a, Client>, Bounded>,
    workload_generator: impl FnOnce(KeyedStream<u32, Option<Output>, Cluster<'a, Client>, Unbounded, NoOrder>) -> KeyedStream<u32, Input, Cluster<'a, Client>, Unbounded, NoOrder>,
    protocol: impl FnOnce(KeyedStream<u32, Input, Cluster<'a, Client>, Unbounded, NoOrder>) -> KeyedStream<u32, Output, Cluster<'a, Client>, Unbounded, NoOrder>,
) -> KeyedStream<u32, (Output, Duration), Cluster<'a, Client>, Unbounded, NoOrder>
where Input: Clone, Output: Clone,
Expand description

Benchmarks transactional workloads by concurrently submitting workloads (up to num_clients_per_node per machine)

  • num_clients_per_node: Number of virtual clients per machine
  • workload_generator: Converts previous output (or None, for new virtual clients) into the next input payload
  • protocol: The protocol to benchmark

ยงReturns

A stream of latencies per completed client request