flask、tornado、BaseHTTPServer性能简单对比
最近写了一个web应用,分别用flask、tornado、BaseHTTPServer都实现了一次,顺便就对比了一下三者的性能,本结果仅对本次测试负责(这句话很内涵,值得推广)。
测试工具用了ab,时间有限,只测试get方式。
tornado------------------
Concurrency Level: 200
Time taken for tests: 34.444 seconds
Requests per second: 290.33 [#/sec] (mean)
Time per request: 688.872 [ms] (mean)
Concurrency Level: 100
Time taken for tests: 11.845 seconds
Requests per second: 844.27 [#/sec] (mean)
Time per request: 118.445 [ms] (mean)
flask------------------
Concurrency Level: 200
Time taken for tests: 38.146 seconds
Requests per second: 262.15 [#/sec] (mean)
Time per request: 762.923 [ms] (mean)
Concurrency Level: 100
Time taken for tests: 17.919 seconds
Requests per second: 558.08 [#/sec] (mean)
Time per request: 179.186 [ms] (mean)
BaseHTTPServer------------------
性能比前两者差二、三十倍。
结论:没事别用BaseHTTPServer。而tornado和flask各有所长,个人认为写小应用使用tornado更简单,复杂的应用使用flask会好一点。
flask、tornado、BaseHTTPServer性能简单对比的更多相关文章
- [评测]低配环境下,PostgresQL和Mysql读写性能简单对比(欢迎大家提出Mysql优化意见)
[评测]低配环境下,PostgresQL和Mysql读写性能简单对比 原文链接:https://www.cnblogs.com/blog5277/p/10658426.html 原文作者:博客园--曲 ...
- 飞腾PC机器与奔腾G645的PC机器以及E5-2630V4虚拟机内存性能简单对比
1. 对比工具 sysbench 2. 对比命令 sysbench --test=memory --memory-total-size=12G --num-threads= run 3 安装方式 #u ...
- [OpenBenchMarking] AMD CPU 的性能简单对比
来源: https://openbenchmarking.org/result/1710193-AL-EPYC7351P64 1. 2. 3. 4.
- Django,Flask,Tornado三大框架对比,Python几种主流框架,13个Python web框架比较,2018年Python web五大主流框架
Django 与 Tornado 各自的优缺点Django优点: 大和全(重量级框架)自带orm,template,view 需要的功能也可以去找第三方的app注重高效开发全自动化的管理后台(只需要使 ...
- Flask, Tornado, GEvent, 以及它们的结合的性能比较
Flask, Tornado, GEvent, 以及它们的结合的性能比较 英文: http://blog.wensheng.com/2011/10/performance-of-flask-torna ...
- HTTPS, SPDY和 HTTP/2性能的简单对比
中文原文:HTTPS, SPDY和 HTTP/2性能的简单对比 整理自:A Simple Performance Comparison of HTTPS, SPDY and HTTP/2 请尊重版权, ...
- Flask, Tornado, GEvent组合运行与性能比较
我在选一个python的互联网框架, 本来已经定下来用Tornado了. 但我还听到很多人推荐Flask的简单性和灵活性, 还有gevent的高性能, 所以决定也试试它们以及它们和Tornado的结 ...
- JS几种数组遍历方式以及性能分析对比
前言 这一篇与上一篇 JS几种变量交换方式以及性能分析对比 属于同一个系列,本文继续分析JS中几种常用的数组遍历方式以及各自的性能对比 起由 在上一次分析了JS几种常用变量交换方式以及各自性能后,觉得 ...
- 【转贴】Cortex系列M0-4简单对比
转载网址:http://blog.sina.com.cn/s/blog_7dbd9c0e01018e4l.html 最近搞了块ST的Cortex-M4处理器,然后下了本文档.分享一下. 针对目前进入大 ...
随机推荐
- hadoop 学习笔记(第三章 Hadoop分布式文件系统 )
map->shuffle->reduce map(k1,v1)--->(k2,v2) reduce(k2,List<v2>)--->(k2,v3) 传输类型:org ...
- Rabbitmq消息持久化
1.交换机持久化设置 exchange 持久化,在声明时指定 durable未true 2.队列持久化设置 queue 持久化,在声明时指定 durable 为true 3.消息持久化设置 Deliv ...
- 理解es6 中 arrow function的this
箭头函数相当于定义时候,普通函数.bind(this)箭头函数根本没有自己的this,导致内部的this就是定义时候的外层代码块中的this.外层代码块中的this,则取决于执行时候环境上下文cont ...
- boot跳转到app后,中断不起作用的原因
boot跳转到app后 osKernelStart()之前,中断有问题,不起作用 原因是因为boot跳转之前__disable_irq(); 跳转到APP后,并不是一切从头开始,__disable_i ...
- TNS-12560: TNS: 协议适配器错误同时伴有TNS-00584: 有效节点检查配置错误的解决方法
:修改/home/oracle/app/product/11.2.0/db_1/network/admin/sqlnet.ora(与listener.ora同一目录) 增加白名单: tcp.valid ...
- C++第二章作业
1.(1)if...else 用法 #include <iostream> #include <cstring> using namespace std; int main() ...
- jenkins centos slave起不来报错The SSH key presented by the remote host does not match the key saved in the Known Hosts file against this host. Connections to this host will be denied until the two keys mat
场景:我的centos-204是一台centos的机器,本来用https://www.cnblogs.com/zndxall/p/8297356.html 的centos slave方式搭建ok的,一 ...
- HTML页面空格记录     (小计)
半角的不断行的空白格(推荐使用) 也就是咱们经常在英文状态下面使用的空格按键 半角的空格 他的宽度为中文字符的一半长度 全角的空格他的宽度为中文字符的长度
- LNMP平台搭建之一:nginx编译安装
参考博客:https://www.cnblogs.com/zhang-shijie/p/5294162.html jack.zhang 一.环境说明 系统环境:centos6.5 [root@lo ...
- jq元素拖拽
<div id="a1"></div> js <script type="text/javascript"> $(funct ...