Skip to content
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

Modified stats_dump() To Return Internal Stats As String #403

Merged
merged 1 commit into from
Nov 2, 2020

Conversation

nguyenv
Copy link
Collaborator

@nguyenv nguyenv commented Oct 28, 2020

Previously, tiledb_stats_dump() output to stdout. However, Jupyter notebooks
do not capture or redirect external stdout and thus were not able to display
internal stats. tiledb_stats_dump() now outputs to a temporary file which is
then converted to a Python string.


[ch3357]

@nguyenv nguyenv requested a review from ihnorton October 28, 2020 06:04
Copy link
Member

@ihnorton ihnorton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Some small change suggestions to make sure we still get the stats from the python side.

tiledb/libtiledb.pyx Outdated Show resolved Hide resolved
tiledb/libtiledb.pyx Outdated Show resolved Hide resolved
tiledb/libtiledb.pyx Show resolved Hide resolved
@nguyenv nguyenv force-pushed the vn/stat_dump_to_fp branch 2 times, most recently from b3069dc to 93ea38d Compare October 30, 2020 22:32
@nguyenv nguyenv requested a review from ihnorton October 31, 2020 01:31
Copy link
Member

@ihnorton ihnorton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small tweaks and then LGTM.

tiledb/libtiledb.pyx Outdated Show resolved Hide resolved
tiledb/libtiledb.pyx Outdated Show resolved Hide resolved
tiledb/core.cc Outdated Show resolved Hide resolved
Previously, tiledb_stats_dump() output to stdout. However, Jupyter notebooks
do not capture or redirect external stdout and thus were not able to display
internal stats. tiledb_stats_dump() now outputs to a temporary file which is
then converted to a Python string.

This also required a to print_stats() which has been renamed to
python_internal_stats(). Previously, print_stats() output the internal stats
to stdout. The modified function returns a std::string.
@nguyenv nguyenv force-pushed the vn/stat_dump_to_fp branch from 93ea38d to e4e76c6 Compare November 2, 2020 13:32
Copy link
Member

@ihnorton ihnorton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 💯

@nguyenv nguyenv merged commit 39d4f9a into dev Nov 2, 2020
@nguyenv nguyenv deleted the vn/stat_dump_to_fp branch November 2, 2020 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants