For low overhead programs, plop generates division by zero errors #4

wants to merge 5 commits into


None yet
1 participant

Thanks to @malagori and @ksahlin for the bug reports:

malagori$ python -m plop.collector courses/python2013/workplace/mehmood
profile output saved to /tmp/plop.out
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 72, in _run_code
    exec code in run_globals
  File "/Users/malagori/.virtualenvs/pythonVEnv/lib/python2.7/site-packages/plop/", line 118, in <module>
  File "/Users/malagori/.virtualenvs/pythonVEnv/lib/python2.7/site-packages/plop/", line 112, in main
    overhead = float(collector.sample_time) / collector.samples_taken
ZeroDivisionError: float division by zero

@bdarnell, the offending code can be found here:

By running "python sahlin/scripts/ sahlin" after cloning you should get the above backtrace.

This pull request should solve #3 too.

@bdarnell bdarnell closed this in 7642a00 Apr 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment