作家
登录

论HTTP性能,Go与.NET Core一争雌雄

作者: 来源: 2017-10-10 13:48:24 阅读 我要评论

 requests to "api/values/{id}"
  •         [HttpGet("{id}")] 
  •         public string Get(int id) 
  •         { 
  •             return "value"
  •         } 
  •         // Put handles "PUT" requests to "api/values/{id}"
  •         [HttpPut("{id}")] 
  •         public void Put(int id, [FromBody]string value) 
  •         { 
  •         } 
  •         // Delete handles "DELETE" requests to "api/values/{id}"
  •         [HttpDelete("{id}")] 
  •         public void Delete(int id) 
  •         { 
  •         } 
  •     } 
  • 运行 .NET Core web 办事项目:

    1. $ cd netcore-mvc 
    2. $ dotnet run -c Release 
    3. Hosting environment: Production 
    4. Content root path: C:\mygopath\src\github.com\kataras\iris\_benchmarks\netcore-mvc 
    5. Now listening on: http://localhost:5000 
    6. Application started. Press Ctrl+C to shut down. 

    运行和定位 HTTP 基准对象:

    1. $ bombardier -c 125 -n 5000000 http://localhost:5000/api/values/5 
    2. Bombarding http://localhost:5000/api/values/5 with 5000000 requests using 125 connections 
    3.  5000000 / 5000000 [=====================================================] 100.00% 2m3s 
    4. Done! 
    5. Statistics        Avg      Stdev        Max 
    6.   Reqs/sec     40226.03    8724.30     161919 
    7.   Latency        3.09ms     1.40ms   169.12ms 
    8.   HTTP codes: 

    9.   推荐阅读

        SQL Server 2017正式发布;Oracle宣布开源Fn project

      SQL Server 2017 正式宣布:同时支撑 Windows 和 Linux微软在客岁 3 月初次对外宣布了 Linux 版的 SQL Server,痊愈本年 7 月宣布了首个公开 RC 版。前几日在美国奥兰多召开的微软 Ignit>>>详细阅读


      本文标题:论HTTP性能,Go与.NET Core一争雌雄

      地址:http://www.17bianji.com/lsqh/37756.html

    关键词: 探索发现

    乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

    网友点评
    自媒体专栏

    评论

    热度

    精彩导读
    栏目ID=71的表不存在(操作类型=0)