zhuyifei1999

Results 54 comments of zhuyifei1999

Seems non-deterministic for some reason https://github.com/zhuyifei1999/guppy3/runs/4731656956?check_suite_focus=true observes failure only when both coverage and sdist are disabled, whereas most of my attempts show the exact reverse. Targeting the same code to...

Hmm... my main concern is if people will do numeric operations on these numbers, and it'll be troublesome to copy & paste. Maybe I'll just do the comma separation for...

``` >>> __import__('guppy').hpy().heap() Partition of a set of 36,633 objects. Total size = 4,257,677 bytes. Index Count % Size % Cumulative % Kind (class / dict of class) 0 10,391...

> Good idea and work. Is there an error in the count? Set of 10,039,006 vs 10,038,996 more rows No ;) 10039006 - 10038996 = 10, 10 rows already displayed...

No, not at the moment. Guppy uses Python's internal traversal, tp_traverse, to find what each object refers to (see: [stdtypes.c#L359](https://github.com/zhuyifei1999/guppy3/blob/28d1870eb1e3ffee56b554700da30b5dff9b2771/src/heapy/stdtypes.c#L359) [hv.c#L298](https://github.com/zhuyifei1999/guppy3/blob/28d1870eb1e3ffee56b554700da30b5dff9b2771/src/heapy/hv.c#L298)). This mechanism is also used by the python garbage...

Interesting. It seems to inject a [piece of python code](https://github.com/facebookincubator/memory-analyzer/blob/master/memory_analyzer/templates/analysis.py.template) into the the target process [via gdb](https://github.com/facebookincubator/memory-analyzer/blob/master/memory_analyzer/analysis_utils.py#L51). Not sure I agree with the runtime safety of doing so but it...

This can't-be-simpler window manager will make focus possible: ```c #include int main() { Display *dpy; Window root; XEvent ev; XWindowChanges wc; if (!(dpy = XOpenDisplay(0))) return 1; root = DefaultRootWindow(dpy);...

Possibly scanning all the fds in /proc caused the lag? htop does this too so I wasn't concerned. Could you do a `$ time strace -c path/to/nvtop`, wait a few...

Also, approximately how many processes are running and how many fds are open? i.e. what's the output of `$ ls -d /proc/{1..9}*/fd/* | wc -l` and `$ ls /proc/{1..9}*/fd/ |...

> ``` > real 0m9.998s > user 0m0.047s > sys 0m0.519s > ``` To make sure, during this run, was lag happening? Because (0.519 + 0.047) / 9.998 = 5.7%...