Add stats --json output#377
Conversation
6af27c1 to
016d619
Compare
|
new forced-push:
|
016d619 to
0bc1567
Compare
|
Fixed missing empty line by running I realized I can test PR checks by creating PR to forked "main". All checks passed in test PR: oddsun#1. Maybe this approach could be added to |
0bc1567 to
2901581
Compare
godlygeek
left a comment
There was a problem hiding this comment.
I've reviewed this, and spotted a few small things that will need to be fixed.
|
On top of those, can you also update your commit message to use your real name in the signed-off-by? Per https://github.com/bloomberg/memray/blob/main/CONTRIBUTING.md#contribution-licensing we need a real name for the DCO signoff, not a pseudonym. |
|
Got it. Do you want me to make the changes and squash into a single commit again and then update the signoff? |
Yes, that would be perfect! |
177c34b to
9b127a8
Compare
9b127a8 to
92d4267
Compare
godlygeek
left a comment
There was a problem hiding this comment.
I've pushed a few more commits here to polish this a little bit: adding some documentation, adding support for --output and --force like our other subcommands that output files accept, and tweaking the format of the JSON a little bit to make it easier to use.
@pablogsal Since I've edited this pretty heavily now, would you mind giving this a review?
21baa93 to
051c97c
Compare
Will review this today or monday 👍 |
051c97c to
7e69771
Compare
|
The 3.8 tests are failing because of ipython/ipython#14053 - either the IPython maintainers need to yank the 8.13 release, or we need to land #380 and rebase this. |
I've landed #380, we can always remove that workaround if and when the IPython maintainers yank the 8.13 release. EDIT: the IPython maintainers have now yanked 8.13 and so #381 reverted the #380 PR ^^ |
7e69771 to
b8b3d23
Compare
Signed-off-by: Hao Sun <1161465+oddsun@users.noreply.github.com>
- For the histogram, dump objects rather than lists, in order to help explain what the values represent. - For the count of allocations by allocator, dump an object mapping allocator name to count. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
b8b3d23 to
088e2d2
Compare
Closes: #187
Describe your changes
Added json flag and implementation to allow export stats to json file using
memray stats --json ....Testing performed
Added 2 unit tests
tests/unit/test_stats_reporter.py::test_stats_output: test printing stats to terminaltests/unit/test_stats_reporter.py::test_stats_output_json: test output json statsAdditional context
pycon2023