Skip to content

Commit

Permalink
Record numStorageRead and storageReadBytes in BufferedInput::load (#7022
Browse files Browse the repository at this point in the history
)

Summary:
Runtime stats for TableScan that show number and size of IO are not being
collected when cache is disabled.

Start collecting these in BufferedInput::load.

Pull Request resolved: #7022

Reviewed By: Yuhta

Differential Revision: D50230585

Pulled By: mbasmanova

fbshipit-source-id: 6c4d63333c653ddf26ebc7c46371b2a25d800ed1
  • Loading branch information
mbasmanova authored and facebook-github-bot committed Oct 12, 2023
1 parent 8eb21d8 commit 42132d9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion velox/dwio/common/BufferedInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,16 @@ void BufferedInput::load(const LogType logType) {
} else {
for (const auto& region : regions_) {
auto allocated = allocate(region);
input_->read(allocated.data(), allocated.size(), region.offset, logType);
uint64_t usec = 0;
{
MicrosecondTimer timer(&usec);
input_->read(
allocated.data(), allocated.size(), region.offset, logType);
}
if (auto* stats = input_->getStats()) {
stats->read().increment(region.length);
stats->queryThreadIoLatency().increment(usec);
}
}
}

Expand Down

0 comments on commit 42132d9

Please sign in to comment.