bloomberg / memray

Memray is a memory profiler for Python
https://bloomberg.github.io/memray/
Apache License 2.0
13.17k stars 392 forks source link

Summary reporter no longer reporting anything with 1.9.0 #434

Closed marceldev89 closed 1 year ago

marceldev89 commented 1 year ago

Is there an existing issue for this?

Current Behavior

$ memray summary s-pickle-5.bin
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┓
┃                                                        ┃     <Total ┃     Total ┃       Own ┃       Own ┃ Allocati… ┃
┃ Location                                               ┃    Memory> ┃  Memory % ┃    Memory ┃  Memory % ┃     Count ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━┩
└────────────────────────────────────────────────────────┴────────────┴───────────┴───────────┴───────────┴───────────┘

Expected Behavior

$ memray summary s-pickle-5.bin
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┓
┃                                                        ┃     <Total ┃     Total ┃       Own ┃       Own ┃ Allocati… ┃
┃ Location                                               ┃    Memory> ┃  Memory % ┃    Memory ┃  Memory % ┃     Count ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━┩
│ run_path at /usr/lib/python3.10/runpy.py               │  389.682MB │    46.56% │    0.000B │     0.00% │     90594 │
│ _run_code at /usr/lib/python3.10/runpy.py              │  389.671MB │    46.56% │    0.000B │     0.00% │     90582 │

Steps To Reproduce

$ memray run -o test.bin
$ memray summary test.bin

Memray Version

1.9.0

Python Version

3.10

Operating System

Linux

Anything else?

I've tried with Python 3.10 and 3.11 and both produce no output. It is giving the messages about calculating stuff. Memray version 1.8.1 still works fine.

godlygeek commented 1 year ago

Oops, yeah, I can reproduce that. Looks like a bug introduced in #418 that our code review and test suite missed. I'm investigating...

marceldev89 commented 1 year ago

Confirming that 1.9.1 works as expected. Thank you! ❤️

godlygeek commented 1 year ago

Thank you for the report!