Permalink
Browse files

add nginx benchmark stuff

  • Loading branch information...
1 parent f67b208 commit add7727ed3fb994be483ae592565e401d16681ee @carlos8f committed Nov 2, 2012
Showing with 131 additions and 0 deletions.
  1. +9 −0 bench/nginx/README.md
  2. +79 −0 bench/nginx/nginx-mime.conf
  3. +27 −0 bench/nginx/nginx.conf
  4. +16 −0 bench/nginx/nginx.js
View
9 bench/nginx/README.md
@@ -0,0 +1,9 @@
+nginx benchmark
+===============
+
+To include nginx in the benchmarks:
+
+- install nginx
+- tweak the included `nginx.conf` with the path to buffet's test files
+- copy `nginx.js` to the `bench` folder
+- run `make bench` from the buffet root.
View
79 bench/nginx/nginx-mime.conf
@@ -0,0 +1,79 @@
+types {
+ text/html html htm shtml;
+ text/css css;
+ text/xml xml;
+ image/gif gif;
+ image/jpeg jpeg jpg;
+ application/x-javascript js;
+ application/atom+xml atom;
+ application/rss+xml rss;
+
+ text/mathml mml;
+ text/plain txt;
+ text/vnd.sun.j2me.app-descriptor jad;
+ text/vnd.wap.wml wml;
+ text/x-component htc;
+
+ image/png png;
+ image/tiff tif tiff;
+ image/vnd.wap.wbmp wbmp;
+ image/x-icon ico;
+ image/x-jng jng;
+ image/x-ms-bmp bmp;
+ image/svg+xml svg svgz;
+ image/webp webp;
+
+ application/java-archive jar war ear;
+ application/mac-binhex40 hqx;
+ application/msword doc;
+ application/pdf pdf;
+ application/postscript ps eps ai;
+ application/rtf rtf;
+ application/vnd.ms-excel xls;
+ application/vnd.ms-powerpoint ppt;
+ application/vnd.wap.wmlc wmlc;
+ application/vnd.google-earth.kml+xml kml;
+ application/vnd.google-earth.kmz kmz;
+ application/x-7z-compressed 7z;
+ application/x-cocoa cco;
+ application/x-java-archive-diff jardiff;
+ application/x-java-jnlp-file jnlp;
+ application/x-makeself run;
+ application/x-perl pl pm;
+ application/x-pilot prc pdb;
+ application/x-rar-compressed rar;
+ application/x-redhat-package-manager rpm;
+ application/x-sea sea;
+ application/x-shockwave-flash swf;
+ application/x-stuffit sit;
+ application/x-tcl tcl tk;
+ application/x-x509-ca-cert der pem crt;
+ application/x-xpinstall xpi;
+ application/xhtml+xml xhtml;
+ application/zip zip;
+
+ application/octet-stream bin exe dll;
+ application/octet-stream deb;
+ application/octet-stream dmg;
+ application/octet-stream eot;
+ application/octet-stream iso img;
+ application/octet-stream msi msp msm;
+
+ audio/midi mid midi kar;
+ audio/mpeg mp3;
+ audio/ogg ogg;
+ audio/x-m4a m4a;
+ audio/x-realaudio ra;
+
+ video/3gpp 3gpp 3gp;
+ video/mp4 mp4;
+ video/mpeg mpeg mpg;
+ video/quicktime mov;
+ video/webm webm;
+ video/x-flv flv;
+ video/x-m4v m4v;
+ video/x-mng mng;
+ video/x-ms-asf asx asf;
+ video/x-ms-wmv wmv;
+ video/x-msvideo avi;
+}
View
27 bench/nginx/nginx.conf
@@ -0,0 +1,27 @@
+worker_processes 1;
+
+events {
+ worker_connections 1024;
+}
+
+http {
+ include nginx-mime.conf;
+ default_type application/octet-stream;
+
+ sendfile on;
+ #tcp_nopush on;
+
+ keepalive_timeout 65;
+
+ gzip on;
+
+ server {
+ listen 8080;
+ server_name localhost;
+
+ location / {
+ root /path/to/node-buffet/test/files;
+ index index.html;
+ }
+ }
+}
View
16 bench/nginx/nginx.js
@@ -0,0 +1,16 @@
+var exec = require('child_process').exec
+ , join = require('path').join
+
+exports.name = 'nginx';
+exports.version = '1.2.4';
+
+exports.listen = function (options, cb) {
+ exec('nginx', ['-c', join(__dirname, 'nginx', 'nginx.conf')]);
+ setTimeout(function () {
+ cb(null, 8080);
+ }, 500);
+};
+
+exports.close = function () {
+ exec('nginx', ['-s', 'quit']);
+};

0 comments on commit add7727

Please sign in to comment.