[我还会回来的]asp.net core再战iris
废话不多说,直接开干!
硬件配置
- 处理器: Intel(R) Core(TM) i5-4690k CPU @3.90GHz
- 内存容量: 8.00 GB
软件版本
- OS: Microsoft Windows 10
- HTTP 跑分工具: https://github.com/codesenberg/bombardier, 最新版本 1.2
- .NET Core SDK: https://www.microsoft.com/net/core, 最新版本 2.1.302
- iris: https://github.com/kataras/iris, 最新版本 使用 go1.10.3-windows/amd64 编译
比试选手
- iris (The fastest backend community-driven web framework on (THIS) Earth. https://github.com/kataras/iris) [使用命令go build mian.go;.\main.exe]
- aspnetcore(.NET下面的一个普通web框架 https://github.com/aspnet/Home)[使用命令dotnet publish -c Release;dotnet netcore.dll]
- aspnetcore-tieredcompilation(使用tieredcompilation进行编译,具体可看 https://blogs.msdn.microsoft.com/dotnet/2018/08/02/tiered-compilation-preview-in-net-core-2-1/)[使用命令dotnet publish -c Release;dotnet netcore.dll]
比试内容
- PlainText(路由加普通文本返回)
- MVC(mvc加普通文本返回)
比试场景
- 100连接,100,000次请求;
- 1000连接,100,000次请求。
胜负评定
- Reqs/sec - 越大越好。
- Latency - 越小越好。
- Throughput - 越大越好。
比试结果
PlainText(100连接):

PlainText(1000连接):

MVC(100连接):

MVC(1000连接):

PS:看来asp.net core不是社区驱动的web框架啊,tieredcompilation对性能的提升还是挺明显的,不过现在还是preview版本,可能正式版的性能提升会更大。另外觉得测试有问题的或者不合理欢迎评论区留言。
附录:
PlainText(100连接):
iris:
Bombarding http://localhost:5000/api/values/1 with 1000000 request(s) using 100 connection(s)
1000000 / 1000000 [=======================================================================================] 100.00% 9s
Done!
Statistics Avg Stdev Max
Reqs/sec 100890.93 14603.97 117701.58
Latency 0.99ms 106.80us 31.98ms
HTTP codes:
1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 18.76MB/s
aspnetcore:
Bombarding http://localhost:5000/api/values/1 with 1000000 request(s) using 100 connection(s)
1000000 / 1000000 [=======================================================================================] 100.00% 8s
Done!
Statistics Avg Stdev Max
Reqs/sec 115900.67 10720.26 125724.81
Latency 0.86ms 109.38us 76.96ms
HTTP codes:
1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 20.99MB/s
aspnetcore-tieredcompilation:
Bombarding http://localhost:5000/api/values/1 with 1000000 request(s) using 100 connection(s)
1000000 / 1000000 [=======================================================================================] 100.00% 8s
Done!
Statistics Avg Stdev Max
Reqs/sec 124023.27 13668.23 144797.03
Latency 805.52us 178.97us 67.96ms
HTTP codes:
1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 22.45MB/s
PlainText(1000连接):
iris:
Bombarding http://localhost:5000/api/values/1 with 1000000 request(s) using 1000 connection(s)
1000000 / 1000000 [======================================================================================] 100.00% 13s
Done!
Statistics Avg Stdev Max
Reqs/sec 78192.20 37748.20 249899.94
Latency 13.49ms 17.04ms 1.51s
HTTP codes:
1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 13.77MB/s
aspnetcore:
Bombarding http://localhost:5000/api/values/1 with 1000000 request(s) using 1000 connection(s)
1000000 / 1000000 [======================================================================================] 100.00% 12s
Done!
Statistics Avg Stdev Max
Reqs/sec 78938.95 18707.34 193173.86
Latency 12.30ms 2.12ms 558.68ms
HTTP codes:
1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 14.72MB/s
aspnetcore-tieredcompilation:
Bombarding http://localhost:5000/api/values/1 with 1000000 request(s) using 1000 connection(s)
1000000 / 1000000 [======================================================================================] 100.00% 11s
Done!
Statistics Avg Stdev Max
Reqs/sec 85556.97 16972.96 129806.89
Latency 11.83ms 2.55ms 565.68ms
HTTP codes:
1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 15.30MB/s
MVC(100连接):
iris:
Bombarding http://localhost:5000/api/values/1 with 1000000 request(s) using 100 connection(s)
1000000 / 1000000 [======================================================================================] 100.00% 12s
Done!
Statistics Avg Stdev Max
Reqs/sec 83268.90 6405.62 93735.08
Latency 1.20ms 129.24us 37.98ms
HTTP codes:
1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 15.49MB/s
aspnetcore:
Bombarding http://localhost:5000/api/values/1 with 1000000 request(s) using 100 connection(s)
1000000 / 1000000 [======================================================================================] 100.00% 15s
Done!
Statistics Avg Stdev Max
Reqs/sec 64032.32 5136.30 73209.37
Latency 1.56ms 243.37us 142.92ms
HTTP codes:
1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 14.09MB/s
aspnetcore-tieredcompilation:
Bombarding http://localhost:5000/api/values/1 with 1000000 request(s) using 100 connection(s)
1000000 / 1000000 [======================================================================================] 100.00% 12s
Done!
Statistics Avg Stdev Max
Reqs/sec 79460.11 11395.25 98716.02
Latency 1.26ms 307.25us 139.92ms
HTTP codes:
1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 17.48MB/s
MVC(1000连接):
iris:
Bombarding http://localhost:5000/api/values/1 with 1000000 request(s) using 1000 connection(s)
1000000 / 1000000 [======================================================================================] 100.00% 16s
Done!
Statistics Avg Stdev Max
Reqs/sec 64706.80 34030.38 256487.23
Latency 16.16ms 13.56ms 1.65s
HTTP codes:
1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 11.50MB/s
aspnetcore:
Bombarding http://localhost:5000/api/values/1 with 1000000 request(s) using 1000 connection(s)
1000000 / 1000000 [======================================================================================] 100.00% 19s
Done!
Statistics Avg Stdev Max
Reqs/sec 50314.60 21544.11 200875.55
Latency 19.14ms 3.18ms 571.67ms
HTTP codes:
1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 11.51MB/s
aspnetcore-tieredcompilation:
Bombarding http://localhost:5000/api/values/1 with 1000000 request(s) using 1000 connection(s)
1000000 / 1000000 [======================================================================================] 100.00% 15s
Done!
Statistics Avg Stdev Max
Reqs/sec 62695.73 22662.30 268026.80
Latency 15.70ms 2.37ms 566.67ms
HTTP codes:
1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 14.02MB/s
[我还会回来的]asp.net core再战iris的更多相关文章
- Amazing ASP.NET Core 2.0
前言 ASP.NET Core 的变化和发展速度是飞快的,当你发现你还没有掌握 ASP.NET Core 1.0 的时候, 2.0 已经快要发布了,目前 2.0 处于 Preview 1 版本,意味着 ...
- ASP.NET Core 2.0 新功能汇总
前言 ASP.NET Core 的变化和发展速度是飞快的,当你发现你还没有掌握 ASP.NET Core 1.0 的时候, 2.0 已经快要发布了,目前 2.0 处于 Preview 1 版本,意味着 ...
- mazing ASP.NET Core 2.0【转】
前言 ASP.NET Core 的变化和发展速度是飞快的,当你发现你还没有掌握 ASP.NET Core 1.0 的时候, 2.0 已经快要发布了,目前 2.0 处于 Preview 1 版本,意味着 ...
- ASP.NET Core MVC如何上传文件及处理大文件上传
用文件模型绑定接口:IFormFile (小文件上传) 当你使用IFormFile接口来上传文件的时候,一定要注意,IFormFile会将一个Http请求中的所有文件都读取到服务器内存后,才会触发AS ...
- asp.net core流式上传大文件
asp.net core流式上传大文件 首先需要明确一点就是使用流式上传和使用IFormFile在效率上没有太大的差异,IFormFile的缺点主要是客户端上传过来的文件首先会缓存在服务器内存中,任何 ...
- 使用Code First建模自引用关系笔记 asp.net core上使用redis探索(1) asp.net mvc控制器激活全分析 语言入门必学的基础知识你还记得么? 反射
使用Code First建模自引用关系笔记 原文链接 一.Has方法: A.HasRequired(a => a.B); HasOptional:前者包含后者一个实例或者为null HasR ...
- 学习ASP.NET Core, 怎能不了解请求处理管道[5]: 中间件注册可以除了可以使用Startup之外,还可以选择StartupFilter
中间件的注册除了可以借助Startup对象(DelegateStartup或者ConventionBasedStartup)来完成之外,也可以利用另一个叫做StartupFilter的对象来实现.所谓 ...
- ASP.NET Core 折腾笔记一
前言: 在ASP.NET Core 1.0时,曾折腾过一次,后因发现不了System.Data而停止. 更因VS2015提示过期Delete掉VS了,其实主要还是笔记本的硬盘空间吃紧. 快双十一了,本 ...
- 做个简单的RSS订阅(ASP.NET Core),节省自己的时间
0x01 前言 因为每天上下班路上,午休前,都是看看新闻,但是种类繁多,又要自己找感兴趣的,所以肯定会耗费不少时间. 虽说现在有很多软件也可以订阅一些自己喜欢的新闻,要安装到手机,还是挺麻烦的.所以就 ...
随机推荐
- rest_framework之权限源码剖析
权限问题 1.models.py 2.用户类型: 3.views.py: 假设订单相关业务(只有SVIP用户有权限) 假设用户信息相关业务(只有普通用户.VIP有权限) 4.运行结果: 基本使用 以上 ...
- (BUG记录)使用迭代器安全的删除处于循环下集合中的元素
今日在写一个功能时,需要从MQ拿取数据集合调用对端系统进行批量处理,为了幂等支持,在循环内部如果不满足调用条件就直接从集合中移除. 以上是一个典型的循环集合内删除的场景任务,工作一年第一次遇到这个场景 ...
- oracle 创建的表为什么在table里没有,但是可以查出来
有两种的可能: 1这个表在其他用户下创建的,当前用户没有权限访问,此表不在属于当前用户 2查询时写的表名,并不是真正意义的表名,可能指向其他用户,或者就不是这个表
- 电子科技大学第九届ACM趣味程序设计竞赛(热身赛)题解
比赛地址:http://acm.uestc.edu.cn/#/contest/show/191 A题 小羽涂色 题意: 在x轴的正半轴上,问你是否存在一段区间[L,R]其中包含r个奇数和g个偶数. 分 ...
- CIKM 2012 papers to be downloaded
http://dl.acm.org/citation.cfm?id=2398426 http://dl.acm.org/citation.cfm?id=2396825 http://dl.ac ...
- PHP 点阵5*7字体
效果: 源码: <?php // standard ascii 5x7 font 纵向取模 // defines ascii characters 0x20-0x7f (32-127) $fon ...
- [Swift]LeetCode622. 设计循环队列 | Design Circular Queue
Design your implementation of the circular queue. The circular queue is a linear data structure in w ...
- [Swift]LeetCode819. 最常见的单词 | Most Common Word
Given a paragraph and a list of banned words, return the most frequent word that is not in the list ...
- the python challenge闯关记录(0-8)
0 第零关 2**38 = 274877906944 下一关的url:http://www.pythonchallenge.com/pc/def/274877906944.html 1 第一关 移位计 ...
- 北上广等一线城市IT岗位已接近饱和?
IT行业的技术者,时常被我们戏称为「IT民工」,虽然行业内巨大的人才需求和相对容易得到的高薪在源源不断的吸引各路人马加入,但它依旧在全球最缺人的十大行业中位居榜首. 我身边的朋友大都问过我这样一个疑问 ...