bdarnell/plop — pull request #4 by brainstorm (2013-02-26 14:31:34+00:00)
Title: For low overhead programs, plop generates division by zero errors

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
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.