废话不多说,直接开干!

硬件配置

  • 处理器: 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. csv 数据

    csv数据:逗号分隔值,其文件以纯文本的形式存储表格数据(数据和文本).csv模块是python的内置模块,需要引用后再使用 csv.reader(csv_file) #使用with结构 with o ...

  2. 使用Java 线程池的利弊及JDK自带六种创建线程池的方法

    1. 为什么使用线程池 诸如 Web 服务器.数据库服务器.文件服务器或邮件服务器之类的许多服务器应用程序都面向处理来自某些远程来源的大量短小的任务.请求以某种方式到达服务器,这种方式可能是通过网络协 ...

  3. Java Web每天学之Servlet的原理解析

    Java Web每天学之Servlet的工作原理解析,上海尚学堂Java技术文章Java Web系列之二上一篇文章Java Web每天学之Servlet的工作原理解析是之一,欢迎点击阅读. Servl ...

  4. [Swift]LeetCode294. 翻转游戏之 II $ Flip Game II

    You are playing the following Flip Game with your friend: Given a string that contains only these tw ...

  5. Python内置函数(6)——bool

    英文文档: class bool([x]) Return a Boolean value, i.e. one of True or False. x is converted using the st ...

  6. SH2018笔试题之成长值问题

    一.题目 详见代码 二.代码 import java.util.Scanner; /** * 3 * 1 1 5 10 * 2 3 4 * 1 4 6 -5 */ public class main4 ...

  7. JVM虚拟机(1)---常用JVM配置参数

    常用JVM配置参数 常用JVM配置参数主要有:Trace跟踪参数.堆的分配参数.栈的分配参数. 一.Trace跟踪参数 跟踪参数用于跟踪监控JVM,对于开发人员来讲用于JVM调优以及故障排查的. 1. ...

  8. 简单实现 C# 与 Javascript的兼容

    本文章介绍下自己这刚实现的一个c#与js交互的插件.需求来源于一次与朋友的讨论.主要对话如下: 朋友:最近我想模拟一些数据,来测试我现在写的接口,但手工编写这些测试数据太麻烦了 本人:是啊,.net能 ...

  9. CSRF攻击原理及防御

    一.CSRF攻击原理 CSRF是什么呢?CSRF全名是Cross-site request forgery,是一种对网站的恶意利用,CSRF比XSS更具危险性.想要深入理解CSRF的攻击特性我们有必要 ...

  10. SpringBoot入门教程(十三)CORS方式实现跨域

    什么是跨域?浏览器从一个域名的网页去请求另一个域名的资源时,域名.端口.协议任一不同,都是跨域 . 跨域资源访问是经常会遇到的场景,当一个资源从与该资源本身所在的服务器不同的域或端口请求一个资源时,资 ...