#[non_exhaustive]pub struct StartupTimings {
pub program_resolve_ms: Option<u64>,
pub process_spawn_ms: Option<u64>,
pub port_wait_ms: Option<u64>,
pub transport_setup_ms: u64,
pub handshake_ms: u64,
pub session_fs_ms: Option<u64>,
pub llm_handler_ms: Option<u64>,
pub total_ms: u64,
}Expand description
Millisecond breakdown of the phases of Client::start.
Optional fields represent phases that do not run for every configuration:
program_resolve_ms is None when the caller supplies an explicit CLI path
(no resolution/extraction), port_wait_ms is Some only for the TCP
transport, and session_fs_ms / llm_handler_ms are Some only when the
corresponding option is configured. process_spawn_ms is None for
transports that do not spawn a subprocess (external server, in-process FFI
runtime). transport_setup_ms, handshake_ms, and total_ms are always
populated for a value returned by
Client::startup_timings.
Durations are whole milliseconds, matching the existing elapsed_ms
tracing fields.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.program_resolve_ms: Option<u64>Time spent in resolve::copilot_binary_with_extract_dir locating (and,
for a bundled CLI, extracting) the copilot binary. None when the
caller passes an explicit CliProgram::Path.
process_spawn_ms: Option<u64>Time spent spawning the CLI subprocess (command.spawn()). None for
the external-server and in-process transports, which do not spawn a
child.
port_wait_ms: Option<u64>Time spent waiting for the TCP server to announce its listening port on
stdout. Some only for the TCP transport.
transport_setup_ms: u64Total transport setup time. This includes spawning and connecting to a
subprocess, connecting to an external server, or starting the in-process
FFI runtime. process_spawn_ms and port_wait_ms provide nested detail
for spawned transports.
handshake_ms: u64Time spent on the connect protocol handshake in
Client::verify_protocol_version,
including the fallback to the legacy ping RPC.
session_fs_ms: Option<u64>Time spent registering the filesystem provider via
sessionFs.setProvider. Some only when
ClientOptions::session_fs is set.
llm_handler_ms: Option<u64>Time spent registering the LLM inference provider via
llmInference.setProvider. Some only when
ClientOptions::request_handler
is set.
total_ms: u64Total wall-clock time for Client::start, from
entry to the client being ready. Always present.
Trait Implementations§
Source§impl Clone for StartupTimings
impl Clone for StartupTimings
Source§fn clone(&self) -> StartupTimings
fn clone(&self) -> StartupTimings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StartupTimings
impl Debug for StartupTimings
Source§impl Default for StartupTimings
impl Default for StartupTimings
Source§fn default() -> StartupTimings
fn default() -> StartupTimings
impl Eq for StartupTimings
Source§impl PartialEq for StartupTimings
impl PartialEq for StartupTimings
impl StructuralPartialEq for StartupTimings
Auto Trait Implementations§
impl Freeze for StartupTimings
impl RefUnwindSafe for StartupTimings
impl Send for StartupTimings
impl Sync for StartupTimings
impl Unpin for StartupTimings
impl UnsafeUnpin for StartupTimings
impl UnwindSafe for StartupTimings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.