Skip to content

nodekit.Trace pydantic-model

Fields:

Validators:

  • validate_nodekit_versionnodekit_version

list_steps

list_steps() -> list[StepRecord]

Project the Trace to one StepRecord per completed Node.

Each record pairs one NodeStartedEvent, one ActionTakenEvent, and one NodeEndedEvent with the same NodeAddress. Non-Node lifecycle Events, such as pointer and key samples, are ignored.

Each record contains the following keys:

Returns:

Raises:

  • ValueError

    If Node lifecycle Events do not appear in strict NodeStartedEvent, ActionTakenEvent, NodeEndedEvent order, or if paired lifecycle Events have different Node addresses.

nodekit.StepRecord pydantic-model

A realized (Node, Action) step in a Trace.

A StepRecord is a canonical projection of one completed Node visit in a Trace. It pairs the Node address with the Action taken there, plus the timestamps for when the Node started, when the Action was taken, and when the Node ended.

Fields:

action pydantic-field

action: Action

The Action taken at the Node.

node_address pydantic-field

node_address: NodeAddress

The address of the completed Node.

step_index pydantic-field

step_index: int

The zero-based index of the StepRecord in the Trace.

t_action pydantic-field

t_action: TimeElapsedMsec

The timestamp of the ActionTakenEvent.

t_end pydantic-field

t_end: TimeElapsedMsec

The timestamp of the NodeEndedEvent.

t_start pydantic-field

t_start: TimeElapsedMsec

The timestamp of the NodeStartedEvent.