pub struct CompilationMetrics {
pub project_id: String,
pub worker_id: String,
pub timestamp: DateTime<Utc>,
pub timing: CompilationTimingBreakdown,
pub local_build_time: Option<Duration>,
pub speedup: Option<f64>,
pub files_synced: u64,
pub bytes_transferred: u64,
pub exit_code: i32,
pub success: bool,
}Expand description
Comprehensive metrics for a single compilation.
Fields§
§project_id: StringProject identifier (usually directory name or hash).
worker_id: StringWorker that performed the compilation.
timestamp: DateTime<Utc>When the compilation occurred.
timing: CompilationTimingBreakdownTiming breakdown for each phase.
local_build_time: Option<Duration>Local build time for comparison (if available).
speedup: Option<f64>Speedup ratio (local_time / remote_time).
files_synced: u64Number of files synced to worker.
bytes_transferred: u64Total bytes transferred.
exit_code: i32Exit code from compilation.
success: boolWhether compilation succeeded.
Implementations§
Source§impl CompilationMetrics
impl CompilationMetrics
Sourcepub fn calculate_speedup(&mut self)
pub fn calculate_speedup(&mut self)
Calculate speedup based on local vs remote build time.
Sourcepub fn is_beneficial(&self) -> bool
pub fn is_beneficial(&self) -> bool
Check if remote compilation was beneficial (faster than local).
Trait Implementations§
Source§impl Clone for CompilationMetrics
impl Clone for CompilationMetrics
Source§fn clone(&self) -> CompilationMetrics
fn clone(&self) -> CompilationMetrics
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 CompilationMetrics
impl Debug for CompilationMetrics
Source§impl Default for CompilationMetrics
impl Default for CompilationMetrics
Source§impl<'de> Deserialize<'de> for CompilationMetrics
impl<'de> Deserialize<'de> for CompilationMetrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CompilationMetrics
impl RefUnwindSafe for CompilationMetrics
impl Send for CompilationMetrics
impl Sync for CompilationMetrics
impl Unpin for CompilationMetrics
impl UnsafeUnpin for CompilationMetrics
impl UnwindSafe for CompilationMetrics
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