作家
登录

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

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

                    template: "{controller=Home}/{action=Index}/{id?}"); 
  •             }); 
  •         } 
  •     } 
    1. /* 
    2. wwwroot/css 
    3. wwwroot/images 
    4. wwwroot/js 
    5. wwwroot/lib 
    6. wwwroot/favicon.ico 
    7. Views/Shared/_Layout.cshtml 
    8. Views/Shared/Error.cshtml 
    9. Views/Home/About.cshtml 
    10. Views/Home/Contact.cshtml 
    11. Views/Home/Index.cshtml 
    12. These files are quite long to be shown in this article but you can view them at:  
    13. https://github.com/kataras/iris/tree/master/_benchmarks/netcore-mvc-templates 

    因为是新出的,我不想立马就比较两个不合的器械,所以我耐烦等待,想等宣布更稳定的版本后再进行。

    运行 .NET Core 办事项目:

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

    运行 HTTP 基准对象:

    1. Bombarding http://localhost:5000 with 1000000 requests using 125 connections 
    2.  1000000 / 1000000 [====================================================] 100.00% 1m20s 
    3. Done! 
    4. Statistics Avg Stdev Max 
    5.  Reqs/sec 11738.60 7741.36 125887 
    6.  Latency 10.10ms 22.10ms 1.97s 
    7.  HTTP codes: 
    8.  1xx — 0, 2xx — 1000000, 3xx — 0, 4xx — 0, 5xx — 0 
    9.  others — 0 
    10.  Throughput: 89.03MB/s 

    Iris MVC 应用的模板

    1. package controllers 
    2. import "github.com/kataras/iris/mvc" 
    3. type AboutController struct{ mvc.Controller } 
    4. func (c *AboutController) Get() { 
    5.     c.Data["Title"] = "About" 
    6.     c.Data["Message"] = "Your application description page." 
    7.     c.Tmpl = "about.html" 
    1. package controllers 
    2. import "github.com/kataras/iris/mvc"

        推荐阅读

        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)