Skip to content

Instantly share code, notes, and snippets.

@moradgholi
Last active August 29, 2015 14:24
Show Gist options
  • Select an option

  • Save moradgholi/1c7659f179013e5582c5 to your computer and use it in GitHub Desktop.

Select an option

Save moradgholi/1c7659f179013e5582c5 to your computer and use it in GitHub Desktop.
Speed test Laravel 5.1 vs Lumen for PHP League OAuth2.0
Enviornment : Homestead with 2 gigs of RAM
Model Name:	MacBook Pro
Model Identifier:	MacBookPro9,2
Processor Name:	Intel Core i5
Processor Speed:	2.5 GHz
Number of Processors:	1
Total Number of Cores:	2
L2 Cache (per Core):	256 KB
L3 Cache:	3 MB
Memory:	16 GB

==== Laravel 5.1 :

ab -t 10 -c 10 -p post_data -T 'application/x-www-form-urlencoded'  http://laravel.oauth/oauth/access_token

This is ApacheBench, Version 2.3 <$Revision: 1638069 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking laravel.oauth (be patient)
Finished 38 requests


Server Software:        nginx/1.8.0
Server Hostname:        laravel.oauth
Server Port:            80

Document Path:          /oauth/access_token
Document Length:        158 bytes

Concurrency Level:      10
Time taken for tests:   10.009 seconds
Complete requests:      38
Failed requests:        0
Total transferred:      15466 bytes
Total body sent:        13489
HTML transferred:       6004 bytes
Requests per second:    3.80 [#/sec] (mean)
Time per request:       2634.006 [ms] (mean)
Time per request:       263.401 [ms] (mean, across all concurrent requests)
Transfer rate:          1.51 [Kbytes/sec] received
                        1.32 kb/s sent
                        2.83 kb/s total

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.5      0       2
Processing:   892 2385 534.8   2522    3181
Waiting:      892 2384 534.7   2522    3181
Total:        893 2385 534.6   2522    3181

Percentage of the requests served within a certain time (ms)
  50%   2522
  66%   2625
  75%   2712
  80%   2752
  90%   2858
  95%   2962
  98%   3181
  99%   3181
 100%   3181 (longest request)

=== Lumen :

ab -t 10 -c 10 -p post_data -T 'application/x-www-form-urlencoded'  http://lumen.oauth/oauth/access_token
This is ApacheBench, Version 2.3 <$Revision: 1638069 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking lumen.oauth (be patient)
Finished 114 requests


Server Software:        nginx/1.8.0
Server Hostname:        lumen.oauth
Server Port:            80

Document Path:          /oauth/access_token
Document Length:        158 bytes

Concurrency Level:      10
Time taken for tests:   10.070 seconds
Complete requests:      114
Failed requests:        0
Total transferred:      41040 bytes
Total body sent:        35055
HTML transferred:       18012 bytes
Requests per second:    11.32 [#/sec] (mean)
Time per request:       883.339 [ms] (mean)
Time per request:       88.334 [ms] (mean, across all concurrent requests)
Transfer rate:          3.98 [Kbytes/sec] received
                        3.40 kb/s sent
                        7.38 kb/s total

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.2      0       1
Processing:   289  851 133.9    861    1152
Waiting:      289  851 133.9    861    1152
Total:        290  851 133.8    861    1152

Percentage of the requests served within a certain time (ms)
  50%    861
  66%    892
  75%    912
  80%    933
  90%   1001
  95%   1053
  98%   1091
  99%   1148
 100%   1152 (longest request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment