iris/_benchmarks
2017-08-19 22:38:50 +03:00
..
iris .NET Core vs Iris MVC vs Iris (classic API with Handlers) 2017-08-19 07:11:30 +03:00
iris-mvc .NET Core vs Iris MVC vs Iris (classic API with Handlers) 2017-08-19 07:11:30 +03:00
netcore-mvc .NET Core vs Iris MVC vs Iris (classic API with Handlers) 2017-08-19 06:06:05 +03:00
screens .NET Core vs Iris MVC vs Iris (classic API with Handlers) 2017-08-19 07:11:30 +03:00
README.md Add a note about .NET Core, although I am not C# guy anymore, still know more compared to other net developers out there... 2017-08-19 22:38:50 +03:00

Hardware

  • Processor: Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz 2.50GHz
  • RAM: 8.00 GB

Software

Results

.NET Core MVC

$ cd netcore-mvc
# Same as dotnet run -c Release 
# because of the code and configuration,
# scroll to the bottom for more.
$ dotnet run 
Hosting environment: Production
Content root path: C:\mygopath\src\github.com\kataras\iris\_benchmarks\netcore-mvc
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
$ 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
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec     39311.56   11744.49     264000
  Latency        3.19ms     1.61ms   229.73ms
  HTTP codes:
    1xx - 0, 2xx - 5000000, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:     8.61MB/s

Iris MVC

$ cd iris-mvc
$ go run main.go
Now listening on: http://localhost:5000
Application started. Press CTRL+C to shut down.
$ 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% 47s
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec    105643.81    7687.79     122564
  Latency        1.18ms   366.55us    22.01ms
  HTTP codes:
    1xx - 0, 2xx - 5000000, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:    19.65MB/s

Iris

$ cd iris
$ go run main.go
Now listening on: http://localhost:5000
Application started. Press CTRL+C to shut down.
$ 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% 45s
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec    110809.98    8209.87     128212
  Latency        1.13ms   307.86us    18.02ms
  HTTP codes:
    1xx - 0, 2xx - 5000000, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:    20.61MB/s

Click here to navigate to the screenshots.

Summary

  • Time to complete the 5000000 requests - smaller is better.
  • Reqs/sec - bigger is better.
  • Latency - smaller is better
  • Throughput - bigger is better.
  • 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).

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

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.

Want to put some of your benchmarks here? Go ahead and share your results with the rest of us: