iris/_benchmarks
kataras 151e38d5c8 .NET Core vs Iris MVC vs Iris (classic API with Handlers)
No need to format using Writef on benchmarks for a simple string value without dynamic text, just use the WriteString which is the correct function for these apps.


Former-commit-id: 896ec514570d533d8da91af3ad199fc4f823fe74
2017-08-19 07:11:30 +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 .NET Core vs Iris MVC vs Iris (classic API with Handlers) 2017-08-19 07:11:30 +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
$ 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

127210K Memory (private working set)

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

126024K Memory (private working set)

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

11052K Memory (private working set)

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.