-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly report lazy loaded inputBytes #11097
Conversation
✅ Deploy Preview for meta-velox canceled.
|
This pull request was exported from Phabricator. Differential Revision: D63414708 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pedroerp LGTM. Thanks for the improvement % nits.
velox/exec/tests/TableScanTest.cpp
Outdated
auto task = assertQuery(op, {filePath}, "select c0 % 3 from tmp"); | ||
|
||
// Ensure lazy stats are attributed to table scan. | ||
auto stats = task->taskStats(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: const auto stats
velox/vector/LazyVector.cpp
Outdated
@@ -41,7 +45,9 @@ void VectorLoader::load( | |||
vector_size_t resultSize, | |||
VectorPtr* result) { | |||
{ | |||
DeltaCpuWallTimer timer([&](auto& delta) { writeIOTiming(delta); }); | |||
DeltaCpuWallTimer lazyIoRecorder([&](auto& cpuDelta) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a new class for this as it now does delta cpu and io stats tracking. Maybe LazyIoStatsRecorder? We could just define in LazyVector.cpp? Thanks!
velox/exec/Driver.cpp
Outdated
int64_t inputBytesDelta = 0; | ||
it = lockStats->runtimeStats.find(LazyVector::kInputBytes); | ||
if (it != lockStats->runtimeStats.end()) { | ||
int64_t inputBytes = it->second.sum; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const int64_t inputBytes
This pull request was exported from Phabricator. Differential Revision: D63414708 |
59b440e
to
41fa353
Compare
Summary: Pull Request resolved: facebookincubator#11097 Whenever there is lazy loading, TableScan would come out with zero input and output bytes, and they would be attributed to the operator that in fact loaded the lazy vector. Using the existing mechanism to save it locally and periodically apply to the correct source operator. Reviewed By: xiaoxmeng Differential Revision: D63414708
velox/common/time/CpuWallTimer.h
Outdated
} | ||
|
||
private: | ||
// NOTE: Put `wallTimeStart_` before `cpuTimeStart_`, so that wall-time starts | ||
// counting earlier than cpu-time. | ||
const std::chrono::steady_clock::time_point wallTimeStart_; | ||
const uint64_t cpuTimeStart_; | ||
}; | ||
|
||
// Composes delta CpuWallTiming upon destruction and passes it to the user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// for public comment. Thanks!
velox/common/time/CpuWallTimer.h
Outdated
@@ -58,18 +58,13 @@ class CpuWallTimer { | |||
}; | |||
|
|||
// Keeps track of elapsed CPU and wall time from construction time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
This pull request was exported from Phabricator. Differential Revision: D63414708 |
Summary: Pull Request resolved: facebookincubator#11097 Whenever there is lazy loading, TableScan would come out with zero input and output bytes, and they would be attributed to the operator that in fact loaded the lazy vector. Using the existing mechanism to save it locally and periodically apply to the correct source operator. Reviewed By: xiaoxmeng Differential Revision: D63414708
41fa353
to
b9dd69f
Compare
This pull request was exported from Phabricator. Differential Revision: D63414708 |
Summary: Pull Request resolved: facebookincubator#11097 Whenever there is lazy loading, TableScan would come out with zero input and output bytes, and they would be attributed to the operator that in fact loaded the lazy vector. Using the existing mechanism to save it locally and periodically apply to the correct source operator. Reviewed By: xiaoxmeng Differential Revision: D63414708
b9dd69f
to
dfa0bc8
Compare
Summary: Pull Request resolved: facebookincubator#11097 Whenever there is lazy loading, TableScan would come out with zero input and output bytes, and they would be attributed to the operator that in fact loaded the lazy vector. Using the existing mechanism to save it locally and periodically apply to the correct source operator. Reviewed By: xiaoxmeng Differential Revision: D63414708
dfa0bc8
to
faaccef
Compare
This pull request was exported from Phabricator. Differential Revision: D63414708 |
This pull request has been merged in 42940c8. |
Conbench analyzed the 1 benchmark run on commit There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
Summary: Pull Request resolved: facebookincubator#11097 Whenever there is lazy loading, TableScan would come out with zero input and output bytes, and they would be attributed to the operator that in fact loaded the lazy vector. Using the existing mechanism to save it locally and periodically apply to the correct source operator. Reviewed By: xiaoxmeng Differential Revision: D63414708 fbshipit-source-id: d1bbc64fc7ec1ed952593aaeece0b02daed60038
Summary:
Whenever there is lazy loading, TableScan would come out with zero
input and output bytes, and they would be attributed to the operator that in
fact loaded the lazy vector. Using the existing mechanism to save it locally
and periodically apply to the correct source operator.
Differential Revision: D63414708