Ljh684/moonnet-lab/examples/rpc_retry does not have a README file

    CallOutcome

    pub(all) struct CallOutcome {
    attempts : Int
    delivered : Bool
    latency :
    Time

    } derive(Eq,
    Debug
    )

    What one call did.

    Frame

    pub(all) enum Frame {
    Request
    Reply
    } derive(Eq,
    Debug
    )

    What travels on the wire. The payload type is chosen by the caller; the link does not care what is inside a packet.

    Measurement

    pub(all) struct Measurement {
    calls : Int
    delivered : Int
    mean_attempts : Double
    mean_latency :
    Time

    } derive(Eq,
    Debug
    )

    What a row of the table says.

    Measurement::to_line

    fn Measurement::to_line(self : Measurement, loss : Double) -> String

    One line of the table.

    RpcPolicy

    pub(all) struct RpcPolicy {
    timeout :
    Time

    attempts : Int
    } derive(Eq,
    Debug
    )

    The retry policy under test.

    call

    Run one call to completion and report what it cost.

    The two links are built from the same seed but carry different names, and the loss decision is mixed with the name - so the request and the reply see unrelated loss patterns, which is what two directions of a real path do.

    default_policy

    fn default_policy() -> RpcPolicy

    The policy the table below uses: a 200 ms deadline, at most four attempts.
    fn link_spec(name : String, loss : Double) ->
    LinkSpec

    The link a call runs over, so the table below and the tests describe the same path.

    measure

    fn measure(loss : Double, policy : RpcPolicy, seeds : Int) -> Measurement

    How a policy fares on a path that drops loss of the packets, over seeds independent calls. This is the table the entry point prints, kept here so it can be asserted by a test rather than only looked at.

    Source Files