-
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
misc: Add toString() to OutputBuffer stats #11562
Conversation
✅ Deploy Preview for meta-velox canceled.
|
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.
@yingsu00 thanks for the improvement. Do you want to have a unit test for this? thanks!
velox/exec/OutputBuffer.h
Outdated
return fmt::format( | ||
"[{}, {}, {}, {}, {}, {}, {}]", | ||
finished, | ||
bytesBuffered, |
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.
use succinctBytes for stats in bytes
velox/exec/OutputBuffer.h
Outdated
} | ||
|
||
return fmt::format( | ||
"[ bufferedBytes: {}, bufferedPages: {}, " |
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.
[bufferedBytes
velox/exec/OutputBuffer.h
Outdated
"[ bufferedBytes: {}, bufferedPages: {}, " | ||
"totalBytesSent: {}, totalRowsSent: {}, totalPagesSent: {}, " | ||
"averageBufferTimeMs: {}, numTopBuffers: {}, {}]", | ||
bufferedBytes, |
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
velox/exec/OutputBuffer.h
Outdated
std::string destinationBufferStats; | ||
if (!buffersStats.empty()) { | ||
for (auto& destinationBufferStat : buffersStats) { | ||
destinationBufferStats += destinationBufferStat.toString(); |
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.
Do we want one line per each destination buffer given there would be hundreds of them for better display? Thanks!
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.
Yes I have updated this PR to one line per destination buffer
@xiaoxmeng Thanks for reviewing! I haven't finished the test yet, but here's the output what it looks like:
Let me know if it looks ok. |
5a4513c
to
3df500d
Compare
d246b66
to
503e0fb
Compare
97f067b
to
e9b83f4
Compare
@assignUser @pedroerp @xiaoxmeng The tests are green now, could you please review again? The current CMakelists.txt looks like this
Thank you! |
velox/common/testutil/CMakeLists.txt
Outdated
velox_add_library(velox_test_output_matcher OutputMatcher.cpp) | ||
velox_link_libraries(velox_test_output_matcher PUBLIC Folly::folly GTest::gtest | ||
re2::re2) |
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.
Like this it will still fail the build due to missing GTest when VELOX_BUILD_TESTING is not set. But because of the refactor you can just move it into the if
and that should be fine (it's just used in tests right?)
e9b83f4
to
a5e42e1
Compare
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.
CMake looks good now, thanks!
a5e42e1
to
ee05acf
Compare
@xiaoxmeng I've addressed all comments and added test. The tests all pass now. Do you want to review again? Many thanks! |
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.
@yingsu00 thanks for the update % nit.
velox/exec/OutputBuffer.h
Outdated
std::string toString() const { | ||
return fmt::format( | ||
"[finished: {}, bytesBuffered: {}, rowsBuffered: {}, pagesBuffered: {}, bytesSent: {}, rowsSent: {}, pagesSent:{}]", | ||
// "[{}, {}, {}, {}, {}, {}, {}]", |
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.
Remove //?
ee05acf
to
a005bbb
Compare
@kgpai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
CI pass dropped to 37% with this change. |
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
/* |
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.
License header is twice here.
…kincubator#11562) Summary: Backing out D67304118: Add toString() to OutputBuffer stats since it breaks certain tests : https://github.com/facebookincubator/velox/actions/runs/12305614280/job/34345592257 . Differential Revision: D67403265
…kincubator#11562) (facebookincubator#11906) Summary: Backing out D67304118: Add toString() to OutputBuffer stats since it breaks certain tests : https://github.com/facebookincubator/velox/actions/runs/12305614280/job/34345592257 . Differential Revision: D67403265
…#11906) Summary: Pull Request resolved: #11906 Backing out D67304118: Add toString() to OutputBuffer stats since it breaks certain tests : https://github.com/facebookincubator/velox/actions/runs/12305614280/job/34345592257 . Reviewed By: bikramSingh91 Differential Revision: D67403265 fbshipit-source-id: 8c0723b2748645e88a68ddf57c2b1cc5dbbb2095
Sample output: