Skip to main content

TraceEvent

Enum TraceEvent 

Source
pub enum TraceEvent<M, I, N, C> {
Show 21 variants Sent { at: Time, from: NodeId, to: NodeId, msg: M, }, Delivered { at: Time, from: NodeId, to: NodeId, msg: M, }, HandedToSelf { at: Time, node: NodeId, msg: M, }, Dropped { at: Time, from: NodeId, to: NodeId, msg: M, reason: DropReason, }, Duplicated { at: Time, from: NodeId, to: NodeId, msg: M, }, Reordered { at: Time, from: NodeId, to: NodeId, msg: M, }, TimerFired { at: Time, node: NodeId, id: TimerId, }, Indicated { at: Time, node: NodeId, ind: I, }, SessionOpened { at: Time, a: NodeId, b: NodeId, epoch: u64, }, SessionEnded { at: Time, a: NodeId, b: NodeId, epoch: u64, reason: DropReason, }, SuffixLost { at: Time, from: NodeId, to: NodeId, msg: M, }, Crashed { at: Time, node: NodeId, }, Suspended { at: Time, node: NodeId, }, Resumed { at: Time, node: NodeId, }, Restarted { at: Time, node: NodeId, }, Wrote { at: Time, node: NodeId, kind: WriteKind, }, DiedWriting { at: Time, node: NodeId, }, Invoked { at: Time, node: NodeId, op: OpId, cmd: C, }, NotInvoked { at: Time, node: NodeId, op: OpId, cmd: C, why: NotBegun, }, Said { at: Time, node: NodeId, note: N, }, Recovered { at: Time, node: NodeId, had_state: bool, },
}
Expand description

One thing that happened, in order.

Variants§

§

Sent

A protocol asked for a message to be transmitted.

Fields

§at: Time
§from: NodeId
§to: NodeId
§msg: M
§

Delivered

A message was handed to the recipient protocol.

Fields

§at: Time
§from: NodeId
§to: NodeId
§msg: M
§

HandedToSelf

A message a process addressed to itself, handed over without the network.

Not a TraceEvent::Sent, because it crosses no wire: a driver is what turns a request to send into a packet, and a packet addressed to the process it came from is a hand-off between two roles in one state machine. Counting it among what a run put on the network overstates what a deployment costs, and giving it a delivery bound makes every phase of a co-located protocol slower than it is.

Recorded, and not merely elided, because ceasing to be a network message must not mean ceasing to be observable. A leader learning of a higher ballot from its own acceptor is a refusal like any other, and a suite that could not see it lost a non-vacuity floor two registered safety tests depend on — which is what an earlier draft, eliding it inside the protocol, actually did.

Fields

§at: Time
§node: NodeId
§msg: M
§

Dropped

A message was not delivered.

Fields

§at: Time
§from: NodeId
§to: NodeId
§msg: M
§reason: DropReason
§

Duplicated

The network scheduled a second copy of a message.

Fields

§at: Time
§from: NodeId
§to: NodeId
§msg: M
§

Reordered

A message was selected for extreme delay.

Fields

§at: Time
§from: NodeId
§to: NodeId
§msg: M
§

TimerFired

A timer previously set by a protocol fired.

Fields

§at: Time
§node: NodeId
§id: TimerId
§

Indicated

A protocol delivered on its guarantee to the layer above.

Fields

§at: Time
§node: NodeId
§ind: I
§

SessionOpened

A session was established between two processes.

Fields

§at: Time
§a: NodeId
§b: NodeId
§epoch: u64
§

SessionEnded

A session ended. Anything still in flight may have been discarded.

Fields

§at: Time
§a: NodeId
§b: NodeId
§epoch: u64
§reason: DropReason
§

SuffixLost

A message discarded because the session carrying it ended.

Fields

§at: Time
§from: NodeId
§to: NodeId
§msg: M
§

Crashed

A process crashed, losing its volatile state.

Fields

§at: Time
§node: NodeId
§

Suspended

A process was suspended, keeping its state.

Fields

§at: Time
§node: NodeId
§

Resumed

A suspended process resumed, and everything held for it was dispatched.

Fields

§at: Time
§node: NodeId
§

Restarted

A crashed process restarted, and took its startup branch.

Fields

§at: Time
§node: NodeId
§

Wrote

A durable write. kind distinguishes rewriting metadata from appending, so a claim about a protocol’s write cost can be checked rather than asserted.

Fields

§at: Time
§node: NodeId
§kind: WriteKind
§

DiedWriting

A process died inside a write. Whether that write landed is decided by the seed and is deliberately not recorded: the point of the fault is that nobody knows until the recovered process reads its storage back.

Fields

§at: Time
§node: NodeId
§

Invoked

A process was given an operation, and handled it.

Recorded when the handler ran, not when the command was scheduled. A handler’s effects cannot precede the handler, so this is a valid left-hand end of the interval containing the operation’s effect, and a tighter one than the moment the caller asked — which matters, because a suite that schedules several commands at one instant would otherwise show them all overlapping each other.

Fields

§at: Time
§node: NodeId
§op: OpId
§cmd: C
§

NotInvoked

A process was given an operation and never handled it.

Recorded rather than discarded silently: an operation asked for and never begun is not the same as one never asked for, and a record that cannot tell them apart is one a checker would reason from falsely.

Fields

§at: Time
§node: NodeId
§op: OpId
§cmd: C
§

Said

A process narrated a decision it took.

The one event here that is not something that happened to a process. It is in the same account, on the same clock, precisely so that a claim can be read against the run — a process saying it refused an announcement is a process from which no acceptance followed, and a test can require that rather than trust it.

Recorded before the writes and effects of the handler that narrated it: a note marks the decision, and the write and the sends are what the decision led to.

Fields

§at: Time
§node: NodeId
§note: N
§

Recovered

A restarted process was given back what it had written. had_state is false when it had written nothing and started as if for the first time.

Fields

§at: Time
§node: NodeId
§had_state: bool

Implementations§

Source§

impl<M, I, N, C> TraceEvent<M, I, N, C>

Source

pub fn at(&self) -> Time

Trait Implementations§

Source§

impl<M: Clone, I: Clone, N: Clone, C: Clone> Clone for TraceEvent<M, I, N, C>

Source§

fn clone(&self) -> TraceEvent<M, I, N, C>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<M: Debug, I: Debug, N: Debug, C: Debug> Debug for TraceEvent<M, I, N, C>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<M: Eq, I: Eq, N: Eq, C: Eq> Eq for TraceEvent<M, I, N, C>

Source§

impl<M: PartialEq, I: PartialEq, N: PartialEq, C: PartialEq> PartialEq for TraceEvent<M, I, N, C>

Source§

fn eq(&self, other: &TraceEvent<M, I, N, C>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<M: PartialEq, I: PartialEq, N: PartialEq, C: PartialEq> StructuralPartialEq for TraceEvent<M, I, N, C>

Auto Trait Implementations§

§

impl<M, I, N, C> Freeze for TraceEvent<M, I, N, C>
where M: Freeze, I: Freeze, C: Freeze, N: Freeze,

§

impl<M, I, N, C> RefUnwindSafe for TraceEvent<M, I, N, C>

§

impl<M, I, N, C> Send for TraceEvent<M, I, N, C>
where M: Send, I: Send, C: Send, N: Send,

§

impl<M, I, N, C> Sync for TraceEvent<M, I, N, C>
where M: Sync, I: Sync, C: Sync, N: Sync,

§

impl<M, I, N, C> Unpin for TraceEvent<M, I, N, C>
where M: Unpin, I: Unpin, C: Unpin, N: Unpin,

§

impl<M, I, N, C> UnsafeUnpin for TraceEvent<M, I, N, C>

§

impl<M, I, N, C> UnwindSafe for TraceEvent<M, I, N, C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more