Update the benchmarks results as Scott Hanselman‏ and Josh Clark noted.

No such a difference (before: 8.61MB/s now: 8.91MB/s).

I think we can't do much more, I already removed the heavy parts on the first run... but still I'm open for any suggestions. Thank you for the feedback!


Former-commit-id: 0b0c8ba40c8380b530b6c77a5ee75ecfb4357f16
This commit is contained in:
kataras 2017-08-20 06:53:15 +03:00
parent 83614f1089
commit 89d0d5c5de
3 changed files with 14 additions and 13 deletions

View File

@ -15,10 +15,7 @@
### .NET Core MVC
```bash
$ cd netcore-mvc
# Same as dotnet run -c Release
# because of the code and configuration,
# scroll to the bottom for more.
$ dotnet run
$ dotnet run -c Release
Hosting environment: Production
Content root path: C:\mygopath\src\github.com\kataras\iris\_benchmarks\netcore-mvc
Now listening on: http://localhost:5000
@ -28,15 +25,15 @@ Application started. Press Ctrl+C to shut down.
```bash
$ bombardier -c 125 -n 5000000 http://localhost:5000/api/values/5
Bombarding http://localhost:5000/api/values/5 with 5000000 requests using 125 connections
5000000 / 5000000 [=====================================================================================] 100.00% 2m8s
5000000 / 5000000 [=====================================================================================] 100.00% 2m3s
Done!
Statistics Avg Stdev Max
Reqs/sec 39311.56 11744.49 264000
Latency 3.19ms 1.61ms 229.73ms
Reqs/sec 40226.03 8724.30 161919
Latency 3.09ms 1.40ms 169.12ms
HTTP codes:
1xx - 0, 2xx - 5000000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 8.61MB/s
Throughput: 8.91MB/s
```
### Iris MVC
@ -94,17 +91,21 @@ Click [here](screens) to navigate to the screenshots.
* Memory usage - smaller is better.
* LOC (Lines Of Code) - smaller is better.
.NET Core MVC Application, written using 86 lines of code, ran for **2 minutes and 8 seconds** serving **39311.56** requests per second within **3.19ms** latency in average and **229.73ms** max, the memory usage of all these was ~126MB (without the dotnet host).
.NET Core MVC Application, written using 86 lines of code, ran for **2 minutes and 3 seconds** serving **40226.03** requests per second within **3.09ms** latency in average and **169.12ms** max, the memory usage of all these was ~123MB (without the dotnet host).
Iris MVC Application, written using 27 lines of code, ran for **47 seconds** serving **105643.71** requests per second within **1.18ms** latency in average and **22.01ms** max, the memory usage of all these was ~12MB.
Iris Application, written using 22 lines of code, ran for **45 seconds** serving **110809.98** requests per second within **1.13ms** latency in average and **18.02ms** max, the memory usage of all these was ~11MB.
#### Notes for .NET Developers
#### Update: 20 August 2017
Don't try to tell "you're running from `dotnet run` and don't `dotnet run -c Release`", see the output first: `Hosting environment: Production`. It doesn't matter if you run `dotnet run` without arguments: if the configuration file says production or you don't use `if debug then do that`, then it runs as production.
As [Josh Clark](https://twitter.com/clarkis117) and [Scott Hanselman](https://twitter.com/shanselman) pointed out [on this status](https://twitter.com/shanselman/status/899005786826788865), on .NET Core `Startup.cs` file the line with `services.AddMvc();` can be replaced with `services.AddMvcCore();`. I followed their helpful instructions and re-run the benchmarks. The article now contains the latest benchmark output for the .NET Core application with the change both Josh and Scott noted.
Want to put some of your benchmarks here? Go ahead and share your results with the rest of us:
The twitter conversion: https://twitter.com/MakisMaropoulos/status/899113215895982080
For those who want to compare with the standard services.AddMvc(); you can see the old output by pressing [here](screens/500m_requests_netcore-mvc.png).
**Thank you all** for the 100% green feedback, have fun!
- https://dev.to/kataras/go-vsnet-core-in-terms-of-http-performance
- https://medium.com/@kataras/go-vs-net-core-in-terms-of-http-performance-7535a61b67b8

View File

@ -23,7 +23,7 @@ namespace netcore_mvc
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.AddMvcCore();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB