dart_frog icon indicating copy to clipboard operation
dart_frog copied to clipboard

docs: provide benchmarks

Open iapicca opened this issue 3 years ago • 4 comments

As for the title, it would be nice to have some benchmark as reference possibly via FrameworkBenchmarks [site]

iapicca avatar May 25 '22 16:05 iapicca

Hey @iapicca 👋

Thanks for opening an issue!

We can try to gather some benchmarks in the near future but in the meantime I'm fairly confident that Dart Frog's benchmarks will be quite comparable to shelf since it's built on top of the existing shelf package.

felangel avatar May 25 '22 16:05 felangel

@felangel I think at the moment the most relevant benchmark submitted is a pure dart, but seems to be incomplete (no fortunes, no postgres...!!!) shelf is "missing" from dart benchmarks, but on the other hand isn't really a framework

anyway the date for round 21 is in 5 days so maybe this could be more doable for 2023

iapicca avatar May 26 '22 06:05 iapicca

Benchmark from Apache Benchmark on my 2019 MacBook Pro (from #58)

  Model Name:	MacBook Pro
  Model Identifier:	MacBookPro16,1
  Processor Name:	8-Core Intel Core i9
  Processor Speed:	2.3 GHz
  Number of Processors:	1
  Total Number of Cores:	8
  L2 Cache (per Core):	256 KB
  L3 Cache:	16 MB
  Hyper-Threading Technology:	Enabled
  Memory:	16 GB
$ ab -n 20000 -c 10 http://127.0.0.1:8080/   
This is ApacheBench, Version 2.3 <$Revision: 1879490 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 2000 requests
Completed 4000 requests
Completed 6000 requests
Completed 8000 requests
Completed 10000 requests
Completed 12000 requests
Completed 14000 requests
Completed 16000 requests
Completed 18000 requests
Completed 20000 requests
Finished 20000 requests


Server Software:        dart:io
Server Hostname:        127.0.0.1
Server Port:            8080

Document Path:          /
Document Length:        21 bytes

Concurrency Level:      10
Time taken for tests:   5.592 seconds
Complete requests:      20000
Failed requests:        0
Total transferred:      5220000 bytes
HTML transferred:       420000 bytes
Requests per second:    3576.53 [#/sec] (mean)
Time per request:       2.796 [ms] (mean)
Time per request:       0.280 [ms] (mean, across all concurrent requests)
Transfer rate:          911.60 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       1
Processing:     0    3  62.2      1    2762
Waiting:        0    3  59.0      1    2762
Total:          1    3  62.2      1    2762

Percentage of the requests served within a certain time (ms)
  50%      1
  66%      1
  75%      1
  80%      1
  90%      1
  95%      2
  98%      2
  99%      3
 100%   2762 (longest request)

felangel avatar May 27 '22 04:05 felangel

@felangel given this comment from FrameworkBenchmarks about Round 22

[...] We'd like to have a quicker turnaround for Round 22. We're hoping between Oct - Nov.

do you think will be possible to participate? I'd be happy to help if required

iapicca avatar Jul 20 '22 11:07 iapicca