Skip to content

Commit fac0252

Browse files
authored
Merge pull request #48082 from makortel/tstorageFactoryFileRootCounters
Update ROOT counters in TStorageFactoryFile read functions
2 parents 5404a8c + e020bd2 commit fac0252

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

IOPool/TFileAdaptor/src/TStorageFactoryFile.cc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,13 @@ Bool_t TStorageFactoryFile::ReadBuffer(char *buf, Int_t len) {
303303
GetRelOffset(),
304304
GetSize());
305305
}
306+
307+
// Update ROOT's statistics
308+
fBytesRead += n;
309+
fgBytesRead += n;
310+
fReadCalls++;
311+
fgReadCalls++;
312+
306313
return n ? kFALSE : kTRUE;
307314
}
308315

@@ -410,6 +417,12 @@ Bool_t TStorageFactoryFile::ReadBuffersSync(char *buf, Long64_t *pos, Int_t *len
410417
xstats.tick(io_buffer_used);
411418
repacker.unpack(current_buffer);
412419

420+
// Update ROOT's statistics
421+
fBytesRead += result;
422+
fgBytesRead += result;
423+
fReadCalls++;
424+
fgReadCalls++;
425+
413426
// Update the location of the unused part of the input buffer.
414427
remaining_buffer_size -= real_bytes_processed;
415428
current_buffer += real_bytes_processed;

0 commit comments

Comments
 (0)