当前位置: 移动技术网 > IT编程>开发语言>.net > [我还会回来的]asp.net core再战iris

[我还会回来的]asp.net core再战iris

2018年08月05日  | 移动技术网IT编程  | 我要评论

drawimage,周春富,中秋节手抄报图片

  废话不多说,直接开干!

硬件配置

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

软件版本

  • OS: Microsoft Windows 10
  • HTTP 跑分工具: , 最新版本 1.2
  • .NET Core SDK: , 最新版本 2.1.302
  • iris: , 最新版本 使用  编译

比试选手

  • iris (The fastest backend community-driven web framework on (THIS) Earth. ) [使用命令go build mian.go;.\main.exe]
  • aspnetcore(.NET下面的一个普通web框架 )[使用命令dotnet publish -c Release;dotnet netcore.dll]
  • aspnetcore-tieredcompilation(使用tieredcompilation进行编译,具体可看 )[使用命令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

 博文参考:
测试代码地址:

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网