Skip to content

Commit c68b8bb

Browse files
authored
Add license (the-benchmarker#424)
* 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)
1 parent 02fc17c commit c68b8bb

15 files changed

+158
-14
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ bin/
1515

1616
# git temporary files
1717
*.orig
18+
19+
# PHP
20+
vendor/

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222
- FRAMEWORK=bottle
2323
- FRAMEWORK=aiohttp
2424
- FRAMEWORK=quart
25+
- FRAMEWORK=cyclone
2526
- FRAMEWORK=mofuw
2627
- FRAMEWORK=act
2728
- FRAMEWORK=rails
@@ -56,6 +57,7 @@ env:
5657
- FRAMEWORK=koa
5758
- FRAMEWORK=polka
5859
- FRAMEWORK=rayo
60+
- FRAMEWORK=turbo_polka
5961

6062
script:
6163
- shards build

FRAMEWORKS.yml

+18-10
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ node:
3939
hapi:
4040
website: hapijs.com
4141
version: "17.6"
42+
turbo_polka:
43+
github: mafintosh/turbo-http
44+
version: "0.3"
45+
type: experimental
4246
python:
4347
sanic:
4448
github: huge-success/sanic
@@ -64,6 +68,10 @@ python:
6468
quart:
6569
website: pgjones.gitlab.io/quart
6670
version: "0.6"
71+
cyclone:
72+
website: cyclone.io
73+
version: "0.0 (dev preview)"
74+
type: experimental
6775
php:
6876
symfony:
6977
website: symfony.com
@@ -88,9 +96,9 @@ crystal:
8896
website: spider-gazelle.net
8997
version: "1.1"
9098
nim:
91-
#jester:
92-
# github: dom96/jester
93-
# version: "0.4"
99+
# jester:
100+
# github: dom96/jester
101+
# version: "0.4"
94102
mofuw:
95103
github: 2vg/mofuw
96104
version: "2.0"
@@ -136,13 +144,13 @@ rust:
136144
rocket:
137145
website: rocket.rs
138146
version: "0.3"
139-
#elixir:
140-
# phoenix:
141-
# website: phoenixframework.org
142-
# version: "1.3"
143-
# plug:
144-
# github: elixir-plug/plug
145-
# version: "1.6"
147+
# elixir:
148+
# phoenix:
149+
# website: phoenixframework.org
150+
# version: "1.3"
151+
# plug:
152+
# github: elixir-plug/plug
153+
# version: "1.6"
146154
cpp:
147155
evhtp:
148156
github: criticalstack/libevhtp

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2018 The benchmarker <[email protected]>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

dependencies.yml

+4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ dependencies:
7474

7575
- type: php
7676
path: php/symfony
77+
settings:
78+
constraint_prefix: '~'
7779

7880
- type: php
7981
path: php/laravel
82+
settings:
83+
constraint_prefix: '~'

neph.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ python:
4949
- bottle
5050
- aiohttp
5151
- quart
52+
- cyclone
5253

5354
go:
5455
depends_on:
@@ -81,6 +82,7 @@ node:
8182
- koa
8283
- restify
8384
- hapi
85+
- turbo_polka
8486

8587
elixir:
8688
depends_on:
@@ -224,6 +226,11 @@ aiohttp:
224226
docker build -t aiohttp .
225227
dir: python/aiohttp
226228

229+
cyclone:
230+
command: |
231+
docker build -t cyclone .
232+
dir: python/cyclone
233+
227234
iris:
228235
command: |
229236
docker build -t iris .
@@ -324,6 +331,10 @@ hapi:
324331
docker build -t hapi .
325332
dir: node/hapi
326333

334+
turbo_polka:
335+
command: |
336+
docker build -t turbo_polka .
337+
dir: node/turbo_polka
327338

328339
plug:
329340
command: |

node/turbo_polka/Dockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM node
2+
3+
RUN npm -g install pm2
4+
5+
WORKDIR /usr/src/app
6+
7+
COPY app.js package.json ./
8+
9+
RUN npm install
10+
11+
ENV NODE_ENV production
12+
13+
CMD pm2-runtime start app.js -i $(nproc)

node/turbo_polka/app.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const polka = require('polka');
2+
const turbo = require('turbo-http');
3+
const server = turbo.createServer();
4+
5+
polka({ server })
6+
.get('/', (req, res) => {
7+
res.end('');
8+
})
9+
.get('/user/:id', (req, res) => {
10+
res.end(req.params.id);
11+
})
12+
.post('/user', (req, res) => {
13+
res.end('');
14+
})
15+
.listen(3000);

node/turbo_polka/package.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"author": {
3+
"name": "Parsa Ghadimi",
4+
"email": "[email protected]",
5+
"url": "http://qti3e.com"
6+
},
7+
"dependencies": {
8+
"polka": "~0.5.1",
9+
"turbo-http": "~0.3.0"
10+
}
11+
}

php/laravel/composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"require": {
33
"fideloper/proxy": "~4.0.0",
4-
"laravel/framework": "~5.7.3",
4+
"laravel/framework": "~5.7.8",
55
"laravel/tinker": "~1.0.7",
6-
"nunomaduro/collision": "~2.0.3"
6+
"nunomaduro/collision": "~2.1.0"
77
},
88
"autoload": {
99
"psr-4": {

python/cyclone/Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM python
2+
3+
WORKDIR /usr/src/app
4+
5+
COPY requirements.txt server.py ./
6+
7+
RUN pip install --no-cache-dir -r requirements.txt
8+
9+
EXPOSE 3000
10+
11+
CMD python server.py

python/cyclone/requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
twisted==18.7.0
2+
-e git+https://github.com/ygl-rg/cyclone3.git#egg=cyclone

python/cyclone/server.py

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import cyclone.web
2+
import sys
3+
4+
from twisted.internet import reactor
5+
from twisted.python import log
6+
7+
8+
class MainHandler(cyclone.web.RequestHandler):
9+
@cyclone.web.asynchronous
10+
def get(self):
11+
self.write("")
12+
self.finish()
13+
14+
15+
class UserInfoHandler(cyclone.web.RequestHandler):
16+
@cyclone.web.asynchronous
17+
def get(self, id):
18+
self.write(id)
19+
self.finish()
20+
21+
22+
class UserHandler(cyclone.web.RequestHandler):
23+
@cyclone.web.asynchronous
24+
def post(self):
25+
self.write("")
26+
self.finish()
27+
28+
29+
if __name__ == "__main__":
30+
application = cyclone.web.Application([
31+
(r'/', MainHandler),
32+
(r"/user/(\d+)", UserInfoHandler),
33+
(r"/user", UserHandler),
34+
])
35+
36+
log.startLogging(sys.stdout)
37+
reactor.listenTCP(port=3000, interface='0.0.0.0', factory=application)
38+
reactor.run()

python/django/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
django==2.1.*
1+
django>=2.1.2,<3.0.0
22
gunicorn==19.9.*
33
meinheld==0.6.*

tools/src/benchmarker.cr

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ require "yaml"
1212
threads = (System.cpu_count + 1).to_i
1313
connections = 1000
1414
record = false
15-
ns =
1615

1716
check = false
1817
store = Kiwi::MemoryStore.new
1918
duration = 15
2019

20+
class Options
21+
class_property with_experimental : Bool = false
22+
end
23+
2124
#################
2225
# ### OPTIONS ###
2326
#################
@@ -36,6 +39,9 @@ OptionParser.parse! do |parser|
3639
parser.on("--record", "Record results in README.md") do
3740
record = true
3841
end
42+
parser.on("--experimental", "Display experimental stuff (non-native, not versioned)") do
43+
Options.with_experimental = true
44+
end
3945
end
4046

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

0 commit comments

Comments
 (0)