pyperf does not work in REPL
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 962
- Forks
- 106
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 4
Description
(venv) marco@buzz:~/sources/cpython_mine$ python
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyperf
>>>
>>> runner = pyperf.Runner()
>>> runner.timeit(name="sort a sorted list",
... stmt="sorted(s, key=f)",
... setup="f = lambda x: x; s = list(range(1000))")
/home/marco/sources/cpython_mine/venv/bin/python: can't find '__main__' module in ''
I'm using pyperf 2.0.0.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure in a Python REPL using pyperf.Runner and the shown Runner.timeit call with Python 3.6.9 and pyperf 2.0.0. Trace why the REPL invocation produces the “can't find 'main' module” error; done means the benchmark runs successfully from the REPL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100