Skip to content

Commit

Permalink
Add license (the-benchmarker#424)
Browse files Browse the repository at this point in the history
* Restore scala (the-benchmarker#401, the-benchmarker#404) (the-benchmarker#414)

* Wrong version displayed for iron (the-benchmarker#406)

* wrong version display for iron

* update README

* force django version to >= 2.1.2 (the-benchmarker#398)

since a security issue has been discovered, @see https://www.djangoproject.com/weblog/2018/oct/01/security-release/

* Update nunomaduro/collision in php/laravel/composer.json from ~2.0.3 to v2.1.0 (the-benchmarker#397)

* Update nunomaduro/collision from ~2.0.3 to v2.1.0

* use tilde constraint

* avoid versionning vendor deps

* [Node.js]: Support turbo-http (the-benchmarker#329)

* Node.js: Add turbo-http

* flag turbo (polka) as experimental

* add to CI

* lint yaml config

* adding cyclone (the-benchmarker#396)

* adding cyclone

* add cyclone job description for neph

* use pip to install cyclone (from github)

* mark cyclone as developer preview

* flag as experimental

* add cyclone in CI

* allow --experimental flag usage (the-benchmarker#399)

* Addresses the-benchmarker#404

* Akka-http upgraded to latest. Addresses the-benchmarker#401

* sbt upgraded

* minor

* restore changes made by @mfirry to upgrade scala frameworks

* add a license

* use a community license (instead of personal author)
  • Loading branch information
waghanza committed Oct 10, 2018
1 parent 02fc17c commit c68b8bb
Show file tree
Hide file tree
Showing 15 changed files with 158 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -15,3 +15,6 @@ bin/

# git temporary files
*.orig

# PHP
vendor/
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -22,6 +22,7 @@ env:
- FRAMEWORK=bottle
- FRAMEWORK=aiohttp
- FRAMEWORK=quart
- FRAMEWORK=cyclone
- FRAMEWORK=mofuw
- FRAMEWORK=act
- FRAMEWORK=rails
Expand Down Expand Up @@ -56,6 +57,7 @@ env:
- FRAMEWORK=koa
- FRAMEWORK=polka
- FRAMEWORK=rayo
- FRAMEWORK=turbo_polka

script:
- shards build
Expand Down
28 changes: 18 additions & 10 deletions FRAMEWORKS.yml
Expand Up @@ -39,6 +39,10 @@ node:
hapi:
website: hapijs.com
version: "17.6"
turbo_polka:
github: mafintosh/turbo-http
version: "0.3"
type: experimental
python:
sanic:
github: huge-success/sanic
Expand All @@ -64,6 +68,10 @@ python:
quart:
website: pgjones.gitlab.io/quart
version: "0.6"
cyclone:
website: cyclone.io
version: "0.0 (dev preview)"
type: experimental
php:
symfony:
website: symfony.com
Expand All @@ -88,9 +96,9 @@ crystal:
website: spider-gazelle.net
version: "1.1"
nim:
#jester:
# github: dom96/jester
# version: "0.4"
# jester:
# github: dom96/jester
# version: "0.4"
mofuw:
github: 2vg/mofuw
version: "2.0"
Expand Down Expand Up @@ -136,13 +144,13 @@ rust:
rocket:
website: rocket.rs
version: "0.3"
#elixir:
# phoenix:
# website: phoenixframework.org
# version: "1.3"
# plug:
# github: elixir-plug/plug
# version: "1.6"
# elixir:
# phoenix:
# website: phoenixframework.org
# version: "1.3"
# plug:
# github: elixir-plug/plug
# version: "1.6"
cpp:
evhtp:
github: criticalstack/libevhtp
Expand Down
19 changes: 19 additions & 0 deletions LICENSE
@@ -0,0 +1,19 @@
Copyright (c) 2018 The benchmarker <the-benchmarker@googlegroups.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 4 additions & 0 deletions dependencies.yml
Expand Up @@ -74,6 +74,10 @@ dependencies:

- type: php
path: php/symfony
settings:
constraint_prefix: '~'

- type: php
path: php/laravel
settings:
constraint_prefix: '~'
11 changes: 11 additions & 0 deletions neph.yaml
Expand Up @@ -49,6 +49,7 @@ python:
- bottle
- aiohttp
- quart
- cyclone

go:
depends_on:
Expand Down Expand Up @@ -81,6 +82,7 @@ node:
- koa
- restify
- hapi
- turbo_polka

elixir:
depends_on:
Expand Down Expand Up @@ -224,6 +226,11 @@ aiohttp:
docker build -t aiohttp .
dir: python/aiohttp

cyclone:
command: |
docker build -t cyclone .
dir: python/cyclone

iris:
command: |
docker build -t iris .
Expand Down Expand Up @@ -324,6 +331,10 @@ hapi:
docker build -t hapi .
dir: node/hapi

turbo_polka:
command: |
docker build -t turbo_polka .
dir: node/turbo_polka

plug:
command: |
Expand Down
13 changes: 13 additions & 0 deletions node/turbo_polka/Dockerfile
@@ -0,0 +1,13 @@
FROM node

RUN npm -g install pm2

WORKDIR /usr/src/app

COPY app.js package.json ./

RUN npm install

ENV NODE_ENV production

CMD pm2-runtime start app.js -i $(nproc)
15 changes: 15 additions & 0 deletions node/turbo_polka/app.js
@@ -0,0 +1,15 @@
const polka = require('polka');
const turbo = require('turbo-http');
const server = turbo.createServer();

polka({ server })
.get('/', (req, res) => {
res.end('');
})
.get('/user/:id', (req, res) => {
res.end(req.params.id);
})
.post('/user', (req, res) => {
res.end('');
})
.listen(3000);
11 changes: 11 additions & 0 deletions node/turbo_polka/package.json
@@ -0,0 +1,11 @@
{
"author": {
"name": "Parsa Ghadimi",
"email": "me@qti3e.com",
"url": "http://qti3e.com"
},
"dependencies": {
"polka": "~0.5.1",
"turbo-http": "~0.3.0"
}
}
4 changes: 2 additions & 2 deletions php/laravel/composer.json
@@ -1,9 +1,9 @@
{
"require": {
"fideloper/proxy": "~4.0.0",
"laravel/framework": "~5.7.3",
"laravel/framework": "~5.7.8",
"laravel/tinker": "~1.0.7",
"nunomaduro/collision": "~2.0.3"
"nunomaduro/collision": "~2.1.0"
},
"autoload": {
"psr-4": {
Expand Down
11 changes: 11 additions & 0 deletions python/cyclone/Dockerfile
@@ -0,0 +1,11 @@
FROM python

WORKDIR /usr/src/app

COPY requirements.txt server.py ./

RUN pip install --no-cache-dir -r requirements.txt

EXPOSE 3000

CMD python server.py
2 changes: 2 additions & 0 deletions python/cyclone/requirements.txt
@@ -0,0 +1,2 @@
twisted==18.7.0
-e git+https://github.com/ygl-rg/cyclone3.git#egg=cyclone
38 changes: 38 additions & 0 deletions python/cyclone/server.py
@@ -0,0 +1,38 @@
import cyclone.web
import sys

from twisted.internet import reactor
from twisted.python import log


class MainHandler(cyclone.web.RequestHandler):
@cyclone.web.asynchronous
def get(self):
self.write("")
self.finish()


class UserInfoHandler(cyclone.web.RequestHandler):
@cyclone.web.asynchronous
def get(self, id):
self.write(id)
self.finish()


class UserHandler(cyclone.web.RequestHandler):
@cyclone.web.asynchronous
def post(self):
self.write("")
self.finish()


if __name__ == "__main__":
application = cyclone.web.Application([
(r'/', MainHandler),
(r"/user/(\d+)", UserInfoHandler),
(r"/user", UserHandler),
])

log.startLogging(sys.stdout)
reactor.listenTCP(port=3000, interface='0.0.0.0', factory=application)
reactor.run()
2 changes: 1 addition & 1 deletion python/django/requirements.txt
@@ -1,3 +1,3 @@
django==2.1.*
django>=2.1.2,<3.0.0
gunicorn==19.9.*
meinheld==0.6.*
9 changes: 8 additions & 1 deletion tools/src/benchmarker.cr
Expand Up @@ -12,12 +12,15 @@ require "yaml"
threads = (System.cpu_count + 1).to_i
connections = 1000
record = false
ns =

check = false
store = Kiwi::MemoryStore.new
duration = 15

class Options
class_property with_experimental : Bool = false
end

#################
# ### OPTIONS ###
#################
Expand All @@ -36,6 +39,9 @@ OptionParser.parse! do |parser|
parser.on("--record", "Record results in README.md") do
record = true
end
parser.on("--experimental", "Display experimental stuff (non-native, not versioned)") do
Options.with_experimental = true
end
end

##################
Expand All @@ -59,6 +65,7 @@ def frameworks : Array(Target)
YAML.parse(File.read("FRAMEWORKS.yml")).as_h.each do |lang, data|
data.as_h.each do |framework, line|
row = line.as_h
next if row.has_key?("type") && row["type"] == "experimental" && !Options.with_experimental
if row.has_key?("github")
link = "github.com/#{row["github"]}"
elsif row.has_key?("website")
Expand Down

0 comments on commit c68b8bb

Please sign in to comment.