Explorar o código

Add falcon and tidy up Ruby rack configurations (#3844)

* Add falcon to rack tests

* Get it working

* Remove setup_file

* Improve documentation/code
Samuel Williams %!s(int64=7) %!d(string=hai) anos
pai
achega
ac64b82a4b

+ 1 - 0
frameworks/Ruby/rack/Gemfile

@@ -5,3 +5,4 @@ gem 'unicorn', '5.3.0'
 gem 'puma', '3.9.1'
 gem 'rack', '2.0.1'
 gem 'json', '2.1.0'
+gem 'falcon'

+ 2 - 1
frameworks/Ruby/rack/README.md

@@ -18,6 +18,7 @@ The tests were run with:
 * [Unicorn 4.8.3](http://unicorn.bogomips.org/)
 * [TorqBox 0.1.7](http://torquebox.org/torqbox/)
 * [Puma 3.9](http://puma.io/)
+* [Falcon](https://github.com/socketry/falcon)
 * [Thin 1.6.2](http://code.macournoyer.com/thin/)
 
 ## Paths & Source for Tests
@@ -33,7 +34,7 @@ The tests were run with:
 
 ### Experts
 
-_No experts listed, yet. If you're an expert, add yourself!_
+* Samuel Williams (@ioquatix) -- Async & Falcon developer.
 
 ### Community
 

+ 20 - 2
frameworks/Ruby/rack/benchmark_config.json

@@ -2,7 +2,6 @@
   "framework": "rack",
   "tests": [{
     "default": {
-      "setup_file": "run_mri_puma",
       "json_url": "/json",
       "db_url": "/db",
       "query_url": "/queries?queries=",
@@ -23,7 +22,6 @@
       "notes": ""
     },
     "unicorn": {
-      "setup_file": "run_mri_unicorn",
       "json_url": "/json",
       "db_url": "/db",
       "query_url": "/queries?queries=",
@@ -42,6 +40,26 @@
       "database_os": "Linux",
       "display_name": "rack-unicorn-mri",
       "notes": ""
+    },
+    "falcon": {
+      "json_url": "/json",
+      "db_url": "/db",
+      "query_url": "/queries?queries=",
+      "update_url": "/updates?queries=",
+      "plaintext_url": "/plaintext",
+      "port": 8080,
+      "approach": "Stripped",
+      "classification": "Platform",
+      "database": "MySQL",
+      "framework": "rack",
+      "language": "Ruby",
+      "orm": "Raw",
+      "platform": "Rack",
+      "webserver": "Falcon",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "rack-falcon-mri",
+      "notes": ""
     }
   }]
 }

+ 11 - 0
frameworks/Ruby/rack/rack-falcon.dockerfile

@@ -0,0 +1,11 @@
+FROM ruby:2.4
+
+RUN apt update -yqq && apt install -yqq nginx
+
+ADD ./ /rack
+
+WORKDIR /rack
+
+RUN bundle install --jobs=4 --gemfile=/rack/Gemfile --path=/rack/rack/bundle
+
+CMD bundle exec falcon serve --forked --bind tcp://0.0.0.0:8080