Ver código fonte

Nginx plaintext bench (#4234)

* Nginx plaintext bench

* Change docker file
wget not neccesary

* Simplified conf
Without ngx_http_echo and now pass the test without warn
Joan Miquel 6 anos atrás
pai
commit
ad57f682f5

+ 18 - 0
frameworks/C/nginx/README.md

@@ -0,0 +1,18 @@
+[![Nginx logo](https://nginx.org/nginx.png)](https://nginx.org)
+
+# Nginx Benchmarking Test
+
+This is the Nginx portion of a [benchmarking test suite](../) comparing a variety of web development platforms.
+
+
+
+## Infrastructure Software Version
+The tests were run with:
+
+* [nginx mainline version](http://nginx.org/)
+
+
+## Test URLs
+### Plaintext Test
+
+http://localhost/hello

+ 25 - 0
frameworks/C/nginx/benchmark_config.json

@@ -0,0 +1,25 @@
+{
+  "framework": "nginx",
+  "tests": [
+    {
+      "default": {
+        "plaintext_url": "/hello",
+        "port": 8080,
+        "approach": "Realistic",
+        "classification": "Platform",
+        "framework": "None",
+        "language": "C",
+        "flavor": "None",
+        "orm": "Raw",
+        "platform": "None",
+        "database": "none",
+        "webserver": "nginx",
+        "os": "Linux",
+        "database_os": "Linux",
+        "display_name": "Nginx",
+        "notes": "",
+        "versus": ""
+      }
+    }
+  ]
+}

+ 39 - 0
frameworks/C/nginx/nginx.conf

@@ -0,0 +1,39 @@
+user www-data;
+worker_processes  auto;
+error_log stderr error;
+worker_rlimit_nofile 200000;
+daemon off;
+
+events {
+    worker_connections 16384;
+	multi_accept on;
+}
+
+http {
+    include       /etc/nginx/mime.types;
+    default_type  application/octet-stream;
+    access_log off;
+    server_tokens off;
+
+    sendfile on;
+    tcp_nopush on;
+    tcp_nodelay on;
+    keepalive_timeout 65;
+
+    server {
+        listen       8080;
+        server_name  localhost;
+
+        root /;
+        
+        location / {
+            root   html;
+            index  index.html index.htm;
+        }
+
+        location /hello {
+          default_type text/plain;
+          return 200 "Hello, World!";
+        }
+    }
+}

+ 13 - 0
frameworks/C/nginx/nginx.dockerfile

@@ -0,0 +1,13 @@
+FROM ubuntu:16.04
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
+RUN LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/nginx-mainline
+#RUN add-apt-repository -y ppa:nginx/development
+RUN apt-get update -yqq
+RUN apt-get install -y nginx-light
+
+ADD ./ ./
+
+CMD nginx -c /nginx.conf