Test junction under PyPy
It will be cool to run junction on pypy and see if we can use it production. If the test benchmark is on par with CPython (we love faster one's ) and doesn't involve too much work, then switch to PyPy.
Junction doesnt have good coverage, so we are not sure if any thing breaks.
Even test timings doesn't seem good. PyPy take 119 seconds, where as Py takes only 78 seconds.
PyPy:
(pypy)
# anand at anand in ~/projects/python/junction on git:ticket x [23:46:02]
$ py.test
================================================================= test session starts =================================================================
platform linux2 -- Python 2.7.3[pypy-2.2.1-final], pytest-2.8.2, py-1.4.30, pluggy-0.3.1
rootdir: /home/anand/projects/python/junction, inifile: pytest.ini
plugins: pythonpath-0.7, ipdb-0.1.dev2, django-2.8.0, flakes-1.0.0
collected 19 items
tests/integrations/test_device_api.py .
tests/integrations/test_feedback_api.py .........
tests/integrations/test_feedback_service.py ..
tests/integrations/test_google_analytics.py .
tests/integrations/test_permissions.py .
tests/integrations/test_proposal_views.py ..
tests/unit/test_monkey.py .
tests/unit/proposals/test_services.py .
tests/unit/proposals/test_views.py .
============================================================= 19 passed in 119.39 seconds =============================================================
Py:
(junction)
# anand at anand in ~/projects/python/junction on git:ticket x [23:45:03]
$ py.test
================================================================= test session starts =================================================================
platform linux2 -- Python 2.7.6 -- py-1.4.30 -- pytest-2.7.2
rootdir: /home/anand/projects/python/junction, inifile: pytest.ini
plugins: pythonpath, ipdb, cache, django, flakes
collected 19 items
tests/integrations/test_device_api.py .
tests/integrations/test_feedback_api.py .........
tests/integrations/test_feedback_service.py ..
tests/integrations/test_google_analytics.py .
tests/integrations/test_permissions.py .
tests/integrations/test_proposal_views.py ..
tests/unit/test_monkey.py .
tests/unit/proposals/test_services.py .
tests/unit/proposals/test_views.py .
============================================================= 19 passed in 77.73 seconds ==============================================================
May be i am missing something?
As @vigneshsarma mentioned, i have updated to lastest pypy, there is only a minor performance change.
Python:
(junction)
# anand at anand in ~/projects/python/junction on git:ticket x [21:01:02]
$ py.test
================================================================= test session starts =================================================================
platform linux2 -- Python 2.7.6 -- py-1.4.30 -- pytest-2.7.2
rootdir: /home/anand/projects/python/junction, inifile: pytest.ini
plugins: pythonpath, ipdb, django
collected 18 items
tests/integrations/test_feedback_api.py .........
tests/integrations/test_feedback_service.py ..
tests/integrations/test_google_analytics.py .
tests/integrations/test_permissions.py .
tests/integrations/test_proposal_views.py ..
tests/unit/test_monkey.py .
tests/unit/proposals/test_services.py .
tests/unit/proposals/test_views.py .
============================================================= 18 passed in 77.61 seconds ==============================================================
PyPy:
(pypy)
# anand at anand in ~/projects/python/junction on git:ticket x [21:01:19]
$ py.test
================================================================= test session starts =================================================================
platform linux2 -- Python 2.7.10[pypy-2.6.1-final], pytest-2.8.2, py-1.4.30, pluggy-0.3.1
rootdir: /home/anand/projects/python/junction, inifile: pytest.ini
plugins: pythonpath-0.7, ipdb-0.1.dev2, django-2.8.0, flakes-1.0.0
collected 18 items
tests/integrations/test_feedback_api.py .........
tests/integrations/test_feedback_service.py ..
tests/integrations/test_google_analytics.py .
tests/integrations/test_permissions.py .
tests/integrations/test_proposal_views.py ..
tests/unit/test_monkey.py .
tests/unit/proposals/test_services.py .
tests/unit/proposals/test_views.py .
============================================================= 18 passed in 107.54 seconds =============================================================
@palnabarun @pradyunsg Any requirement for this now ?
No requirement, but compatibility would be a great idea.