diff --git a/frameworks/Erlang/elli/README.md b/frameworks/Erlang/elli/README.md deleted file mode 100644 index 7389fe5b64f..00000000000 --- a/frameworks/Erlang/elli/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# Elli Benchmarking Test - -This is the Elli portion of a [benchmarking test suite](../) comparing a variety of web development platforms. - -### JSON Encoding Test - -* [JSON test controller](src/elli_bench_cb.erl) - - -### Data-Store/Database Mapping Test - -* [DB test controller](src/elli_bench_cb.erl) - - -## Infrastructure Software Versions -The tests were run with: - -* [Elli](git://github.com/knutin/elli) -* [Erlang R16B](http://www.erlang.org/) -* [MySQL 5.5.29](https://dev.mysql.com/) - -## Test URLs -### JSON Encoding Test - -http://localhost/json - -### Data-Store/Database Mapping Test - -http://localhost/db - -### Variable Query Test - -http://localhost/db?queries=2 diff --git a/frameworks/Erlang/elli/benchmark_config.json b/frameworks/Erlang/elli/benchmark_config.json deleted file mode 100644 index ce58700f3e1..00000000000 --- a/frameworks/Erlang/elli/benchmark_config.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "framework": "elli", - "tests": [{ - "default": { - "plaintext_url":"/plaintext", - "json_url": "/json", - "db_url": "/db", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "MySQL", - "framework": "elli", - "language": "Erlang", - "flavor": "None", - "orm": "Raw", - "platform": "beam", - "webserver": "elli", - "os": "Linux", - "database_os": "Linux", - "display_name": "elli", - "notes": "", - "tags": ["broken"], - "versus": "" - }}] -} diff --git a/frameworks/Erlang/elli/elli.dockerfile b/frameworks/Erlang/elli/elli.dockerfile deleted file mode 100644 index 7e4d305e664..00000000000 --- a/frameworks/Erlang/elli/elli.dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM erlang:25.1 - -WORKDIR /elli -COPY src src -COPY rebar.config rebar.config - -RUN rebar get-deps -RUN rebar compile - -EXPOSE 8080 - -CMD erl -pa ebin deps/*/ebin +sbwt very_long +swt very_low -s elli_bench -noshell diff --git a/frameworks/Erlang/elli/rebar.config b/frameworks/Erlang/elli/rebar.config deleted file mode 100644 index cfc0e615bcf..00000000000 --- a/frameworks/Erlang/elli/rebar.config +++ /dev/null @@ -1,6 +0,0 @@ -{deps, - [ - {jiffy, ".*", {git, "https://github.com/davisp/jiffy.git", {tag, "1.1.1"}}}, - {emysql, ".*", {git, "https://github.com/deadtrickster/Emysql.git", "52b802098322aad372198b9f5fa9ae9a4c758ad1"}}, - {elli, ".*", {git, "https://github.com/elli-lib/elli.git", {tag, "3.3.0"}}} - ]}. diff --git a/frameworks/Erlang/elli/src/elli_bench.app.src b/frameworks/Erlang/elli/src/elli_bench.app.src deleted file mode 100644 index aa4a1b58ed4..00000000000 --- a/frameworks/Erlang/elli/src/elli_bench.app.src +++ /dev/null @@ -1,12 +0,0 @@ -{application, elli_bench, - [ - {description, ""}, - {vsn, "1"}, - {registered, []}, - {applications, [ - kernel, - stdlib - ]}, - {mod, { elli_bench_app, []}}, - {env, []} - ]}. diff --git a/frameworks/Erlang/elli/src/elli_bench.erl b/frameworks/Erlang/elli/src/elli_bench.erl deleted file mode 100644 index ef4a7526b12..00000000000 --- a/frameworks/Erlang/elli/src/elli_bench.erl +++ /dev/null @@ -1,5 +0,0 @@ --module(elli_bench). --export([start/0]). - -start() -> - application:start(elli_bench). diff --git a/frameworks/Erlang/elli/src/elli_bench_app.erl b/frameworks/Erlang/elli/src/elli_bench_app.erl deleted file mode 100644 index f3d3a4eb5d7..00000000000 --- a/frameworks/Erlang/elli/src/elli_bench_app.erl +++ /dev/null @@ -1,16 +0,0 @@ --module(elli_bench_app). - --behaviour(application). - -%% Application callbacks --export([start/2, stop/1]). - -%% =================================================================== -%% Application callbacks -%% =================================================================== - -start(_StartType, _StartArgs) -> - elli_bench_sup:start_link(). - -stop(_State) -> - ok. diff --git a/frameworks/Erlang/elli/src/elli_bench_cb.erl b/frameworks/Erlang/elli/src/elli_bench_cb.erl deleted file mode 100644 index 7fc5bb39e4e..00000000000 --- a/frameworks/Erlang/elli/src/elli_bench_cb.erl +++ /dev/null @@ -1,61 +0,0 @@ --module(elli_bench_cb). --export([handle/2, handle_event/3]). - --include_lib("elli/include/elli.hrl"). --behaviour(elli_handler). - -handle(Req, _Args) -> - %% Delegate to our handler function - handle(Req#req.method, elli_request:path(Req), Req). - -%% Plaintext test route -handle('GET', [<<"plaintext">>], _Req) -> - %% Reply with a normal response. 'ok' can be used instead of '200' - %% to signal success. - {ok, [{<<"Server">>, <<"elli">>}, {<<"Date">>, httpd_util:rfc1123_date()}, {<<"Content-Type">>, <<"text/plain">>}], <<"Hello, World!">>}; - -%% Json test route -handle('GET',[<<"json">>], _Req) -> - %% Reply with a normal response. 'ok' can be used instead of '200' - %% to signal success. - {ok, [{<<"Server">>, <<"elli">>}, {<<"Date">>, httpd_util:rfc1123_date()}, {<<"Content-Type">>, <<"application/json">>}], jiffy:encode({[{<<"message">>, <<"Hello, World!">>}]})}; - -%% db test route (Single Database Query) -handle('GET',[<<"db">>], Req) -> - random:seed(erlang:now()), - JSON = case elli_request:get_arg(<<"queries">>, Req) of - undefined -> - {result_packet, _, _, [[ID, Rand]], _} = emysql:execute(test_pool, db_stmt, [random:uniform(10000)]), - [{[{<<"id">>, ID}, {<<"randomNumber">>, Rand}]}]; - N -> - I = list_to_integer(binary_to_list(N)), - Res = [ {[{<<"id">>, ID}, {<<"randomNumber">>, Rand}]} || - {result_packet, _, _, [[ID, Rand]], _} <- [emysql:execute(test_pool, db_stmt, [random:uniform(10000)]) || _ <- lists:seq(1, I) ]], - Res - end, - {ok, [{<<"Server">>, <<"elli">>}, {<<"Date">>, httpd_util:rfc1123_date()}, {<<"Content-Type">>, <<"application/json">>}], jiffy:encode(lists:nth(1,JSON))}; - -%% TODO : Finish this function with correct logic. -%% Please check TFB document -%% Multiple query test route -% handle('GET',[<<"query">>], Req) -> -% random:seed(erlang:now()), -% JSON = case elli_request:get_arg(<<"queries">>, Req) of -% undefined -> -% {result_packet, _, _, [[ID, Rand]], _} = emysql:execute(test_pool, db_stmt, [random:uniform(10000)]), -% [{[{<<"id">>, ID}, {<<"randomNumber">>, Rand}]}]; -% N -> -% I = list_to_integer(binary_to_list(N)), -% Res = [ {[{<<"id">>, ID}, {<<"randomNumber">>, Rand}]} || -% {result_packet, _, _, [[ID, Rand]], _} <- [emysql:execute(test_pool, db_stmt, [random:uniform(10000)]) || _ <- lists:seq(1, I) ]], -% Res -% end, -% {ok, [{<<"Content-Type">>, <<"application/json">>}], jiffy:encode(JSON)}; - -handle(_, _, _Req) -> - {404, [], <<"Not Found">>}. - -%% @doc: Handle request events, like request completed, exception -%% thrown, client timeout, etc. Must return 'ok'. -handle_event(_Event, _Data, _Args) -> - ok. diff --git a/frameworks/Erlang/elli/src/elli_bench_sup.erl b/frameworks/Erlang/elli/src/elli_bench_sup.erl deleted file mode 100644 index 6da7b7571d7..00000000000 --- a/frameworks/Erlang/elli/src/elli_bench_sup.erl +++ /dev/null @@ -1,46 +0,0 @@ --module(elli_bench_sup). - --behaviour(supervisor). - -%% API --export([start_link/0]). - -%% Supervisor callbacks --export([init/1]). - -%% Helper macro for declaring children of supervisor --define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}). - -%% =================================================================== -%% API functions -%% =================================================================== - -start_link() -> - supervisor:start_link({local, ?MODULE}, ?MODULE, []). - -%% =================================================================== -%% Supervisor callbacks -%% =================================================================== - -%% CAUTION : Assign big number to db pool will fail travis ci. -%% Original value was 5000, too big! Even 512 crashes! keep 256 -%% till travis-ci environment accepts bigger size of db pool. - -init([]) -> - crypto:start(), - application:start(emysql), - emysql:add_pool(test_pool, 256, - "benchmarkdbuser", "benchmarkdbpass", "tfb-database", 3306, - "hello_world", utf8), - emysql:prepare(db_stmt, <<"SELECT * FROM World where id = ?">>), - ElliOpts = [{callback, elli_bench_cb}, {port, 8080}], - ElliSpec = { - fancy_http, - {elli, start_link, [ElliOpts]}, - permanent, - 256, - worker, - [elli]}, - - {ok, { {one_for_one, 5, 10}, [ElliSpec]} }. -