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 ;
@@ -721,9 +721,23 @@ impl Stream {
721
721
722
722
/// First flushes arrows onto disk and then converts the arrow into parquet
723
723
pub fn flush_and_convert ( & self , shutdown_signal : bool ) -> Result < ( ) , StagingError > {
724
+ let start_flush = Instant :: now ( ) ;
724
725
self . flush ( shutdown_signal) ;
726
+ trace ! (
727
+ "Flushing stream ({}) took: {}s" ,
728
+ self . stream_name,
729
+ start_flush. elapsed( ) . as_secs_f64( )
730
+ ) ;
731
+
732
+ let start_convert = Instant :: now ( ) ;
733
+ self . prepare_parquet ( shutdown_signal) ?;
734
+ trace ! (
735
+ "Converting arrows to parquet on stream ({}) took: {}s" ,
736
+ self . stream_name,
737
+ start_convert. elapsed( ) . as_secs_f64( )
738
+ ) ;
725
739
726
- self . prepare_parquet ( shutdown_signal )
740
+ Ok ( ( ) )
727
741
}
728
742
}
729
743
You can’t perform that action at this time.
0 commit comments