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

Closed
wants to merge 5 commits into
from

Conversation

Projects
None yet
1 participant
@brainstorm

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

malagori$ python -m plop.collector check_repo.py courses/python2013/workplace/mehmood
Pass
profile output saved to /tmp/plop.out
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/malagori/.virtualenvs/pythonVEnv/lib/python2.7/site-packages/plop/collector.py", line 118, in <module>
    main()
  File "/Users/malagori/.virtualenvs/pythonVEnv/lib/python2.7/site-packages/plop/collector.py", 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:

https://github.com/pythonkurs/sahlin

By running "python sahlin/scripts/check_repo.py 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