diff --git a/simulator/runner/file.rs b/simulator/runner/file.rs index 685a60af..17651d22 100644 --- a/simulator/runner/file.rs +++ b/simulator/runner/file.rs @@ -29,29 +29,29 @@ impl SimulatorFile { } pub(crate) fn print_stats(&self) { - println!("op calls faults"); - println!("--------- -------- --------"); - println!( + log::info!("op calls faults"); + log::info!("--------- -------- --------"); + log::info!( "pread {:8} {:8}", *self.nr_pread_calls.borrow(), *self.nr_pread_faults.borrow() ); - println!( + log::info!( "pwrite {:8} {:8}", *self.nr_pwrite_calls.borrow(), *self.nr_pwrite_faults.borrow() ); - println!( + log::info!( "sync {:8} {:8}", *self.nr_sync_calls.borrow(), 0 // No fault counter for sync ); - println!("--------- -------- --------"); + log::info!("--------- -------- --------"); let sum_calls = *self.nr_pread_calls.borrow() + *self.nr_pwrite_calls.borrow() + *self.nr_sync_calls.borrow(); let sum_faults = *self.nr_pread_faults.borrow() + *self.nr_pwrite_faults.borrow(); - println!("total {:8} {:8}", sum_calls, sum_faults); + log::info!("total {:8} {:8}", sum_calls, sum_faults); } } diff --git a/simulator/runner/io.rs b/simulator/runner/io.rs index e7802b40..2da707de 100644 --- a/simulator/runner/io.rs +++ b/simulator/runner/io.rs @@ -40,12 +40,11 @@ impl SimulatorIO { } pub(crate) fn print_stats(&self) { - println!("run_once faults: {}", self.nr_run_once_faults.borrow()); + log::info!("run_once faults: {}", self.nr_run_once_faults.borrow()); for file in self.files.borrow().iter() { - println!(); - println!("==========================="); + log::info!(""); + log::info!("==========================="); file.print_stats(); - println!(); } } }