File tree 1 file changed +3
-0
lines changed
lading/src/generator/file_gen
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ use std::collections::{HashMap, HashSet};
5
5
use bytes:: Bytes ;
6
6
use lading_payload:: block;
7
7
use rand:: Rng ;
8
+ use tracing:: info;
8
9
9
10
/// Time representation of the model
10
11
pub type Tick = u64 ;
@@ -675,6 +676,7 @@ impl State {
675
676
676
677
// Garbage collect unlinked files with no open handles, calculating the bytes
677
678
// lost from these files.
679
+ #[ tracing:: instrument( skip( self ) ) ]
678
680
fn gc ( & mut self ) {
679
681
let mut to_remove = Vec :: new ( ) ;
680
682
for ( & inode, node) in & self . nodes {
@@ -688,6 +690,7 @@ impl State {
688
690
if let Some ( Node :: File { file } ) = self . nodes . remove ( & inode) {
689
691
let lost_bytes = file. bytes_written . saturating_sub ( file. bytes_read ) ;
690
692
self . lost_bytes += lost_bytes;
693
+ info ! ( "TOTAL BYTES LOST: {lost}" , lost = self . lost_bytes) ;
691
694
}
692
695
}
693
696
}
You can’t perform that action at this time.
0 commit comments