ExecutionTiming

Struct ExecutionTiming 

Source
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

Source

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.

Source

pub fn execution_duration(&self) -> Option<Duration>

Calculate pure execution duration (reply_started → reply)

This is the actual execution time, excluding output publishing overhead.

Source

pub fn output_overhead(&self) -> Option<Duration>

Calculate output overhead (reply → idle)

This is the time spent publishing outputs after execution finished.

Source

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)

Source

pub fn has_timing(&self) -> bool

Check if this timing has valid data

Trait Implementations§

Source§

impl Clone for ExecutionTiming

Source§

fn clone(&self) -> ExecutionTiming

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ExecutionTiming

Source§

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

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

impl Default for ExecutionTiming

Source§

fn default() -> ExecutionTiming

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ExecutionTiming

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ExecutionTiming

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

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
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.

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.

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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,