废话不多说,直接开干!

硬件配置

  • 处理器: Intel(R) Core(TM) i5-4690k CPU @3.90GHz
  • 内存容量: 8.00 GB

软件版本

比试选手

比试内容

  • 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的更多相关文章

  1. Amazing ASP.NET Core 2.0

    前言 ASP.NET Core 的变化和发展速度是飞快的,当你发现你还没有掌握 ASP.NET Core 1.0 的时候, 2.0 已经快要发布了,目前 2.0 处于 Preview 1 版本,意味着 ...

  2. ASP.NET Core 2.0 新功能汇总

    前言 ASP.NET Core 的变化和发展速度是飞快的,当你发现你还没有掌握 ASP.NET Core 1.0 的时候, 2.0 已经快要发布了,目前 2.0 处于 Preview 1 版本,意味着 ...

  3. mazing ASP.NET Core 2.0【转】

    前言 ASP.NET Core 的变化和发展速度是飞快的,当你发现你还没有掌握 ASP.NET Core 1.0 的时候, 2.0 已经快要发布了,目前 2.0 处于 Preview 1 版本,意味着 ...

  4. ASP.NET Core MVC如何上传文件及处理大文件上传

    用文件模型绑定接口:IFormFile (小文件上传) 当你使用IFormFile接口来上传文件的时候,一定要注意,IFormFile会将一个Http请求中的所有文件都读取到服务器内存后,才会触发AS ...

  5. asp.net core流式上传大文件

    asp.net core流式上传大文件 首先需要明确一点就是使用流式上传和使用IFormFile在效率上没有太大的差异,IFormFile的缺点主要是客户端上传过来的文件首先会缓存在服务器内存中,任何 ...

  6. 使用Code First建模自引用关系笔记 asp.net core上使用redis探索(1) asp.net mvc控制器激活全分析 语言入门必学的基础知识你还记得么? 反射

    使用Code First建模自引用关系笔记   原文链接 一.Has方法: A.HasRequired(a => a.B); HasOptional:前者包含后者一个实例或者为null HasR ...

  7. 学习ASP.NET Core, 怎能不了解请求处理管道[5]: 中间件注册可以除了可以使用Startup之外,还可以选择StartupFilter

    中间件的注册除了可以借助Startup对象(DelegateStartup或者ConventionBasedStartup)来完成之外,也可以利用另一个叫做StartupFilter的对象来实现.所谓 ...

  8. ASP.NET Core 折腾笔记一

    前言: 在ASP.NET Core 1.0时,曾折腾过一次,后因发现不了System.Data而停止. 更因VS2015提示过期Delete掉VS了,其实主要还是笔记本的硬盘空间吃紧. 快双十一了,本 ...

  9. 做个简单的RSS订阅(ASP.NET Core),节省自己的时间

    0x01 前言 因为每天上下班路上,午休前,都是看看新闻,但是种类繁多,又要自己找感兴趣的,所以肯定会耗费不少时间. 虽说现在有很多软件也可以订阅一些自己喜欢的新闻,要安装到手机,还是挺麻烦的.所以就 ...

随机推荐

  1. windows系统dos窗口全屏

    第一次进入博客园 2017年12月7日 之前使用dos窗口时都输入的是简短的指令,今天突然感觉小框看着不舒服,就找了一下度娘,在这里感谢万能的百度,一鞠躬. 1.win+r打开dos命令窗口 2.cm ...

  2. Java工作原理:JVM,内存回收及其他

    JAVA虚拟机系列文章 http://developer.51cto.com/art/201001/176550.htm Java语言引入了Java虚拟机,具有跨平台运行的功能,能够很好地适应各种We ...

  3. Java_Object

    说一下java中的Object类. 1.Object: Object是java类库中的一个特殊类,也是所有类的父类. Object类定义了一些有用的方法,由于是根类,这些方法在其他类中都存在,一般是进 ...

  4. TCPDF说明文档

    TCPDF说明文档 一.首先调用TCPDF文件 require_once('tcpdf.php'); 二.实例化TCPDF类 页面方向(P =肖像,L =景观).测量(mm).页面格式 $pdf = ...

  5. JDK 和 OpenJDK 的区别

    历史上的原因是,openjdk是jdk的开放原始码版本,以GPL协议的形式放出.在JDK7的时候,openjdk已经成为jdk7的主干开发,sun jdk7是在openjdk7的基础上发布的,其大部分 ...

  6. Angular ui-roter 和AngularJS 通过 ocLazyLoad 实现动态(懒)加载模块和依赖

    什么是ui-router ui-router是AngularUI库最有用的组件之一(AngularUI库由AngularJS社区构建).它是一个第三方路由框架,允许通过状态机制组织接口,而不是简单的U ...

  7. flex弹性布局心得

    概述 最近做项目用flex重构了一下网页中的布局,顺便学习了一下flex弹性布局,感觉超级强大,有一些心得,记录下来供以后开发时参考,相信对其他人也有用. 参考资料: Solved by Flexbo ...

  8. flink metric库的使用和自定义metric-reporter

    简单介绍 flink内部实现了一套metric数据收集库. 同时flink自身系统有一些固定的metric数据, 包括系统的一些指标,CPU,内存, IO 或者各个task运行的一些指标.具体包含那些 ...

  9. Redis哨兵

    Redis Sentinel Redis哨兵为Redis提供高可用.这就意味着你用哨兵可以创建一个Redis部署,在没有人为干预的情况下抵抗某些失败.(PS:自动故障转移) Redis哨兵还提供其他的 ...

  10. InstallShield Limited Edition Project 打包windows服务解析

    最近项目从vs2005 升级到vs2010后,发现新的vs2010 不再带有原来的安装工程项目,导致以前的安装包不可以使用,查找资料后发现微软从vs2010 版本后不再提供自带的安装工程,尝试着利用  ...