pub struct ExecutionTiming {
pub status_busy: Option<DateTime<Utc>>,
pub execute_input: Option<DateTime<Utc>>,
pub reply_started: Option<DateTime<Utc>>,
pub reply: Option<DateTime<Utc>>,
pub status_idle: Option<DateTime<Utc>>,
}Expand description
Execution timing metadata from notebook cells
JupyterLab 1.2+ can record timing information in cell metadata under the “execution” key. This captures timestamps at various stages of cell execution.
Fields§
§status_busy: Option<DateTime<Utc>>When kernel became busy (started processing request)
execute_input: Option<DateTime<Utc>>When execute_input message was sent
reply_started: Option<DateTime<Utc>>When execution started (from shell.execute_reply metadata)
reply: Option<DateTime<Utc>>When execution finished (shell.execute_reply received)
status_idle: Option<DateTime<Utc>>When kernel became idle (all outputs published)
Implementations§
Source§impl ExecutionTiming
impl ExecutionTiming
Sourcepub fn total_duration(&self) -> Option<Duration>
pub fn total_duration(&self) -> Option<Duration>
Calculate total duration (busy → idle)
This is the wall-clock time from when the kernel started processing the request until all outputs were published.
Sourcepub fn execution_duration(&self) -> Option<Duration>
pub fn execution_duration(&self) -> Option<Duration>
Calculate pure execution duration (reply_started → reply)
This is the actual execution time, excluding output publishing overhead.
Sourcepub fn output_overhead(&self) -> Option<Duration>
pub fn output_overhead(&self) -> Option<Duration>
Calculate output overhead (reply → idle)
This is the time spent publishing outputs after execution finished.
Sourcepub fn from_duration(start: DateTime<Utc>, end: DateTime<Utc>) -> Self
pub fn from_duration(start: DateTime<Utc>, end: DateTime<Utc>) -> Self
Create timing from start and end timestamps
This is a simplified version for when we only have start/end times (e.g., when capturing timing during execution without all intermediate events)
Sourcepub fn has_timing(&self) -> bool
pub fn has_timing(&self) -> bool
Check if this timing has valid data
Trait Implementations§
Source§impl Clone for ExecutionTiming
impl Clone for ExecutionTiming
Source§fn clone(&self) -> ExecutionTiming
fn clone(&self) -> ExecutionTiming
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more