给大家推荐一个 Python 的 web framework

2016-07-01 10:54:47 +08:00
 doenitz

项目名称: karlooper
GitHub 地址: https://github.com/karldoenitz/karlooper
项目简介:一个用 Python 开发的单线程一部非阻塞的 web 应用框架,使用 epoll 或 kqueue 进行 io 多路复用。
性能参数对比:
服务完全部署在同一台机器上,

tornado :
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient).....done


Server Software:        TornadoServer/4.0.2
Server Hostname:        127.0.0.1
Server Port:            9999

Document Path:          /hello
Document Length:        12 bytes

Concurrency Level:      10
Time taken for tests:   0.011 seconds
Complete requests:      10
Failed requests:        0
Write errors:           0
Total transferred:      2070 bytes
HTML transferred:       120 bytes
Requests per second:    946.70 [#/sec] (mean)
Time per request:       10.563 [ms] (mean)
Time per request:       1.056 [ms] (mean, across all concurrent requests)
Transfer rate:          191.37 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.2      0       1
Processing:     1    4   1.9      4       6
Waiting:        1    3   1.9      3       6
Total:          1    4   1.8      4       7

Percentage of the requests served within a certain time (ms)
  50%      4
  66%      5
  75%      5
  80%      6
  90%      7
  95%      7
  98%      7
  99%      7
 100%      7 (longest request)

karlooper :
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient).....done


Server Software:
Server Hostname:        127.0.0.1
Server Port:            9987

Document Path:          /test/test2
Document Length:        10 bytes

Concurrency Level:      10
Time taken for tests:   0.005 seconds
Complete requests:      10
Failed requests:        0
Write errors:           0
Total transferred:      1738 bytes
HTML transferred:       110 bytes
Requests per second:    2157.96 [#/sec] (mean)
Time per request:       4.634 [ms] (mean)
Time per request:       0.463 [ms] (mean, across all concurrent requests)
Transfer rate:          366.26 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    2   0.6      2       2
Processing:     1    2   0.6      2       2
Waiting:        0    1   0.7      1       2
Total:          2    3   0.5      3       4

Percentage of the requests served within a certain time (ms)
  50%      3
  66%      3
  75%      4
  80%      4
  90%      4
  95%      4
  98%      4
  99%      4
 100%      4 (longest request)

希望大家喜欢,能提出宝贵的意见或建议。

2051 次点击
所在节点    Python
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/289547

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX