nodekit.Trace
pydantic-model
¶
Fields:
Validators:
-
validate_nodekit_version→nodekit_version
list_steps
¶
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:
step_index: The zero-based index of the StepRecord in the Trace.node_address: The NodeAddress of the Node.action: The Action taken at the Node.t_start: The timestamp of the NodeStartedEvent.t_action: The timestamp of the ActionTakenEvent.t_end: The timestamp of the NodeEndedEvent.
Returns:
-
list[StepRecord]–A list of StepRecords in Trace order.
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:
-
step_index(int) -
node_address(NodeAddress) -
action(Action) -
t_start(TimeElapsedMsec) -
t_action(TimeElapsedMsec) -
t_end(TimeElapsedMsec)