Pārlūkot izejas kodu

Cleanup some items (#5761)

* Cleanup some items

* update license year

* remove more frameworks

* PHP/hyperf broken
Nate 5 gadi atpakaļ
vecāks
revīzija
798a13907e
59 mainītis faili ar 17 papildinājumiem un 1266 dzēšanām
  1. 1 1
      .travis.yml
  2. 1 1
      LICENSE
  3. 1 3
      frameworks/C/libreactor/benchmark_config.json
  4. 8 4
      frameworks/D/vibed/benchmark_config.json
  5. 0 17
      frameworks/FSharp/suave/src/App/obj/x86/Debug/netcoreapp2.1/App.AssemblyInfo.fs
  6. 0 1
      frameworks/FSharp/suave/src/App/obj/x86/Debug/netcoreapp2.1/App.AssemblyInfoInputs.cache
  7. 0 1
      frameworks/FSharp/suave/src/App/obj/x86/Debug/netcoreapp2.1/App.fsproj.CoreCompileInputs.cache
  8. 0 17
      frameworks/FSharp/suave/src/App/obj/x86/Release/netcoreapp2.1/App.AssemblyInfo.fs
  9. 0 1
      frameworks/FSharp/suave/src/App/obj/x86/Release/netcoreapp2.1/App.AssemblyInfoInputs.cache
  10. 0 1
      frameworks/FSharp/suave/src/App/obj/x86/Release/netcoreapp2.1/App.fsproj.CoreCompileInputs.cache
  11. 0 10
      frameworks/JavaScript/chubbajs/.babelrc
  12. 0 25
      frameworks/JavaScript/chubbajs/README.md
  13. 0 28
      frameworks/JavaScript/chubbajs/benchmark_config.json
  14. 0 17
      frameworks/JavaScript/chubbajs/chubbajs.dockerfile
  15. 0 21
      frameworks/JavaScript/chubbajs/package.json
  16. 0 14
      frameworks/JavaScript/chubbajs/server/config/config.production.js
  17. 0 13
      frameworks/JavaScript/chubbajs/server/config/index.js
  18. 0 107
      frameworks/JavaScript/chubbajs/server/controllers/HelloWorld.js
  19. 0 26
      frameworks/JavaScript/chubbajs/server/index.js
  20. 0 18
      frameworks/JavaScript/chubbajs/server/models/Fortune.js
  21. 0 18
      frameworks/JavaScript/chubbajs/server/models/World.js
  22. 6 3
      frameworks/PHP/hyperf/benchmark_config.json
  23. 0 4
      frameworks/Ruby/hanami/.hanamirc
  24. 0 9
      frameworks/Ruby/hanami/Gemfile
  25. 0 12
      frameworks/Ruby/hanami/Rakefile
  26. 0 327
      frameworks/Ruby/hanami/apps/web/application.rb
  27. 0 21
      frameworks/Ruby/hanami/apps/web/config/controller.rb
  28. 0 14
      frameworks/Ruby/hanami/apps/web/config/routes.rb
  29. 0 1
      frameworks/Ruby/hanami/apps/web/controllers/.gitkeep
  30. 0 10
      frameworks/Ruby/hanami/apps/web/controllers/hello_world/db.rb
  31. 0 13
      frameworks/Ruby/hanami/apps/web/controllers/hello_world/fortune.rb
  32. 0 10
      frameworks/Ruby/hanami/apps/web/controllers/hello_world/json.rb
  33. 0 11
      frameworks/Ruby/hanami/apps/web/controllers/hello_world/plaintext.rb
  34. 0 18
      frameworks/Ruby/hanami/apps/web/controllers/hello_world/query.rb
  35. 0 20
      frameworks/Ruby/hanami/apps/web/controllers/hello_world/update.rb
  36. 0 9
      frameworks/Ruby/hanami/apps/web/templates/application.html.erb
  37. 0 12
      frameworks/Ruby/hanami/apps/web/templates/hello_world/fortune.html.erb
  38. 0 7
      frameworks/Ruby/hanami/apps/web/views/application_layout.rb
  39. 0 6
      frameworks/Ruby/hanami/apps/web/views/hello_world/fortune.rb
  40. 0 49
      frameworks/Ruby/hanami/benchmark_config.json
  41. 0 3
      frameworks/Ruby/hanami/config.ru
  42. 0 2
      frameworks/Ruby/hanami/config/boot.rb
  43. 0 28
      frameworks/Ruby/hanami/config/environment.rb
  44. 0 1
      frameworks/Ruby/hanami/config/initializers/.gitkeep
  45. 0 158
      frameworks/Ruby/hanami/config/nginx.conf
  46. 0 53
      frameworks/Ruby/hanami/config/unicorn.rb
  47. 0 12
      frameworks/Ruby/hanami/hanami-unicorn.dockerfile
  48. 0 9
      frameworks/Ruby/hanami/hanami.dockerfile
  49. 0 2
      frameworks/Ruby/hanami/lib/hello_world.rb
  50. 0 1
      frameworks/Ruby/hanami/lib/hello_world/entities/.gitkeep
  51. 0 6
      frameworks/Ruby/hanami/lib/hello_world/entities/fortune.rb
  52. 0 2
      frameworks/Ruby/hanami/lib/hello_world/entities/world.rb
  53. 0 1
      frameworks/Ruby/hanami/lib/hello_world/repositories/.gitkeep
  54. 0 3
      frameworks/Ruby/hanami/lib/hello_world/repositories/fortune_repository.rb
  55. 0 7
      frameworks/Ruby/hanami/lib/hello_world/repositories/world_repository.rb
  56. 0 23
      frameworks/TypeScript/oak/README.md
  57. 0 26
      frameworks/TypeScript/oak/benchmark_config.json
  58. 0 6
      frameworks/TypeScript/oak/oak.dockerfile
  59. 0 23
      frameworks/TypeScript/oak/src/index.ts

+ 1 - 1
.travis.yml

@@ -69,7 +69,7 @@ env:
     - 'TESTDIR="Python/aiohttp Python/api_hour Python/apidaora Python/blacksheep Python/bottle Python/cherrypy Python/django Python/emmett Python/eve Python/falcon Python/fastapi Python/flask"'
     - 'TESTDIR="Python/aiohttp Python/api_hour Python/apidaora Python/blacksheep Python/bottle Python/cherrypy Python/django Python/emmett Python/eve Python/falcon Python/fastapi Python/flask"'
     - 'TESTDIR="Python/hug Python/japronto Python/klein Python/morepath Python/pyramid Python/quart Python/responder Python/sanic Python/spyne Python/starlette"'
     - 'TESTDIR="Python/hug Python/japronto Python/klein Python/morepath Python/pyramid Python/quart Python/responder Python/sanic Python/spyne Python/starlette"'
     - 'TESTDIR="Python/tornado Python/turbogears Python/uvicorn Python/uwsgi Python/vibora Python/web2py Python/webware Python/weppy Python/wsgi"'
     - 'TESTDIR="Python/tornado Python/turbogears Python/uvicorn Python/uwsgi Python/vibora Python/web2py Python/webware Python/weppy Python/wsgi"'
-    - 'TESTDIR="Ruby/agoo Ruby/grape Ruby/h2o_mruby Ruby/hanami Ruby/padrino Ruby/rack Ruby/rack-sequel"'
+    - 'TESTDIR="Ruby/agoo Ruby/grape Ruby/h2o_mruby Ruby/padrino Ruby/rack Ruby/rack-sequel"'
     - 'TESTDIR="Ruby/rails Ruby/roda-sequel Ruby/sinatra Ruby/sinatra-sequel"'
     - 'TESTDIR="Ruby/rails Ruby/roda-sequel Ruby/sinatra Ruby/sinatra-sequel"'
     - 'TESTDIR="Rust/actix Rust/gotham Rust/hyper Rust/iron Rust/saphir"'
     - 'TESTDIR="Rust/actix Rust/gotham Rust/hyper Rust/iron Rust/saphir"'
     - 'TESTDIR="Rust/may-minihttp Rust/nickel Rust/rocket"'
     - 'TESTDIR="Rust/may-minihttp Rust/nickel Rust/rocket"'

+ 1 - 1
LICENSE

@@ -1,4 +1,4 @@
-Copyright (c) 2018, TechEmpower, Inc.
+Copyright (c) 2020, TechEmpower, Inc.
 All rights reserved.
 All rights reserved.
 
 
 Redistribution and use in source and binary forms, with or without
 Redistribution and use in source and binary forms, with or without

+ 1 - 3
frameworks/C/libreactor/benchmark_config.json

@@ -20,9 +20,7 @@
         "display_name": "libreactor",
         "display_name": "libreactor",
         "notes": "",
         "notes": "",
         "versus": "None"
         "versus": "None"
-      }
-    },
-    {
+      },
       "server": {
       "server": {
         "json_url": "/json",
         "json_url": "/json",
         "plaintext_url": "/plaintext",
         "plaintext_url": "/plaintext",

+ 8 - 4
frameworks/D/vibed/benchmark_config.json

@@ -22,7 +22,8 @@
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "vibe.d",
       "display_name": "vibe.d",
       "notes": "",
       "notes": "",
-      "versus": "vibed"
+      "versus": "vibed",
+      "tags": ["broken"]
     },
     },
     "dmd-pgsql": {
     "dmd-pgsql": {
       "json_url": "/json",
       "json_url": "/json",
@@ -45,7 +46,8 @@
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "vibe.d-pgsql",
       "display_name": "vibe.d-pgsql",
       "notes": "",
       "notes": "",
-      "versus": "vibed"
+      "versus": "vibed",
+      "tags": ["broken"]
     },
     },
     "ldc": {
     "ldc": {
       "json_url": "/json",
       "json_url": "/json",
@@ -68,7 +70,8 @@
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "vibe.d-ldc",
       "display_name": "vibe.d-ldc",
       "notes": "",
       "notes": "",
-      "versus": "vibed"
+      "versus": "vibed",
+      "tags": ["broken"]
     },
     },
     "ldc-pgsql": {
     "ldc-pgsql": {
       "json_url": "/json",
       "json_url": "/json",
@@ -91,7 +94,8 @@
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "vibe.d-ldc-pgsql",
       "display_name": "vibe.d-ldc-pgsql",
       "notes": "",
       "notes": "",
-      "versus": "vibed"
+      "versus": "vibed",
+      "tags": ["broken"]
     }
     }
   }]
   }]
 }
 }

+ 0 - 17
frameworks/FSharp/suave/src/App/obj/x86/Debug/netcoreapp2.1/App.AssemblyInfo.fs

@@ -1,17 +0,0 @@
-// <auto-generated>
-//     Generated by the FSharp WriteCodeFragment class.
-// </auto-generated>
-namespace FSharp
-
-open System
-open System.Reflection
-
-
-[<assembly: System.Reflection.AssemblyCompanyAttribute("App")>]
-[<assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")>]
-[<assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")>]
-[<assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")>]
-[<assembly: System.Reflection.AssemblyProductAttribute("App")>]
-[<assembly: System.Reflection.AssemblyTitleAttribute("App")>]
-[<assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")>]
-do()

+ 0 - 1
frameworks/FSharp/suave/src/App/obj/x86/Debug/netcoreapp2.1/App.AssemblyInfoInputs.cache

@@ -1 +0,0 @@
-935fc6b03c2183b74aad9f70355d701aca07a4a5

+ 0 - 1
frameworks/FSharp/suave/src/App/obj/x86/Debug/netcoreapp2.1/App.fsproj.CoreCompileInputs.cache

@@ -1 +0,0 @@
-996161b50654b5313def748bcba68f19230ee197

+ 0 - 17
frameworks/FSharp/suave/src/App/obj/x86/Release/netcoreapp2.1/App.AssemblyInfo.fs

@@ -1,17 +0,0 @@
-// <auto-generated>
-//     Generated by the FSharp WriteCodeFragment class.
-// </auto-generated>
-namespace FSharp
-
-open System
-open System.Reflection
-
-
-[<assembly: System.Reflection.AssemblyCompanyAttribute("App")>]
-[<assembly: System.Reflection.AssemblyConfigurationAttribute("Release")>]
-[<assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")>]
-[<assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")>]
-[<assembly: System.Reflection.AssemblyProductAttribute("App")>]
-[<assembly: System.Reflection.AssemblyTitleAttribute("App")>]
-[<assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")>]
-do()

+ 0 - 1
frameworks/FSharp/suave/src/App/obj/x86/Release/netcoreapp2.1/App.AssemblyInfoInputs.cache

@@ -1 +0,0 @@
-e00334bb3b31d675bce4978abd5874586e50ef72

+ 0 - 1
frameworks/FSharp/suave/src/App/obj/x86/Release/netcoreapp2.1/App.fsproj.CoreCompileInputs.cache

@@ -1 +0,0 @@
-813325372d046d9e3a38020b82a801095c97816c

+ 0 - 10
frameworks/JavaScript/chubbajs/.babelrc

@@ -1,10 +0,0 @@
-{
-  "plugins": [
-    ["@babel/plugin-proposal-decorators", {
-      "legacy": true
-    }],
-    ["@babel/plugin-proposal-class-properties", {
-      "loose": true
-    }]
-  ]
-}

+ 0 - 25
frameworks/JavaScript/chubbajs/README.md

@@ -1,25 +0,0 @@
-# [ChubbaJS](https://github.com/nbrady-techempower/chubbajs) Benchmarking Test
-
-This is the [ChubbaJS](https://github.com/nbrady-techempower/chubbajs) portion of a [benchmarking test suite](../) comparing a variety of web development platforms.
-
-## Test URLs
-
-### Plaintext Test
-
-http://localhost:8080/plaintext
-
-### JSON Encoding Test
-
-http://localhost:8080/json
-
-### DB Test
-
-http://localhost:8080/db
-
-### Query Test
-
-http://localhost:8080/query?queries=2
-
-### Update Test
-
-http://localhost:8080/update?queries=2

+ 0 - 28
frameworks/JavaScript/chubbajs/benchmark_config.json

@@ -1,28 +0,0 @@
-{
-  "framework": "chubbajs",
-  "tests": [{
-    "default": {
-      "plaintext_url": "/plaintext",
-      "json_url": "/json",
-      "db_url": "/db",
-      "query_url": "/query?queries=",
-      "update_url": "/update?queries=",
-      "fortune_url": "/fortune",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Micro",
-      "database": "Postgres",
-      "framework": "chubbajs",
-      "language": "JavaScript",
-      "flavor": "NodeJS",
-      "platform": "nodejs",
-      "webserver": "None",
-      "orm": "Micro",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "chubbajs",
-      "notes": "",
-      "versus": "express"
-    }
-  }]
-}

+ 0 - 17
frameworks/JavaScript/chubbajs/chubbajs.dockerfile

@@ -1,17 +0,0 @@
-FROM node:12.3.1-slim
-
-ENV NODE_ENV production
-
-RUN apt-get update -yqq
-RUN apt-get install -yqq git
-
-COPY ./package.json ./package.json
-
-RUN npm install
-
-COPY ./server ./server
-COPY ./.babelrc ./.babelrc
-
-RUN npm run build
-
-CMD ["npm", "run", "start:prod"]

+ 0 - 21
frameworks/JavaScript/chubbajs/package.json

@@ -1,21 +0,0 @@
-{
-  "name": "chubbajs",
-  "version": "0.1.0",
-  "description": "A chunky js framework",
-  "main": "index.js",
-  "scripts": {
-    "start:prod": "node ./build/index.js",
-    "build": "babel -d ./build ./server -s"
-  },
-  "author": "[email protected]",
-  "dependencies": {
-    "chubbajs": "https://github.com/nbrady-techempower/chubbajs#94b5d91",
-    "@babel/cli": "7.7.7",
-    "@babel/core": "7.7.7",
-    "@babel/node": "7.7.7",
-    "@babel/plugin-proposal-decorators": "7.7.4",
-    "@babel/plugin-proposal-class-properties": "7.7.4",
-    "regenerator-runtime": "0.13.3",
-    "html-entities": "1.2.1"
-  }
-}

+ 0 - 14
frameworks/JavaScript/chubbajs/server/config/config.production.js

@@ -1,14 +0,0 @@
-module.exports = {
-  port: 8080,
-  projectRoot: "/build",
-  database: {
-    engine: "postgres",
-    host: "TFB-database",
-    user: "benchmarkdbuser",
-    password: "benchmarkdbpass",
-    database: "hello_world",
-    port: 5432,
-    // Will check models against current scheme and perform migrations
-    migrations: false
-  }
-};

+ 0 - 13
frameworks/JavaScript/chubbajs/server/config/index.js

@@ -1,13 +0,0 @@
-/**
- * Passes the proper config object to the application
- */
-
-let config = {};
-
-try {
-  config = require(`./config.${process.env.NODE_ENV}.js`);
-} catch(e) {
-  console.log('No config for this environment exists.');
-}
-
-module.exports = config;

+ 0 - 107
frameworks/JavaScript/chubbajs/server/controllers/HelloWorld.js

@@ -1,107 +0,0 @@
-const {
-    GET,
-    validateParams
-} = require("chubbajs").routes.annotations;
-const Entities = require("html-entities").AllHtmlEntities;
-const World = require("../models/World");
-const Fortune = require("../models/Fortune");
-
-const entities = new Entities();
-
-function rando() {
-    return Math.floor(Math.random() * 10000) + 1;
-}
-
-function sanitizeQueries(q) {
-    if (!parseInt(q) || q < 1) return 1;
-    if (q > 500) return 500;
-    return q;
-}
-
-class HelloWorldController {
-    @GET("*")
-    async setServer(ctx) {
-        ctx.res.set('Server', 'Express');
-    }
-
-    @GET("/plaintext")
-    async plaintext(ctx) {
-        ctx.res.set('Content-Type', 'text/plain');
-        ctx.res.send("Hello, World!");
-    }
-
-    @GET("/json")
-    async json(ctx) {
-        ctx.res.json({ message: "Hello, World!"});
-    }
-
-    @GET("/db")
-    async db(ctx) {
-        const world = await new World(rando());
-        ctx.res.json({ id: world.id, randomnumber: world.randomnumber });
-    }
-
-    @GET("/query")
-    @validateParams({
-        query: "queries",
-        sanitize: sanitizeQueries
-    })
-    async query(ctx, { queries }) {
-        const ret = [];
-        for (let i = 0; i < queries; i++) {
-            const world = await new World(rando());
-            ret.push({ id: world.id, randomnumber: world.randomnumber });
-        }
-        ctx.res.json(ret);
-    }
-
-    @GET("/update")
-    @validateParams({
-        query: "queries",
-        sanitize: sanitizeQueries
-    })
-    async update(ctx, { queries }) {
-        const ret = [];
-        for (let i = 0; i < queries; i++) {
-            const world = await new World(rando());
-            world.randomnumber = rando();
-            await world.save();
-            ret.push({ id: world.id, randomnumber: world.randomnumber });
-        }
-        ctx.res.json(ret);
-    }
-
-    @GET("/fortune")
-    async fortune(ctx) {
-        let fortunes = (await ctx.db.query(`SELECT * FROM "Fortune"`)).rows;
-        const newFortune = new Fortune();
-        newFortune.message = "Additional fortune added at request time.";
-        newFortune.id = 0;
-        fortunes.push(newFortune);
-        fortunes.sort((a, b) => (a.message < b.message) ? -1 : 1);
-
-        ctx.res.send(`<!DOCTYPE html>
-<html>
-<head>
-<title>Fortunes</title>
-</head>
-<body>
-<table>
-<tr>
-<th>id</th>
-<th>message</th>
-</tr>
-${fortunes.map(f => `
-<tr>
-<td>${f.id}</td>
-<td>${entities.encode(f.message)}</td>
-</tr>
-`).join('')}
-</table>
-</body>
-</html>`);
-    }
-
-}
-
-module.exports = HelloWorldController;

+ 0 - 26
frameworks/JavaScript/chubbajs/server/index.js

@@ -1,26 +0,0 @@
-const { configure } = require("chubbajs");
-const config = require("./config");
-require("regenerator-runtime");
-
-const cluster = require('cluster');
-const numCPUs = require('os').cpus().length;
-
-if (cluster.isMaster) {
-    // Fork workers.
-    for (let i = 0; i < numCPUs; i++) {
-        cluster.fork();
-    }
-
-    cluster.on('exit', (worker, code, signal) =>
-        console.log('worker ' + worker.pid + ' died'));
-} else {
-    let context;
-    async function startServer() {
-        context = await configure(config);
-        context.app.listen(config.port, () => {
-            console.log(`Server is running on port ${config.port}.`);
-        });
-    }
-    startServer();
-}
-

+ 0 - 18
frameworks/JavaScript/chubbajs/server/models/Fortune.js

@@ -1,18 +0,0 @@
-const { primaryKey, varChar } = require("chubbajs").database.annotations;
-const Model = require("chubbajs").database.Model;
-
-class Fortune extends Model {
-
-    constructor(id) {
-        super(id);
-    }
-
-    @primaryKey
-    id;
-
-    @varChar(200)
-    message;
-
-}
-
-module.exports = Fortune;

+ 0 - 18
frameworks/JavaScript/chubbajs/server/models/World.js

@@ -1,18 +0,0 @@
-const { primaryKey, int } = require("chubbajs").database.annotations;
-const Model = require("chubbajs").database.Model;
-
-class World extends Model {
-
-    constructor(id) {
-        super(id);
-    }
-
-    @primaryKey
-    id;
-
-    @int
-    randomnumber;
-
-}
-
-module.exports = World;

+ 6 - 3
frameworks/PHP/hyperf/benchmark_config.json

@@ -23,7 +23,8 @@
                 "database_os": "Linux",
                 "database_os": "Linux",
                 "display_name": "Hyperf",
                 "display_name": "Hyperf",
                 "notes": "",
                 "notes": "",
-                "versus": "swoole"
+                "versus": "swoole",
+                "tags": ["broken"]
             },
             },
             "raw": {
             "raw": {
                 "db_url": "/raw-db",
                 "db_url": "/raw-db",
@@ -43,7 +44,8 @@
                 "database_os": "Linux",
                 "database_os": "Linux",
                 "display_name": "Hyperf",
                 "display_name": "Hyperf",
                 "notes": "",
                 "notes": "",
-                "versus": "swoole"
+                "versus": "swoole",
+                "tags": ["broken"]
             },
             },
             "micro": {
             "micro": {
                 "fortune_url": "/micro-fortunes",
                 "fortune_url": "/micro-fortunes",
@@ -61,7 +63,8 @@
                 "database_os": "Linux",
                 "database_os": "Linux",
                 "display_name": "Hyperf",
                 "display_name": "Hyperf",
                 "notes": "",
                 "notes": "",
-                "versus": "swoole"
+                "versus": "swoole",
+                "tags": ["broken"]
             }
             }
         }
         }
     ]
     ]

+ 0 - 4
frameworks/Ruby/hanami/.hanamirc

@@ -1,4 +0,0 @@
-project=hello_world
-architecture=container
-test=minitest
-template=erb

+ 0 - 9
frameworks/Ruby/hanami/Gemfile

@@ -1,9 +0,0 @@
-source 'https://rubygems.org'
-
-gem 'rake', '12.3.3'
-gem 'hanami', '1.1.0'
-gem 'hanami-model', '1.1.0'
-gem 'mysql2', '0.4.10'
-gem 'unicorn', '5.3.0'
-gem 'rom-sql', '1.3.5'
-gem 'puma', '3.12.6'

+ 0 - 12
frameworks/Ruby/hanami/Rakefile

@@ -1,12 +0,0 @@
-require 'rake'
-require 'hanami/rake_tasks'
-require 'rake/testtask'
-
-Rake::TestTask.new do |t|
-  t.pattern = 'spec/**/*_spec.rb'
-  t.libs    << 'spec'
-  t.warning = false
-end
-
-task default: :test
-task spec: :test

+ 0 - 327
frameworks/Ruby/hanami/apps/web/application.rb

@@ -1,327 +0,0 @@
-require 'hanami/helpers'
-require 'hanami/assets'
-require_relative 'config/controller'
-
-module Web
-  class Application < Hanami::Application
-    configure do
-      ##
-      # BASIC
-      #
-
-      # Define the root path of this application.
-      # All paths specified in this configuration are relative to path below.
-      #
-      root __dir__
-
-      # Relative load paths where this application will recursively load the
-      # code.
-      #
-      # When you add new directories, remember to add them here.
-      #
-      load_paths << [
-        'controllers',
-        'views'
-      ]
-
-      # Handle exceptions with HTTP statuses (true) or don't catch them (false).
-      # Defaults to true.
-      # See: http://www.rubydoc.info/gems/hanami-controller/#Exceptions_management
-      #
-      # handle_exceptions true
-
-      ##
-      # HTTP
-      #
-
-      # Routes definitions for this application
-      # See: http://www.rubydoc.info/gems/hanami-router#Usage
-      #
-      routes 'config/routes'
-
-      # URI scheme used by the routing system to generate absolute URLs
-      # Defaults to "http"
-      #
-      # scheme 'https'
-
-      # URI host used by the routing system to generate absolute URLs
-      # Defaults to "localhost"
-      #
-      # host 'example.org'
-
-      # URI port used by the routing system to generate absolute URLs
-      # Argument: An object coercible to integer, defaults to 80 if the scheme
-      # is http and 443 if it's https
-      #
-      # This should only be configured if app listens to non-standard ports
-      #
-      # port 443
-
-      # Enable cookies
-      # Argument: boolean to toggle the feature
-      #           A Hash with options
-      #
-      # Options:
-      #   :domain   - The domain (String - nil by default, not required)
-      #   :path     - Restrict cookies to a relative URI
-      #               (String - nil by default)
-      #   :max_age  - Cookies expiration expressed in seconds
-      #               (Integer - nil by default)
-      #   :secure   - Restrict cookies to secure connections
-      #               (Boolean - Automatically true when using HTTPS)
-      #               See #scheme and #ssl?
-      #   :httponly - Prevent JavaScript access (Boolean - true by default)
-      #
-      # cookies true
-      # or
-      # cookies max_age: 300
-
-      # Enable sessions
-      # Argument: Symbol the Rack session adapter
-      #           A Hash with options
-      #
-      # See: http://www.rubydoc.info/gems/rack/Rack/Session/Cookie
-      #
-      # sessions :cookie, secret: ENV['WEB_SESSIONS_SECRET']
-
-      # Configure Rack middleware for this application
-      #
-      # middleware.use Rack::Protection
-
-      # Default format for the requests that don't specify an HTTP_ACCEPT header
-      # Argument: A symbol representation of a mime type, defaults to :html
-      #
-      # default_request_format :html
-
-      # Default format for responses that don't consider the request format
-      # Argument: A symbol representation of a mime type, defaults to :html
-      #
-      # default_response_format :json
-
-      # HTTP Body parsers
-      # Parse non GET responses body for a specific mime type
-      # Argument: Symbol, which represent the format of the mime type
-      #             (only `:json` is supported)
-      #           Object, the parser
-      #
-      # body_parsers :json
-
-      # When it's true and the router receives a non-encrypted request (http),
-      # it redirects to the secure equivalent (https). Disabled by default.
-      #
-      # force_ssl true
-
-      ##
-      # TEMPLATES
-      #
-
-      # The layout to be used by all views
-      #
-      layout :application # It will load Web::Views::ApplicationLayout
-
-      # The relative path to templates
-      #
-      templates 'templates'
-
-      ##
-      # ASSETS
-      #
-      assets do
-        # JavaScript compressor
-        #
-        # Supported engines:
-        #
-        #   * :builtin
-        #   * :uglifier
-        #   * :yui
-        #   * :closure
-        #
-        # See: http://hanamirb.org/guides/assets/compressors
-        #
-        # In order to skip JavaScript compression comment the following line
-        # javascript_compressor :builtin
-
-        # Stylesheet compressor
-        #
-        # Supported engines:
-        #
-        #   * :builtin
-        #   * :yui
-        #   * :sass
-        #
-        # See: http://hanamirb.org/guides/assets/compressors
-        #
-        # In order to skip stylesheet compression comment the following line
-        # stylesheet_compressor :builtin
-
-        # Specify sources for assets
-        #
-        sources << [
-          'assets'
-        ]
-      end
-
-      ##
-      # SECURITY
-      #
-
-      # X-Frame-Options is a HTTP header supported by modern browsers.
-      # It determines if a web page can or cannot be included via <frame> and
-      # <iframe> tags by untrusted domains.
-      #
-      # Web applications can send this header to prevent Clickjacking attacks.
-      #
-      # Read more at:
-      #
-      #   * https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options
-      #   * https://www.owasp.org/index.php/Clickjacking
-      #
-      security.x_frame_options 'DENY'
-
-      # X-Content-Type-Options prevents browsers from interpreting files as
-      # something else than declared by the content type in the HTTP headers.
-      #
-      # Read more at:
-      #
-      #   * https://www.owasp.org/index.php/OWASP_Secure_Headers_Project#X-Content-Type-Options
-      #   * https://msdn.microsoft.com/en-us/library/gg622941%28v=vs.85%29.aspx
-      #   * https://blogs.msdn.microsoft.com/ie/2008/09/02/ie8-security-part-vi-beta-2-update
-      #
-      security.x_content_type_options 'nosniff'
-
-      # X-XSS-Protection is a HTTP header to determine the behavior of the
-      # browser in case an XSS attack is detected.
-      #
-      # Read more at:
-      #
-      #   * https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)
-      #   * https://www.owasp.org/index.php/OWASP_Secure_Headers_Project#X-XSS-Protection
-      #
-      security.x_xss_protection '1; mode=block'
-
-      # Content-Security-Policy (CSP) is a HTTP header supported by modern
-      # browsers. It determines trusted sources of execution for dynamic
-      # contents (JavaScript) or other web related assets: stylesheets, images,
-      # fonts, plugins, etc.
-      #
-      # Web applications can send this header to mitigate Cross Site Scripting
-      # (XSS) attacks.
-      #
-      # The default value allows images, scripts, AJAX, fonts and CSS from the
-      # same origin, and does not allow any other resources to load (eg object,
-      # frame, media, etc).
-      #
-      # Inline JavaScript is NOT allowed. To enable it, please use:
-      # "script-src 'unsafe-inline'".
-      #
-      # Content Security Policy introduction:
-      #
-      #  * http://www.html5rocks.com/en/tutorials/security/content-security-policy/
-      #  * https://www.owasp.org/index.php/Content_Security_Policy
-      #  * https://www.owasp.org/index.php/Cross-site_Scripting_%28XSS%29
-      #
-      # Inline and eval JavaScript risks:
-      #
-      #   * http://www.html5rocks.com/en/tutorials/security/content-security-policy/#inline-code-considered-harmful
-      #   * http://www.html5rocks.com/en/tutorials/security/content-security-policy/#eval-too
-      #
-      # Content Security Policy usage:
-      #
-      #  * http://content-security-policy.com/
-      #  * https://developer.mozilla.org/en-US/docs/Web/Security/CSP/Using_Content_Security_Policy
-      #
-      # Content Security Policy references:
-      #
-      #  * https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives
-      #
-      security.content_security_policy %{
-        form-action 'self';
-        frame-ancestors 'self';
-        base-uri 'self';
-        default-src 'none';
-        script-src 'self';
-        connect-src 'self';
-        img-src 'self' https: data:;
-        style-src 'self' 'unsafe-inline' https:;
-        font-src 'self';
-        object-src 'none';
-        plugin-types application/pdf;
-        child-src 'self';
-        frame-src 'self';
-        media-src 'self'
-      }
-
-      ##
-      # FRAMEWORKS
-      #
-
-      # Configure the code that will yield each time Web::Action is included
-      # This is useful for sharing common functionality
-      #
-      # See: http://www.rubydoc.info/gems/hanami-controller#Configuration
-      controller.prepare do
-        # include MyAuthentication # included in all the actions
-        # before :authenticate!    # run an authentication before callback
-      end
-
-      # Configure the code that will yield each time Web::View is included
-      # This is useful for sharing common functionality
-      #
-      # See: http://www.rubydoc.info/gems/hanami-view#Configuration
-      view.prepare do
-        include Hanami::Helpers
-        include Web::Assets::Helpers
-      end
-    end
-
-    ##
-    # DEVELOPMENT
-    #
-    configure :development do
-      # Don't handle exceptions, render the stack trace
-      handle_exceptions false
-    end
-
-    ##
-    # TEST
-    #
-    configure :test do
-      # Don't handle exceptions, render the stack trace
-      handle_exceptions false
-    end
-
-    ##
-    # PRODUCTION
-    #
-    configure :production do
-      # scheme 'https'
-      # host   'example.org'
-      # port   443
-
-      assets do
-        # Don't compile static assets in production mode (eg. Sass, ES6)
-        #
-        # See: http://www.rubydoc.info/gems/hanami-assets#Configuration
-        compile false
-
-        # Use fingerprint file name for asset paths
-        #
-        # See: http://hanamirb.org/guides/assets/overview
-        fingerprint false
-
-        # Content Delivery Network (CDN)
-        #
-        # See: http://hanamirb.org/guides/assets/content-delivery-network
-        #
-        # scheme 'https'
-        # host   'cdn.example.org'
-        # port   443
-
-        # Subresource Integrity
-        #
-        # See: http://hanamirb.org/guides/assets/content-delivery-network/#subresource-integrity
-        subresource_integrity :sha256
-      end
-    end
-  end
-end

+ 0 - 21
frameworks/Ruby/hanami/apps/web/config/controller.rb

@@ -1,21 +0,0 @@
-require 'hanami/controller'
-
-SERVER_STRING =
-  if defined?(PhusionPassenger)
-    [
-      PhusionPassenger::SharedConstants::SERVER_TOKEN_NAME,
-      PhusionPassenger::VERSION_STRING
-    ].join('/').freeze
-  elsif defined?(Puma)
-    Puma::Const::PUMA_SERVER_STRING
-  elsif defined?(Unicorn)
-    Unicorn::HttpParser::DEFAULTS['SERVER_SOFTWARE']
-  end
-
-Hanami::Controller.configure do
-  default_charset('')
-  default_headers({
-    'Date'   => Time.now.httpdate,
-    'Server' => SERVER_STRING || 'WebServer'
-  })
-end

+ 0 - 14
frameworks/Ruby/hanami/apps/web/config/routes.rb

@@ -1,14 +0,0 @@
-# Configure your routes here
-# See: http://hanamirb.org/guides/routing/overview/
-#
-# Example:
-# get '/hello', to: ->(env) { [200, {}, ['Hello from Hanami!']] }
-get '/plaintext', to: 'hello_world#plaintext'
-get '/fortune',  to: 'hello_world#fortune'
-get '/update', to: 'hello_world#update'
-
-namespace 'hello_world' do
-  get '/json',    to: 'hello_world#json'
-  get '/db',      to: 'hello_world#db'
-  get '/query', to: 'hello_world#query'
-end

+ 0 - 1
frameworks/Ruby/hanami/apps/web/controllers/.gitkeep

@@ -1 +0,0 @@
-#

+ 0 - 10
frameworks/Ruby/hanami/apps/web/controllers/hello_world/db.rb

@@ -1,10 +0,0 @@
-module Web::Controllers::HelloWorld
-  class Db
-    include Web::Action
-
-    def call(params)
-      self.headers.merge!({ 'Content-Type' => 'application/json' })
-      status 200, WorldRepository.new.find_random_entity.to_h.to_json
-    end
-  end
-end

+ 0 - 13
frameworks/Ruby/hanami/apps/web/controllers/hello_world/fortune.rb

@@ -1,13 +0,0 @@
-module Web::Controllers::HelloWorld
-  class Fortune
-    include Web::Action
-    expose :fortunes
-
-    def call(params)
-      self.headers.merge!({ 'Content-Type' => 'text/html; charset=utf-8' })
-      @fortunes = FortuneRepository.new.all
-      @fortunes << ::Fortune.new(id: 0, message: "Additional fortune added at request time.")
-      @fortunes = @fortunes.sort_by { |x| x.message }
-    end
-  end
-end

+ 0 - 10
frameworks/Ruby/hanami/apps/web/controllers/hello_world/json.rb

@@ -1,10 +0,0 @@
-module Web::Controllers::HelloWorld
-  class Json
-    include Web::Action
-
-    def call(params)
-      self.headers.merge!({ 'Content-Type' => 'application/json' })
-      status 200, {:message => "Hello, World!"}.to_json
-    end
-  end
-end

+ 0 - 11
frameworks/Ruby/hanami/apps/web/controllers/hello_world/plaintext.rb

@@ -1,11 +0,0 @@
-module Web::Controllers::HelloWorld
-  class Plaintext
-    include Web::Action
-
-    def call(params)
-      self.format = :txt
-      self.headers.merge!({ 'Content-Type' => 'text/plain' })
-      status 200, 'Hello, World!'
-    end
-  end
-end

+ 0 - 18
frameworks/Ruby/hanami/apps/web/controllers/hello_world/query.rb

@@ -1,18 +0,0 @@
-module Web::Controllers::HelloWorld
-  class Query
-    include Web::Action
-
-    def call(params)
-      self.headers.merge!({ 'Content-Type' => 'application/json' })
-      queries = params[:queries].to_i
-      queries = 1 if queries < 1
-      queries = 500 if queries > 500
-
-      repository = WorldRepository.new
-      results = (1..queries).map do
-        repository.find_random_entity.to_h
-      end
-      status 200, results.to_json
-    end
-  end
-end

+ 0 - 20
frameworks/Ruby/hanami/apps/web/controllers/hello_world/update.rb

@@ -1,20 +0,0 @@
-module Web::Controllers::HelloWorld
-  class Update
-    include Web::Action
-
-    def call(params)
-      self.headers.merge!({ 'Content-Type' => 'application/json' })
-      queries = (params[:queries] || 1).to_i
-      queries = 1 if queries < 1
-      queries = 500 if queries > 500
-
-      repository = WorldRepository.new
-      worlds = (1..queries).map do
-        world = repository.find_random_entity
-        world = repository.update(world.id, randomNumber: Random.rand(10000) + 1)
-        world.to_h
-      end
-      status 200, worlds.to_json
-    end
-  end
-end

+ 0 - 9
frameworks/Ruby/hanami/apps/web/templates/application.html.erb

@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>Fortunes</title>
-</head>
-<body>
-<%= yield %>
-</body>
-</html>

+ 0 - 12
frameworks/Ruby/hanami/apps/web/templates/hello_world/fortune.html.erb

@@ -1,12 +0,0 @@
-<table>
-<tr>
-<th>id</th>
-<th>message</th>
-</tr>
-<% fortunes.each do |fortune| %>
-<tr>
-<td><%= fortune.id %></td>
-<td><%= Rack::Utils.escape_html(fortune.message) %></td>
-</tr>
-<% end %>
-</table>

+ 0 - 7
frameworks/Ruby/hanami/apps/web/views/application_layout.rb

@@ -1,7 +0,0 @@
-module Web
-  module Views
-    class ApplicationLayout
-      include Web::Layout
-    end
-  end
-end

+ 0 - 6
frameworks/Ruby/hanami/apps/web/views/hello_world/fortune.rb

@@ -1,6 +0,0 @@
-module Web::Views::HelloWorld
-  class Fortune
-    include Web::View
-    format :html
-  end
-end

+ 0 - 49
frameworks/Ruby/hanami/benchmark_config.json

@@ -1,49 +0,0 @@
-{
-  "framework": "hanami",
-  "tests": [{
-    "default": {
-      "json_url": "/hello_world/json",
-      "db_url": "/hello_world/db",
-      "query_url": "/hello_world/query?queries=",
-      "fortune_url": "/fortune",
-      "update_url": "/update?queries=",
-      "plaintext_url": "/plaintext",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Fullstack",
-      "database": "MySQL",
-      "framework": "hanami",
-      "language": "Ruby",
-      "orm": "Full",
-      "platform": "Rack",
-      "webserver": "Puma",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "hanami-puma-mri",
-      "notes": "",
-      "versus": "rack-puma-mri"
-    },
-    "unicorn": {
-      "json_url": "/hello_world/json",
-      "db_url": "/hello_world/db",
-      "query_url": "/hello_world/query?queries=",
-      "fortune_url": "/fortune",
-      "update_url": "/update?queries=",
-      "plaintext_url": "/plaintext",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Fullstack",
-      "database": "MySQL",
-      "framework": "hanami",
-      "language": "Ruby",
-      "orm": "Full",
-      "platform": "Rack",
-      "webserver": "Unicorn",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "hanami-unicorn-mri",
-      "notes": "",
-      "versus": "rack-unicorn-mri"
-    }
-  }]
-}

+ 0 - 3
frameworks/Ruby/hanami/config.ru

@@ -1,3 +0,0 @@
-require './config/environment'
-
-run Hanami.app

+ 0 - 2
frameworks/Ruby/hanami/config/boot.rb

@@ -1,2 +0,0 @@
-require_relative './environment'
-Hanami.boot

+ 0 - 28
frameworks/Ruby/hanami/config/environment.rb

@@ -1,28 +0,0 @@
-require 'bundler/setup'
-require 'hanami/setup'
-require 'hanami/model'
-require_relative '../lib/hello_world'
-require_relative '../apps/web/application'
-
-Hanami.configure do
-  mount Web::Application, at: '/'
-
-  model do
-    ##
-    # Database adapter
-    #
-    # Available options:
-    #
-    #  * SQL adapter
-    #    adapter :sql, 'sqlite://db/hello_world_development.sqlite3'
-    #    adapter :sql, 'postgresql://localhost/hello_world_development'
-    #    adapter :sql, 'mysql://localhost/hello_world_development'
-    #
-
-    host = ENV['DB_HOST'] || 'localhost'
-    adapter :sql, "mysql2://benchmarkdbuser:benchmarkdbpass@#{host}/hello_world"
-  end
-
-  environment :production do
-  end
-end

+ 0 - 1
frameworks/Ruby/hanami/config/initializers/.gitkeep

@@ -1 +0,0 @@
-#

+ 0 - 158
frameworks/Ruby/hanami/config/nginx.conf

@@ -1,158 +0,0 @@
-# This is example contains the bare mininum to get nginx going with
-# Unicorn or Rainbows! servers.  Generally these configuration settings
-# are applicable to other HTTP application servers (and not just Ruby
-# ones), so if you have one working well for proxying another app
-# server, feel free to continue using it.
-#
-# The only setting we feel strongly about is the fail_timeout=0
-# directive in the "upstream" block.  max_fails=0 also has the same
-# effect as fail_timeout=0 for current versions of nginx and may be
-# used in its place.
-#
-# Users are strongly encouraged to refer to nginx documentation for more
-# details and search for other example configs.
-
-# you generally only need one nginx worker unless you're serving
-# large amounts of static files which require blocking disk reads
-worker_processes 8;
-
-# # drop privileges, root is needed on most systems for binding to port 80
-# # (or anything < 1024).  Capability-based security may be available for
-# # your system and worth checking out so you won't need to be root to
-# # start nginx to bind on 80
-# user nobody nogroup; # for systems with a "nogroup"
-#user nobody nobody; # for systems with "nobody" as a group instead
-
-# Feel free to change all paths to suite your needs here, of course
-pid /tmp/nginx.pid;
-#error_log /tmp/nginx.error.log;
-error_log stderr error;
-
-events {
-  worker_connections 4096; # increase if you have lots of clients
-  accept_mutex off; # "on" if nginx worker_processes > 1
-  use epoll; # enable for Linux 2.6+
-  # use kqueue; # enable for FreeBSD, OSX
-}
-
-http {
-  # nginx will find this file in the config directory set at nginx build time
-  include /etc/nginx/mime.types;
-
-  # fallback in case we can't determine a type
-  default_type application/octet-stream;
-
-  # click tracking!
-  #access_log /tmp/nginx.access.log combined;
-  access_log off;
-
-  # you generally want to serve static files with nginx since neither
-  # Unicorn nor Rainbows! is optimized for it at the moment
-  sendfile on;
-
-  tcp_nopush on; # off may be better for *some* Comet/long-poll stuff
-  tcp_nodelay off; # on may be better for some Comet/long-poll stuff
-
-  # we haven't checked to see if Rack::Deflate on the app server is
-  # faster or not than doing compression via nginx.  It's easier
-  # to configure it all in one place here for static files and also
-  # to disable gzip for clients who don't get gzip/deflate right.
-  # There are other gzip settings that may be needed used to deal with
-  # bad clients out there, see http://wiki.nginx.org/NginxHttpGzipModule
-  #gzip on;
-  #gzip_http_version 1.0;
-  #gzip_proxied any;
-  #gzip_min_length 500;
-  #gzip_disable "MSIE [1-6]\.";
-  #gzip_types text/plain text/html text/xml text/css
-  #           text/comma-separated-values
-  #           text/javascript application/x-javascript
-  #           application/atom+xml;
-
-  # this can be any application server, not just Unicorn/Rainbows!
-  upstream app_server {
-    # fail_timeout=0 means we always retry an upstream even if it failed
-    # to return a good HTTP response (in case the Unicorn master nukes a
-    # single worker for timing out).
-
-    # for UNIX domain socket setups:
-    server unix:/tmp/.sock fail_timeout=0;
-
-    # for TCP setups, point these to your backend servers
-    # server 192.168.0.7:8080 fail_timeout=0;
-    # server 192.168.0.8:8080 fail_timeout=0;
-    # server 192.168.0.9:8080 fail_timeout=0;
-  }
-
-  server {
-    # enable one of the following if you're on Linux or FreeBSD
-    listen 8080 default deferred; # for Linux
-    # listen 80 default accept_filter=httpready; # for FreeBSD
-
-    # If you have IPv6, you'll likely want to have two separate listeners.
-    # One on IPv4 only (the default), and another on IPv6 only instead
-    # of a single dual-stack listener.  A dual-stack listener will make
-    # for ugly IPv4 addresses in $remote_addr (e.g ":ffff:10.0.0.1"
-    # instead of just "10.0.0.1") and potentially trigger bugs in
-    # some software.
-    # listen [::]:80 ipv6only=on; # deferred or accept_filter recommended
-
-    client_max_body_size 4G;
-    server_name _;
-
-    # ~2 seconds is often enough for most folks to parse HTML/CSS and
-    # retrieve needed images/icons/frames, connections are cheap in
-    # nginx so increasing this is generally safe...
-    keepalive_timeout 10;
-
-    # path for static files
-    root /path/to/app/current/public;
-
-    # Prefer to serve static files directly from nginx to avoid unnecessary
-    # data copies from the application server.
-    #
-    # try_files directive appeared in in nginx 0.7.27 and has stabilized
-    # over time.  Older versions of nginx (e.g. 0.6.x) requires
-    # "if (!-f $request_filename)" which was less efficient:
-    # http://bogomips.org/unicorn.git/tree/examples/nginx.conf?id=v3.3.1#n127
-    try_files $uri/index.html $uri.html $uri @app;
-
-    location @app {
-      # an HTTP header important enough to have its own Wikipedia entry:
-      #   http://en.wikipedia.org/wiki/X-Forwarded-For
-      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-
-      # enable this if you forward HTTPS traffic to unicorn,
-      # this helps Rack set the proper URL scheme for doing redirects:
-      # proxy_set_header X-Forwarded-Proto $scheme;
-
-      # pass the Host: header from the client right along so redirects
-      # can be set properly within the Rack application
-      proxy_set_header Host $http_host;
-
-      # we don't want nginx trying to do something clever with
-      # redirects, we set the Host: header above already.
-      proxy_redirect off;
-
-      # set "proxy_buffering off" *only* for Rainbows! when doing
-      # Comet/long-poll/streaming.  It's also safe to set if you're using
-      # only serving fast clients with Unicorn + nginx, but not slow
-      # clients.  You normally want nginx to buffer responses to slow
-      # clients, even with Rails 3.1 streaming because otherwise a slow
-      # client can become a bottleneck of Unicorn.
-      #
-      # The Rack application may also set "X-Accel-Buffering (yes|no)"
-      # in the response headers do disable/enable buffering on a
-      # per-response basis.
-      # proxy_buffering off;
-
-      proxy_pass http://app_server;
-    }
-
-    # Rails error pages
-    error_page 500 502 503 504 /500.html;
-    location = /500.html {
-      root /path/to/app/current/public;
-    }
-  }
-}

+ 0 - 53
frameworks/Ruby/hanami/config/unicorn.rb

@@ -1,53 +0,0 @@
-worker_processes 8
-listen "/tmp/.sock", :backlog => 256
-
-preload_app true
-GC.respond_to?(:copy_on_write_friendly=) and
-  GC.copy_on_write_friendly = true
-
-  before_fork do |server, worker|
-    # the following is highly recomended for Rails + "preload_app true"
-    # as there's no need for the master process to hold a connection
-    defined?(ActiveRecord::Base) and
-      ActiveRecord::Base.connection.disconnect!
-
-    # The following is only recommended for memory/DB-constrained
-    # installations.  It is not needed if your system can house
-    # twice as many worker_processes as you have configured.
-    #
-    # # This allows a new master process to incrementally
-    # # phase out the old master process with SIGTTOU to avoid a
-    # # thundering herd (especially in the "preload_app false" case)
-    # # when doing a transparent upgrade.  The last worker spawned
-    # # will then kill off the old master process with a SIGQUIT.
-    # old_pid = "#{server.config[:pid]}.oldbin"
-    # if old_pid != server.pid
-    #   begin
-    #     sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU
-    #     Process.kill(sig, File.read(old_pid).to_i)
-    #   rescue Errno::ENOENT, Errno::ESRCH
-    #   end
-    # end
-    #
-    # Throttle the master from forking too quickly by sleeping.  Due
-    # to the implementation of standard Unix signal handlers, this
-    # helps (but does not completely) prevent identical, repeated signals
-    # from being lost when the receiving process is busy.
-    # sleep 1
-  end
-
-  after_fork do |server, worker|
-    # per-process listener ports for debugging/admin/migrations
-    # addr = "127.0.0.1:#{9293 + worker.nr}"
-    # server.listen(addr, :tries => -1, :delay => 5, :tcp_nopush => true)
-
-    # the following is *required* for Rails + "preload_app true",
-    defined?(ActiveRecord::Base) and
-      ActiveRecord::Base.establish_connection
-
-    # if preload_app is true, then you may also want to check and
-    # restart any other shared sockets/descriptors such as Memcached,
-    # and Redis.  TokyoCabinet file handles are safe to reuse
-    # between any number of forked children (assuming your kernel
-    # correctly implements pread()/pwrite() system calls)
-  end

+ 0 - 12
frameworks/Ruby/hanami/hanami-unicorn.dockerfile

@@ -1,12 +0,0 @@
-FROM ruby:2.4
-
-RUN apt-get update -yqq && apt-get install -yqq nginx
-
-ADD ./ /hanami
-
-WORKDIR /hanami
-
-RUN bundle install --jobs=4 --gemfile=/hanami/Gemfile --path=/hanami/hanami/bundle
-
-CMD nginx -c /hanami/config/nginx.conf && \
-    RACK_ENV=none DB_HOST=tfb-database bundle exec unicorn_rails -E production -c config/unicorn.rb

+ 0 - 9
frameworks/Ruby/hanami/hanami.dockerfile

@@ -1,9 +0,0 @@
-FROM ruby:2.4
-
-ADD ./ /hanami
-
-WORKDIR /hanami
-
-RUN bundle install --jobs=4 --gemfile=/hanami/Gemfile --path=/hanami/hanami/bundle
-
-CMD DB_HOST=tfb-database bundle exec puma -t 8:32 -w 8 --preload -b tcp://0.0.0.0:8080 -e production

+ 0 - 2
frameworks/Ruby/hanami/lib/hello_world.rb

@@ -1,2 +0,0 @@
-module HelloWorld
-end

+ 0 - 1
frameworks/Ruby/hanami/lib/hello_world/entities/.gitkeep

@@ -1 +0,0 @@
-#

+ 0 - 6
frameworks/Ruby/hanami/lib/hello_world/entities/fortune.rb

@@ -1,6 +0,0 @@
-class Fortune < Hanami::Entity
-  attributes do
-    attribute :id,      Types::Int
-    attribute :message, Types::String
-  end
-end

+ 0 - 2
frameworks/Ruby/hanami/lib/hello_world/entities/world.rb

@@ -1,2 +0,0 @@
-class World < Hanami::Entity
-end

+ 0 - 1
frameworks/Ruby/hanami/lib/hello_world/repositories/.gitkeep

@@ -1 +0,0 @@
-#

+ 0 - 3
frameworks/Ruby/hanami/lib/hello_world/repositories/fortune_repository.rb

@@ -1,3 +0,0 @@
-class FortuneRepository < Hanami::Repository
-  self.relation = :fortune
-end

+ 0 - 7
frameworks/Ruby/hanami/lib/hello_world/repositories/world_repository.rb

@@ -1,7 +0,0 @@
-class WorldRepository < Hanami::Repository
-  self.relation = :world
-
-  def find_random_entity
-    find(Random.rand(10000) + 1)
-  end
-end

+ 0 - 23
frameworks/TypeScript/oak/README.md

@@ -1,23 +0,0 @@
-# Oak Benchmarking Test
-
-### Test Type Implementation Source Code
-
-- [JSON](src/index.ts)
-- [PLAINTEXT](src/index.ts)
-
-## Important Libraries
-
-The tests were run with:
-
-- [Deno](https://deno.land/)
-- [Oak](https://github.com/oakserver/oak)
-
-## Test URLs
-
-### JSON
-
-http://localhost:8000/json
-
-### PLAINTEXT
-
-http://localhost:8000/plaintext

+ 0 - 26
frameworks/TypeScript/oak/benchmark_config.json

@@ -1,26 +0,0 @@
-{
-  "framework": "oak",
-  "tests": [
-    {
-      "default": {
-        "json_url": "/json",
-        "plaintext_url": "/plaintext",
-        "port": 8000,
-        "approach": "Realistic",
-        "classification": "Micro",
-        "database": "None",
-        "framework": "Oak",
-        "language": "TypeScript",
-        "flavor": "Deno",
-        "orm": "None",
-        "platform": "None",
-        "webserver": "None",
-        "os": "Linux",
-        "database_os": "Linux",
-        "display_name": "Oak",
-        "notes": "",
-        "versus": "nodejs"
-      }
-    }
-  ]
-}

+ 0 - 6
frameworks/TypeScript/oak/oak.dockerfile

@@ -1,6 +0,0 @@
-FROM maxmcd/deno
-
-WORKDIR /home
-COPY src src
-
-CMD ["deno", "--allow-net", "./src/index.ts"]

+ 0 - 23
frameworks/TypeScript/oak/src/index.ts

@@ -1,23 +0,0 @@
-import { Application, Router } from "https://deno.land/x/oak/mod.ts";
-
-(async () => {
-  const router = new Router();
-
-  router
-    .get("/json", context => {
-      context.response.headers.set("Server", "Oak");
-      context.response.headers.set("Date", new Date().toUTCString());
-      context.response.body = { message: "Hello, World!" };
-    })
-    .get("/plaintext", context => {
-      context.response.headers.set("Server", "Oak");
-      context.response.headers.set("Date", new Date().toUTCString());
-      context.response.body = "Hello, World!";
-    });
-
-  const app = new Application();
-  app.use(router.routes());
-  app.use(router.allowedMethods());
-
-  await app.listen("0.0.0.0:8000");
-})();