File tree 1 file changed +16
-2
lines changed
1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ use std::{
24
24
path:: { Path , PathBuf } ,
25
25
process,
26
26
sync:: { Arc , Mutex , RwLock } ,
27
- time:: { SystemTime , UNIX_EPOCH } ,
27
+ time:: { Instant , SystemTime , UNIX_EPOCH } ,
28
28
} ;
29
29
30
30
use arrow_array:: RecordBatch ;
@@ -733,9 +733,23 @@ impl Stream {
733
733
734
734
/// First flushes arrows onto disk and then converts the arrow into parquet
735
735
pub fn flush_and_convert ( & self , shutdown_signal : bool ) -> Result < ( ) , StagingError > {
736
+ let start_flush = Instant :: now ( ) ;
736
737
self . flush ( ) ;
738
+ trace ! (
739
+ "Flushing stream ({}) took: {}s" ,
740
+ self . stream_name,
741
+ start_flush. elapsed( ) . as_secs_f64( )
742
+ ) ;
743
+
744
+ let start_convert = Instant :: now ( ) ;
745
+ self . prepare_parquet ( shutdown_signal) ?;
746
+ trace ! (
747
+ "Converting arrows to parquet on stream ({}) took: {}s" ,
748
+ self . stream_name,
749
+ start_convert. elapsed( ) . as_secs_f64( )
750
+ ) ;
737
751
738
- self . prepare_parquet ( shutdown_signal )
752
+ Ok ( ( ) )
739
753
}
740
754
}
741
755
You can’t perform that action at this time.
0 commit comments