Git Product home page Git Product logo

meliae's Introduction

Meliae

A simple program for dumping python memory usage information to a disk format, which can then be parsed into useful things like graph representations.

It will likely grow to include a GUI for browsing the reference graph. For now it is mostly used in the python interpreter.

The name is simply a fun word (means Ash-wood Nymph).

vs. heapy

This project is similar to heapy (in the 'guppy' project), in its attempt to understand how memory has been allocated.

Currently, its main difference is that it splits the task of computing summary statistics, etc of memory consumption from the actual scanning of memory consumption. It does this, because I often want to figure out what is going on in my process, while my process is consuming huge amounts of memory (1GB, etc). It also allows dramatically simplifying the scanner, as I don't allocate python objects while trying to analyze python object memory consumption.

Code history

This repository was created from the Meliae launchpad project with:

bzr fast-export --git-branch=launchpad-trunk lp:meliae | git fast-import

The launchpad-trunk branch contains the state of code from the import.

meliae's People

Contributors

acdha avatar garyposter avatar isaacl avatar jameinel avatar jelmer avatar jhenstridge avatar mostawesomedude avatar rbtcollins avatar sourcefrog avatar trbs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

meliae's Issues

import error

I Just install meliae on my cestos

git clone [email protected]:isaacl/meliae.git
cd meliae
python setup.py install
python -c "from meliae import scannr"

got a error
image

KeyError: 'address 139921041104544 not present'

Using meliae via pyrasite on python3, I'm seeing this area when meliae tries to load the memory dump:

Traceback (most recent call last):sed        0    
  File "/opt/virtualenv/traffic5_venv/bin/pyrasite-memory-viewer", line 8, in <module>
    sys.exit(main())
  File "/opt/virtualenv/traffic5_venv/lib64/python3.6/site-packages/pyrasite/tools/memory_viewer.py", line 150, in main
    objects = loader.load(filename)
  File "/opt/virtualenv/traffic5_venv/lib64/python3.6/site-packages/meliae/loader.py", line 562, in load
    if not manager.collapse_instance_dicts():
  File "/opt/virtualenv/traffic5_venv/lib64/python3.6/site-packages/meliae/loader.py", line 432, in collapse_instance_dicts
    obj_1, obj_2 = obj
  File "meliae/_loader.pyx", line 481, in meliae._loader._MemObjectProxy.__getitem__
  File "meliae/_loader.pyx", line 477, in meliae._loader._MemObjectProxy.__getitem__
  File "meliae/_loader.pyx", line 767, in meliae._loader.MemObjectCollection.__getitem__
KeyError: 'address 139921041104544 not present'

py3 support?

hi, this is really a great tool.
but is there any future plan for support of python3?
thanks

'dict' object has no attribute 'itervalues'

An exception thrown when used with pyrasite-memory-viewer:

(py381torch160) [cxh@deepq ~]$ pyrasite-memory-viewer 3365181
loaded line 12838, 12839 objs,   1.5 /   1.5 MiB read in 0.1s
checked    12838 /    12839 collapsed      327
set parents    12511 /    12512
collapsed in 0.0s
set parents    12511 /    12512
Traceback (most recent call last):
  File "/home/cxh/.pyenv/versions/py381torch160/bin/pyrasite-memory-viewer", line 11, in <module>
    load_entry_point('pyrasite==2.0', 'console_scripts', 'pyrasite-memory-viewer')()
  File "/home/cxh/.pyenv/versions/3.8.1/envs/py381torch160/lib/python3.8/site-packages/pyrasite/tools/memory_viewer.py", line 153, in main
    PyrasiteMemoryViewer(pid=pid, objects=objects).main()
  File "/home/cxh/.pyenv/versions/3.8.1/envs/py381torch160/lib/python3.8/site-packages/pyrasite/tools/memory_viewer.py", line 130, in main
    self.view, self.exit_view = self.setup_view()
  File "/home/cxh/.pyenv/versions/3.8.1/envs/py381torch160/lib/python3.8/site-packages/pyrasite/tools/memory_viewer.py", line 86, in setup_view
    self.object_buttons = self.get_object_buttons()
  File "/home/cxh/.pyenv/versions/3.8.1/envs/py381torch160/lib/python3.8/site-packages/pyrasite/tools/memory_viewer.py", line 75, in get_object_buttons
    for i, line in enumerate(str(self.summary).split('\n')):
  File "/home/cxh/.pyenv/versions/3.8.1/envs/py381torch160/lib/python3.8/site-packages/meliae/loader.py", line 177, in __repr__
    self.by_size()
  File "/home/cxh/.pyenv/versions/3.8.1/envs/py381torch160/lib/python3.8/site-packages/meliae/loader.py", line 198, in by_size
    summaries = sorted(self.type_summaries.itervalues(),
AttributeError: 'dict' object has no attribute 'itervalues' 

python: 3.8.1
meliae: 0.5.1
pyrasite: 2.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.