#[non_exhaustive]pub struct PerfBreakdown {
pub source_build_us: u128,
pub parse_us: u128,
pub highlight_us: u128,
pub by_row_us: u128,
pub diag_us: u128,
}Expand description
Per-call sub-step timings exposed to apps’ :perf overlay.
Recorded on the worker side and shipped back inside RenderOutput.
§Examples
use hjkl_syntax::PerfBreakdown;
let p = PerfBreakdown::default();
assert_eq!(p.parse_us, 0);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.source_build_us: u128Microseconds spent building the source string + row_starts table.
parse_us: u128Microseconds spent in tree_sitter::Parser::parse.
highlight_us: u128Microseconds spent in hjkl_bonsai::Highlighter::highlight_range_*.
by_row_us: u128Microseconds spent building the per-row span table from flat spans.
diag_us: u128Microseconds spent scanning for diagnostic ERROR/MISSING nodes.
Implementations§
Trait Implementations§
Source§impl Clone for PerfBreakdown
impl Clone for PerfBreakdown
Source§fn clone(&self) -> PerfBreakdown
fn clone(&self) -> PerfBreakdown
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PerfBreakdown
impl Debug for PerfBreakdown
Source§impl Default for PerfBreakdown
impl Default for PerfBreakdown
Source§fn default() -> PerfBreakdown
fn default() -> PerfBreakdown
Returns the “default value” for a type. Read more
impl Copy for PerfBreakdown
Auto Trait Implementations§
impl Freeze for PerfBreakdown
impl RefUnwindSafe for PerfBreakdown
impl Send for PerfBreakdown
impl Sync for PerfBreakdown
impl Unpin for PerfBreakdown
impl UnsafeUnpin for PerfBreakdown
impl UnwindSafe for PerfBreakdown
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
Mutably borrows from an owned value. Read more