File tree Expand file tree Collapse file tree
vortex-bench/src/random_access Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ use vortex::array::stream::ArrayStreamExt;
2525use vortex:: buffer:: Buffer ;
2626use vortex:: file:: OpenOptionsSessionExt ;
2727use vortex:: file:: VortexFile ;
28- use vortex:: file:: segments:: set_io_tracing;
2928use vortex:: layout:: segments:: TracingSegmentSource ;
3029use vortex:: utils:: aliases:: hash_map:: HashMap ;
3130
@@ -81,7 +80,6 @@ impl RandomAccessor for VortexRandomAccessor {
8180 if let Some ( ts) = & self . tracing_source {
8281 ts. clear ( ) ;
8382 }
84- set_io_tracing ( true ) ;
8583
8684 let indices_buf: Buffer < u64 > = Buffer :: from ( indices. to_vec ( ) ) ;
8785 let array = self
@@ -92,8 +90,6 @@ impl RandomAccessor for VortexRandomAccessor {
9290 . read_all ( )
9391 . await ?;
9492
95- set_io_tracing ( false ) ;
96-
9793 if let Some ( ts) = & self . tracing_source {
9894 eprintln ! ( "\n === Logical Segment Requests ===" ) ;
9995 ts. dump ( ) ;
Original file line number Diff line number Diff line change @@ -311,20 +311,6 @@ impl State {
311311 current_end - aligned_start,
312312 ) ;
313313
314- if crate :: segments:: IO_TRACING_ENABLED . load ( std:: sync:: atomic:: Ordering :: Relaxed ) {
315- let sub_reqs: Vec < String > = requests
316- . iter ( )
317- . map ( |r| format ! ( "id={} off={} len={}" , r. id, r. offset, r. length) )
318- . collect ( ) ;
319- eprintln ! (
320- " [coalesced] range={}..{} bytes={:<10} sub_reqs=[{}]" ,
321- aligned_start,
322- current_end,
323- current_end - aligned_start,
324- sub_reqs. join( ", " ) ,
325- ) ;
326- }
327-
328314 Some ( CoalescedRequest {
329315 range : aligned_start..current_end,
330316 alignment : self . coalesced_buffer_alignment ,
Original file line number Diff line number Diff line change @@ -9,16 +9,6 @@ use std::sync::atomic::Ordering;
99use std:: task:: Context ;
1010use std:: task:: Poll ;
1111
12- use std:: sync:: atomic:: AtomicBool ;
13-
14- /// Global flag to enable I/O tracing output.
15- pub static IO_TRACING_ENABLED : AtomicBool = AtomicBool :: new ( false ) ;
16-
17- /// Enable or disable I/O tracing output printed to stdout.
18- pub fn set_io_tracing ( enabled : bool ) {
19- IO_TRACING_ENABLED . store ( enabled, Ordering :: Relaxed ) ;
20- }
21-
2212use futures:: FutureExt ;
2313use futures:: StreamExt ;
2414use futures:: channel:: mpsc;
@@ -132,24 +122,13 @@ impl FileSegmentSource {
132122 )
133123 . boxed ( ) ;
134124
135- let pread_counter = Arc :: new ( AtomicUsize :: new ( 0 ) ) ;
136125 let drive_fut = async move {
137126 stream
138127 . map ( move |req| {
139128 let reader = reader. clone ( ) ;
140- let pread_counter = Arc :: clone ( & pread_counter) ;
141129 async move {
142- let offset = req. offset ( ) ;
143- let len = req. len ( ) ;
144- if IO_TRACING_ENABLED . load ( Ordering :: Relaxed ) {
145- let order = pread_counter. fetch_add ( 1 , Ordering :: Relaxed ) ;
146- eprintln ! (
147- " [pread #{:<3}] offset={:<14} bytes={:<10}" ,
148- order, offset, len,
149- ) ;
150- }
151130 let result = reader
152- . read_at ( offset, len, req. alignment ( ) )
131+ . read_at ( req . offset ( ) , req . len ( ) , req. alignment ( ) )
153132 . await ;
154133 req. resolve ( result) ;
155134 }
You can’t perform that action at this time.
0 commit comments