@@ -270,13 +270,17 @@ pub trait BlobCache: Send + Sync {
270
270
) ) ) ;
271
271
}
272
272
let duration = Instant :: now ( ) . duration_since ( start) . as_millis ( ) ;
273
+ let duration_s = duration as f64 / 1000.0 ;
274
+ let throughput_mbps = blob_size as f64 / duration_s / 1_000_000.0 ;
275
+
273
276
debug ! (
274
- "read_chunks_from_backend: {} {} {} bytes at {}, duration {}ms" ,
277
+ "read_chunks_from_backend: {} {} {} bytes at {}, duration {}ms, throughput {:.4}Mbps " ,
275
278
std:: thread:: current( ) . name( ) . unwrap_or_default( ) ,
276
279
if prefetch { "prefetch" } else { "fetch" } ,
277
280
blob_size,
278
281
blob_offset,
279
- duration
282
+ duration,
283
+ throughput_mbps
280
284
) ;
281
285
282
286
let chunks = chunks. iter ( ) . map ( |v| v. as_ref ( ) ) . collect ( ) ;
@@ -328,12 +332,15 @@ pub trait BlobCache: Send + Sync {
328
332
}
329
333
330
334
let duration = Instant :: now ( ) . duration_since ( start) . as_millis ( ) ;
335
+ let duration_s = duration as f64 / 1000.0 ;
336
+ let throughput_mbps = chunk. compressed_size ( ) as f64 / duration_s / 1_000_000.0 ;
331
337
debug ! (
332
- "read_chunk_from_backend: {} {} bytes at {}, duration {}ms" ,
338
+ "read_chunk_from_backend: {} {} bytes at {}, duration {}ms, throughput {:.4}Mbps " ,
333
339
std:: thread:: current( ) . name( ) . unwrap_or_default( ) ,
334
340
chunk. compressed_size( ) ,
335
341
chunk. compressed_offset( ) ,
336
- duration
342
+ duration,
343
+ throughput_mbps
337
344
) ;
338
345
self . validate_chunk_data ( chunk, buffer, false )
339
346
. map_err ( |e| {
0 commit comments