OpenLoop

class OpenLoop(client: Client, mix: Mix, keys: KeyChooser, targets: List<URI>, rate: Double, warmUpSeconds: Int, measureSeconds: Int, inFlight: InFlightCap = InFlightCap.of(rate, TransferApi.REQUEST_TIMEOUT, targets.size), onPhase: (String) -> Unit = {})

The open-loop driver: operations are scheduled at a fixed arrival rate, the ith at start + i / rate, whether or not the earlier ones have completed, so a slow server cannot slow the arrivals down (coordinated omission). Each operation's latency is measured from its scheduled time, not from when it was sent, so a late send counts against it too.

The first warmUpSeconds are not recorded; the next measureSeconds are, into Measured. An operation belongs to the phase and the second its scheduled time falls in. At most inFlight operations are outstanding (InFlightCap): one scheduled beyond that is not sent and is counted as generator-overload, which marks the run as not keeping up. Operation i runs the scenario mix picks for it; a mix also records each scenario's latencies and errors apart. The operations go round robin to the targets that are up (Targets): a node that refuses a connection, such as one a hand-over run stopped, is left out for a moment, and an operation it refused runs on the next node.

Constructors

Link copied to clipboard
constructor(client: Client, mix: Mix, keys: KeyChooser, targets: List<URI>, rate: Double, warmUpSeconds: Int, measureSeconds: Int, inFlight: InFlightCap = InFlightCap.of(rate, TransferApi.REQUEST_TIMEOUT, targets.size), onPhase: (String) -> Unit = {})

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class Measured(seconds: Int)

What the measured phase recorded.

Functions

Link copied to clipboard

Runs the warm-up and the measured phase, and waits for the operations still in flight.