pub struct CompilationTimer { /* private fields */ }Expand description
Timer for tracking compilation phases.
Use this to measure the duration of each phase of remote compilation.
§Example
ⓘ
let mut timer = CompilationTimer::new("my-project", "worker-1");
// ... rsync source files ...
timer.end_rsync_up();
// ... run cargo build ...
timer.end_remote_build();
// ... rsync artifacts back ...
timer.end_rsync_down();
let metrics = timer.finish(0, 100, 1_000_000);Implementations§
Source§impl CompilationTimer
impl CompilationTimer
Sourcepub fn end_rsync_up(&mut self)
pub fn end_rsync_up(&mut self)
Mark the end of the rsync upload phase.
Sourcepub fn end_remote_build(&mut self)
pub fn end_remote_build(&mut self)
Mark the end of the remote build phase.
Sourcepub fn end_rsync_down(&mut self)
pub fn end_rsync_down(&mut self)
Mark the end of the rsync download phase.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompilationTimer
impl RefUnwindSafe for CompilationTimer
impl Send for CompilationTimer
impl Sync for CompilationTimer
impl Unpin for CompilationTimer
impl UnsafeUnpin for CompilationTimer
impl UnwindSafe for CompilationTimer
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