@@ -139,7 +139,7 @@ impl Stream {
139139 }
140140
141141 // Concatenates record batches and puts them in memory store for each event.
142- #[ hotpath:: measure]
142+ #[ cfg_attr ( feature = " hotpath" , hotpath :: measure) ]
143143 pub fn push (
144144 & self ,
145145 schema_key : & str ,
@@ -409,7 +409,7 @@ impl Stream {
409409 base. join ( format ! ( "{INPROCESS_DIR_PREFIX}{minute}" ) )
410410 }
411411
412- #[ hotpath:: measure]
412+ #[ cfg_attr ( feature = " hotpath" , hotpath :: measure) ]
413413 pub fn parquet_files ( & self ) -> Vec < PathBuf > {
414414 let Ok ( dir) = self . data_path . read_dir ( ) else {
415415 return vec ! [ ] ;
@@ -470,7 +470,7 @@ impl Stream {
470470 skip( self , tenant_id) ,
471471 fields( stream_name = %self . stream_name)
472472 ) ]
473- #[ hotpath:: measure]
473+ #[ cfg_attr ( feature = " hotpath" , hotpath :: measure) ]
474474 pub fn prepare_parquet (
475475 & self ,
476476 init_signal : bool ,
@@ -550,7 +550,7 @@ impl Stream {
550550 Ok ( ( ) )
551551 }
552552
553- #[ hotpath:: measure]
553+ #[ cfg_attr ( feature = " hotpath" , hotpath :: measure) ]
554554 pub fn flush ( & self , forced : bool ) -> Result < ( ) , StagingError > {
555555 let _span = info_span ! ( "flush" , stream_name = %self . stream_name, forced) . entered ( ) ;
556556 // Swap out stale writers under the lock, drop them after releasing it.
@@ -652,7 +652,7 @@ impl Stream {
652652 /// Bails out without sorting when either source column is missing
653653 /// (non-metric stream, schema drift) so the caller can write the
654654 /// batch unchanged.
655- #[ hotpath:: measure]
655+ #[ cfg_attr ( feature = " hotpath" , hotpath :: measure) ]
656656 fn sort_batch_for_metric_pruning (
657657 batch : & RecordBatch ,
658658 time_partition_field : & str ,
@@ -694,7 +694,7 @@ impl Stream {
694694 Ok ( RecordBatch :: try_new ( schema, columns) ?)
695695 }
696696
697- #[ hotpath:: measure]
697+ #[ cfg_attr ( feature = " hotpath" , hotpath :: measure) ]
698698 fn prepare_metric_row_group (
699699 schema : Arc < Schema > ,
700700 buffer : Vec < RecordBatch > ,
@@ -772,7 +772,7 @@ impl Stream {
772772 /// This function reads arrow files, groups their schemas
773773 ///
774774 /// converts them into parquet files and returns a merged schema
775- #[ hotpath:: measure]
775+ #[ cfg_attr ( feature = " hotpath" , hotpath :: measure) ]
776776 pub fn convert_disk_files_to_parquet (
777777 & self ,
778778 time_partition : Option < & String > ,
@@ -836,7 +836,7 @@ impl Stream {
836836 Ok ( Some ( Schema :: try_merge ( schemas) ?) )
837837 }
838838
839- #[ hotpath:: measure]
839+ #[ cfg_attr ( feature = " hotpath" , hotpath :: measure) ]
840840 fn write_parquet_part_file (
841841 & self ,
842842 part_path : & Path ,
@@ -941,7 +941,7 @@ impl Stream {
941941 }
942942
943943 /// function to validate parquet files
944- #[ hotpath:: measure]
944+ #[ cfg_attr ( feature = " hotpath" , hotpath :: measure) ]
945945 fn is_valid_parquet_file ( path : & Path , stream_name : & str ) -> bool {
946946 // First check file size as a quick validation
947947 match path. metadata ( ) {
@@ -984,7 +984,7 @@ impl Stream {
984984 }
985985 }
986986
987- #[ hotpath:: measure]
987+ #[ cfg_attr ( feature = " hotpath" , hotpath :: measure) ]
988988 fn cleanup_arrow_files_and_dir ( & self , arrow_files : & [ PathBuf ] , tenant_id : & Option < String > ) {
989989 let tenant_str = tenant_id. as_deref ( ) . unwrap_or ( DEFAULT_TENANT ) ;
990990 for ( i, file) in arrow_files. iter ( ) . enumerate ( ) {
@@ -1368,7 +1368,7 @@ impl Stream {
13681368 skip( self , tenant_id) ,
13691369 fields( stream_name = %self . stream_name)
13701370 ) ]
1371- #[ hotpath:: measure]
1371+ #[ cfg_attr ( feature = " hotpath" , hotpath :: measure) ]
13721372 pub fn flush_and_convert (
13731373 & self ,
13741374 init_signal : bool ,
0 commit comments