pub struct Collected {
pub timings: Vec<Timing>,
pub started: Option<Instant>,
}Expand description
Everything collected for one request.
Fields§
§timings: Vec<Timing>§started: Option<Instant>Implementations§
Source§impl Collected
impl Collected
pub fn total(&self, kind: &str) -> Duration
Sourcepub fn repeated_queries(&self) -> Vec<(String, usize)>
pub fn repeated_queries(&self) -> Vec<(String, usize)>
Queries whose text repeats, and how many times.
This is the N+1 detector, and it is the reason a bar is worth more than a total. “31 queries, 12ms” looks fine; “the same query 30 times” is a missing eager load, and only the second one tells you what to do.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Collected
impl RefUnwindSafe for Collected
impl Send for Collected
impl Sync for Collected
impl Unpin for Collected
impl UnsafeUnpin for Collected
impl UnwindSafe for Collected
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