Skip to content
This repository
Browse code

benchmarks from sending a giant file from memory

  • Loading branch information...
commit b625f516292e9036c3a9f82dd0864aaa6618fd3c 1 parent 397749e
James Halliday authored December 15, 2012
5  bench/bench.js
@@ -3,11 +3,16 @@ var http = require('http');
3 3
 var p0 = 7500;
4 4
 var p1 = 7501;
5 5
 
  6
+var giganticBuffer = new Buffer(1024 * 1024 * 4); // 4M buffer
  7
+
6 8
 var name = process.argv[3];
7 9
 var server = {
8 10
     simple : http.createServer(function (req, res) {
9 11
         res.end('beepity boop');
10 12
     }),
  13
+    big : http.createServer(function (req, res) {
  14
+        res.end(giganticBuffer);
  15
+    }),
11 16
 }[process.argv[2]];
12 17
 server.listen(p1);
13 18
 
43  bench/results/big_bouncy_2.0.0.txt
... ...
@@ -0,0 +1,43 @@
  1
+This is ApacheBench, Version 2.3 <$Revision: 655654 $>
  2
+Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  3
+Licensed to The Apache Software Foundation, http://www.apache.org/
  4
+
  5
+Benchmarking localhost (be patient)
  6
+
  7
+
  8
+Server Software:        
  9
+Server Hostname:        localhost
  10
+Server Port:            7500
  11
+
  12
+Document Path:          /
  13
+Document Length:        4194304 bytes
  14
+
  15
+Concurrency Level:      10
  16
+Time taken for tests:   131.492 seconds
  17
+Complete requests:      5000
  18
+Failed requests:        0
  19
+Write errors:           0
  20
+Total transferred:      20971895000 bytes
  21
+HTML transferred:       20971520000 bytes
  22
+Requests per second:    38.03 [#/sec] (mean)
  23
+Time per request:       262.985 [ms] (mean)
  24
+Time per request:       26.298 [ms] (mean, across all concurrent requests)
  25
+Transfer rate:          155753.29 [Kbytes/sec] received
  26
+
  27
+Connection Times (ms)
  28
+              min  mean[+/-sd] median   max
  29
+Connect:        0    0   0.6      0      13
  30
+Processing:   133  262  27.7    257     427
  31
+Waiting:       25   66  14.9     65     144
  32
+Total:        133  263  27.8    257     427
  33
+
  34
+Percentage of the requests served within a certain time (ms)
  35
+  50%    257
  36
+  66%    268
  37
+  75%    275
  38
+  80%    279
  39
+  90%    293
  40
+  95%    317
  41
+  98%    349
  42
+  99%    364
  43
+ 100%    427 (longest request)
43  bench/results/big_http-proxy_0.8.5.txt
... ...
@@ -0,0 +1,43 @@
  1
+This is ApacheBench, Version 2.3 <$Revision: 655654 $>
  2
+Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  3
+Licensed to The Apache Software Foundation, http://www.apache.org/
  4
+
  5
+Benchmarking localhost (be patient)
  6
+
  7
+
  8
+Server Software:        
  9
+Server Hostname:        localhost
  10
+Server Port:            7500
  11
+
  12
+Document Path:          /
  13
+Document Length:        4194304 bytes
  14
+
  15
+Concurrency Level:      10
  16
+Time taken for tests:   136.163 seconds
  17
+Complete requests:      5000
  18
+Failed requests:        0
  19
+Write errors:           0
  20
+Total transferred:      20971895000 bytes
  21
+HTML transferred:       20971520000 bytes
  22
+Requests per second:    36.72 [#/sec] (mean)
  23
+Time per request:       272.327 [ms] (mean)
  24
+Time per request:       27.233 [ms] (mean, across all concurrent requests)
  25
+Transfer rate:          150410.37 [Kbytes/sec] received
  26
+
  27
+Connection Times (ms)
  28
+              min  mean[+/-sd] median   max
  29
+Connect:        0    0   0.2      0       8
  30
+Processing:   165  272  26.3    268     493
  31
+Waiting:       19   71  18.0     70     184
  32
+Total:        165  272  26.3    268     493
  33
+
  34
+Percentage of the requests served within a certain time (ms)
  35
+  50%    268
  36
+  66%    278
  37
+  75%    285
  38
+  80%    290
  39
+  90%    305
  40
+  95%    320
  41
+  98%    343
  42
+  99%    357
  43
+ 100%    493 (longest request)

0 notes on commit b625f51

Please sign in to comment.
Something went wrong with that request. Please try again.