pypy python jitテストtwisted webサービスベース
pypy python jitテストtwisted webサービスベース
- #coding:utf-8
- '''''
- the following line in setup.py (73):
- twisted
-
- setup.py
- :
- conditionalExtensions = getExtensions(),
- =======================
-
- ../../pypy build
- ../../pypy install
-
- ./pypy simpleweb.py 8082
- python simpleweb.py 8080
- '''
- import sys
- from twisted.web import server, resource
- from twisted.internet import reactor
-
- class Simple(resource.Resource):
- isLeaf = True
- def render_GET(self, request):
- return "<html>Hello, world!</html>"
-
- site = server.Site(Simple())
-
- reactor.listenTCP(int(sys.argv[1]), site)
- reactor.run()
-
- '''''
- ab -n 10000 -c 10 http://127.0.0.1:8080/
-
- cpython2.6
- Requests per second: 1663.20 [#/sec] (mean)
- Time per request: 6.013 [ms] (mean)
- Time per request: 0.601 [ms] (mean, across all concurrent requests)
-
- Requests per second: 1813.54 [#/sec] (mean)
- Time per request: 5.514 [ms] (mean)
- Time per request: 0.551 [ms] (mean, across all concurrent requests)
-
- Requests per second: 1777.22 [#/sec] (mean)
- Time per request: 5.627 [ms] (mean)
- Time per request: 0.563 [ms] (mean, across all concurrent requests)
-
-
- pypy 2.7
-
- ab -n 10000 -c 10 http://127.0.0.1:8082/
-
- Requests per second: 1056.80 [#/sec] (mean)
- Time per request: 9.463 [ms] (mean)
- Time per request: 0.946 [ms] (mean, across all concurrent requests)
-
- Requests per second: 2420.05 [#/sec] (mean)
- Time per request: 4.132 [ms] (mean)
- Time per request: 0.413 [ms] (mean, across all concurrent requests)
-
- Requests per second: 3130.71 [#/sec] (mean)
- Time per request: 3.194 [ms] (mean)
- Time per request: 0.319 [ms] (mean, across all concurrent requests)
-
- :
- Requests per second: 3041.53 [#/sec] (mean)
- Time per request: 3.288 [ms] (mean)
- Time per request: 0.329 [ms] (mean, across all concurrent requests)
-
-
- ab -n 10000 -c 30 http://127.0.0.1:8082/
-
- Requests per second: 4094.08 [#/sec] (mean)
- Time per request: 7.328 [ms] (mean)
- Time per request: 0.244 [ms] (mean, across all concurrent requests)
-
- Requests per second: 4257.31 [#/sec] (mean)
- Time per request: 7.047 [ms] (mean)
- Time per request: 0.235 [ms] (mean, across all concurrent requests)
-
-
- nginx
- ab -n 10000 -c 30 'http://127.0.0.1/t2.html'
-
- Requests per second: 14106.12 [#/sec] (mean)
- Time per request: 2.127 [ms] (mean)
- Time per request: 0.071 [ms] (mean, across all concurrent requests)
-
- echo "hello" php
-
- ab -n 10000 -c 30 'http://127.0.0.1/t.php'
-
- Requests per second: 2887.00 [#/sec] (mean)
- Time per request: 10.391 [ms] (mean)
- Time per request: 0.346 [ms] (mean, across all concurrent requests)
-
- Requests per second: 2799.78 [#/sec] (mean)
- Time per request: 3.572 [ms] (mean)
- Time per request: 0.357 [ms] (mean, across all concurrent requests)
-
- python jit
- :
- http://speed.pypy.org
-
- '''