Giter Site home page Giter Site logo

pympler's People

Watchers

 avatar

pympler's Issues

No documentation for how to track an object via the web interface

What steps will reproduce the problem?
  View docs page http://packages.python.org/Pympler/library/web.html

What is the expected output? What do you see instead?
  The web interface says on the tracker tab to read the docs if you want to track objects.  But the docs aren't there.
  The docs tell you that you can pass a tracker object to the web server to display the memory usage of objects.  But that's not actually so, and I spent a good chunk of time figuring out why it wouldn't display my tracker object.  In actual fact, you not only have to pass a tracker object, but you have to run tracker.start_periodic_snapshots(interval=<seconds>).  That might be obvious to experienced users, but if that little bit of documentation were added it would help new users a great deal.

What version of the product are you using? On what operating system?
  v3.0 with python 2.7

Original issue reported on code.google.com by [email protected] on 31 Jan 2013 at 12:19

Run tests from setup.py

* Run pre- and post-installation tests from setup.py (invoke test/runtest.py)
* Mention it in the README

Original issue reported on code.google.com by [email protected] on 18 Nov 2008 at 11:36

Test failure on Mac OSX 64bit Python 2.6

What steps will reproduce the problem?

> python setup.py try

What is the expected output? What do you see instead?

{{{
FAIL: Test thread info is extracted.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/netspinners/projects/Pympler-0.2.0/test/test_process.py", line 82, in test_get_current_threads
    self.assertEqual(type(tinfo.ident), int)
AssertionError: <type 'NoneType'> != <type 'int'>
}}}

Original issue reported on code.google.com by [email protected] on 29 Jul 2011 at 4:44

Tracker graph does not display -- solution

What steps will reproduce the problem?

python
import pympler.web, pympler.classtracker.ClassTracker
tracker = pympler.classtracker.ClassTracker()
tracker.start_periodic_snapshots(interval=1)
pympler.web.start_in_background(tracker=tracker)
 Now browse to localhost:8090

What is the expected output? What do you see instead?
  The javascript graph does not appear because of a javascript error.
  The problem is cause by python's string formatting of large numbers in lists to have an 'L' after them -- which is not understood by javascript.

What version of the product are you using? On what operating system?
  python 2.7

Please provide any additional information below.
  This can be fixed with the following patch to tracker.tpl on line 71:
-                            data: {{series}},
+                            data: {{str(series).replace('L', '')}},

Original issue reported on code.google.com by [email protected] on 31 Jan 2013 at 12:09

Attachments:

Imports fail when python interpreter is run with optimization

What steps will reproduce the problem?
$> python -OO
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pympler.classtracker import ClassTracker
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/kparmar/.virtualenvs/sync/lib/python2.7/site-packages/pympler/classtracker.py", line 14, in <module>
    from pympler.classtracker_stats import ConsoleStats
  File "/Users/kparmar/.virtualenvs/sync/lib/python2.7/site-packages/pympler/classtracker_stats.py", line 7, in <module>
    from pympler.util.compat import pickle
  File "/Users/kparmar/.virtualenvs/sync/lib/python2.7/site-packages/pympler/util/compat.py", line 43, in <module>
    import pympler.util.bottle2 as bottle
  File "/Users/kparmar/.virtualenvs/sync/lib/python2.7/site-packages/pympler/util/bottle2.py", line 1090, in <module>
    post.__doc__ = route.__doc__.replace('GET','POST')
AttributeError: 'NoneType' object has no attribute 'replace'

What is the expected output? What do you see instead?
No errors.

What version of the product are you using? On what operating system?
Pympler v 0.2.1
Mac OS X v 10.8.2

Fix attached.

Original issue reported on code.google.com by [email protected] on 16 Oct 2012 at 2:24

Attachments:

Add code coverage analysis to test-suite

During the Python3.0 port I realized that large (and important) parts of
the heapmonitor are not covered by the tests. Would be great if a coverage
tool could be integrated in the test infrastructure.

http://nedbatchelder.com/code/modules/coverage.html
http://darcs.idyll.org/~t/projects/figleaf/doc/

Original issue reported on code.google.com by [email protected] on 26 Oct 2008 at 1:40

Some Muppy tests take a very long time and fail in the new test environment

In the new test environment running the whole test environment takes very
much time and lets a number of tests fail. Python 2.5.2 at Ubuntu Linux 8.04.

If only muppy tests are run, every test passes and the test completes in
about 2-3 minutes:

$ python runtest.py test/muppy

However, if I run the whole test-suite at once, it takes about an hour and
some tests fail:

$ python runtest.py

(see below)

Either the test should be changed to not be affected by environment changes
(how it is called from the testing environment), or we could revert the
testing environment to run every test in its own little world (fix the
symptom). Should be discussed in the mailing list.

___________________________________________________

$ time python runtest.py
Test referent identification. ... ok
Test garbage annotation. ... ok
Test pruning of reference graph. ... ok
Test serialization of log data. ... ok
Test background monitoring. ... ok
Test footprint description. ... ok
Test timestamp of snapshots. ... ok
Test modifying name. ... ok
Test detaching from tracked classes. ... ok
Test lifetime of tracked objects. ... ok
Test registering objects by name. ... ok
Test tracking objects through classes. ... ok
Test tracking new style classes. ... ok
Test lifetime of tracked objects. ... ok
Test recursive sizing and saving of referents. ... ok
Test registering objects by name. ... ok
Test object registration. ... ok
Test intrackable objects. ... ok
Check that only valid codepoints are returned. ... ok
Check if the diff of to object lists is correct. ... ok
Check that only elements within the specified size boundaries ... ok
Check that only elements of a certain type are included, ... ok
Check that referents are included in return value. ... ok
Check that the return value is the sum of the size of all objects. ... ok
Check that (non-)container objects are identified correctly. ... ok
Check that objects returns a non-empty list. ... ok
Verify that this operations returns a duplicate-free lists. ... ok
Check that objects are sorted by size. ... ok
test_get_tree (test.muppy.test_refbrowser.TreeTest) ... ok
Check node functionality. ... ok
Check that the right representation is returned. ... ok
Check that a single object's data is correctly subtracted from a ... ok
test_summarize (test.muppy.test_summary.SummaryTest) ... ok
test_summary_diff (test.muppy.test_summary.SummaryTest) ... ok
Check that all and only empty entries are removed from a summary. ... ok
Check that all objects of a summary are traversed. ... ok
test_otracker_diff (test.muppy.test_tracker.TrackerTest) ... ok
test_otracker_get_objects (test.muppy.test_tracker.TrackerTest) ... ok
Check that a summary is created correctly. ... FAIL
Check that the diff is computed correctly. ... FAIL
Check that a summary is stored under the correct key and most ... FAIL

======================================================================
FAIL: Check that a summary is created correctly.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ludwig/Projects/pympler-alpha/test/muppy/test_tracker.py",
line 84, in test_stracker_create_summary
    self.assert_(self._contains_indicator(sn) == None)
AssertionError

======================================================================
FAIL: Check that the diff is computed correctly.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ludwig/Projects/pympler-alpha/test/muppy/test_tracker.py",
line 50, in test_stracker_diff
    self.assert_(self._contains_indicator(diff) == -1)
AssertionError

======================================================================
FAIL: Check that a summary is stored under the correct key and most
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ludwig/Projects/pympler-alpha/test/muppy/test_tracker.py",
line 117, in test_stracker_store_summary
    self.assert_(self._contains_indicator(s) == 1)
AssertionError

----------------------------------------------------------------------
Ran 41 tests in 3323.390s

FAILED (failures=3)

real    55m24.974s
user    55m6.235s
sys 0m8.421s

Original issue reported on code.google.com by [email protected] on 14 Oct 2008 at 9:59

testcases break on `python2 setup.py try` with python 2.7.1

Hi,
on Arch Linux 64bit, kernel 2.6.37:
Linux gibran 2.6.37-ARCH #1 SMP PREEMPT Sat Jan 29 20:00:33 CET 2011 x86_64 
Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz GenuineIntel GNU/Linux

$ svn checkout http://pympler.googlecode.com/svn/tags/0.1 pympler && cd pympler 
&& python2 --version && python2 setup.py try 
A    pympler/test
A    pympler/test/asizeof
A    pympler/test/asizeof/__init__.py
A    pympler/test/asizeof/test_asizeof.py
A    pympler/test/heapmonitor
A    pympler/test/heapmonitor/__init__.py
A    pympler/test/heapmonitor/test_heapmonitor.py
A    pympler/test/__init__.py
A    pympler/test/muppy
A    pympler/test/muppy/test_muppy.py
A    pympler/test/muppy/test_tracker.py
A    pympler/test/muppy/test_summary.py
A    pympler/test/muppy/test_mprofile.py
A    pympler/test/muppy/test_refbrowser.py
A    pympler/test/muppy/__init__.py
A    pympler/test/runtest.py
A    pympler/tools
A    pympler/tools/sphinx.py
A    pympler/tools/pychok.py
A    pympler/tmp
A    pympler/tmp/pympler.txt
A    pympler/tmp/feature-overview.txt
A    pympler/NOTICE
A    pympler/LICENSE
A    pympler/dist
A    pympler/doc
A    pympler/doc/build
A    pympler/doc/source
A    pympler/doc/source/changes.rst
A    pympler/doc/source/copyright.rst
A    pympler/doc/source/intro.rst
A    pympler/doc/source/images
A    pympler/doc/source/images/muppy_guibrowser.png
A    pympler/doc/source/.static
A    pympler/doc/source/.static/default.css
A    pympler/doc/source/detailed_toc.rst
A    pympler/doc/source/related.rst
A    pympler/doc/source/asizeof.rst
A    pympler/doc/source/glossary.rst
A    pympler/doc/source/muppy
A    pympler/doc/source/muppy/muppy.rst
A    pympler/doc/source/muppy/intro.rst
A    pympler/doc/source/muppy/library
A    pympler/doc/source/muppy/library/muppy.rst
A    pympler/doc/source/muppy/library/tracker.rst
A    pympler/doc/source/muppy/library/summary.rst
A    pympler/doc/source/muppy/library/refbrowser.rst
A    pympler/doc/source/muppy/library/library.rst
A    pympler/doc/source/muppy/tutorial.rst
A    pympler/doc/source/conf.py
A    pympler/doc/source/.templates
A    pympler/doc/source/.templates/layout.html
A    pympler/doc/source/heapmonitor.rst
A    pympler/doc/source/index.rst
A    pympler/CHANGELOG
A    pympler/setup.py
A    pympler/pympler
A    pympler/pympler/asizeof
A    pympler/pympler/asizeof/__init__.py
A    pympler/pympler/asizeof/asizeof.py
A    pympler/pympler/heapmonitor
A    pympler/pympler/heapmonitor/__init__.py
A    pympler/pympler/heapmonitor/heapmonitor.py
A    pympler/pympler/__init__.py
A    pympler/pympler/metadata.py
A    pympler/pympler/muppy
A    pympler/pympler/muppy/muppy.py
A    pympler/pympler/muppy/tracker.py
A    pympler/pympler/muppy/mprofile.py
A    pympler/pympler/muppy/summary.py
A    pympler/pympler/muppy/__init__.py
A    pympler/pympler/muppy/refbrowser.py
A    pympler/pympler/sizer
A    pympler/pympler/sizer/__init__.py
A    pympler/pympler/sizer/asizeof.py
A    pympler/developer-notes.txt
A    pympler/run.py
A    pympler/MANIFEST.in
A    pympler/README
Checked out revision 289.
Python 2.7.1
running try
/usr/bin/python2 test/runtest.py -pre-install -verbose 3
Python 2.7.1 (r271:86832, Jan  6 2011, 11:45:30) 
64-bit [GCC 4.5.2]

test_codepoint_included (muppy.test_mprofile.MProfileTest)
Test that only valid codepoints are returned. ... ok
test_repr (muppy.test_summary.SummaryTest)
Test that the right representation is returned. ... ok
test_subtract (muppy.test_summary.SummaryTest)
Test that a single object's data is correctly subtracted from a summary. ... ok
test_summarize (muppy.test_summary.SummaryTest)
Test summarize method. ... ok
test_summary_diff (muppy.test_summary.SummaryTest)
Test summary diff. ... ok
test_sweep (muppy.test_summary.SummaryTest)
Test that all and only empty entries are removed from a summary. ... ok
test_traverse (muppy.test_summary.SummaryTest)
Test that all objects of a summary are traversed. ... ok
test_get_tree (muppy.test_refbrowser.TreeTest)
Test reference browser tree representation. ... {1: 'root id'}
FAIL
test_node (muppy.test_refbrowser.TreeTest)
Test node functionality. ... ok
test_diff (muppy.test_muppy.MuppyTest)
Test if the diff of to object lists is correct. ... ok
test_filter_by_size (muppy.test_muppy.MuppyTest)
Test that only elements within the specified size boundaries ... ok
test_filter_by_type (muppy.test_muppy.MuppyTest)
Test that only elements of a certain type are included, ... ok
test_get_referents (muppy.test_muppy.MuppyTest)
Test that referents are included in return value. ... ok
test_get_size (muppy.test_muppy.MuppyTest)
Test that the return value is the sum of the size of all objects. ... ok
test_is_containerobject (muppy.test_muppy.MuppyTest)
Test that (non-)container objects are identified correctly. ... ok
test_objects (muppy.test_muppy.MuppyTest)
Test that objects returns a non-empty list. ... ok
test_remove_duplicates (muppy.test_muppy.MuppyTest)
Test that this operations returns a duplicate-free lists. ... ok
test_sort (muppy.test_muppy.MuppyTest)
Test that objects are sorted by size. ... ok
test_otracker_diff (muppy.test_tracker.TrackerTest)
Test object tracker diff. ... ERROR
test_otracker_get_objects (muppy.test_tracker.TrackerTest)
Test object tracker. ... ok
test_stracker_create_summary (muppy.test_tracker.TrackerTest)
Test that a summary is created correctly. ... ok
test_stracker_diff (muppy.test_tracker.TrackerTest)
Test that the diff is computed correctly. ... ok
test_stracker_store_summary (muppy.test_tracker.TrackerTest)
Test that a summary is stored under the correct key and most ... ok
test_flatsize_vs_getsizeof (asizeof.test_asizeof.AsizeofTest)
Test asizeof.flatsize() vs sys.getsizeof() ... ok
test_edges (heapmonitor.test_heapmonitor.GarbageTestCase)
Test referent identification. ... ok
test_findgarbage (heapmonitor.test_heapmonitor.GarbageTestCase)
Test garbage annotation. ... ok
test_noprune (heapmonitor.test_heapmonitor.GarbageTestCase)
Test pruning of reference graph. ... ok
test_dump (heapmonitor.test_heapmonitor.LogTestCase)
Test serialization of log data. ... ok
test_background_monitoring (heapmonitor.test_heapmonitor.SnapshotTestCase)
Test background monitoring. ... ok
test_desc (heapmonitor.test_heapmonitor.SnapshotTestCase)
Test footprint description. ... ok
test_snapshot_members (heapmonitor.test_heapmonitor.SnapshotTestCase)
Test existence and value of snapshot members. ... ok
test_timestamp (heapmonitor.test_heapmonitor.SnapshotTestCase)
Test timestamp of snapshots. ... ok
test_change_name (heapmonitor.test_heapmonitor.TrackClassTestCase)
Test modifying name. ... ok
test_detach (heapmonitor.test_heapmonitor.TrackClassTestCase)
Test detaching from tracked classes. ... ok
test_keep (heapmonitor.test_heapmonitor.TrackClassTestCase)
Test lifetime of tracked objects. ... ok
test_track_by_name (heapmonitor.test_heapmonitor.TrackClassTestCase)
Test registering objects by name. ... ok
test_track_class (heapmonitor.test_heapmonitor.TrackClassTestCase)
Test tracking objects through classes. ... ok
test_track_class_new (heapmonitor.test_heapmonitor.TrackClassTestCase)
Test tracking new style classes. ... ok
test_keep (heapmonitor.test_heapmonitor.TrackObjectTestCase)
Test lifetime of tracked objects. ... ok
test_mixed_tracking (heapmonitor.test_heapmonitor.TrackObjectTestCase)
Test mixed instance and class tracking. ... ok
test_recurse (heapmonitor.test_heapmonitor.TrackObjectTestCase)
Test recursive sizing and saving of referents. ... ok
test_track_by_name (heapmonitor.test_heapmonitor.TrackObjectTestCase)
Test registering objects by name. ... ok
test_track_object (heapmonitor.test_heapmonitor.TrackObjectTestCase)
Test object registration. ... ok
test_type_errors (heapmonitor.test_heapmonitor.TrackObjectTestCase)
Test intrackable objects. ... ok

======================================================================
ERROR: test_otracker_diff (muppy.test_tracker.TrackerTest)
Test object tracker diff.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dieter/code/packages/python-pympler/pympler/test/muppy/test_tracker.py", line 145, in test_otracker_diff
    diff = otracker.get_diff()
  File "/home/dieter/code/packages/python-pympler/pympler/pympler/muppy/tracker.py", line 220, in get_diff
    diff = muppy.get_diff(self.o0, self.o1)
  File "/home/dieter/code/packages/python-pympler/pympler/pympler/muppy/muppy.py", line 86, in get_diff
    res['+'] = get_not_included(right, left_objects)
  File "/home/dieter/code/packages/python-pympler/pympler/pympler/muppy/muppy.py", line 77, in get_not_included
    elif o not in bar[type(o)]:
TypeError: can only compare to a set

======================================================================
FAIL: test_get_tree (muppy.test_refbrowser.TreeTest)
Test reference browser tree representation.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dieter/code/packages/python-pympler/pympler/test/muppy/test_refbrowser.py", line 65, in test_get_tree
    self.assert_(r in children)
AssertionError: False is not True

----------------------------------------------------------------------
Ran 44 tests in 25.065s

FAILED (failures=1, errors=1)


Original issue reported on code.google.com by [email protected] on 10 Feb 2011 at 9:56

Keep track of Python bugfix on tp_traverse implementation for iterators

Extract from http://bugs.python.org/issue3680

"The dict, set, and deque iterators do not implement tp_traverse although
they reference container objects. This can lead to reference cycles
which will not be collected."

Once this is fixed, pympler can use gc.get_referents to get all objects
referents. Currently this is not possible for the above mentioned iterators.

Original issue reported on code.google.com by [email protected] on 27 Aug 2008 at 6:43

Unified documentation

Up to now, we have three separate documentations for each of the three main
modules. It would be nice to merge them in a unified structure.
Furthermore, we should give meaningful names in the TOC (asizeof,muppy and
classtracker won't mean anything to most people). Here is a quick draft of
how this could look like (the layout is derived from muppy's docs):

* Sizing individual objects - Low-level interface (Asizeof)
* Detecting leaks/On-line analysis (Muppy) [couldn't think of a good name]
* Tracking class instances (ClassTracker)
* Library Documentation (for each module)
* Tutorials

A first step would be to split or replicate the library docs for asizeof
and lift the muppy documentation one level.

Original issue reported on code.google.com by [email protected] on 7 Feb 2009 at 10:10

Python 3.0 compliance

All pympler modules and the infrastructure should be made compatible with
Python 3.0. 

* 2to3 can help to find incompatibilities in modules
* We need to find a way of importing modules that works with all supported
Python versions (*/__init__.py files)
* test with "python runtest.py -P python3.0"

Original issue reported on code.google.com by [email protected] on 26 Oct 2008 at 1:34

test.tracker.test_stats test_html fails

======================================================================
ERROR: Test emitting HTML statistics.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Projects\Pympler-0.2.0\test\tracker\test_stats.py", line 284, in test_html
    stats.create_html(output)
  File "C:\Projects\Pympler-0.2.0\pympler\classtracker_stats.py", line 714, in create_html
    os.mkdir(self.filesdir)
WindowsError: [Error 3] Das System kann den angegebenen Pfad nicht finden: 
'tmp/data/footest_files'



Original issue reported on code.google.com by [email protected] on 18 Jul 2011 at 10:00

latest svn 10.09.2009 produces 2 errors on Windows system

What steps will reproduce the problem?
1. get latest svn
2. python setup.py try

you'll see:

======================================================================
ERROR: Test rendering of graph.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\django-projects\pympler\test\gui\test_garbage.py", line 232, in
test_render
    g.render('garbage.eps')
  File "D:\django-projects\pympler\pympler\gui\graph.py", line 299, in render
    p = Popen((cmd, '-T%s' % format, '-o', filename), stdin=PIPE,
close_fds=True)
  File "d:\python26\lib\subprocess.py", line 553, in __init__
    raise ValueError("close_fds is not supported on Windows "
ValueError: close_fds is not supported on Windows platforms if you redirect
stdin/stdout/stderr

======================================================================
FAIL: Test merging of reference trees.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\django-projects\pympler\test\tracker\test_stats.py", line 139,
in test_merge
    assert fm.size == sz[0] + sz[1], (fm.size, sz[0], sz[1])
AssertionError: (21664, 20808, 784)

----------------------------------------------------------------------
Ran 65 tests in 67.141s

FAILED (failures=1, errors=1)


What version of the product are you using? On what operating system?
latest svn on Windows XP SP3, python2.6.1

pympler 0.1 produced no errors with the same command

Original issue reported on code.google.com by [email protected] on 10 Aug 2009 at 11:57

Test failure Windows 7 64bit with ActivePython 2.7

What steps will reproduce the problem?

> python2.7 setup.py try

What is the expected output? What do you see instead?

FAIL: test_snapshot_members (tracker.test_classtracker.SnapshotTestCase)
Test existence and value of snapshot members.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\ludwig\Projects\pympler\test\tracker\test_classtracker.py", line 195, in test_snapshot_members
    self.assert_(fp.system_total.vsz >= fp.system_total.rss)
AssertionError: False is not true


Please use labels and text to provide additional information.

Original issue reported on code.google.com by [email protected] on 30 Jul 2011 at 12:56

Issue with metadata.py and setup.py on installation

* Quoted the relevant info (hopefully) of the Skype meeting below
* In the process, change project_name in metadata.py to "Pympler"

[Di Nov 18 2008 20:53:27] Jean Brouwers: running setup failed during
install and the reason is that setop copies some text from one of the
doc/source files ...
[Di Nov 18 2008 20:55:06] … since that file is not part of the release I
changed metadata.py to include an slightly edited version of that text and
moved the file up.  I do not recall whether that was needed but it makes
sense to keep metadata and MANiFEST.in in the same dir
...
[Di Nov 18 2008 21:04:07] Schuppe: "python setup.py sdist"?
[Di Nov 18 2008 21:04:18] Jean Brouwers: first that
[Di Nov 18 2008 21:04:34] … then upack the release and run setup.py
[Di Nov 18 2008 21:04:57] … that fails without the changes in metadata.py
[Di Nov 18 2008 21:05:36] Schuppe: okay, got it
[Di Nov 18 2008 21:05:43] Jean Brouwers: just make a release and try to
install that,  the problem is obvious right away

Original issue reported on code.google.com by [email protected] on 18 Nov 2008 at 11:33

Zip created with run.py cannot be uploaded to the cheeseshop

From Ludwig: 
You may have seen that I
added a zipping function to run.py which should create the doc archive
ready for Pypi upload. However, the zip is rejected for some reason with
an odd error. The produced archive seems to be intact, but somewhere
there must be a problem that makes Pypi fail on it. When the archive is
created with system tools, it works fine.

Unfortunately, debugging this problem requires to test it, which blows
up the online do documentation temporarily if the zip is rejected.

It would be nice if either of you could take a look at the zipping
function. It might be a coding error or related to my Python
version/platform (2.5.2 @ 32bit Linux).

Original issue reported on code.google.com by [email protected] on 17 Dec 2008 at 12:00

Runtime for setup.py try and test

Trying Pympler and running the tests can take a variable amount of time.  One 
example, on my Intel 
Mac (1.9 GHz Core Duo, 2 GB RAM) they take about 78 seconds but on my PowerPC 
Mac (400 MHz 
G4, 512 MB RAM) it is much longer, 560 secs.

We should make a note in the README file or in the release notes that ... "the 
time to run the tests 
varies anywhere from about one minute to as much as 10 minutes, depending on 
your platform".


Original issue reported on code.google.com by [email protected] on 30 Nov 2008 at 7:36

Update summary page for pympler 0.2

 * Update compatibilities (full Python 3.x, limited 2.4, very limited 2.2-2.3).
 * Short download instructions (link to archive + easy_install command)
 * Web interface

Original issue reported on code.google.com by [email protected] on 25 Jan 2010 at 10:10

HTML reports generated by HtmlStats have hardcoded fully qualified paths

What steps will reproduce the problem?
1. Generate a HTML report using class_tracker's tracker.stats.HtmlStat().
2. Move the generated file set to another filesystem location or try to publish 
it using a Web server.

What is the expected output? What do you see instead?

Expected: Working Images and class report pages links.
Obtained: Broken links and browser-specific broken image logos.

What version of the product are you using? On what operating system?

SVN trunk tip as of 2011-01-23.

Please provide any additional information below.

See attched patch that changes generation of paths in HTML tags src attributes 
to be relative to the current page.

Original issue reported on code.google.com by [email protected] on 23 Jan 2011 at 3:42

Attachments:

Document release testing strategy

* Extract the important information from below
* How does the freeze work? (svn tag, ...)
* How does the test matrix look like? (Wiki, plain text file)

[Di Nov 18 2008 20:37:32] Ludwig Haehne: Do we want to talk about target
platforms and testing strategies?
[Di Nov 18 2008 20:37:40] Schuppe: sure
[Di Nov 18 2008 20:37:45] Jean Brouwers:  in any case, the HTML  docs look
pretty good so far.  and Sphinx does work fine for now
[Di Nov 18 2008 20:37:53] … OK.
[Di Nov 18 2008 20:38:23] Ludwig Haehne: I guess we should run the tests on
all platforms we want to support
[Di Nov 18 2008 20:38:51] Jean Brouwers: yes, at least do an install
[Di Nov 18 2008 20:39:08] Schuppe: i run tests on debian64 before each commit
[Di Nov 18 2008 20:39:25] Ludwig Haehne: Ok, which platforms would that be?
I'm running Ubuntu 8.10 32 and 64 bit
[Di Nov 18 2008 20:40:05] Jean Brouwers: good so far, I use MacOS and 5 Pythons
[Di Nov 18 2008 20:40:26] Schuppe: do you develop with all of them?
[Di Nov 18 2008 20:40:41] Ludwig Haehne: I have all major Python versions
installed at the 32bit box
[Di Nov 18 2008 20:40:59] … Does anyone of you run windows?
[Di Nov 18 2008 20:41:10] Schuppe: in a vm
[Di Nov 18 2008 20:41:21] Jean Brouwers: it depends. I use 2.6 mostly and
then test with the other ones.
[Di Nov 18 2008 20:41:21] Schuppe: i probably won't run the tests on all
available platforms before every check-in
[Di Nov 18 2008 20:42:12] Ludwig Haehne: I think it is ok if we freeze
before a release and test on all our platforms and confirm that everything
is fine
[Di Nov 18 2008 20:42:18] Jean Brouwers: I have a XP machine with 2.5 or
2.4 and I was planning to run the Pympler tests there
[Di Nov 18 2008 20:42:26] Ludwig Haehne: cool
[Di Nov 18 2008 20:42:34] Schuppe: my vm is xp, too
[Di Nov 18 2008 20:42:49] … i like ludwigs suggestion
[Di Nov 18 2008 20:43:12] Jean Brouwers: If we just test on Linux 32- and
64-bits, plus MacOS plus on XP we are good to go, IMO
[Di Nov 18 2008 20:43:21] Ludwig Haehne: I have an OpenSolaris in a VM that
I could test against, too
[Di Nov 18 2008 20:44:00] Jean Brouwers: well, I have a Solaris 10 machine
as well. but was not going to suggest that we support that.  we could
[Di Nov 18 2008 20:44:08] Schuppe: should we make some kind of a test
matrix we can check against before a release?
[Di Nov 18 2008 20:44:15] Jean Brouwers: yes

...

[Di Nov 18 2008 20:46:28] Schuppe: do we want to do the testing as just
discussed?
[Di Nov 18 2008 20:46:36] Ludwig Haehne: yes
[Di Nov 18 2008 20:46:37] Jean Brouwers: I any case, let's keep Solaris of
the "officially supported" platforms list for now
[Di Nov 18 2008 20:46:42] Ludwig Haehne: ok
[Di Nov 18 2008 20:47:00] Jean Brouwers: we need to test the release.
[Di Nov 18 2008 20:47:19] … not the dev env, correct?
[Di Nov 18 2008 20:47:47] Schuppe: i think we should test with the release
distro
[Di Nov 18 2008 20:47:54] Ludwig Haehne: That means, run tests against an
installed pympler?
[Di Nov 18 2008 20:47:59] Jean Brouwers: yes, just that
[Di Nov 18 2008 20:48:08] … pre and post install
[Di Nov 18 2008 20:48:30] Schuppe: if we don't install the tests, how do we
run the post install?
[Di Nov 18 2008 20:48:38] … also with the setup script?
[Di Nov 18 2008 20:48:52] Jean Brouwers: the goal is to check that Pympler
does run and pass on the "supported" platforms and Python versions.
[Di Nov 18 2008 20:49:07] … yes, with setup.py (and runtest.py)
[Di Nov 18 2008 20:49:14] Schuppe: okay
[Di Nov 18 2008 20:49:22] Ludwig Haehne: what about Python 3.0?
[Di Nov 18 2008 20:49:35] Jean Brouwers: not supported yet

Original issue reported on code.google.com by [email protected] on 18 Nov 2008 at 11:45

Run tests against installed Pympler modules

* Add support for post-installation testing to test/runtest.py
* This should be a flag that can be passed to the runtest script
* It may suffice to not add the path to sys.path

Original issue reported on code.google.com by [email protected] on 18 Nov 2008 at 11:25

Render garbage graphs on-demand

Rendering reference cycles and displaying the garbage object table is very
slow when there is a lot of garbage. Instead of pre-rendering all cycles,
keep the GarbageGraph instance(s) and render the graph on demand.

Only display one cycle (and the respective objects) at a time. Make it
possible to hide objects not directly involved in the cycle (leaf objects).

Original issue reported on code.google.com by [email protected] on 25 Jan 2010 at 9:56

  • Blocking: #32

Wiki page on memory profiling restrictions/limitations

Start a wiki/doc page which collects known issues with Python memory
profiling. This can include 
- how does the garbage collection work / what objects are known to the
garbage collector
- static/cached objects such as True, False, Integers

- address how Pympler works and what Pympler can and cannot do

Original issue reported on code.google.com by [email protected] on 9 Nov 2008 at 11:26

Integrate sources of the 3 projects

Set up the directories and commit the sources of asizeof, muppy and
heapmonitor:

* Jean: Put asizeof module(s) in "pympler/asizeof" or "pympler/asizer"
* Robert: Put muppy modules in "pympler/tracker"
* Ludwig: Put heapmonitor module(s) in "pympler/tracker"

File names should be lower case. Tests go into a separate directory.

Original issue reported on code.google.com by [email protected] on 29 Aug 2008 at 12:05

print_ should take a stream argument

It is often useful to be able to print to some other stream instead of stdout. 

Usually stdout is used by all sorts of other output so in that case it can be 
useful to pipe stdout to /dev/null and only show stderr in  the console. Or if 
you're testing with some webservers (my current use case) you don't have 
stdout/stderr available.

So... something like this:

    def _print(object, stream=sys.stdout):
        print >>stream, 'the output'

Original issue reported on code.google.com by Wolphie on 17 May 2011 at 10:50

--linkcheck error

There is one --linkcheck failure in "related"

http://pysizer.8325.org/ - broken: <urlopen error [Errno 61] Connection refused>

which may need to be fixed.  There are also 4 redirected URLs: 

heapmonitor 
http://docs.python.org/lib/profile-stats.html - redirected to 
http://www.python.org/doc/2.5.2/lib/profile-stats.html

index 
http://code.google.com/p/pympler/issues/ - redirected to 
http://code.google.com/p/pympler/issues/list

muppy/tutorial 
http://docs.python.org/lib/idle.html - redirected to 
http://www.python.org/doc/2.5.2/lib/idle.html

related 
http://code.google.com/p/pympler/issues - redirected to 
http://code.google.com/p/pympler/issues/list



Original issue reported on code.google.com by [email protected] on 27 Nov 2008 at 7:44

Cycle-free retrieval of all known objects

Muppy and Asizeof need a facility to retrieve all known objects. Using
gc.get_objects() has the problem of creating reference cycles because frame
objects are also returned. Thus, we agreed to filter frame objects from the
list returned by gc.get_objects. The documentation should mention that no
frame objects are returned and possibly how to (safely) add the missing
outer frame objects (something like this):

>>> all = pympler.<xyz>.get_objects().extend(inspect.stack()[offset:])

The function should be usable from all Pympler modules. See
muppy.get_objects() for reference.

Original issue reported on code.google.com by [email protected] on 8 Sep 2009 at 4:00

pychok suppresses all output

If "./run.py --pychecker" is executed and an error/warning is emitted by
pychecker, pychok does not output the respective message. This used to work
in the past (with an older revision of run.py or pychok.py).

For example, add a surplus "import inspect" to pympler/process (or
somewhere else). Instead of printing "Imported module (inspect) not used",
only the following is emitted:

$ ./run.py --pychecker pympler/process.py
Running pychecker (32-bit Python 2.5.2)
=======================================
Checking pympler/process.py ...
Running '/usr/bin/python /home/ludwig/Projects/pympler/tools/pychok.py ...'
failed with exit status 65

Original issue reported on code.google.com by [email protected] on 10 Feb 2009 at 10:29

refbrowser imports have changed

What steps will reproduce the problem?
1. import refbrowser 

What is the expected output? What do you see instead?
Traceback (most recent call last):
  File "/Users/adam/minpower/scripts/minpower", line 54, in <module>
    logging_file=args.logfile,
  File "/Users/adam/minpower/minpower/solve.py", line 101, in problem
    overlap_hours=hours_commitment_overlap,
  File "/Users/adam/minpower/minpower/solve.py", line 243, in solve_multistage
    refbrowser.InteractiveBrowser(stage_problem).main()
  File "/Users/adam/Library/Python/2.7/lib/python/site-packages/pympler/refbrowser.py", line 389, in __init__
    raise ImportError("InteractiveBrowser requires Tkinter to be installed.")
ImportError: InteractiveBrowser requires Tkinter to be installed.


What version of the product are you using? On what operating system?
Pympler v.0.2.1, OSX

Please provide any additional information below.

The imports statements changed for muppy. This is confused by a try block that 
includes tkinter. Attached is a version that works.

Original issue reported on code.google.com by [email protected] on 22 Nov 2011 at 6:40

Attachments:

Uninstalling Pympler

We should add another note about uninstalling Pympler.  Basically, remove the 
pympler directory 
and Pympler*.egg file from the lib/python*/site-packages directory.

An easy way to find that directory may be os.path.join(sys.exec_prefix, 'lib', 
'site_packages').

Btw, the Pympler*.egg file is not created by Python 2.5 and alter, it seems.



Original issue reported on code.google.com by [email protected] on 30 Nov 2008 at 7:51

Python 2.4 setup.py error

The following error occurs with Python 2.4 on several platforms:

% python2.4 setup.py try
Traceback (most recent call last):
  File "setup.py", line 79, in ?
    Distribution.common_usage += """
AttributeError: class Distribution has no attribute 'common_usage'



Original issue reported on code.google.com by [email protected] on 29 Nov 2008 at 1:17

Document supported Python versions

* Include supported Python versions in documentation
* Include comments on testing supported releases in release notes.
* Create warning if pympler is used with unsupported Python version

Original issue reported on code.google.com by [email protected] on 21 Oct 2008 at 8:03

Extended tests

We need to add more tests.

* Better code coverage
* Test specific features and use cases

Please add some details which important tests are missing/incomplete.

Original issue reported on code.google.com by [email protected] on 7 Feb 2009 at 9:51

Related Work: meliae project

This is a great memory profiling project!

I thought you should probably mention the meliae project 
(https://launchpad.net/meliae) which is an effort to split data collection from 
analysis, thus minimizing the memory impact that analysis has on the memory 
statistics.

Meliae also integrates with recent runsnakerun versions to provide a drill-down 
memory browser.

Original issue reported on code.google.com by [email protected] on 15 Nov 2011 at 4:24

Python console vs Heapmonitor

>>> from pympler import heapmonitor
>>> class Foo():
...   pass
...
>>> obj = Foo()
>>> heapmonitor.track_object(obj)
>>> heapmonitor.create_snapshot('1st')
>>> heapmonitor.print_stats()
[...]
>>> heapmonitor.track_class(Foo)
>>> l = []
>>> for x in xrange(100):
...   l.append(Foo())
...
>>> heapmonitor.create_snapshot('2nd')
>>> heapmonitor.print_stats()
[...]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../pympler/heapmonitor/heapmonitor.py", line 1168, in print_stats
    stats.print_summary()
  File ".../pympler/heapmonitor/heapmonitor.py", line 805, in print_summary
    info = fp.classes[classname]
KeyError: '__main__.Foo'

Original issue reported on code.google.com by [email protected] on 17 Oct 2008 at 6:14

Python version check

I just tried Pympler-0.1a with Python 3.0 and 2.3 and the results don't look 
good.  We should 
check for valid Python releases inside the setup.py script and print a proper 
message.

% python3.0 setup.py try
running try
/Users/jean/Tools/bin/python3.0 test/runtest.py -pre-install -verbose 3
Python 3.0 (r30:67503, Dec  4 2008, 11:06:52) 
32-bit [GCC 4.0.1 (Apple Computer, Inc. build 5367)]

Warning: ignoring 'muppy.test_mprofile' due to an error while importing
Traceback (most recent call last):
  File "test/runtest.py", line 128, in <module>
    tst, all = suite(dirs, clean=clean, pre=pre, verbose=verbose)
  File "test/runtest.py", line 68, in suite
    mod = __import__(test, globals(), locals(), [mod])
  File "/Users/jean/Desktop/Pympler-0.1a1/test/muppy/test_mprofile.py", line 3, in <module>
    from pympler.muppy import mprofile
  File "/Users/jean/Desktop/Pympler-0.1a1/pympler/muppy/__init__.py", line 15, in <module>
    from pympler.muppy import *
  File "/Users/jean/Desktop/Pympler-0.1a1/pympler/muppy/refbrowser.py", line 171
    print prefix
               ^
SyntaxError: invalid syntax

% python2.3 setup.py try
Traceback (most recent call last):
  File "setup.py", line 10, in ?
    from distutils.core   import Command
ImportError: No module named core


Original issue reported on code.google.com by [email protected] on 4 Dec 2008 at 7:41

Python3.2 tests fail

What steps will reproduce the problem?

>>> python3.2 setup.py try

What is the expected output? What do you see instead?

Tests are not executed:

NotImplementedError: Pympler not yet supported on Python 3.2.1a0.

We shouldn't forbid running pympler on new Python versions (no upper version 
limit).

Original issue reported on code.google.com by [email protected] on 18 Jul 2011 at 1:19

Unittest messages

The unittests report inconsistent messages when running the tests.  Each 
message should start with 
"Test ..."


Original issue reported on code.google.com by [email protected] on 26 Nov 2008 at 7:21

TypeError in HtmlStats.create_html() if 'pct' of one item is greater than 3.0

Hi,
I'm using pympler (Rev: 283), and the attached reproducer is raising a 
TypeError for me

(pympler.bug)markus@thekorn /tmp/pympler.bug/pympler-read-only % python 
reproducer.py
---- SUMMARY ------------------------------------------------------------------
                                         active      5.24 MB      average   pct
  Test                                        1      1.91 MB      1.91 MB   36%
-------------------------------------------------------------------------------
Traceback (most recent call last):
  File "reproducer.py", line 17, in <module>
    HtmlStats(tracker=tracker).create_html("/tmp/boo.html")
  File "/tmp/pympler.bug/pympler-read-only/pympler/tracker/stats.py", line 719, in create_html
    self.charts['snapshots'] = self.create_snapshot_chart(fn)
  File "/tmp/pympler.bug/pympler-read-only/pympler/tracker/stats.py", line 641, in create_snapshot_chart
    xp, yp = mlab.poly_between(x, base, sz)
  File "/usr/lib/pymodules/python2.6/matplotlib/mlab.py", line 2820, in poly_between
    Nx = len(x)
TypeError: object of type 'int' has no len()

The fix is as easy as renaming `x` in stats.py line 640

Thanks,
Markus

Original issue reported on code.google.com by [email protected] on 27 Aug 2010 at 9:41

Attachments:

Ensure pympler does not leak

We don't want to leak memory in pympler. The profiler-garbage clutters the
actual profiling data. 

 * Lift in-method/function defined classes (Bottle)

This bug creates nice garbage :-) Therefore, delay after fixing issue 31.

Original issue reported on code.google.com by [email protected] on 25 Jan 2010 at 10:05

  • Blocked on: #31

Python 2.4 web tests fail

What steps will reproduce the problem?

>>> python2.4 setup.py try

What is the expected output? What do you see instead?

Python2.4 should silently ignore the web tests.


Original issue reported on code.google.com by [email protected] on 18 Jul 2011 at 1:16

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.