diff --git a/velox/dwio/common/CachedBufferedInput.h b/velox/dwio/common/CachedBufferedInput.h index 5a8280e06fa8..d9c5def1fb05 100644 --- a/velox/dwio/common/CachedBufferedInput.h +++ b/velox/dwio/common/CachedBufferedInput.h @@ -69,7 +69,8 @@ class CachedBufferedInput : public BufferedInput { : BufferedInput( std::move(readFile), readerOptions.getMemoryPool(), - metricsLog), + metricsLog, + ioStats.get()), cache_(cache), fileNum_(fileNum), tracker_(std::move(tracker)), diff --git a/velox/dwio/common/DirectBufferedInput.h b/velox/dwio/common/DirectBufferedInput.h index 815e0e19ebae..1c9155c59276 100644 --- a/velox/dwio/common/DirectBufferedInput.h +++ b/velox/dwio/common/DirectBufferedInput.h @@ -115,7 +115,8 @@ class DirectBufferedInput : public BufferedInput { : BufferedInput( std::move(readFile), readerOptions.getMemoryPool(), - metricsLog), + metricsLog, + ioStats.get()), fileNum_(fileNum), tracker_(std::move(tracker)), groupId_(groupId), diff --git a/velox/dwio/common/InputStream.cpp b/velox/dwio/common/InputStream.cpp index afd76c7cb6ad..4ce243ea469d 100644 --- a/velox/dwio/common/InputStream.cpp +++ b/velox/dwio/common/InputStream.cpp @@ -141,11 +141,11 @@ void ReadFileInputStream::vread( size_t(0), [&](size_t acc, const auto& r) { return acc + r.length; }); logRead(regions[0].offset, length, purpose); - auto readStartMs = getCurrentTimeMs(); + auto readStartMicro = getCurrentTimeMicro(); readFile_->preadv(regions, iobufs); if (stats_) { stats_->incRawBytesRead(length); - stats_->incTotalScanTime(getCurrentTimeMs() - readStartMs); + stats_->incTotalScanTime((getCurrentTimeMicro() - readStartMicro) * 1000); } }