diff --git a/.travis.yml b/.travis.yml index b75e01ec695..f6acfc62a00 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,241 +3,217 @@ # sudo: required +group: deprecated-2017-Q4 dist: trusty -group: deprecated-2017Q2 language: generic python: - "2.7" +services: + - docker env: matrix: - - "TESTDIR=C/duda" - - "TESTDIR=C/facil.io" - - "TESTDIR=C/onion" - - "TESTDIR=C/h2o" - - "TESTDIR=C/octane" - - "TESTDIR=C/libreactor" - - "TESTDIR=CSharp/aspnet" - - "TESTDIR=CSharp/aspnetcore" - ## - "TESTDIR=CSharp/aspnet-stripped" - - "TESTDIR=CSharp/evhttp-sharp" - ## - "TESTDIR=CSharp/HttpListener" - - "TESTDIR=CSharp/nancy" - - "TESTDIR=CSharp/revenj" - - "TESTDIR=CSharp/servicestack" - - "TESTDIR=C++/cppcms" - - "TESTDIR=C++/ffead-cpp" - - "TESTDIR=C++/cpoll_cppsp" - - "TESTDIR=C++/cutelyst" - - "TESTDIR=C++/silicon" - - "TESTDIR=C++/treefrog" - - "TESTDIR=C++/ulib" - - "TESTDIR=C++/wt" - - "TESTDIR=C++/poco" - - "TESTDIR=C++/luna" - - "TESTDIR=Clojure/compojure" - - "TESTDIR=Clojure/http-kit" - - "TESTDIR=Clojure/luminus" - - "TESTDIR=Clojure/macchiato" - - "TESTDIR=Clojure/pedestal" - - "TESTDIR=Clojure/aleph" - - "TESTDIR=Clojure/reitit" - - "TESTDIR=Crystal/amber" - - "TESTDIR=Crystal/crystal" - - "TESTDIR=Crystal/kemal" - - "TESTDIR=D/vibed" - - "TESTDIR=D/hunt" - - "TESTDIR=D/collie" - - "TESTDIR=Dart/dart-raw" - - "TESTDIR=Dart/redstone" - - "TESTDIR=Dart/start" - - "TESTDIR=Dart/stream" - - "TESTDIR=Elixir/phoenix" - - "TESTDIR=Elixir/cowboy" - - "TESTDIR=Erlang/chicagoboss" - - "TESTDIR=Erlang/cowboy" - - "TESTDIR=Erlang/elli" - - "TESTDIR=Erlang/mochiweb" - - "TESTDIR=Go/aah" - - "TESTDIR=Go/beego" - - "TESTDIR=Go/echo" - - "TESTDIR=Go/falcore" - - "TESTDIR=Go/fasthttp" - - "TESTDIR=Go/gin" - - "TESTDIR=Go/goji" - - "TESTDIR=Go/go-std" - - "TESTDIR=Go/revel" - - "TESTDIR=Go/webgo" - - "TESTDIR=Groovy/grails" - - "TESTDIR=Groovy/hot" - - "TESTDIR=Haskell/snap" - - "TESTDIR=Haskell/wai" - - "TESTDIR=Haskell/yesod" - - "TESTDIR=Haskell/servant" - - "TESTDIR=Haskell/spock" - - "TESTDIR=Java/act" - - "TESTDIR=Java/activeweb" - - "TESTDIR=Java/baratine" - - "TESTDIR=Java/bayou" - - "TESTDIR=Java/blade" - - "TESTDIR=Java/comsat" - - "TESTDIR=Java/curacao" - - "TESTDIR=Java/dropwizard" - - "TESTDIR=Java/gemini" - - "TESTDIR=Java/grizzly-bm" - - "TESTDIR=Java/jawn" - - "TESTDIR=Java/jetty" - - "TESTDIR=Java/jlhttp" - - "TESTDIR=Java/jooby" - - "TESTDIR=Java/light-java" - - "TESTDIR=Java/minijax" - - "TESTDIR=Java/netty" - - "TESTDIR=Java/ninja-standalone" - - "TESTDIR=Java/play1" - - "TESTDIR=Java/play2-java" - - "TESTDIR=Java/proteus" - - "TESTDIR=Java/rapidoid" - - "TESTDIR=Java/restexpress" - - "TESTDIR=Java/revenj-jvm" - - "TESTDIR=Java/servlet" - - "TESTDIR=Java/spark" - - "TESTDIR=Java/spring" - - "TESTDIR=Java/tapestry" - - "TESTDIR=Java/undertow" - - "TESTDIR=Java/undertow-jersey" - - "TESTDIR=Java/vertx" - - "TESTDIR=Java/vertx-web" - - "TESTDIR=Java/wicket" - - "TESTDIR=Java/wildfly-ee7" - - "TESTDIR=JavaScript/express" - - "TESTDIR=JavaScript/hapi" - - "TESTDIR=JavaScript/koa" - - "TESTDIR=JavaScript/nodejs" - - "TESTDIR=JavaScript/ringojs" - - "TESTDIR=JavaScript/sailsjs" - - "TESTDIR=Kotlin/hexagon" - - "TESTDIR=Kotlin/http4k" - - "TESTDIR=Kotlin/ktor" - - "TESTDIR=Kotlin/pronghorn" - - "TESTDIR=Lua/lapis" - - "TESTDIR=Lua/octopus" - - "TESTDIR=Lua/openresty" - - "TESTDIR=Nim/jester" - - "TESTDIR=Perl/dancer" - - "TESTDIR=Perl/kelp" - - "TESTDIR=Perl/mojolicious" - - "TESTDIR=Perl/plack" - - "TESTDIR=Perl/web-simple" - - "TESTDIR=PHP/cakephp" - - "TESTDIR=PHP/hhvm" - - "TESTDIR=PHP/php" - - "TESTDIR=PHP/cygnite" - - "TESTDIR=PHP/codeigniter" - - "TESTDIR=PHP/clancats" - - "TESTDIR=PHP/fat-free" - - "TESTDIR=PHP/fuel" - - "TESTDIR=PHP/kohana" - - "TESTDIR=PHP/kumbiaphp" - - "TESTDIR=PHP/laravel" - - "TESTDIR=PHP/limonade" - - "TESTDIR=PHP/lithium" - - "TESTDIR=PHP/lumen" - - "TESTDIR=PHP/peachpie" - - "TESTDIR=PHP/phalcon" - - "TESTDIR=PHP/phalcon-micro" - - "TESTDIR=PHP/phpixie" - - "TESTDIR=PHP/silex" - - "TESTDIR=PHP/silex-orm" - - "TESTDIR=PHP/slim" - - "TESTDIR=PHP/symfony" - - "TESTDIR=PHP/workerman" - - "TESTDIR=PHP/yaf" - - "TESTDIR=PHP/yii2" - - "TESTDIR=PHP/zend" - - "TESTDIR=PHP/zend1" - - "TESTDIR=PHP/phreeze" - - "TESTDIR=Python/aiohttp" - - "TESTDIR=Python/apistar" - - "TESTDIR=Python/api_hour" - - "TESTDIR=Python/bottle" - - "TESTDIR=Python/cherrypy" - - "TESTDIR=Python/django" - - "TESTDIR=Python/falcon" - - "TESTDIR=Python/flask" - - "TESTDIR=Python/japronto" - - "TESTDIR=Python/klein" - - "TESTDIR=Python/morepath" - - "TESTDIR=Python/pyramid" - - "TESTDIR=Python/sanic" - - "TESTDIR=Python/tornado" - - "TESTDIR=Python/turbogears" - - "TESTDIR=Python/uvicorn" - - "TESTDIR=Python/uwsgi" - - "TESTDIR=Python/web2py" - - "TESTDIR=Python/webware" - - "TESTDIR=Python/weppy" - - "TESTDIR=Python/wheezyweb" - - "TESTDIR=Python/wsgi" - - "TESTDIR=Ruby/grape" - - "TESTDIR=Ruby/h2o_mruby" - - "TESTDIR=Ruby/hanami" - - "TESTDIR=Ruby/ngx_mruby" - - "TESTDIR=Ruby/padrino" - - "TESTDIR=Ruby/rack" - - "TESTDIR=Ruby/rack-sequel" - - "TESTDIR=Ruby/rails" - - "TESTDIR=Ruby/roda-sequel" - - "TESTDIR=Ruby/sinatra" - - "TESTDIR=Ruby/sinatra-sequel" - - "TESTDIR=Rust/iron" - - "TESTDIR=Rust/nickel" - - "TESTDIR=Rust/hyper" - - "TESTDIR=Rust/tokio-minihttp" - - "TESTDIR=Rust/rouille" - - "TESTDIR=Rust/actix" - - "TESTDIR=Scala/akka-http" - - "TESTDIR=Scala/blaze" - - "TESTDIR=Scala/colossus" - - "TESTDIR=Scala/finagle" - - "TESTDIR=Scala/finatra" - - "TESTDIR=Scala/fintrospect" - - "TESTDIR=Scala/play2-scala" - - "TESTDIR=Scala/scruffy" - - "TESTDIR=Scala/spray" - - "TESTDIR=Scala/s-server" - - "TESTDIR=Scala/http4s" - - "TESTDIR=Scala/finch" - - "TESTDIR=Swift/vapor" - - "TESTDIR=Ur/urweb" - - "TESTDIR=Vala/vsgi" - - "TESTDIR=Vala/valum" + - "TESTLANG=C" + - "TESTDIR=CSharp/aspnet" + - "TESTDIR=CSharp/aspnetcore" + - "TESTDIR=CSharp/evhttp-sharp" + - "TESTDIR=CSharp/nancy" + - "TESTDIR=CSharp/revenj" + - "TESTDIR=CSharp/servicestack" + - "TESTDIR=C++/cppcms" + - "TESTDIR=C++/ffead-cpp" + - "TESTDIR=C++/cpoll_cppsp" + - "TESTDIR=C++/cutelyst" + - "TESTDIR=C++/silicon" + - "TESTDIR=C++/treefrog" + - "TESTDIR=C++/ulib" + - "TESTDIR=C++/wt" + - "TESTDIR=C++/poco" + - "TESTDIR=C++/luna" + - "TESTDIR=Clojure/aleph" + - "TESTDIR=Clojure/compojure" + - "TESTDIR=Clojure/http-kit" + - "TESTDIR=Clojure/luminus" + - "TESTDIR=Clojure/macchiato" + - "TESTDIR=Clojure/pedestal" + - "TESTDIR=Clojure/reitit" + - "TESTDIR=Crystal/amber" + - "TESTDIR=Crystal/crystal" + - "TESTDIR=Crystal/kemal" + - "TESTDIR=D/vibed" + - "TESTDIR=D/hunt" + - "TESTDIR=D/collie" + - "TESTDIR=Dart/dart" + - "TESTDIR=Dart/redstone" + - "TESTDIR=Dart/start" + - "TESTDIR=Dart/stream" + - "TESTDIR=Elixir/phoenix" + - "TESTDIR=Elixir/cowboy" + - "TESTDIR=Erlang/chicagoboss" + - "TESTDIR=Erlang/cowboy" + - "TESTDIR=Erlang/elli" + - "TESTDIR=Erlang/mochiweb" + - "TESTDIR=Go/aah" + - "TESTDIR=Go/beego" + - "TESTDIR=Go/echo" + - "TESTDIR=Go/falcore" + - "TESTDIR=Go/fasthttp" + - "TESTDIR=Go/gin" + - "TESTDIR=Go/goji" + - "TESTDIR=Go/go-std" + - "TESTDIR=Go/revel" + - "TESTDIR=Go/webgo" + - "TESTDIR=Groovy/grails" + - "TESTDIR=Groovy/hot" + - "TESTDIR=Haskell/snap" + - "TESTDIR=Haskell/wai" + - "TESTDIR=Haskell/yesod" + - "TESTDIR=Haskell/servant" + - "TESTDIR=Haskell/spock" + - "TESTDIR=Java/act" + - "TESTDIR=Java/activeweb" + - "TESTDIR=Java/baratine" + - "TESTDIR=Java/bayou" + - "TESTDIR=Java/blade" + - "TESTDIR=Java/comsat" + - "TESTDIR=Java/curacao" + - "TESTDIR=Java/dropwizard" + - "TESTDIR=Java/gemini" + - "TESTDIR=Java/grizzly" + - "TESTDIR=Java/grizzly-jersey" + - "TESTDIR=Java/jawn" + - "TESTDIR=Java/jetty" + - "TESTDIR=Java/jlhttp" + - "TESTDIR=Java/jooby" + - "TESTDIR=Java/light-java" + - "TESTDIR=Java/minijax" + - "TESTDIR=Java/netty" + - "TESTDIR=Java/ninja-standalone" + - "TESTDIR=Java/play1" + - "TESTDIR=Java/play2-java" + - "TESTDIR=Java/proteus" + - "TESTDIR=Java/rapidoid" + - "TESTDIR=Java/restexpress" + - "TESTDIR=Java/revenj-jvm" + - "TESTDIR=Java/servlet" + - "TESTDIR=Java/spark" + - "TESTDIR=Java/spring" + - "TESTDIR=Java/tapestry" + - "TESTDIR=Java/undertow" + - "TESTDIR=Java/undertow-jersey" + - "TESTDIR=Java/vertx" + - "TESTDIR=Java/vertx-web" + - "TESTDIR=Java/wicket" + - "TESTDIR=Java/wildfly-ee7" + - "TESTLANG=JavaScript" + - "TESTDIR=Kotlin/hexagon" + - "TESTDIR=Kotlin/http4k" + - "TESTDIR=Kotlin/ktor" + - "TESTDIR=Kotlin/pronghorn" + - "TESTDIR=Lua/lapis" + - "TESTDIR=Lua/octopus" + - "TESTDIR=Lua/openresty" + - "TESTDIR=Nim/jester" + - "TESTDIR=Perl/dancer" + - "TESTDIR=Perl/kelp" + - "TESTDIR=Perl/mojolicious" + - "TESTDIR=Perl/plack" + - "TESTDIR=Perl/web-simple" + - "TESTDIR=PHP/cakephp" + - "TESTDIR=PHP/hhvm" + - "TESTDIR=PHP/php" + - "TESTDIR=PHP/codeigniter" + - "TESTDIR=PHP/cygnite" + - "TESTDIR=PHP/clancats" + - "TESTDIR=PHP/fat-free" + - "TESTDIR=PHP/fuel" + - "TESTDIR=PHP/kohana" + - "TESTDIR=PHP/kumbiaphp" + - "TESTDIR=PHP/laravel" + - "TESTDIR=PHP/limonade" + - "TESTDIR=PHP/lithium" + - "TESTDIR=PHP/lumen" + - "TESTDIR=PHP/peachpie" + - "TESTDIR=PHP/phalcon" + - "TESTDIR=PHP/phpixie" + - "TESTDIR=PHP/silex" + - "TESTDIR=PHP/slim" + - "TESTDIR=PHP/symfony" + - "TESTDIR=PHP/workerman" + - "TESTDIR=PHP/yii2" + - "TESTDIR=PHP/zend" + - "TESTDIR=PHP/zend1" + - "TESTDIR=PHP/phreeze" + - "TESTDIR=Python/aiohttp" + - "TESTDIR=Python/apistar" + - "TESTDIR=Python/api_hour" + - "TESTDIR=Python/bottle" + - "TESTDIR=Python/cherrypy" + - "TESTDIR=Python/django" + - "TESTDIR=Python/falcon" + - "TESTDIR=Python/flask" + - "TESTDIR=Python/japronto" + - "TESTDIR=Python/klein" + - "TESTDIR=Python/morepath" + - "TESTDIR=Python/pyramid" + - "TESTDIR=Python/sanic" + - "TESTDIR=Python/tornado" + - "TESTDIR=Python/turbogears" + - "TESTDIR=Python/uvicorn" + - "TESTDIR=Python/uwsgi" + - "TESTDIR=Python/web2py" + - "TESTDIR=Python/webware" + - "TESTDIR=Python/weppy" + - "TESTDIR=Python/wheezyweb" + - "TESTDIR=Python/wsgi" + - "TESTDIR=Ruby/grape" + - "TESTDIR=Ruby/h2o_mruby" + - "TESTDIR=Ruby/hanami" + - "TESTDIR=Ruby/padrino" + - "TESTDIR=Ruby/rack" + - "TESTDIR=Ruby/rack-sequel" + - "TESTDIR=Ruby/rails" + - "TESTDIR=Ruby/roda-sequel" + - "TESTDIR=Ruby/sinatra" + - "TESTDIR=Ruby/sinatra-sequel" + - "TESTDIR=Rust/iron" + - "TESTDIR=Rust/nickel" + - "TESTDIR=Rust/hyper" + - "TESTDIR=Rust/may-minihttp" + - "TESTDIR=Rust/tokio-minihttp" + - "TESTDIR=Rust/rouille" + - "TESTDIR=Rust/actix" + - "TESTDIR=Scala/akka-http" + - "TESTDIR=Scala/blaze" + - "TESTDIR=Scala/colossus" + - "TESTDIR=Scala/finagle" + - "TESTDIR=Scala/finatra" + - "TESTDIR=Scala/finch" + - "TESTDIR=Scala/fintrospect" + - "TESTDIR=Scala/http4s" + - "TESTDIR=Scala/play2-scala" + - "TESTDIR=Swift/vapor" + - "TESTDIR=Ur/urweb" + - "TESTDIR=Vala/vsgi" + - "TESTDIR=Vala/valum" + before_script: # Runs travis_diff, printing the output to the terminal, and searches for travis-diff-continue # to determine if the suite should be installed and the current $TESTDIR test should run. - - export CONTINUE_TEST=`./toolset/travis/travis_diff.py | tee /dev/tty | grep -q "travis-diff-continue" && echo 1` - # travis_clean.sh takes care of some services that are baked into the travis - # build. Using language: generic gets us an ubuntu build with fewer services, - # but includes database installs, ruby and rvm installs, and others that interfere - # with running the suite in a clean ubuntu install. - - if [ $CONTINUE_TEST ]; then source ./toolset/travis/travis_clean.sh; else echo 'Skipping travis_clean.sh'; fi + - export RUN_TESTS=`./toolset/travis/travis_diff.py | tee /dev/tty | grep -oP "travis-run-tests \K(.*)"` + + - if [ "$RUN_TESTS" ]; then docker pull techempower/tfb.wrk; fi + - if [ "$RUN_TESTS" ]; then docker pull techempower/tfb; fi - # travis_setup.sh runs all the same commands you would run if you were setting up - # a development environment via: - # http://frameworkbenchmarks.readthedocs.io/en/latest/Development/Installation-Guide/ - - if [ $CONTINUE_TEST ]; then source ./toolset/travis/travis_setup.sh; else echo 'Skipping travis_setup.sh'; fi + # Stop services that would claim ports we may need + - sudo service mysql stop + - sudo service postgresql stop script: # run-ci.py runs the diffing to see if travis needs to test this framework. Ideally/eventually, # we'd like to try and do the diffing before travis_clean & setup. # This will run the tests exactly as you would in your own vm: - # ./toolset/run-tests.py --mode verify --test (all the valid tests for this framework) - - if [ $CONTINUE_TEST ]; then tfb --mode verify --test-dir "$TESTDIR"; else echo 'Skipping test verification.'; fi - # - tfb --mode verify --test - -cache: - directories: - - $HOME/.m2/repository - - $HOME/.cache/pip + - if [ "$RUN_TESTS" ]; then docker network create tfb > /dev/null 2>&1 && docker run --network=tfb -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=`pwd`,target=/FrameworkBenchmarks techempower/tfb --mode verify --test-dir $RUN_TESTS; else echo 'Skipping test verification.'; fi diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 00000000000..96c5478984c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM ubuntu:16.04 + +# One -q produces output suitable for logging (mostly hides +# progress indicators) +RUN apt-get -yq update + +# WARNING: DONT PUT A SPACE AFTER ANY BACKSLASH OR APT WILL BREAK +RUN apt-get -qqy install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ + git-core \ + cloc dstat `# Collect resource usage statistics` \ + python-dev \ + python-pip \ + python-software-properties \ + libmysqlclient-dev `# Needed for MySQL-python` \ + libpq-dev `# Needed for psycopg2` + +RUN pip install colorama==0.3.1 requests MySQL-python psycopg2-binary pymongo docker==3.1.0 + +ENV PYTHONPATH /FrameworkBenchmarks +ENV FWROOT /FrameworkBenchmarks + +ENTRYPOINT ["python", "/FrameworkBenchmarks/toolset/run-tests.py"] \ No newline at end of file diff --git a/README.md b/README.md index a3462a048c5..3914e827a7e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ If you're new to the project, welcome! Please feel free to ask questions [here]( This project provides representative performance measures across a wide field of web application frameworks. With much help from the community, coverage is quite broad and we are happy to broaden it further with contributions. The project presently includes frameworks on many languages including `Go`, `Python`, `Java`, `Ruby`, `PHP`, `C#`, `Clojure`, `Groovy`, `Dart`, `JavaScript`, `Erlang`, `Haskell`, `Scala`, `Perl`, `Lua`, `C`, and others. The current tests exercise plaintext responses, JSON seralization, database reads and writes via the object-relational mapper (ORM), collections, sorting, server-side templates, and XSS counter-measures. Future tests will exercise other components and greater computation. -[Read more and see the results of our tests on cloud and physical hardware](http://www.techempower.com/benchmarks/). +[Read more and see the results of our tests on Amazon EC2 and physical hardware](http://www.techempower.com/benchmarks/). For descriptions of the test types that we run, see the [test requirements section](https://frameworkbenchmarks.readthedocs.org/en/latest/Project-Information/Framework-Tests/). @@ -25,25 +25,45 @@ required. $ git clone https://github.com/TechEmpower/FrameworkBenchmarks.git -2. Move into the vagrant-development directory. +2. Change directories $ cd FrameworkBenchmarks/deployment/vagrant -3. Turn on the VM (takes at least 20 minutes). +3. Create the TFB Docker virtual network - $ vagrant up + $ docker network create tfb -4. Enter the VM. +4. Run a test. - $ vagrant ssh + $ docker run -it --network=tfb -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=[ABS PATH TO THIS DIR],target=/FrameworkBenchmarks techempower/tfb --mode verify --test gemini -5. Move into the FrameworkBenchmarks directory in the vm. +### Explanation of the run script - vagrant@TFB-all:~$ cd ~/FrameworkBenchmarks - -6. Run a test. +That run script is pretty wordy, but each and every flag is required. Unfortunately, because of the way that Docker runs processes, you **cannot** put this inside of a shell script without breaking how `ctrl+c` and `SIGTERM` work (the shell script would receive the signal, do nothing with the underlying python suite running, and exit, orphaning the toolset to continue running). - vagrant@TFB-all:~/FrameworkBenchmarks$ tfb --mode verify --test beego +- `-it` tells docker to run this in 'interactive' mode and simulate a TTY, so that `ctrl+c` is propagated. +- `--network=tfb` tells the container to join the 'tfb' Docker virtual network +- `-v` specifies which Docker socket path to mount as a volume in the running container. This allows docker commands run inside this container to use the host container's docker to create/run/stop/remove containers. +- `--mount` mounts the FrameworkBenchmarks source directory as a volume to share with the container so that rebuilding the toolset image is unnecessary and any changes you make on the host system are available in the running toolset container. +- `techempower/tfb` is the name of toolset container to run +- `--mode verify --test gemini` are the command to pass to the toolset. + +#### A note on Linux: + +You may not want to call step 4 from above every time. You can add an `alias` to your `~/.bash_aliases` file to shorten it since it will not change once configured: + +`$ alias tfb="docker run -it --network=tfb -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=[ABS PATH TO THIS DIR],target=/FrameworkBenchmarks techempower/tfb"` + +`$ source ~/.bash_aliases` + +Now you can run the toolset via `tfb`: + +`$ tfb --mode verify --test gemini` + +#### A note on Windows: + +- Docker expects Linux-style paths. If you cloned on your `C:\` drive, then `[ABS PATH TO THIS DIR]` would be `/c/FrameworkBenchmarks`. +- [Docker for Windows](https://www.docker.com/docker-windows) understands `/var/run/docker.sock` even though that is not a valid path on Windows. [Docker Toolbox](https://docs.docker.com/toolbox/toolbox_install_windows/) **may** not - use at your own risk. ## Add a New Test @@ -65,10 +85,10 @@ If you find any errors or areas for improvement within the docs, feel free to ei Results of continuous benchmarking runs are available in real time [here](https://tfb-status.techempower.com/). #### Data Visualization -If you have a `results.json` file that you would like to visualize, you can [do that here](https://www.techempower.com/benchmarks/#section=test). You can also attach a `runid` parameter to that url where `runid` is a run listed on [tfb-status](https://tfb-status.techempower.com) like so: https://www.techempower.com/benchmarks/#section=test&runid=fd07b64e-47ce-411e-8b9b-b13368e988c6 +If you have a `results.json` file that you would like to visualize, you can [do that here](https://www.techempower.com/benchmarks/#section=test)(these will be visualized using the metadata from the last known round; if you are adding a new test, it will not visualize anything). You can also attach a `runid` parameter to that url where `runid` is a run listed on [tfb-status](https://tfb-status.techempower.com) like so: https://www.techempower.com/benchmarks/#section=test&runid=fd07b64e-47ce-411e-8b9b-b13368e988c6 ## Contributing The community has consistently helped in making these tests better, and we welcome any and all changes. Reviewing our contribution practices and guidelines will help to keep us all on the same page. The [contribution guide](https://frameworkbenchmarks.readthedocs.org/en/latest/Development/Contributing-Guide/) can be found in the [TFB documentation](https://frameworkbenchmarks.readthedocs.org/). -Join in the conversation on our [mailing list](https://groups.google.com/forum/?fromgroups=#!forum/framework-benchmarks), on [Twitter](https://twitter.com/tfbenchmarks), or chat with us on [Freenode](https://webchat.freenode.net/) at `#techempower-fwbm`. +Join in the conversation at our [Google Group](https://groups.google.com/forum/?fromgroups=#!forum/framework-benchmarks), or chat with us on [Freenode](https://webchat.freenode.net/) at `#techempower-fwbm`. diff --git a/benchmark.cfg.example b/benchmark.cfg.example deleted file mode 100644 index 3c772aeae6d..00000000000 --- a/benchmark.cfg.example +++ /dev/null @@ -1,33 +0,0 @@ -[Defaults] -# Available Keys: -os=linux -server_host=TFB-server -client_host=TFB-client -client_identity_file=/home/techempower/.ssh/id_rsa -client_user=techempower -database_host=TFB-database -database_identity_file=/home/techempower/.ssh/id_rsa -database_os=linux -database_user=techempower -duration=15 -exclude=None -install=server -install_error_action=continue -install_strategy=unified -install_only=False -list_tests=False -concurrency_levels=[16, 32, 64, 128, 256, 512] -pipeline_concurrency_levels=[256,1024,4096,16384] -query_levels=[1,5,10,15,20] -cached_query_levels=[1,10,20,50,100] -mode=benchmark -sleep=60 -test=None -type=all -verbose=True -clean=False -clean_all=False -ulimit=200000 -#results_name=My Benchmarking Run %%Y-%%m-%%d %%H:%%M:%%S -#results_environment=My Server Environment -#results_upload_uri=https://example.com/uploads diff --git a/deployment/vagrant/bootstrap.sh b/deployment/vagrant/bootstrap.sh index 4ea177d9b6a..3dccfda3259 100644 --- a/deployment/vagrant/bootstrap.sh +++ b/deployment/vagrant/bootstrap.sh @@ -9,68 +9,18 @@ if [ ! -e "~/.firstboot" ]; then echo "grub-pc grub-pc/install_devices multiselect /dev/sda" | sudo debconf-set-selections # Install prerequisite tools - echo "Installing prerequisites" + echo "Installing docker" + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" sudo apt-get update - sudo apt-get install -y git - git config --global core.autocrlf input + sudo apt-get install -yqq docker-ce - # Setting up ssh & passwordless sudo - ssh-keygen -f /home/vagrant/.ssh/id_rsa -N '' -t rsa - cat /home/vagrant/.ssh/id_rsa.pub >> /home/vagrant/.ssh/authorized_keys - chmod og-wx /home/vagrant/.ssh/authorized_keys - echo "NoHostAuthenticationForLocalhost yes" | tee -a /home/vagrant/.ssh/config - chmod 600 ~/.ssh/config + # Setting up passwordless sudo echo "vagrant ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers - # Setting up hosts aliases - echo 127.0.0.1 TFB-database | sudo tee --append /etc/hosts - echo 127.0.0.1 TFB-client | sudo tee --append /etc/hosts - echo 127.0.0.1 TFB-server | sudo tee --append /etc/hosts - - # Setting up new FWROOT - export FWROOT="/home/vagrant/FrameworkBenchmarks" - echo `export FWROOT="/home/vagrant/FrameworkBenchmarks"` >> ~/.bashrc - sudo chown vagrant:vagrant ~/FrameworkBenchmarks cd ~/FrameworkBenchmarks - # Set up the benchmark.cfg for vagrant user -cat < benchmark.cfg -[Defaults] -# Available Keys: -os=linux -server_host=TFB-server -client_host=TFB-client -client_identity_file=/home/vagrant/.ssh/id_rsa -client_user=vagrant -database_host=TFB-database -database_identity_file=/home/vagrant/.ssh/id_rsa -database_os=linux -database_user=vagrant -duration=60 -exclude=None -install=server -install_error_action=continue -install_strategy=unified -install_only=False -list_tests=False -concurrency_levels=[8, 16, 32, 64, 128, 256] -pipeline_concurrency_levels=[256,1024,4096,16384] -query_levels=[1, 5,10,15,20] -cached_query_levels=[1,10,20,50,100] -threads=8 -mode=benchmark -sleep=60 -test=None -type=all -verbose=True -clean=False -clean_all=False -ulimit=200000 -EOF - - source ./toolset/setup/linux/prerequisites.sh - # Setup a nice welcome message for our guest echo "Setting up welcome message" sudo rm -f /etc/update-motd.d/51-cloudguest @@ -79,9 +29,6 @@ EOF sudo cat < motd Welcome to the FrameworkBenchmarks project! - To get started, perhaps try this: - $ cd FrameworkBenchmarks - You can get lots of help: $ tfb --help @@ -91,6 +38,11 @@ Welcome to the FrameworkBenchmarks project! This Vagrant environment is already setup and ready to go. EOF - sudo mv motd /etc/ + cat < /home/vagrant/.bash_aliases +alias tfb="docker run -it --network=tfb -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=/home/vagrant/FrameworkBenchmarks,target=/FrameworkBenchmarks techempower/tfb" +EOF + sudo mv motd /etc/ + sudo chmod 777 /var/run/docker.sock + docker network create tfb fi diff --git a/deployment/vagrant/core.rb b/deployment/vagrant/core.rb index 61810326749..b70cc162ed7 100644 --- a/deployment/vagrant/core.rb +++ b/deployment/vagrant/core.rb @@ -11,9 +11,8 @@ def provision_bootstrap(config) def provider_libvirt(config) config.vm.provider :libvirt do |virt, override| - virt.name = "TechEmpower Framework Benchmarks" override.vm.hostname = "TFB-all" - override.vm.box = "RX14/trusty64" + override.vm.box = "generic/ubuntu1604" unless ENV.fetch('TFB_SHOW_VM', false) virt.graphics_type = "none" @@ -22,17 +21,16 @@ def provider_libvirt(config) virt.memory = ENV.fetch('TFB_KVM_MEM', 3022) virt.cpus = ENV.fetch('TFB_KVM_CPU', 2) - override.vm.synced_folder "../../toolset", "/home/vagrant/FrameworkBenchmarks/toolset", type: "nfs" - override.vm.synced_folder "../../frameworks", "/home/vagrant/FrameworkBenchmarks/frameworks", type: "nfs" - override.vm.synced_folder "../../results", "/home/vagrant/FrameworkBenchmarks/results", type: "nfs", create: true + override.vm.synced_folder "../../toolset", "/home/vagrant/FrameworkBenchmarks/toolset", type: "nfs", nfs_udp: false + override.vm.synced_folder "../../frameworks", "/home/vagrant/FrameworkBenchmarks/frameworks", type: "nfs", nfs_udp: false + override.vm.synced_folder "../../results", "/home/vagrant/FrameworkBenchmarks/results", type: "nfs", nfs_udp: false, create: true end end def provider_virtualbox(config) config.vm.provider :virtualbox do |vb, override| - vb.name = "TechEmpower Framework Benchmarks" override.vm.hostname = "TFB-all" - override.vm.box = "ubuntu/trusty64" + override.vm.box = "ubuntu/xenial64" if ENV.fetch('TFB_SHOW_VM', false) vb.gui = true diff --git a/frameworks/C++/cpoll_cppsp/.gitignore b/frameworks/C++/cpoll_cppsp/.gitignore deleted file mode 100644 index 439cf87be6d..00000000000 --- a/frameworks/C++/cpoll_cppsp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/www/*.so -/www/*.txt diff --git a/frameworks/C++/cpoll_cppsp/Makefile b/frameworks/C++/cpoll_cppsp/Makefile index 1cb6120fb02..bf71b2bda6c 100644 --- a/frameworks/C++/cpoll_cppsp/Makefile +++ b/frameworks/C++/cpoll_cppsp/Makefile @@ -3,7 +3,7 @@ all: cppsp_0.2.3 clean: rm -f www/*.so www/*.txt rm -f www/forcedynamic.cppsm.* - $(MAKE) -C $(IROOT)/cppsp_0.2.3 clean + $(MAKE) -C /installs/cppsp_0.2.3 clean cppsp_0.2.3: - $(MAKE) -C $(IROOT)/cppsp_0.2.3 all \ No newline at end of file + $(MAKE) -C /installs/cppsp_0.2.3 all \ No newline at end of file diff --git a/frameworks/C++/cpoll_cppsp/benchmark_config.json b/frameworks/C++/cpoll_cppsp/benchmark_config.json index 9bfd591cc1b..50b95ed6951 100644 --- a/frameworks/C++/cpoll_cppsp/benchmark_config.json +++ b/frameworks/C++/cpoll_cppsp/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "cpoll_cppsp", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 16969, @@ -22,7 +21,6 @@ "versus": "cpoll_cppsp" }, "raw": { - "setup_file": "setup_mysql", "db_url": "/db", "query_url": "/db?queries=", "fortune_url": "/fortune", @@ -44,7 +42,6 @@ "versus": "cpoll_cppsp" }, "postgres-raw": { - "setup_file": "setup_postgresql", "db_url": "/db_pg_async", "query_url": "/db_pg_async?queries=", "port": 16969, @@ -64,7 +61,6 @@ "versus": "cpoll_cppsp" }, "postgres-raw-threadpool": { - "setup_file": "setup_postgresql", "db_url": "/db_pg_threadpool", "query_url": "/db_pg_threadpool?queries=", "port": 16969, diff --git a/frameworks/C++/cpoll_cppsp/cpoll_cppsp-base.dockerfile b/frameworks/C++/cpoll_cppsp/cpoll_cppsp-base.dockerfile new file mode 100644 index 00000000000..0bbe2d7dfeb --- /dev/null +++ b/frameworks/C++/cpoll_cppsp/cpoll_cppsp-base.dockerfile @@ -0,0 +1,24 @@ +FROM techempower/gcc-4.8:0.1 + +WORKDIR /installs + +ENV VERSION=0.2.3 +ENV CPPSP_HOME=/installs/cppsp_$VERSION + +RUN wget -q http://downloads.sourceforge.net/project/cpollcppsp/CPPSP%200.2%20%28testing%29/cppsp_$VERSION.tar.xz +RUN tar xf cppsp_$VERSION.tar.xz + +RUN mv cppsp_rel$VERSION/ $CPPSP_HOME + +RUN sed -i 's|CXX := .*|CXX := g++-4.8|g' $CPPSP_HOME/makefile +RUN sed -i 's|-Wall|-w|g' $CPPSP_HOME/makefile + +RUN apt install -yqq postgresql-server-dev-9.5 +ENV CPLUS_INCLUDE_PATH=/usr/include/postgresql:/usr/include/postgresql/9.5/server:${CPLUS_INCLUDE_PATH} + +ADD ./ /cpoll_cppsp +WORKDIR /cpoll_cppsp + +RUN make clean && make + +WORKDIR $CPPSP_HOME diff --git a/frameworks/C++/cpoll_cppsp/cpoll_cppsp-postgres-raw-threadpool.dockerfile b/frameworks/C++/cpoll_cppsp/cpoll_cppsp-postgres-raw-threadpool.dockerfile new file mode 100644 index 00000000000..adaac3c1d81 --- /dev/null +++ b/frameworks/C++/cpoll_cppsp/cpoll_cppsp-postgres-raw-threadpool.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/cpoll_cppsp-base:0.1 + +CMD ./run_application /cpoll_cppsp/www -g g++-4.8 -m /forcedynamic.cppsm diff --git a/frameworks/C++/cpoll_cppsp/cpoll_cppsp-postgres-raw.dockerfile b/frameworks/C++/cpoll_cppsp/cpoll_cppsp-postgres-raw.dockerfile new file mode 100644 index 00000000000..adaac3c1d81 --- /dev/null +++ b/frameworks/C++/cpoll_cppsp/cpoll_cppsp-postgres-raw.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/cpoll_cppsp-base:0.1 + +CMD ./run_application /cpoll_cppsp/www -g g++-4.8 -m /forcedynamic.cppsm diff --git a/frameworks/C++/cpoll_cppsp/cpoll_cppsp-raw.dockerfile b/frameworks/C++/cpoll_cppsp/cpoll_cppsp-raw.dockerfile new file mode 100644 index 00000000000..adaac3c1d81 --- /dev/null +++ b/frameworks/C++/cpoll_cppsp/cpoll_cppsp-raw.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/cpoll_cppsp-base:0.1 + +CMD ./run_application /cpoll_cppsp/www -g g++-4.8 -m /forcedynamic.cppsm diff --git a/frameworks/C++/cpoll_cppsp/cpoll_cppsp.dockerfile b/frameworks/C++/cpoll_cppsp/cpoll_cppsp.dockerfile new file mode 100644 index 00000000000..adaac3c1d81 --- /dev/null +++ b/frameworks/C++/cpoll_cppsp/cpoll_cppsp.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/cpoll_cppsp-base:0.1 + +CMD ./run_application /cpoll_cppsp/www -g g++-4.8 -m /forcedynamic.cppsm diff --git a/frameworks/C++/cpoll_cppsp/setup.sh b/frameworks/C++/cpoll_cppsp/setup.sh deleted file mode 100755 index 2019b8e63b1..00000000000 --- a/frameworks/C++/cpoll_cppsp/setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends postgresql-server-dev-9.3 cppsp - -make clean -make -cd $CPPSP_HOME -./run_application $TROOT/www -g g++-4.8 -m /forcedynamic.cppsm & diff --git a/frameworks/C++/cpoll_cppsp/setup_mysql.sh b/frameworks/C++/cpoll_cppsp/setup_mysql.sh deleted file mode 100644 index 8c83cf989ea..00000000000 --- a/frameworks/C++/cpoll_cppsp/setup_mysql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends mysql - -source ./setup.sh \ No newline at end of file diff --git a/frameworks/C++/cpoll_cppsp/setup_postgresql.sh b/frameworks/C++/cpoll_cppsp/setup_postgresql.sh deleted file mode 100644 index 4c1aa956d38..00000000000 --- a/frameworks/C++/cpoll_cppsp/setup_postgresql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends postgresql - -source ./setup.sh \ No newline at end of file diff --git a/frameworks/C++/cpoll_cppsp/www/connectioninfo.H b/frameworks/C++/cpoll_cppsp/www/connectioninfo.H index c18cbcd32a0..59bbff79fad 100644 --- a/frameworks/C++/cpoll_cppsp/www/connectioninfo.H +++ b/frameworks/C++/cpoll_cppsp/www/connectioninfo.H @@ -1,4 +1,4 @@ -#define BENCHMARK_DB_HOST "TFB-database" +#define BENCHMARK_DB_HOST "tfb-database" #define MYSQL_MAX_CONNECTIONS 3000 #include diff --git a/frameworks/C++/cppcms/.gitignore b/frameworks/C++/cppcms/.gitignore deleted file mode 100644 index db3c5269b3d..00000000000 --- a/frameworks/C++/cppcms/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -mycppcms -config.js -fortunes_view.cpp - diff --git a/frameworks/C++/cppcms/benchmark_config.json b/frameworks/C++/cppcms/benchmark_config.json index a68cc7ccaef..0eee9790b12 100644 --- a/frameworks/C++/cppcms/benchmark_config.json +++ b/frameworks/C++/cppcms/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "cppcms", "tests": [{ "default": { - "setup_file": "setup-nginx-mysql", "json_url": "/json", "db_url": "/db", "query_url": "/queries/", @@ -26,7 +25,6 @@ "notes": "" }, "postgres": { - "setup_file": "setup-nginx-postgresql", "json_url": "/json", "db_url": "/db", "query_url": "/queries/", @@ -50,7 +48,6 @@ "notes": "" }, "direct": { - "setup_file": "setup-direct-mysql", "json_url": "/json", "db_url": "/db", "query_url": "/queries/", diff --git a/frameworks/C++/cppcms/config-direct-mysql.json b/frameworks/C++/cppcms/config-direct-mysql.json new file mode 100644 index 00000000000..4314699e4f0 --- /dev/null +++ b/frameworks/C++/cppcms/config-direct-mysql.json @@ -0,0 +1,20 @@ +{ + "service": { + "api": "http", + "ip": "0.0.0.0", + "port": 8080 + }, + "http": { + "script": "/" + }, + "gzip": { + "enable": false + }, + "app": { + "db_connection_string": "mysql:host=tfb-database;database=hello_world;user=benchmarkdbuser;password=benchmarkdbpass;set_charset_name=utf8;@pool_size=10" + }, + "cache": { + "backend": "thread_shared", + "limit": 10000 + } +} \ No newline at end of file diff --git a/frameworks/C++/cppcms/config-nginx-mysql.json b/frameworks/C++/cppcms/config-nginx-mysql.json new file mode 100644 index 00000000000..f99efe5acca --- /dev/null +++ b/frameworks/C++/cppcms/config-nginx-mysql.json @@ -0,0 +1,19 @@ +{ + "service": { + "api": "fastcgi", + "socket": "/var/tmp/cppcms.sock" + }, + "http": { + "script": "/" + }, + "gzip": { + "enable": false + }, + "app": { + "db_connection_string": "mysql:host=tfb-database;database=hello_world;user=benchmarkdbuser;password=benchmarkdbpass;set_charset_name=utf8;@pool_size=10" + }, + "cache": { + "backend": "thread_shared", + "limit": 10000 + } +} \ No newline at end of file diff --git a/frameworks/C++/cppcms/config-nginx-postgresql.json b/frameworks/C++/cppcms/config-nginx-postgresql.json new file mode 100644 index 00000000000..9b361d803db --- /dev/null +++ b/frameworks/C++/cppcms/config-nginx-postgresql.json @@ -0,0 +1,19 @@ +{ + "service": { + "api": "fastcgi", + "socket": "/var/tmp/cppcms.sock" + }, + "http": { + "script": "/" + }, + "gzip": { + "enable": false + }, + "app": { + "db_connection_string": "postgresql:host=tfb-database;dbname=hello_world;user=benchmarkdbuser;password=benchmarkdbpass;@pool_size=10" + }, + "cache": { + "backend": "thread_shared", + "limit": 10000 + } +} \ No newline at end of file diff --git a/frameworks/C++/cppcms/config.js.tpl b/frameworks/C++/cppcms/config.js.tpl deleted file mode 100644 index 632bd94a6c7..00000000000 --- a/frameworks/C++/cppcms/config.js.tpl +++ /dev/null @@ -1,19 +0,0 @@ -{ - "service": { - "api": "--api--", - --address-- - }, - "http": { - "script": "/" - }, - "gzip": { - "enable": false - }, - "app": { - "db_connection_string": "--db--" - }, - "cache": { - "backend": "thread_shared", - "limit": 10000 - } -} diff --git a/frameworks/C++/cppcms/cppcms-base.dockerfile b/frameworks/C++/cppcms/cppcms-base.dockerfile new file mode 100644 index 00000000000..f32e1cd19bd --- /dev/null +++ b/frameworks/C++/cppcms/cppcms-base.dockerfile @@ -0,0 +1,46 @@ +FROM techempower/nginx:0.1 + +RUN apt install -yqq libgcrypt11-dev cmake python + +WORKDIR /installs + +#http://cppcms.com/wikipp/en/page/cppcms_1x_build +#note '-rc1' in the url +ENV CPPCMS_VERSION=1.1.1 +ENV BACKNAME=cppcms +ENV CPPCMS_HOME=/installs/$BACKNAME-$CPPCMS_VERSION +ENV CPPCMSROOT=${CPPCMS_HOME}-install + +RUN wget -q https://download.sourceforge.net/project/cppcms/$BACKNAME/$CPPCMS_VERSION-rc1/$BACKNAME-$CPPCMS_VERSION.tar.bz2 +RUN tar xf $BACKNAME-$CPPCMS_VERSION.tar.bz2 + +RUN cd $BACKNAME-$CPPCMS_VERSION && \ + mkdir build && \ + cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=${CPPCMSROOT} .. && \ + make && make install + +ENV CPPCMS_HOME=${CPPCMSROOT} + + +ENV CPPDB_VERSION=0.3.1 +ENV BACKNAME=cppdb +ENV CPPDB_HOME=/installs/$BACKNAME-$CPPDB_VERSION +ENV CPPDBROOT=${CPPDB_HOME}-install + +RUN wget -q https://download.sourceforge.net/project/cppcms/$BACKNAME/$CPPDB_VERSION/$BACKNAME-$CPPDB_VERSION.tar.bz2 +RUN tar xf $BACKNAME-$CPPDB_VERSION.tar.bz2 + +RUN cd $BACKNAME-$CPPDB_VERSION && \ + mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=${CPPDBROOT} .. && \ + make && make install + +ENV CPPDB_HOME=${CPPDBROOT} + +ADD ./ /cppcms +WORKDIR /cppcms + +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${CPPCMS_HOME}/lib:${CPPDB_HOME}/lib + +RUN make diff --git a/frameworks/C++/cppcms/cppcms-direct.dockerfile b/frameworks/C++/cppcms/cppcms-direct.dockerfile new file mode 100644 index 00000000000..7ee53a1df4f --- /dev/null +++ b/frameworks/C++/cppcms/cppcms-direct.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/cppcms-base:0.1 + +CMD ./mycppcms -c config-direct-mysql.json diff --git a/frameworks/C++/cppcms/cppcms-postgres.dockerfile b/frameworks/C++/cppcms/cppcms-postgres.dockerfile new file mode 100644 index 00000000000..ef1e6583949 --- /dev/null +++ b/frameworks/C++/cppcms/cppcms-postgres.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/cppcms-base:0.1 + +CMD nginx -c /cppcms/nginx.conf && ./mycppcms -c config-nginx-postgresql.json diff --git a/frameworks/C++/cppcms/cppcms.dockerfile b/frameworks/C++/cppcms/cppcms.dockerfile new file mode 100644 index 00000000000..8ebd63beeb1 --- /dev/null +++ b/frameworks/C++/cppcms/cppcms.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/cppcms-base:0.1 + +CMD nginx -c /cppcms/nginx.conf && ./mycppcms -c config-nginx-mysql.json diff --git a/frameworks/C++/cppcms/nginx.conf b/frameworks/C++/cppcms/nginx.conf index 75d9997bca2..eed4d452789 100644 --- a/frameworks/C++/cppcms/nginx.conf +++ b/frameworks/C++/cppcms/nginx.conf @@ -1,5 +1,6 @@ # This file is based on /usr/local/nginx/conf/nginx.conf.default. +user root; worker_processes auto; error_log stderr error; diff --git a/frameworks/C++/cppcms/setup-direct-mysql.sh b/frameworks/C++/cppcms/setup-direct-mysql.sh deleted file mode 100644 index 5da55a40b9e..00000000000 --- a/frameworks/C++/cppcms/setup-direct-mysql.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -DRIVER=mysql -NGINX= - -source ${TROOT}/setup.sh diff --git a/frameworks/C++/cppcms/setup-nginx-mysql.sh b/frameworks/C++/cppcms/setup-nginx-mysql.sh deleted file mode 100644 index 5c0938808c6..00000000000 --- a/frameworks/C++/cppcms/setup-nginx-mysql.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -DRIVER=mysql -NGINX=1 - -source ${TROOT}/setup.sh diff --git a/frameworks/C++/cppcms/setup-nginx-postgresql.sh b/frameworks/C++/cppcms/setup-nginx-postgresql.sh deleted file mode 100644 index ca2b234615f..00000000000 --- a/frameworks/C++/cppcms/setup-nginx-postgresql.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -DRIVER=postgresql -NGINX=1 - -source ${TROOT}/setup.sh diff --git a/frameworks/C++/cppcms/setup.sh b/frameworks/C++/cppcms/setup.sh deleted file mode 100755 index 4699f199de3..00000000000 --- a/frameworks/C++/cppcms/setup.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -fw_depends mysql postgresql - -cp config.js.tpl config.js - -fw_depends cppcms cppcms-cppdb -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${CPPCMS_HOME}/lib:${CPPDB_HOME}/lib - -make - - -#Database -#http://cppcms.com/sql/cppdb/connstr.html -#http://cppcms.com/sql/cppdb/backendref.html -if [ "${DRIVER}" == "mysql" ]; then - dbstring="mysql:host="$DBHOST";database=hello_world;user=benchmarkdbuser;password=benchmarkdbpass;set_charset_name=utf8;@pool_size=10" -else - dbstring="postgresql:host="$DBHOST";dbname=hello_world;user=benchmarkdbuser;password=benchmarkdbpass;@pool_size=10" -fi -sed -i 's|\(.*\)--db--\(.*\)|\1'"$dbstring"'\2|g' config.js - - -#http://cppcms.com/wikipp/en/page/cppcms_1x_tut_web_server_config#Nginx -#configure Nginx -if [ -n "${NGINX}" ]; then - fw_depends nginx - nginx -c ${TROOT}/nginx.conf - - sed -i 's|\(.*\)--api--\(.*\)|\1'"fastcgi"'\2|g' config.js - sed -i 's|\(.*\)--address--\(.*\)|\1"socket" : "/var/tmp/cppcms.sock"\2|g' config.js - #for ip based connection - #sed -i 's|\(.*\)--address--\(.*\)|\1"ip": "127.0.0.1" , "port" : 8081\2|g' config.js -else - sed -i 's|\(.*\)--api--\(.*\)|\1'"http"'\2|g' config.js - sed -i 's|\(.*\)--address--\(.*\)|\1"ip": "0.0.0.0", "port": 8080\2|g' config.js -fi - - - -./mycppcms -c config.js - diff --git a/frameworks/C++/cutelyst/CMakeLists.txt b/frameworks/C++/cutelyst/CMakeLists.txt deleted file mode 100644 index 307ebc1adfc..00000000000 --- a/frameworks/C++/cutelyst/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -project(cutelyst_benchmarks) - -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) -if (POLICY CMP0043) - cmake_policy(SET CMP0043 NEW) -endif() - -find_package(Qt5 COMPONENTS Core Network Sql REQUIRED) -find_package(CutelystQt5 REQUIRED) - -# Auto generate moc files -set(CMAKE_AUTOMOC ON) - -# As moc files are generated in the binary dir, tell CMake -# to always look for includes there: -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -# Enable C++11 features -add_definitions(-std=c++11) - -include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${CutelystQt5_INCLUDE_DIR} -) - -file(GLOB_RECURSE TEMPLATES_SRC root/*) - -add_subdirectory(src) diff --git a/frameworks/C++/cutelyst/benchmark_config.json b/frameworks/C++/cutelyst/benchmark_config.json index da9c19424cd..91101adb18c 100644 --- a/frameworks/C++/cutelyst/benchmark_config.json +++ b/frameworks/C++/cutelyst/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "cutelyst", "tests": [{ "default": { - "setup_file": "setup_pf", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -20,8 +19,7 @@ "notes": "", "versus": "" }, - "pf-postgres": { - "setup_file": "setup_pf_pg", + "pf-pg": { "db_url": "/db_postgres", "query_url": "/query_postgres?queries=", "update_url": "/updates_postgres?queries=", @@ -41,8 +39,7 @@ "notes": "", "versus": "" }, - "pf-mysql": { - "setup_file": "setup_pf_my", + "pf-my": { "db_url": "/db_mysql", "query_url": "/query_mysql?queries=", "update_url": "/updates_mysql?queries=", @@ -63,7 +60,6 @@ "versus": "" }, "thread": { - "setup_file": "setup_thread", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -81,8 +77,7 @@ "notes": "", "versus": "" }, - "thread-postgres-raw": { - "setup_file": "setup_thread_pg", + "thread-pg": { "db_url": "/db_postgres", "query_url": "/query_postgres?queries=", "update_url": "/updates_postgres?queries=", @@ -102,8 +97,7 @@ "notes": "", "versus": "" }, - "thread-mysql-raw": { - "setup_file": "setup_thread_my", + "thread-my": { "db_url": "/db_mysql", "query_url": "/query_mysql?queries=", "update_url": "/updates_mysql?queries=", @@ -123,8 +117,7 @@ "notes": "", "versus": "" }, - "pf-epoll": { - "setup_file": "setup_pf_epoll", + "pf-nodelay": { "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -138,12 +131,11 @@ "webserver": "None", "os": "Linux", "database_os": "Linux", - "display_name": "cutelyst-pf-epoll", + "display_name": "cutelyst-pf-nodelay", "notes": "", "versus": "" }, - "pf-postgres-epoll": { - "setup_file": "setup_pf_pg_epoll", + "pf-pg-nodelay": { "db_url": "/db_postgres", "query_url": "/query_postgres?queries=", "update_url": "/updates_postgres?queries=", @@ -159,12 +151,11 @@ "webserver": "None", "os": "Linux", "database_os": "Linux", - "display_name": "cutelyst-pf-pg-epoll", + "display_name": "cutelyst-pf-pg-nodelay", "notes": "", "versus": "" }, - "pf-mysql-epoll": { - "setup_file": "setup_pf_my_epoll", + "pf-my-nodelay": { "db_url": "/db_mysql", "query_url": "/query_mysql?queries=", "update_url": "/updates_mysql?queries=", @@ -180,12 +171,11 @@ "webserver": "None", "os": "Linux", "database_os": "Linux", - "display_name": "cutelyst-pf-my-epoll", + "display_name": "cutelyst-pf-my-nodelay", "notes": "", "versus": "" }, - "thread-epoll": { - "setup_file": "setup_thread_epoll", + "thread-nodelay": { "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -199,12 +189,11 @@ "webserver": "None", "os": "Linux", "database_os": "Linux", - "display_name": "cutelyst-thr-epoll", + "display_name": "cutelyst-thr-nodelay", "notes": "", "versus": "" }, - "thread-postgres-epoll": { - "setup_file": "setup_thread_pg_epoll", + "thread-pg-nodelay": { "db_url": "/db_postgres", "query_url": "/query_postgres?queries=", "update_url": "/updates_postgres?queries=", @@ -220,12 +209,11 @@ "webserver": "None", "os": "Linux", "database_os": "Linux", - "display_name": "cutelyst-thr-pg-epoll", + "display_name": "cutelyst-thr-pg-nodelay", "notes": "", "versus": "" }, - "thread-mysql-epoll": { - "setup_file": "setup_thread_my_epoll", + "thread-my-nodelay": { "db_url": "/db_mysql", "query_url": "/query_mysql?queries=", "update_url": "/updates_mysql?queries=", @@ -241,52 +229,11 @@ "webserver": "None", "os": "Linux", "database_os": "Linux", - "display_name": "cutelyst-thr-my-epoll", - "notes": "", - "versus": "" - }, - "thread-epoll-half": { - "setup_file": "setup_thread_epoll_half", - "json_url": "/json", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "None", - "framework": "cutelyst", - "language": "C++", - "orm": "Raw", - "platform": "Qt", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "cutelyst-thr-epoll-half", - "notes": "", - "versus": "" - }, - "thread-postgres-epoll-half": { - "setup_file": "setup_thread_pg_epoll_half", - "db_url": "/db_postgres", - "query_url": "/query_postgres?queries=", - "update_url": "/updates_postgres?queries=", - "fortune_url": "/fortunes_raw_postgres", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "Postgres", - "framework": "cutelyst", - "language": "C++", - "orm": "Raw", - "platform": "Qt", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "cutelyst-thr-pg-epoll-half", + "display_name": "cutelyst-thr-my-nodelay", "notes": "", "versus": "" }, "nginx": { - "setup_file": "setup_uwsgi_nginx", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -304,8 +251,7 @@ "notes": "", "versus": "" }, - "nginx-postgres-raw": { - "setup_file": "setup_uwsgi_nginx_pg", + "nginx-pg": { "db_url": "/db_postgres", "query_url": "/query_postgres?queries=", "update_url": "/updates_postgres?queries=", @@ -325,8 +271,7 @@ "notes": "", "versus": "" }, - "nginx-mysql-raw": { - "setup_file": "setup_uwsgi_nginx_my", + "nginx-my": { "db_url": "/db_mysql", "query_url": "/query_mysql?queries=", "update_url": "/updates_mysql?queries=", diff --git a/frameworks/C++/cutelyst/config.sh b/frameworks/C++/cutelyst/config.sh deleted file mode 100755 index b9fe781c723..00000000000 --- a/frameworks/C++/cutelyst/config.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash - -fw_depends cutelyst - -# configure -# DRIVER -# UWSGI -# NGINX -# PROCESS_OR_THREAD -# CUTELYST_EVENT_LOOP_EPOLL - -echo DRIVER=${DRIVER} -echo UWSGI=${UWSGI} -echo NGINX=${NGINX} -echo QT_VERSION_MM=${QT_VERSION_MM} -echo CUTELYST_EVENT_LOOP_EPOLL=${CUTELYST_EVENT_LOOP_EPOLL} -echo C_PROCESSES=${C_PROCESSES} -echo C_THREADS=${C_THREADS} -echo CPU_AFFINITY=${CPU_AFFINITY} - -if [ "${DRIVER}" == "QMYSQL" ]; then - fw_depends mysql -elif [ "${DRIVER}" == "QPSQL" ]; then - fw_depends postgresql -fi - -CROOT=${IROOT}/cutelyst - -mkdir -p ${CROOT}/benchmarks || true -cd ${CROOT}/benchmarks - -# build -export CMAKE_PREFIX_PATH=/opt/qt${QT_VERSION_MM}:${CROOT} -cmake $TROOT -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$CROOT -make -j $CPU_COUNT - -if [ -n "${UWSGI}" ]; then - cp -v ${TROOT}/config/config_socket.ini ${CROOT}/config.ini - SEND_DATE=true -else - cp -v ${TROOT}/config/config.ini ${CROOT}/config.ini - SEND_DATE=false -fi - -sed -i "s|Driver=.*|Driver=${DRIVER}|g" ${CROOT}/config.ini -sed -i "s|DatabaseHostName=.*|DatabaseHostName=${DBHOST}|g" ${CROOT}/config.ini -sed -i "s|SendDate=.*|SendDate=${SEND_DATE}|g" ${CROOT}/config.ini - -export LD_LIBRARY_PATH=/opt/qt${QT_VERSION_MM}/lib:${CROOT}/lib/x86_64-linux-gnu/ - -if [ -n "${UWSGI}" ]; then - uwsgi \ - --ini ${CROOT}/config.ini \ - --plugin ${CROOT}/lib/uwsgi/plugins/cutelyst_plugin.so \ - --cutelyst-app ${CROOT}/benchmarks/src/libcutelyst_benchmarks.so \ - --processes=${C_PROCESSES} \ - --threads=${C_THREADS} \ - --cpu-affinity=${CPU_AFFINITY} \ - --reuse-port \ - & -else - ${CROOT}/bin/cutelyst-wsgi \ - --ini ${CROOT}/config.ini:uwsgi \ - -a ${CROOT}/benchmarks/src/libcutelyst_benchmarks.so \ - --processes=${C_PROCESSES} \ - --threads=${C_THREADS} \ - --cpu-affinity=${CPU_AFFINITY} \ - --socket-timeout 0 \ - --reuse-port \ - & -fi - -# configure Nginx -if [ -n "${NGINX}" ]; then - fw_depends nginx - cp -v ${TROOT}/nginx.conf ${CROOT}/nginx.conf - sed -i "s|include .*/conf/uwsgi_params;|include ${NGINX_HOME}/conf/uwsgi_params;|g" ${CROOT}/nginx.conf - nginx -c ${CROOT}/nginx.conf -fi diff --git a/frameworks/C++/cutelyst/cutelyst-benchmark-app.dockerfile b/frameworks/C++/cutelyst/cutelyst-benchmark-app.dockerfile new file mode 100644 index 00000000000..2d7c0815436 --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-benchmark-app.dockerfile @@ -0,0 +1,19 @@ +FROM techempower/cutelyst-framework:0.1 + +ENV TROOT=/cutelyst-benchmark-app +ENV LD_LIBRARY_PATH=${CMAKE_PREFIX_PATH}/lib +ENV CUTELYST_APP=${TROOT}/build/libcutelyst_benchmarks.so + +ADD src ${TROOT}/ +ADD config/config.ini /cutelyst.ini +ADD config/config_socket.ini /cutelyst_socket.ini + +RUN sed -i "s|DatabaseHostName=.*|DatabaseHostName=${DBHOST}|g" /cutelyst.ini +RUN sed -i "s|DatabaseHostName=.*|DatabaseHostName=${DBHOST}|g" /cutelyst_socket.ini + +RUN cd ${TROOT} && \ + mkdir -p build && \ + cd build && \ + cmake ${TROOT} \ + -DCMAKE_BUILD_TYPE=Release && \ + make diff --git a/frameworks/C++/cutelyst/cutelyst-deps.dockerfile b/frameworks/C++/cutelyst/cutelyst-deps.dockerfile new file mode 100644 index 00000000000..339785e10ed --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-deps.dockerfile @@ -0,0 +1,19 @@ +FROM techempower/base:0.1 + +ENV QT_VERSION_MM=59 +ENV QT_VERSION_FULL=594-xenial +ENV CMAKE_PREFIX_PATH=/opt/qt${QT_VERSION_MM} +ENV LD_LIBRARY_PATH=${CMAKE_PREFIX_PATH}/lib + +RUN apt-add-repository --yes ppa:beineri/opt-qt$QT_VERSION_FULL && \ + apt-get update -qq && \ + apt-get install -qqy \ + cmake \ + clearsilver-dev \ + libgrantlee5-dev \ + libjemalloc-dev \ + qt${QT_VERSION_MM}base \ + qt${QT_VERSION_MM}script \ + qt${QT_VERSION_MM}tools + +RUN apt install -yqq uwsgi uwsgi uuid-dev libcap-dev libzmq3-dev diff --git a/frameworks/C++/cutelyst/cutelyst-framework.dockerfile b/frameworks/C++/cutelyst/cutelyst-framework.dockerfile new file mode 100644 index 00000000000..f9c5a6d9f04 --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-framework.dockerfile @@ -0,0 +1,14 @@ +FROM techempower/cutelyst-deps:0.1 + +ENV CUTELYST_VER=2.0.1 + +RUN wget https://github.com/cutelyst/cutelyst/archive/v$CUTELYST_VER.tar.gz -O cutelyst-$CUTELYST_VER.tar.gz && \ + tar zxf cutelyst-$CUTELYST_VER.tar.gz && \ + cd cutelyst-$CUTELYST_VER && mkdir build && cd build && \ + cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DPLUGIN_UWSGI=on \ + -DPLUGIN_VIEW_GRANTLEE=on \ + -DUSE_JEMALLOC=on && \ + make && make install diff --git a/frameworks/C++/cutelyst/cutelyst-nginx-base.dockerfile b/frameworks/C++/cutelyst/cutelyst-nginx-base.dockerfile new file mode 100644 index 00000000000..a8702b2e253 --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-nginx-base.dockerfile @@ -0,0 +1,12 @@ +FROM techempower/nginx:0.1 +FROM techempower/cutelyst-benchmark-app:0.1 + +COPY --from=0 /nginx /nginx + +ENV NGINX_HOME="/nginx" +ENV PATH=/nginx/sbin:${PATH} + +ADD nginx.conf /nginx.conf + +RUN sed -i "s|include .*/conf/uwsgi_params;|include ${NGINX_HOME}/conf/uwsgi_params;|g" /nginx.conf +RUN sed -i "s|SendDate=.*|SendDate=false|g" /cutelyst_socket.ini diff --git a/frameworks/C++/cutelyst/cutelyst-nginx-my.dockerfile b/frameworks/C++/cutelyst/cutelyst-nginx-my.dockerfile new file mode 100644 index 00000000000..c3ff02eda12 --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-nginx-my.dockerfile @@ -0,0 +1,16 @@ +FROM techempower/cutelyst-nginx-base:0.1 + +ENV C_THREADS=1 +ENV CPU_AFFINITY=1 +ENV DRIVER=QMYSQL + +RUN sed -i "s|Driver=.*|Driver=${DRIVER}|g" /cutelyst_socket.ini + +CMD nginx -c /nginx.conf && uwsgi \ + --ini /cutelyst_socket.ini \ + --plugin /usr/lib/uwsgi/plugins/cutelyst2_plugin.so \ + --cutelyst-app ${CUTELYST_APP} \ + --processes=$(nproc) \ + --threads=${C_THREADS} \ + --cpu-affinity=${CPU_AFFINITY} \ + --reuse-port diff --git a/frameworks/C++/cutelyst/cutelyst-nginx-pg.dockerfile b/frameworks/C++/cutelyst/cutelyst-nginx-pg.dockerfile new file mode 100644 index 00000000000..f39fdbc443f --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-nginx-pg.dockerfile @@ -0,0 +1,16 @@ +FROM techempower/cutelyst-nginx-base:0.1 + +ENV C_THREADS=1 +ENV CPU_AFFINITY=1 +ENV DRIVER=QPSQL + +RUN sed -i "s|Driver=.*|Driver=${DRIVER}|g" /cutelyst_socket.ini + +CMD nginx -c /nginx.conf && uwsgi \ + --ini /cutelyst_socket.ini \ + --plugin /usr/lib/uwsgi/plugins/cutelyst2_plugin.so \ + --cutelyst-app ${CUTELYST_APP} \ + --processes=$(nproc) \ + --threads=${C_THREADS} \ + --cpu-affinity=${CPU_AFFINITY} \ + --reuse-port diff --git a/frameworks/C++/cutelyst/cutelyst-nginx.dockerfile b/frameworks/C++/cutelyst/cutelyst-nginx.dockerfile new file mode 100644 index 00000000000..46d96841307 --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-nginx.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/cutelyst-nginx-base:0.1 + +ENV C_THREADS=1 +ENV CPU_AFFINITY=1 + +CMD nginx -c /nginx.conf && uwsgi \ + --ini /cutelyst_socket.ini \ + --plugin /usr/lib/uwsgi/plugins/cutelyst2_plugin.so \ + --cutelyst-app ${CUTELYST_APP} \ + --processes=$(nproc) \ + --threads=${C_THREADS} \ + --cpu-affinity=${CPU_AFFINITY} \ + --reuse-port diff --git a/frameworks/C++/cutelyst/cutelyst-pf-my-nodelay.dockerfile b/frameworks/C++/cutelyst/cutelyst-pf-my-nodelay.dockerfile new file mode 100644 index 00000000000..03ddfd1ab92 --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-pf-my-nodelay.dockerfile @@ -0,0 +1,18 @@ +FROM techempower/cutelyst-benchmark-app:0.1 + +ENV C_THREADS=1 +ENV CPU_AFFINITY=1 +ENV DRIVER=QMYSQL + +RUN sed -i "s|Driver=.*|Driver=${DRIVER}|g" /cutelyst.ini +RUN sed -i "s|DatabaseHostName=.*|DatabaseHostName=${DBHOST}|g" /cutelyst.ini + +CMD cutelyst-wsgi2 \ + --ini /cutelyst.ini:uwsgi \ + --application ${CUTELYST_APP} \ + --processes=$(nproc) \ + --threads=${C_THREADS} \ + --cpu-affinity=${CPU_AFFINITY} \ + --socket-timeout 0 \ + --reuse-port \ + --tcp-nodelay diff --git a/frameworks/C++/cutelyst/cutelyst-pf-my.dockerfile b/frameworks/C++/cutelyst/cutelyst-pf-my.dockerfile new file mode 100644 index 00000000000..97ff75994f1 --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-pf-my.dockerfile @@ -0,0 +1,17 @@ +FROM techempower/cutelyst-benchmark-app:0.1 + +ENV C_THREADS=1 +ENV CPU_AFFINITY=1 +ENV DRIVER=QMYSQL + +RUN sed -i "s|Driver=.*|Driver=${DRIVER}|g" /cutelyst.ini +RUN sed -i "s|DatabaseHostName=.*|DatabaseHostName=${DBHOST}|g" /cutelyst.ini + +CMD cutelyst-wsgi2 \ + --ini /cutelyst.ini:uwsgi \ + --application ${CUTELYST_APP} \ + --processes=$(nproc) \ + --threads=${C_THREADS} \ + --cpu-affinity=${CPU_AFFINITY} \ + --socket-timeout 0 \ + --reuse-port diff --git a/frameworks/C++/cutelyst/cutelyst-pf-nodelay.dockerfile b/frameworks/C++/cutelyst/cutelyst-pf-nodelay.dockerfile new file mode 100644 index 00000000000..7dd202c4277 --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-pf-nodelay.dockerfile @@ -0,0 +1,14 @@ +FROM techempower/cutelyst-benchmark-app:0.1 + +ENV C_THREADS=1 +ENV CPU_AFFINITY=1 + +CMD cutelyst-wsgi2 \ + --ini /cutelyst.ini:uwsgi \ + --application ${CUTELYST_APP} \ + --processes=$(nproc) \ + --threads=${C_THREADS} \ + --cpu-affinity=${CPU_AFFINITY} \ + --socket-timeout 0 \ + --reuse-port \ + --tcp-nodelay diff --git a/frameworks/C++/cutelyst/cutelyst-pf-pg-nodelay.dockerfile b/frameworks/C++/cutelyst/cutelyst-pf-pg-nodelay.dockerfile new file mode 100644 index 00000000000..e38807448aa --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-pf-pg-nodelay.dockerfile @@ -0,0 +1,18 @@ +FROM techempower/cutelyst-benchmark-app:0.1 + +ENV C_THREADS=1 +ENV CPU_AFFINITY=1 +ENV DRIVER=QPSQL + +RUN sed -i "s|Driver=.*|Driver=${DRIVER}|g" /cutelyst.ini +RUN sed -i "s|DatabaseHostName=.*|DatabaseHostName=${DBHOST}|g" /cutelyst.ini + +CMD cutelyst-wsgi2 \ + --ini /cutelyst.ini:uwsgi \ + --application ${CUTELYST_APP} \ + --processes=$(nproc) \ + --threads=${C_THREADS} \ + --cpu-affinity=${CPU_AFFINITY} \ + --socket-timeout 0 \ + --reuse-port \ + --tcp-nodelay diff --git a/frameworks/C++/cutelyst/cutelyst-pf-pg.dockerfile b/frameworks/C++/cutelyst/cutelyst-pf-pg.dockerfile new file mode 100644 index 00000000000..bf3be3d75ad --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-pf-pg.dockerfile @@ -0,0 +1,16 @@ +FROM techempower/cutelyst-benchmark-app:0.1 + +ENV C_THREADS=1 +ENV CPU_AFFINITY=1 +ENV DRIVER=QPSQL + +RUN sed -i "s|Driver=.*|Driver=${DRIVER}|g" /cutelyst.ini + +CMD cutelyst-wsgi2 \ + --ini /cutelyst.ini:uwsgi \ + --application ${CUTELYST_APP} \ + --processes=$(nproc) \ + --threads=${C_THREADS} \ + --cpu-affinity=${CPU_AFFINITY} \ + --socket-timeout 0 \ + --reuse-port diff --git a/frameworks/C++/cutelyst/cutelyst-thread-my-nodelay.dockerfile b/frameworks/C++/cutelyst/cutelyst-thread-my-nodelay.dockerfile new file mode 100644 index 00000000000..94ebe67226f --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-thread-my-nodelay.dockerfile @@ -0,0 +1,17 @@ +FROM techempower/cutelyst-benchmark-app:0.1 + +ENV C_PROCESSES=1 +ENV CPU_AFFINITY=1 +ENV DRIVER=QMYSQL + +RUN sed -i "s|Driver=.*|Driver=${DRIVER}|g" /cutelyst.ini + +CMD cutelyst-wsgi2 \ + --ini /cutelyst.ini:uwsgi \ + --application ${CUTELYST_APP} \ + --processes=${C_PROCESSES} \ + --threads=$(nproc) \ + --cpu-affinity=${CPU_AFFINITY} \ + --socket-timeout 0 \ + --reuse-port \ + --tcp-nodelay diff --git a/frameworks/C++/cutelyst/cutelyst-thread-my.dockerfile b/frameworks/C++/cutelyst/cutelyst-thread-my.dockerfile new file mode 100644 index 00000000000..94c6ff3c442 --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-thread-my.dockerfile @@ -0,0 +1,16 @@ +FROM techempower/cutelyst-benchmark-app:0.1 + +ENV C_PROCESSES=1 +ENV CPU_AFFINITY=1 +ENV DRIVER=QMYSQL + +RUN sed -i "s|Driver=.*|Driver=${DRIVER}|g" /cutelyst.ini + +CMD cutelyst-wsgi2 \ + --ini /cutelyst.ini:uwsgi \ + --application ${CUTELYST_APP} \ + --processes=${C_PROCESSES} \ + --threads=$(nproc) \ + --cpu-affinity=${CPU_AFFINITY} \ + --socket-timeout 0 \ + --reuse-port diff --git a/frameworks/C++/cutelyst/cutelyst-thread-nodelay.dockerfile b/frameworks/C++/cutelyst/cutelyst-thread-nodelay.dockerfile new file mode 100644 index 00000000000..75ab0e7d031 --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-thread-nodelay.dockerfile @@ -0,0 +1,14 @@ +FROM techempower/cutelyst-benchmark-app:0.1 + +ENV C_PROCESSES=1 +ENV CPU_AFFINITY=1 + +CMD cutelyst-wsgi2 \ + --ini /cutelyst.ini:uwsgi \ + --application ${CUTELYST_APP} \ + --processes=${C_PROCESSES} \ + --threads=$(nproc) \ + --cpu-affinity=${CPU_AFFINITY} \ + --socket-timeout 0 \ + --reuse-port \ + --tcp-nodelay diff --git a/frameworks/C++/cutelyst/cutelyst-thread-pg-nodelay.dockerfile b/frameworks/C++/cutelyst/cutelyst-thread-pg-nodelay.dockerfile new file mode 100644 index 00000000000..a85d3643e95 --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-thread-pg-nodelay.dockerfile @@ -0,0 +1,17 @@ +FROM techempower/cutelyst-benchmark-app:0.1 + +ENV C_PROCESSES=1 +ENV CPU_AFFINITY=1 +ENV DRIVER=QPSQL + +RUN sed -i "s|Driver=.*|Driver=${DRIVER}|g" /cutelyst.ini + +CMD cutelyst-wsgi2 \ + --ini /cutelyst.ini:uwsgi \ + --application ${CUTELYST_APP} \ + --processes=${C_PROCESSES} \ + --threads=$(nproc) \ + --cpu-affinity=${CPU_AFFINITY} \ + --socket-timeout 0 \ + --reuse-port \ + --tcp-nodelay diff --git a/frameworks/C++/cutelyst/cutelyst-thread-pg.dockerfile b/frameworks/C++/cutelyst/cutelyst-thread-pg.dockerfile new file mode 100644 index 00000000000..da68b06277e --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-thread-pg.dockerfile @@ -0,0 +1,16 @@ +FROM techempower/cutelyst-benchmark-app:0.1 + +ENV C_PROCESSES=1 +ENV CPU_AFFINITY=1 +ENV DRIVER=QPSQL + +RUN sed -i "s|Driver=.*|Driver=${DRIVER}|g" /cutelyst.ini + +CMD cutelyst-wsgi2 \ + --ini /cutelyst.ini:uwsgi \ + --application ${CUTELYST_APP} \ + --processes=${C_PROCESSES} \ + --threads=$(nproc) \ + --cpu-affinity=${CPU_AFFINITY} \ + --socket-timeout 0 \ + --reuse-port diff --git a/frameworks/C++/cutelyst/cutelyst-thread.dockerfile b/frameworks/C++/cutelyst/cutelyst-thread.dockerfile new file mode 100644 index 00000000000..8f0c4d0f951 --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst-thread.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/cutelyst-benchmark-app:0.1 + +ENV C_PROCESSES=1 +ENV CPU_AFFINITY=1 + +CMD cutelyst-wsgi2 \ + --ini /cutelyst.ini:uwsgi \ + --application ${CUTELYST_APP} \ + --processes=${C_PROCESSES} \ + --threads=$(nproc) \ + --cpu-affinity=${CPU_AFFINITY} \ + --socket-timeout 0 \ + --reuse-port diff --git a/frameworks/C++/cutelyst/cutelyst.dockerfile b/frameworks/C++/cutelyst/cutelyst.dockerfile new file mode 100644 index 00000000000..7f64f15f22d --- /dev/null +++ b/frameworks/C++/cutelyst/cutelyst.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/cutelyst-benchmark-app:0.1 + +ENV C_THREADS=1 +ENV CPU_AFFINITY=1 + +CMD cutelyst-wsgi2 \ + --ini /cutelyst.ini:uwsgi \ + --application ${CUTELYST_APP} \ + --processes=$(nproc) \ + --threads=${C_THREADS} \ + --cpu-affinity=${CPU_AFFINITY} \ + --socket-timeout 0 \ + --reuse-port diff --git a/frameworks/C++/cutelyst/setup_pf.sh b/frameworks/C++/cutelyst/setup_pf.sh deleted file mode 100755 index 3e71936dcd1..00000000000 --- a/frameworks/C++/cutelyst/setup_pf.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -DRIVER= -UWSGI= -NGINX= -C_PROCESSES=$(( (${CPU_COUNT}+1) / 2 )) -C_THREADS=0 -CPU_AFFINITY=2 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_pf_epoll.sh b/frameworks/C++/cutelyst/setup_pf_epoll.sh deleted file mode 100755 index 406b9e70141..00000000000 --- a/frameworks/C++/cutelyst/setup_pf_epoll.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -DRIVER= -UWSGI= -NGINX= -C_PROCESSES=$(( (${CPU_COUNT}+1) / 2 )) -C_THREADS=0 -CPU_AFFINITY=2 -export CUTELYST_EVENT_LOOP_EPOLL=1 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_pf_my.sh b/frameworks/C++/cutelyst/setup_pf_my.sh deleted file mode 100755 index 3b5bd1a5f8d..00000000000 --- a/frameworks/C++/cutelyst/setup_pf_my.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -DRIVER=QMYSQL -UWSGI= -NGINX= -C_PROCESSES=$(( (${CPU_COUNT}+1) / 2 )) -C_THREADS=0 -CPU_AFFINITY=2 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_pf_my_epoll.sh b/frameworks/C++/cutelyst/setup_pf_my_epoll.sh deleted file mode 100755 index e26a7b2ba42..00000000000 --- a/frameworks/C++/cutelyst/setup_pf_my_epoll.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -DRIVER=QMYSQL -UWSGI= -NGINX= -C_PROCESSES=$(( (${CPU_COUNT}+1) / 2 )) -C_THREADS=0 -CPU_AFFINITY=2 -export CUTELYST_EVENT_LOOP_EPOLL=1 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_pf_pg.sh b/frameworks/C++/cutelyst/setup_pf_pg.sh deleted file mode 100755 index 90f5cde3e03..00000000000 --- a/frameworks/C++/cutelyst/setup_pf_pg.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -DRIVER=QPSQL -UWSGI= -NGINX= -C_PROCESSES=$(( (${CPU_COUNT}+1) / 2 )) -C_THREADS=0 -CPU_AFFINITY=2 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_pf_pg_epoll.sh b/frameworks/C++/cutelyst/setup_pf_pg_epoll.sh deleted file mode 100755 index d5230e8825a..00000000000 --- a/frameworks/C++/cutelyst/setup_pf_pg_epoll.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -DRIVER=QPSQL -UWSGI= -NGINX= -C_PROCESSES=$(( (${CPU_COUNT}+1) / 2 )) -C_THREADS=0 -CPU_AFFINITY=2 -export CUTELYST_EVENT_LOOP_EPOLL=1 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_thread.sh b/frameworks/C++/cutelyst/setup_thread.sh deleted file mode 100755 index 26e434ef589..00000000000 --- a/frameworks/C++/cutelyst/setup_thread.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -DRIVER= -UWSGI= -NGINX= -C_PROCESSES=1 -C_THREADS=${CPU_COUNT} -CPU_AFFINITY=1 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_thread_epoll.sh b/frameworks/C++/cutelyst/setup_thread_epoll.sh deleted file mode 100755 index b8e884cc1bc..00000000000 --- a/frameworks/C++/cutelyst/setup_thread_epoll.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -DRIVER= -UWSGI= -NGINX= -C_PROCESSES=1 -C_THREADS=${CPU_COUNT} -CPU_AFFINITY=1 -export CUTELYST_EVENT_LOOP_EPOLL=1 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_thread_epoll_half.sh b/frameworks/C++/cutelyst/setup_thread_epoll_half.sh deleted file mode 100755 index ddef9db3139..00000000000 --- a/frameworks/C++/cutelyst/setup_thread_epoll_half.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -DRIVER= -UWSGI= -NGINX= -C_PROCESSES=1 -C_THREADS=$(( (${CPU_COUNT}+1) / 2 )) -CPU_AFFINITY=2 -export CUTELYST_EVENT_LOOP_EPOLL=1 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_thread_my.sh b/frameworks/C++/cutelyst/setup_thread_my.sh deleted file mode 100755 index 3d6d2e05234..00000000000 --- a/frameworks/C++/cutelyst/setup_thread_my.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -DRIVER=QMYSQL -UWSGI= -NGINX= -C_PROCESSES=1 -C_THREADS=${CPU_COUNT} -CPU_AFFINITY=1 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_thread_my_epoll.sh b/frameworks/C++/cutelyst/setup_thread_my_epoll.sh deleted file mode 100755 index 2bad87d6796..00000000000 --- a/frameworks/C++/cutelyst/setup_thread_my_epoll.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -DRIVER=QMYSQL -UWSGI= -NGINX= -C_PROCESSES=1 -C_THREADS=${CPU_COUNT} -CPU_AFFINITY=1 -export CUTELYST_EVENT_LOOP_EPOLL=1 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_thread_pg.sh b/frameworks/C++/cutelyst/setup_thread_pg.sh deleted file mode 100755 index ac4a7f08197..00000000000 --- a/frameworks/C++/cutelyst/setup_thread_pg.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -DRIVER=QPSQL -UWSGI= -NGINX= -C_PROCESSES=1 -C_THREADS=${CPU_COUNT} -CPU_AFFINITY=1 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_thread_pg_epoll.sh b/frameworks/C++/cutelyst/setup_thread_pg_epoll.sh deleted file mode 100755 index 0250343bd00..00000000000 --- a/frameworks/C++/cutelyst/setup_thread_pg_epoll.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -DRIVER=QPSQL -UWSGI= -NGINX= -C_PROCESSES=1 -C_THREADS=${CPU_COUNT} -CPU_AFFINITY=1 -export CUTELYST_EVENT_LOOP_EPOLL=1 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_thread_pg_epoll_half.sh b/frameworks/C++/cutelyst/setup_thread_pg_epoll_half.sh deleted file mode 100755 index fcaaeca1baa..00000000000 --- a/frameworks/C++/cutelyst/setup_thread_pg_epoll_half.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -DRIVER=QPSQL -UWSGI= -NGINX= -C_PROCESSES=1 -C_THREADS=$(( (${CPU_COUNT}+1) / 2 )) -CPU_AFFINITY=2 -export CUTELYST_EVENT_LOOP_EPOLL=1 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_uwsgi_nginx.sh b/frameworks/C++/cutelyst/setup_uwsgi_nginx.sh deleted file mode 100755 index 26ccc126b6c..00000000000 --- a/frameworks/C++/cutelyst/setup_uwsgi_nginx.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -DRIVER= -UWSGI=1 -NGINX=1 -C_PROCESSES=$(( (${CPU_COUNT}+1) / 2 )) -C_THREADS=0 -CPU_AFFINITY=2 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_uwsgi_nginx_my.sh b/frameworks/C++/cutelyst/setup_uwsgi_nginx_my.sh deleted file mode 100755 index 79c128bd566..00000000000 --- a/frameworks/C++/cutelyst/setup_uwsgi_nginx_my.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -DRIVER=QMYSQL -UWSGI=1 -NGINX=1 -C_PROCESSES=$(( (${CPU_COUNT}+1) / 2 )) -C_THREADS=0 -CPU_AFFINITY=2 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/setup_uwsgi_nginx_pg.sh b/frameworks/C++/cutelyst/setup_uwsgi_nginx_pg.sh deleted file mode 100755 index 6c07eb81cd5..00000000000 --- a/frameworks/C++/cutelyst/setup_uwsgi_nginx_pg.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -DRIVER=QPSQL -UWSGI=1 -NGINX=1 -C_PROCESSES=$(( (${CPU_COUNT}+1) / 2 )) -C_THREADS=0 -CPU_AFFINITY=2 - -source ${TROOT}/config.sh diff --git a/frameworks/C++/cutelyst/source_code b/frameworks/C++/cutelyst/source_code index 85943eee2f6..db0367e25d6 100644 --- a/frameworks/C++/cutelyst/source_code +++ b/frameworks/C++/cutelyst/source_code @@ -1,5 +1,4 @@ cutelyst/ -cutelyst/CMakeLists.txt cutelyst/src cutelyst/src/plaintexttest.cpp cutelyst/src/jsontest.cpp diff --git a/frameworks/C++/cutelyst/src/CMakeLists.txt b/frameworks/C++/cutelyst/src/CMakeLists.txt index 1bf1c260922..e672311155a 100644 --- a/frameworks/C++/cutelyst/src/CMakeLists.txt +++ b/frameworks/C++/cutelyst/src/CMakeLists.txt @@ -1,3 +1,29 @@ +project(cutelyst_benchmarks) + +cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) +if (POLICY CMP0043) + cmake_policy(SET CMP0043 NEW) +endif() + +find_package(Qt5 5.6.0 REQUIRED COMPONENTS Core Network Sql) +find_package(Cutelyst2Qt5 2.0.0 REQUIRED) + +# Auto generate moc files +set(CMAKE_AUTOMOC ON) + +# As moc files are generated in the binary dir, tell CMake +# to always look for includes there: +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +include_directories( + ${CMAKE_SOURCE_DIR} + ${Cutelyst2Qt5_INCLUDE_DIR} +) + +file(GLOB_RECURSE TEMPLATES_SRC root/*) file(GLOB_RECURSE cutelyst_benchmarks_SRCS *.cpp *.h) set(cutelyst_benchmarks_SRCS diff --git a/frameworks/C++/ffead-cpp/benchmark_config.json b/frameworks/C++/ffead-cpp/benchmark_config.json index d085e34e226..184a79a6641 100644 --- a/frameworks/C++/ffead-cpp/benchmark_config.json +++ b/frameworks/C++/ffead-cpp/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "ffead-cpp", "tests": [{ "default": { - "setup_file": "setup-mongo", "json_url": "/te-benchmark/json", "plaintext_url": "/te-benchmark/plaintext", "db_url": "/te-benchmark/db", @@ -23,32 +22,8 @@ "display_name": "ffead-cpp-mongo", "notes": "", "versus": "" - }, - "mysql": { - "setup_file": "setup-mysql", - "json_url": "/te-benchmark/json", - "plaintext_url": "/te-benchmark/plaintext", - "db_url": "/te-benchmark/db", - "query_url": "/te-benchmark/queries?queries=", - "fortune_url": "/te-benchmark/fortunes", - "update_url": "/te-benchmark/updates?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "mysql", - "framework": "ffead-cpp", - "language": "C++", - "orm": "Full", - "platform": "ffead-cpp", - "webserver": "ffead-cpp", - "os": "Linux", - "database_os": "Linux", - "display_name": "ffead-cpp-mysql", - "notes": "", - "versus": "" }, "postgresql": { - "setup_file": "setup-postgresql", "json_url": "/te-benchmark/json", "plaintext_url": "/te-benchmark/plaintext", "db_url": "/te-benchmark/db", @@ -92,29 +67,6 @@ "display_name": "ffead-cpp-apache-mongo", "notes": "", "versus": "" - }, - "apache-mysql": { - "setup_file": "setup-apache-mysql", - "json_url": "/te-benchmark/json", - "plaintext_url": "/te-benchmark/plaintext", - "db_url": "/te-benchmark/db", - "query_url": "/te-benchmark/queries?queries=", - "fortune_url": "/te-benchmark/fortunes", - "update_url": "/te-benchmark/updates?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "mysql", - "framework": "ffead-cpp", - "language": "C++", - "orm": "Full", - "platform": "ffead-cpp", - "webserver": "apache", - "os": "Linux", - "database_os": "Linux", - "display_name": "ffead-cpp-apache-mysql", - "notes": "", - "versus": "" }, "apache-postgresql": { "setup_file": "setup-apache-postgresql", @@ -138,75 +90,6 @@ "display_name": "ffead-cpp-apache-postgresql", "notes": "", "versus": "" - }, - "nginx-mongo": { - "setup_file": "setup-nginx-mongo", - "json_url": "/te-benchmark/json", - "plaintext_url": "/te-benchmark/plaintext", - "db_url": "/te-benchmark/db", - "query_url": "/te-benchmark/queries?queries=", - "fortune_url": "/te-benchmark/fortunes", - "update_url": "/te-benchmark/updates?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "mongodb", - "framework": "ffead-cpp", - "language": "C++", - "orm": "Full", - "platform": "ffead-cpp", - "webserver": "nginx", - "os": "Linux", - "database_os": "Linux", - "display_name": "ffead-cpp-nginx-mongo", - "notes": "", - "versus": "" - }, - "nginx-mysql": { - "setup_file": "setup-nginx-mysql", - "json_url": "/te-benchmark/json", - "plaintext_url": "/te-benchmark/plaintext", - "db_url": "/te-benchmark/db", - "query_url": "/te-benchmark/queries?queries=", - "fortune_url": "/te-benchmark/fortunes", - "update_url": "/te-benchmark/updates?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "mysql", - "framework": "ffead-cpp", - "language": "C++", - "orm": "Full", - "platform": "ffead-cpp", - "webserver": "nginx", - "os": "Linux", - "database_os": "Linux", - "display_name": "ffead-cpp-nginx-mysql", - "notes": "", - "versus": "" - }, - "nginx-postgresql": { - "setup_file": "setup-nginx-postgresql", - "json_url": "/te-benchmark/json", - "plaintext_url": "/te-benchmark/plaintext", - "db_url": "/te-benchmark/db", - "query_url": "/te-benchmark/queries?queries=", - "fortune_url": "/te-benchmark/fortunes", - "update_url": "/te-benchmark/updates?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "postgres", - "framework": "ffead-cpp", - "language": "C++", - "orm": "Full", - "platform": "ffead-cpp", - "webserver": "nginx", - "os": "Linux", - "database_os": "Linux", - "display_name": "ffead-cpp-nginx-postgresql", - "notes": "", - "versus": "" } }] } \ No newline at end of file diff --git a/frameworks/C++/ffead-cpp/ffead-cpp-apache-mongo.dockerfile b/frameworks/C++/ffead-cpp/ffead-cpp-apache-mongo.dockerfile new file mode 100644 index 00000000000..1a0de9bcf00 --- /dev/null +++ b/frameworks/C++/ffead-cpp/ffead-cpp-apache-mongo.dockerfile @@ -0,0 +1,22 @@ +FROM techempower/ffead-cpp-httpd:0.1 + +WORKDIR ${IROOT}/ffead-cpp-src/ + +RUN cp -f web/te-benchmark/sql-src/TeBkWorldmongo.h web/te-benchmark/include/TeBkWorld.h +RUN cp -f web/te-benchmark/sql-src/TeBkWorldmongo.cpp web/te-benchmark/src/TeBkWorld.cpp +RUN cp -f web/te-benchmark/config/sdormmongo.xml web/te-benchmark/config/sdorm.xml +RUN rm -rf ffead-cpp-2.0-bin +RUN make build-apps +RUN rm -rf ${IROOT}/ffead-cpp-2.0 +RUN cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 + +WORKDIR ${IROOT}/ffead-cpp-2.0 + +RUN rm -rf web/default web/oauthApp web/flexApp web/markers +RUN chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh + +RUN chmod 755 $FFEAD_CPP_PATH/*.sh +RUN rm -f $FFEAD_CPP_PATH/*.cntrl +RUN rm -f $FFEAD_CPP_PATH/tmp/*.sess + +CMD apachectl -D FOREGROUND diff --git a/frameworks/C++/ffead-cpp/ffead-cpp-apache-mysql.dockerfile b/frameworks/C++/ffead-cpp/ffead-cpp-apache-mysql.dockerfile new file mode 100644 index 00000000000..d4631b9050e --- /dev/null +++ b/frameworks/C++/ffead-cpp/ffead-cpp-apache-mysql.dockerfile @@ -0,0 +1,22 @@ +FROM techempower/ffead-cpp-httpd:0.1 + +WORKDIR ${IROOT}/ffead-cpp-src/ + +RUN cp -f web/te-benchmark/sql-src/TeBkWorldsql.h web/te-benchmark/include/TeBkWorld.h +RUN cp -f web/te-benchmark/sql-src/TeBkWorldsql.cpp web/te-benchmark/src/TeBkWorld.cpp +RUN cp -f web/te-benchmark/config/sdormmysql.xml web/te-benchmark/config/sdorm.xml +RUN rm -rf ffead-cpp-2.0-bin +RUN make build-apps +RUN rm -rf ${IROOT}/ffead-cpp-2.0 +RUN cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 + +WORKDIR ${IROOT}/ffead-cpp-2.0 + +RUN rm -rf web/default web/oauthApp web/flexApp web/markers +RUN chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh + +RUN chmod 755 $FFEAD_CPP_PATH/*.sh +RUN rm -f $FFEAD_CPP_PATH/*.cntrl +RUN rm -f $FFEAD_CPP_PATH/tmp/*.sess + +CMD apachectl -D FOREGROUND diff --git a/frameworks/C++/ffead-cpp/ffead-cpp-apache-postgresql.dockerfile b/frameworks/C++/ffead-cpp/ffead-cpp-apache-postgresql.dockerfile new file mode 100644 index 00000000000..f87f72f0d89 --- /dev/null +++ b/frameworks/C++/ffead-cpp/ffead-cpp-apache-postgresql.dockerfile @@ -0,0 +1,22 @@ +FROM techempower/ffead-cpp-httpd:0.1 + +WORKDIR ${IROOT}/ffead-cpp-src/ + +RUN cp -f web/te-benchmark/sql-src/TeBkWorldsql.h web/te-benchmark/include/TeBkWorld.h +RUN cp -f web/te-benchmark/sql-src/TeBkWorldsql.cpp web/te-benchmark/src/TeBkWorld.cpp +RUN cp -f web/te-benchmark/config/sdormpostgresql.xml web/te-benchmark/config/sdorm.xml +RUN rm -rf ffead-cpp-2.0-bin +RUN make build-apps +RUN rm -rf ${IROOT}/ffead-cpp-2.0 +RUN cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 + +WORKDIR ${IROOT}/ffead-cpp-2.0 + +RUN rm -rf web/default web/oauthApp web/flexApp web/markers +RUN chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh + +RUN chmod 755 $FFEAD_CPP_PATH/*.sh +RUN rm -f $FFEAD_CPP_PATH/*.cntrl +RUN rm -f $FFEAD_CPP_PATH/tmp/*.sess + +CMD apachectl -D FOREGROUND diff --git a/frameworks/C++/ffead-cpp/ffead-cpp-base.dockerfile b/frameworks/C++/ffead-cpp/ffead-cpp-base.dockerfile new file mode 100644 index 00000000000..807bb6643aa --- /dev/null +++ b/frameworks/C++/ffead-cpp/ffead-cpp-base.dockerfile @@ -0,0 +1,37 @@ +FROM techempower/base:0.1 + +ENV IROOT=/installs +ENV FFEAD_CPP_PATH=${IROOT}/ffead-cpp-2.0 +ENV PATH=${FFEAD_CPP_PATH}:${PATH} + +RUN mkdir /installs + +RUN apt install -yqq autoconf uuid-dev odbc-postgresql unixodbc unixodbc-dev + +WORKDIR $IROOT + +# libmyodbc has been removed from apt + +RUN wget -q http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit.tar.gz +RUN tar xf mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit.tar.gz +RUN mkdir -p /usr/lib/x86_64-linux-gnu/odbc +RUN mv mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/lib/libmyodbc5* /usr/lib/x86_64-linux-gnu/odbc/ +RUN mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/bin/myodbc-installer -d -a -n "MySQL" -t "DRIVER=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc5w.so;" + +# mongocdriver also used in all tests + +RUN wget -q https://github.com/mongodb/mongo-c-driver/releases/download/1.4.0/mongo-c-driver-1.4.0.tar.gz +RUN tar xf mongo-c-driver-1.4.0.tar.gz +RUN cd mongo-c-driver-1.4.0/ && \ + ./configure --prefix=${IROOT} --libdir=${IROOT} --disable-automatic-init-and-cleanup && \ + make && make install + +WORKDIR / + +COPY te-benchmark/ te-benchmark/ +COPY ffead-cpp-framework.sh ./ +COPY server.sh ./ + +RUN chmod 755 *.sh + +RUN ./ffead-cpp-framework.sh diff --git a/frameworks/C++/ffead-cpp/ffead-cpp-emb-base.dockerfile b/frameworks/C++/ffead-cpp/ffead-cpp-emb-base.dockerfile new file mode 100644 index 00000000000..fb1ba7b575c --- /dev/null +++ b/frameworks/C++/ffead-cpp/ffead-cpp-emb-base.dockerfile @@ -0,0 +1,20 @@ +FROM techempower/ffead-cpp-base:0.1 + +WORKDIR ${IROOT}/ffead-cpp-src/ + +RUN cp -f web/te-benchmark/sql-src/TeBkWorldmongo.h web/te-benchmark/include/TeBkWorld.h +RUN cp -f web/te-benchmark/sql-src/TeBkWorldmongo.cpp web/te-benchmark/src/TeBkWorld.cpp +RUN cp -f web/te-benchmark/config/sdormmongo.xml web/te-benchmark/config/sdorm.xml +RUN rm -rf ffead-cpp-2.0-bin +RUN make build-apps +RUN rm -rf ${IROOT}/ffead-cpp-2.0 +RUN cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 + +WORKDIR ${IROOT}/ffead-cpp-2.0 + +RUN rm -rf web/default web/oauthApp web/flexApp web/markers +RUN chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh + +RUN chmod 755 $FFEAD_CPP_PATH/*.sh +RUN rm -f $FFEAD_CPP_PATH/*.cntrl +RUN rm -f $FFEAD_CPP_PATH/tmp/*.sess diff --git a/toolset/setup/linux/frameworks/ffead-cpp-framework.sh b/frameworks/C++/ffead-cpp/ffead-cpp-framework.sh similarity index 86% rename from toolset/setup/linux/frameworks/ffead-cpp-framework.sh rename to frameworks/C++/ffead-cpp/ffead-cpp-framework.sh index 14b78c60ab2..f2ec65c7751 100644 --- a/toolset/setup/linux/frameworks/ffead-cpp-framework.sh +++ b/frameworks/C++/ffead-cpp/ffead-cpp-framework.sh @@ -1,21 +1,19 @@ #!/bin/bash -fw_installed ffead-cpp-framework && return 0 - #From https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/C%2B%2B/ulib/setup_json.sh if [ "$TRAVIS" != "true" ]; then -MAX_THREADS=$(( 3 * $CPU_COUNT / 2 )) +MAX_THREADS=$(( 3 * nproc / 2 )) else -MAX_THREADS=$(( 2 * $CPU_COUNT )) +MAX_THREADS=$(( 2 * nproc )) fi WRIT_THREADS=$(( $MAX_THREADS / 3 )) SERV_THREADS=$(( $MAX_THREADS - $WRIT_THREADS )) -fw_get -o ffead-cpp-src.zip https://github.com/sumeetchhetri/ffead-cpp/archive/master.zip -rm -rf ffead-cpp-src -rm -rf ffead-cpp-master -unzip ffead-cpp-src.zip +cd $IROOT + +wget -q https://github.com/sumeetchhetri/ffead-cpp/archive/master.zip +unzip master.zip mv ffead-cpp-master ffead-cpp-src cd ffead-cpp-src/ @@ -59,7 +57,3 @@ sed -i 's|localhost|'${DBHOST}'|g' resources/sample-odbc.ini cp resources/sample-odbcinst.ini ${IROOT}/odbcinst.ini cp resources/sample-odbc.ini ${IROOT}/odbc.ini - -cd ${IROOT} - -echo -e "export FFEAD_CPP_PATH=${IROOT}/ffead-cpp-2.0" > $IROOT/ffead-cpp-framework.installed diff --git a/frameworks/C++/ffead-cpp/ffead-cpp-httpd.dockerfile b/frameworks/C++/ffead-cpp/ffead-cpp-httpd.dockerfile new file mode 100644 index 00000000000..6c1cde163c8 --- /dev/null +++ b/frameworks/C++/ffead-cpp/ffead-cpp-httpd.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/ffead-cpp-base:0.1 + +COPY ffead-cpp-httpd.sh ./ + +RUN chmod 755 *.sh + +RUN ./ffead-cpp-httpd.sh + +ENV PATH=${IROOT}/httpd/bin:${PATH} diff --git a/toolset/setup/linux/frameworks/ffead-cpp-httpd.sh b/frameworks/C++/ffead-cpp/ffead-cpp-httpd.sh similarity index 85% rename from toolset/setup/linux/frameworks/ffead-cpp-httpd.sh rename to frameworks/C++/ffead-cpp/ffead-cpp-httpd.sh index 39905def771..8d455a414db 100644 --- a/toolset/setup/linux/frameworks/ffead-cpp-httpd.sh +++ b/frameworks/C++/ffead-cpp/ffead-cpp-httpd.sh @@ -1,20 +1,16 @@ #!/bin/bash -fw_installed ffead-cpp-httpd && return 0 +cd $IROOT -fw_depends ffead-cpp-framework - -sudo apt-get remove -y apache2 - -fw_get -o httpd-2.4.25.tar.gz https://archive.apache.org/dist/httpd/httpd-2.4.25.tar.gz -fw_get -o apr-1.5.2.tar.gz https://archive.apache.org/dist/apr/apr-1.5.2.tar.gz -fw_get -o apr-util-1.5.4.tar.gz https://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz +wget -q https://archive.apache.org/dist/httpd/httpd-2.4.25.tar.gz +wget -q https://archive.apache.org/dist/apr/apr-1.5.2.tar.gz +wget -q https://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz rm -rf ${IROOT}/httpd-2.4.25 rm -rf ${IROOT}/apr-1.5.2 rm -rf ${IROOT}/apr-util-1.5.4 -fw_untar httpd-2.4.25.tar.gz -fw_untar apr-1.5.2.tar.gz -fw_untar apr-util-1.5.4.tar.gz +tar xf httpd-2.4.25.tar.gz +tar xf apr-1.5.2.tar.gz +tar xf apr-util-1.5.4.tar.gz mv -f apr-1.5.2 httpd-2.4.25/srclib/apr mv -f apr-util-1.5.4 httpd-2.4.25/srclib/apr-util cd ${IROOT}/httpd-2.4.25 @@ -84,5 +80,3 @@ FFEAD_CPP_PATH '"${FFEADROOT}"' EOL' - -touch ${IROOT}/ffead-cpp-httpd.installed \ No newline at end of file diff --git a/frameworks/C++/ffead-cpp/ffead-cpp-mysql.dockerfile b/frameworks/C++/ffead-cpp/ffead-cpp-mysql.dockerfile new file mode 100644 index 00000000000..2128ced65a9 --- /dev/null +++ b/frameworks/C++/ffead-cpp/ffead-cpp-mysql.dockerfile @@ -0,0 +1,22 @@ +FROM techempower/ffead-cpp-base:0.1 + +WORKDIR ${IROOT}/ffead-cpp-src/ + +RUN cp -f web/te-benchmark/sql-src/TeBkWorldsql.h web/te-benchmark/include/TeBkWorld.h +RUN cp -f web/te-benchmark/sql-src/TeBkWorldsql.cpp web/te-benchmark/src/TeBkWorld.cpp +RUN cp -f web/te-benchmark/config/sdormmysql.xml web/te-benchmark/config/sdorm.xml +RUN rm -rf ffead-cpp-2.0-bin +RUN make build-apps +RUN rm -rf ${IROOT}/ffead-cpp-2.0 +RUN cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 + +WORKDIR ${IROOT}/ffead-cpp-2.0 + +RUN rm -rf web/default web/oauthApp web/flexApp web/markers +RUN chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh + +RUN chmod 755 $FFEAD_CPP_PATH/*.sh +RUN rm -f $FFEAD_CPP_PATH/*.cntrl +RUN rm -f $FFEAD_CPP_PATH/tmp/*.sess + +CMD ./server.sh diff --git a/frameworks/C++/ffead-cpp/ffead-cpp-nginx-mongo.dockerfile b/frameworks/C++/ffead-cpp/ffead-cpp-nginx-mongo.dockerfile new file mode 100644 index 00000000000..9bec32660a1 --- /dev/null +++ b/frameworks/C++/ffead-cpp/ffead-cpp-nginx-mongo.dockerfile @@ -0,0 +1,22 @@ +FROM techempower/ffead-cpp-nginx:0.1 + +WORKDIR ${IROOT}/ffead-cpp-src/ + +RUN cp -f web/te-benchmark/sql-src/TeBkWorldmongo.h web/te-benchmark/include/TeBkWorld.h +RUN cp -f web/te-benchmark/sql-src/TeBkWorldmongo.cpp web/te-benchmark/src/TeBkWorld.cpp +RUN cp -f web/te-benchmark/config/sdormmongo.xml web/te-benchmark/config/sdorm.xml +RUN rm -rf ffead-cpp-2.0-bin +RUN make build-apps +RUN rm -rf ${IROOT}/ffead-cpp-2.0 +RUN cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 + +WORKDIR ${IROOT}/ffead-cpp-2.0 + +RUN rm -rf web/default web/oauthApp web/flexApp web/markers +RUN chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh + +RUN chmod 755 $FFEAD_CPP_PATH/*.sh +RUN rm -f $FFEAD_CPP_PATH/*.cntrl +RUN rm -f $FFEAD_CPP_PATH/tmp/*.sess + +CMD nginx -g 'daemon off;' diff --git a/frameworks/C++/ffead-cpp/ffead-cpp-nginx-mysql.dockerfile b/frameworks/C++/ffead-cpp/ffead-cpp-nginx-mysql.dockerfile new file mode 100644 index 00000000000..10c1c09104d --- /dev/null +++ b/frameworks/C++/ffead-cpp/ffead-cpp-nginx-mysql.dockerfile @@ -0,0 +1,22 @@ +FROM techempower/ffead-cpp-nginx:0.1 + +WORKDIR ${IROOT}/ffead-cpp-src/ + +RUN cp -f web/te-benchmark/sql-src/TeBkWorldsql.h web/te-benchmark/include/TeBkWorld.h +RUN cp -f web/te-benchmark/sql-src/TeBkWorldsql.cpp web/te-benchmark/src/TeBkWorld.cpp +RUN cp -f web/te-benchmark/config/sdormmysql.xml web/te-benchmark/config/sdorm.xml +RUN rm -rf ffead-cpp-2.0-bin +RUN make build-apps +RUN rm -rf ${IROOT}/ffead-cpp-2.0 +RUN cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 + +WORKDIR ${IROOT}/ffead-cpp-2.0 + +RUN rm -rf web/default web/oauthApp web/flexApp web/markers +RUN chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh + +RUN chmod 755 $FFEAD_CPP_PATH/*.sh +RUN rm -f $FFEAD_CPP_PATH/*.cntrl +RUN rm -f $FFEAD_CPP_PATH/tmp/*.sess + +CMD nginx -g 'daemon off;' diff --git a/frameworks/C++/ffead-cpp/ffead-cpp-nginx-postgresql.dockerfile b/frameworks/C++/ffead-cpp/ffead-cpp-nginx-postgresql.dockerfile new file mode 100644 index 00000000000..430ec5ae82e --- /dev/null +++ b/frameworks/C++/ffead-cpp/ffead-cpp-nginx-postgresql.dockerfile @@ -0,0 +1,22 @@ +FROM techempower/ffead-cpp-nginx:0.1 + +WORKDIR ${IROOT}/ffead-cpp-src/ + +RUN cp -f web/te-benchmark/sql-src/TeBkWorldsql.h web/te-benchmark/include/TeBkWorld.h +RUN cp -f web/te-benchmark/sql-src/TeBkWorldsql.cpp web/te-benchmark/src/TeBkWorld.cpp +RUN cp -f web/te-benchmark/config/sdormpostgresql.xml web/te-benchmark/config/sdorm.xml +RUN rm -rf ffead-cpp-2.0-bin +RUN make build-apps +RUN rm -rf ${IROOT}/ffead-cpp-2.0 +RUN cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 + +WORKDIR ${IROOT}/ffead-cpp-2.0 + +RUN rm -rf web/default web/oauthApp web/flexApp web/markers +RUN chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh + +RUN chmod 755 $FFEAD_CPP_PATH/*.sh +RUN rm -f $FFEAD_CPP_PATH/*.cntrl +RUN rm -f $FFEAD_CPP_PATH/tmp/*.sess + +CMD nginx -g 'daemon off;' diff --git a/frameworks/C++/ffead-cpp/ffead-cpp-nginx.dockerfile b/frameworks/C++/ffead-cpp/ffead-cpp-nginx.dockerfile new file mode 100644 index 00000000000..f62f26f6165 --- /dev/null +++ b/frameworks/C++/ffead-cpp/ffead-cpp-nginx.dockerfile @@ -0,0 +1,21 @@ +FROM techempower/ffead-cpp-base:0.1 + +WORKDIR $IROOT + +RUN wget -q http://nginx.org/download/nginx-1.13.1.tar.gz +RUN tar xf nginx-1.13.1.tar.gz + +WORKDIR $IROOT/nginx-1.13.1 + +RUN ./configure \ + --prefix=${IROOT}/nginxfc \ + --with-ld-opt="-lstdc++ -L${IROOT}/ffead-cpp-2.0/lib -L${IROOT}" \ + --add-module="${IROOT}/ffead-cpp-src/modules/nginx_mod_ffeadcpp" \ + --with-cc-opt="-I${IROOT}/ffead-cpp-2.0/include -I${IROOT}/include/libmongoc-1.0 -I${IROOT}/include/libbson-1.0 -w -fpermissive" +RUN make +RUN make install + +RUN cp ${IROOT}/ffead-cpp-src/modules/nginx_mod_ffeadcpp/nginx.conf ${IROOT}/nginxfc/conf/ +RUN sed -i 's|FFEAD_PATH|'${IROOT}/ffead-cpp-2.0'|g' ${IROOT}/nginxfc/conf/nginx.conf + +ENV PATH=${IROOT}/nginxfc/sbin:${PATH} diff --git a/frameworks/C++/ffead-cpp/ffead-cpp-postgresql.dockerfile b/frameworks/C++/ffead-cpp/ffead-cpp-postgresql.dockerfile new file mode 100644 index 00000000000..6acc8c4c6ab --- /dev/null +++ b/frameworks/C++/ffead-cpp/ffead-cpp-postgresql.dockerfile @@ -0,0 +1,22 @@ +FROM techempower/ffead-cpp-base:0.1 + +WORKDIR ${IROOT}/ffead-cpp-src/ + +RUN cp -f web/te-benchmark/sql-src/TeBkWorldsql.h web/te-benchmark/include/TeBkWorld.h +RUN cp -f web/te-benchmark/sql-src/TeBkWorldsql.cpp web/te-benchmark/src/TeBkWorld.cpp +RUN cp -f web/te-benchmark/config/sdormpostgresql.xml web/te-benchmark/config/sdorm.xml +RUN rm -rf ffead-cpp-2.0-bin +RUN make build-apps +RUN rm -rf ${IROOT}/ffead-cpp-2.0 +RUN cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 + +WORKDIR ${IROOT}/ffead-cpp-2.0 + +RUN rm -rf web/default web/oauthApp web/flexApp web/markers +RUN chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh + +RUN chmod 755 $FFEAD_CPP_PATH/*.sh +RUN rm -f $FFEAD_CPP_PATH/*.cntrl +RUN rm -f $FFEAD_CPP_PATH/tmp/*.sess + +CMD ./server.sh diff --git a/frameworks/C++/ffead-cpp/ffead-cpp.dockerfile b/frameworks/C++/ffead-cpp/ffead-cpp.dockerfile new file mode 100644 index 00000000000..6edaf43cc71 --- /dev/null +++ b/frameworks/C++/ffead-cpp/ffead-cpp.dockerfile @@ -0,0 +1,22 @@ +FROM techempower/ffead-cpp-base:0.1 + +WORKDIR ${IROOT}/ffead-cpp-src/ + +RUN cp -f web/te-benchmark/sql-src/TeBkWorldmongo.h web/te-benchmark/include/TeBkWorld.h +RUN cp -f web/te-benchmark/sql-src/TeBkWorldmongo.cpp web/te-benchmark/src/TeBkWorld.cpp +RUN cp -f web/te-benchmark/config/sdormmongo.xml web/te-benchmark/config/sdorm.xml +RUN rm -rf ffead-cpp-2.0-bin +RUN make build-apps +RUN rm -rf ${IROOT}/ffead-cpp-2.0 +RUN cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 + +WORKDIR ${IROOT}/ffead-cpp-2.0 + +RUN rm -rf web/default web/oauthApp web/flexApp web/markers +RUN chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh + +RUN chmod 755 $FFEAD_CPP_PATH/*.sh +RUN rm -f $FFEAD_CPP_PATH/*.cntrl +RUN rm -f $FFEAD_CPP_PATH/tmp/*.sess + +CMD ./server.sh diff --git a/frameworks/C++/ffead-cpp/removed.txt b/frameworks/C++/ffead-cpp/removed.txt new file mode 100644 index 00000000000..6df53447223 --- /dev/null +++ b/frameworks/C++/ffead-cpp/removed.txt @@ -0,0 +1,112 @@ +Could mot get the following + "mysql": { + "json_url": "/te-benchmark/json", + "plaintext_url": "/te-benchmark/plaintext", + "db_url": "/te-benchmark/db", + "query_url": "/te-benchmark/queries?queries=", + "fortune_url": "/te-benchmark/fortunes", + "update_url": "/te-benchmark/updates?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Fullstack", + "database": "mysql", + "framework": "ffead-cpp", + "language": "C++", + "orm": "Full", + "platform": "ffead-cpp", + "webserver": "ffead-cpp", + "os": "Linux", + "database_os": "Linux", + "display_name": "ffead-cpp-mysql", + "notes": "", + "versus": "" + }, + "apache-mysql": { + "setup_file": "setup-apache-mysql", + "json_url": "/te-benchmark/json", + "plaintext_url": "/te-benchmark/plaintext", + "db_url": "/te-benchmark/db", + "query_url": "/te-benchmark/queries?queries=", + "fortune_url": "/te-benchmark/fortunes", + "update_url": "/te-benchmark/updates?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Fullstack", + "database": "mysql", + "framework": "ffead-cpp", + "language": "C++", + "orm": "Full", + "platform": "ffead-cpp", + "webserver": "apache", + "os": "Linux", + "database_os": "Linux", + "display_name": "ffead-cpp-apache-mysql", + "notes": "", + "versus": "" + }, + "nginx-mongo": { + "json_url": "/te-benchmark/json", + "plaintext_url": "/te-benchmark/plaintext", + "db_url": "/te-benchmark/db", + "query_url": "/te-benchmark/queries?queries=", + "fortune_url": "/te-benchmark/fortunes", + "update_url": "/te-benchmark/updates?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Fullstack", + "database": "mongodb", + "framework": "ffead-cpp", + "language": "C++", + "orm": "Full", + "platform": "ffead-cpp", + "webserver": "nginx", + "os": "Linux", + "database_os": "Linux", + "display_name": "ffead-cpp-nginx-mongo", + "notes": "", + "versus": "" + }, + "nginx-mysql": { + "json_url": "/te-benchmark/json", + "plaintext_url": "/te-benchmark/plaintext", + "db_url": "/te-benchmark/db", + "query_url": "/te-benchmark/queries?queries=", + "fortune_url": "/te-benchmark/fortunes", + "update_url": "/te-benchmark/updates?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Fullstack", + "database": "mysql", + "framework": "ffead-cpp", + "language": "C++", + "orm": "Full", + "platform": "ffead-cpp", + "webserver": "nginx", + "os": "Linux", + "database_os": "Linux", + "display_name": "ffead-cpp-nginx-mysql", + "notes": "", + "versus": "" + }, + "nginx-postgresql": { + "json_url": "/te-benchmark/json", + "plaintext_url": "/te-benchmark/plaintext", + "db_url": "/te-benchmark/db", + "query_url": "/te-benchmark/queries?queries=", + "fortune_url": "/te-benchmark/fortunes", + "update_url": "/te-benchmark/updates?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Fullstack", + "database": "postgres", + "framework": "ffead-cpp", + "language": "C++", + "orm": "Full", + "platform": "ffead-cpp", + "webserver": "nginx", + "os": "Linux", + "database_os": "Linux", + "display_name": "ffead-cpp-nginx-postgresql", + "notes": "", + "versus": "" + } \ No newline at end of file diff --git a/frameworks/C++/ffead-cpp/server.sh b/frameworks/C++/ffead-cpp/server.sh index aacc9745a2e..5a2751feeba 100644 --- a/frameworks/C++/ffead-cpp/server.sh +++ b/frameworks/C++/ffead-cpp/server.sh @@ -1,12 +1,8 @@ #!/bin/sh +cd $FFEAD_CPP_PATH + export MALLOC_CHECK_=0 -IS_OS_DARWIN=`uname|tr '[A-Z]' '[a-z]'|awk 'index($0,"darwin") != 0 {print "darwin"}'` -if [ "$IS_OS_DARWIN" != "" ]; then - export FFEAD_CPP_PATH=`cd "$(dirname server.sh)" && ABSPATH=$(pwd) && cd -` -else - export FFEAD_CPP_PATH=`echo $(dirname $(readlink -f $0))` -fi echo $FFEAD_CPP_PATH export LD_LIBRARY_PATH=$FFEAD_CPP_PATH/lib:$LD_LIBRARY_PATH @@ -29,4 +25,7 @@ chmod 700 $FFEAD_CPP_PATH/tests/* chmod 700 $FFEAD_CPP_PATH/rtdcf/* #chmod 700 $FFEAD_CPP_PATH/rtdcf/autotools/* #/usr/sbin/setenforce 0 -./CHS $FFEAD_CPP_PATH > ffead.log 2>&1 \ No newline at end of file + +./CHS $FFEAD_CPP_PATH + +wait diff --git a/frameworks/C++/ffead-cpp/setup-apache-mongo.sh b/frameworks/C++/ffead-cpp/setup-apache-mongo.sh deleted file mode 100644 index 28ddecdaa33..00000000000 --- a/frameworks/C++/ffead-cpp/setup-apache-mongo.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends ffead-cpp-apache-mongo - -rm -f $FFEAD_CPP_PATH/*.cntrl -rm -f $FFEAD_CPP_PATH/tmp/*.sess -apachectl restart > ffead.log 2>&1 diff --git a/frameworks/C++/ffead-cpp/setup-apache-mysql.sh b/frameworks/C++/ffead-cpp/setup-apache-mysql.sh deleted file mode 100644 index 7bfd62eebd7..00000000000 --- a/frameworks/C++/ffead-cpp/setup-apache-mysql.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends ffead-cpp-apache-mysql - -rm -f $FFEAD_CPP_PATH/*.cntrl -rm -f $FFEAD_CPP_PATH/tmp/*.sess -apachectl restart > ffead.log 2>&1 diff --git a/frameworks/C++/ffead-cpp/setup-apache-postgresql.sh b/frameworks/C++/ffead-cpp/setup-apache-postgresql.sh deleted file mode 100644 index fd303222b37..00000000000 --- a/frameworks/C++/ffead-cpp/setup-apache-postgresql.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends ffead-cpp-apache-postgresql - -rm -f $FFEAD_CPP_PATH/*.cntrl -rm -f $FFEAD_CPP_PATH/tmp/*.sess -apachectl restart > ffead.log 2>&1 diff --git a/frameworks/C++/ffead-cpp/setup-mongo.sh b/frameworks/C++/ffead-cpp/setup-mongo.sh deleted file mode 100644 index b431b0a918b..00000000000 --- a/frameworks/C++/ffead-cpp/setup-mongo.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends ffead-cpp-emb-mongo - -chmod 755 $FFEAD_CPP_PATH/*.sh -rm -f $FFEAD_CPP_PATH/*.cntrl -rm -f $FFEAD_CPP_PATH/tmp/*.sess -cd $FFEAD_CPP_PATH -./server.sh diff --git a/frameworks/C++/ffead-cpp/setup-mysql.sh b/frameworks/C++/ffead-cpp/setup-mysql.sh deleted file mode 100644 index 2da8aa4647d..00000000000 --- a/frameworks/C++/ffead-cpp/setup-mysql.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends ffead-cpp-emb-mysql - -chmod 755 $FFEAD_CPP_PATH/*.sh -rm -f $FFEAD_CPP_PATH/*.cntrl -rm -f $FFEAD_CPP_PATH/tmp/*.sess -cd $FFEAD_CPP_PATH -./server.sh diff --git a/frameworks/C++/ffead-cpp/setup-nginx-mongo.sh b/frameworks/C++/ffead-cpp/setup-nginx-mongo.sh deleted file mode 100644 index 2384305d714..00000000000 --- a/frameworks/C++/ffead-cpp/setup-nginx-mongo.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -fw_depends ffead-cpp-nginx-mongo - -#export FFEAD_CPP_PATH=$IROOT/ffead-cpp-2.0 -export LD_LIBRARY_PATH=$IROOT:$FFEAD_CPP_PATH/lib:$LD_LIBRARY_PATH -export ODBCINI=${IROOT}/odbc.ini -export ODBCSYSINI=${IROOT} -echo $FFEAD_CPP_PATH -echo $LD_LIBRARY_PATH -rm -f $FFEAD_CPP_PATH/*.cntrl -rm -f $FFEAD_CPP_PATH/tmp/*.sess -nginx > ffead.log 2>&1 diff --git a/frameworks/C++/ffead-cpp/setup-nginx-mysql.sh b/frameworks/C++/ffead-cpp/setup-nginx-mysql.sh deleted file mode 100644 index e00c42022e6..00000000000 --- a/frameworks/C++/ffead-cpp/setup-nginx-mysql.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -fw_depends ffead-cpp-nginx-mysql - -#export FFEAD_CPP_PATH=$IROOT/ffead-cpp-2.0 -export LD_LIBRARY_PATH=$IROOT:$FFEAD_CPP_PATH/lib:$LD_LIBRARY_PATH -export ODBCINI=${IROOT}/odbc.ini -export ODBCSYSINI=${IROOT} -echo $FFEAD_CPP_PATH -echo $LD_LIBRARY_PATH -rm -f $FFEAD_CPP_PATH/*.cntrl -rm -f $FFEAD_CPP_PATH/tmp/*.sess -nginx > ffead.log 2>&1 - diff --git a/frameworks/C++/ffead-cpp/setup-nginx-postgresql.sh b/frameworks/C++/ffead-cpp/setup-nginx-postgresql.sh deleted file mode 100644 index f0746551b14..00000000000 --- a/frameworks/C++/ffead-cpp/setup-nginx-postgresql.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -fw_depends ffead-cpp-nginx-postgresql - -#export FFEAD_CPP_PATH=$IROOT/ffead-cpp-2.0 -export LD_LIBRARY_PATH=$IROOT:$FFEAD_CPP_PATH/lib:$LD_LIBRARY_PATH -export ODBCINI=${IROOT}/odbc.ini -export ODBCSYSINI=${IROOT} -echo $FFEAD_CPP_PATH -echo $LD_LIBRARY_PATH -rm -f $FFEAD_CPP_PATH/*.cntrl -rm -f $FFEAD_CPP_PATH/tmp/*.sess -nginx > ffead.log 2>&1 diff --git a/frameworks/C++/ffead-cpp/setup-postgresql.sh b/frameworks/C++/ffead-cpp/setup-postgresql.sh deleted file mode 100644 index 7febe9495e2..00000000000 --- a/frameworks/C++/ffead-cpp/setup-postgresql.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends ffead-cpp-emb-postgresql - -chmod 755 $FFEAD_CPP_PATH/*.sh -rm -f $FFEAD_CPP_PATH/*.cntrl -rm -f $FFEAD_CPP_PATH/tmp/*.sess -cd $FFEAD_CPP_PATH -./server.sh diff --git a/frameworks/C++/luna/benchmark_config.json b/frameworks/C++/luna/benchmark_config.json index 50894961954..e00e38b61cf 100644 --- a/frameworks/C++/luna/benchmark_config.json +++ b/frameworks/C++/luna/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "luna", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -21,7 +20,6 @@ "versus": "" }, "epoll": { - "setup_file": "setup_epoll", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -39,8 +37,7 @@ "notes": "", "versus": "" }, - "thread-per-connection": { - "setup_file": "setup_thread", + "thread": { "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/C++/luna/luna-base.dockerfile b/frameworks/C++/luna/luna-base.dockerfile new file mode 100644 index 00000000000..f587632a378 --- /dev/null +++ b/frameworks/C++/luna/luna-base.dockerfile @@ -0,0 +1,15 @@ +FROM techempower/gcc-4.9:0.1 + +RUN apt install -yqq python-dev python-pip cmake autoconf + +# We're using conan 0.28.1 because, as of this writing, later versions of conan +# are incompatible with the luna framework, and luna is the only framework that +# uses conan. +RUN pip install conan==0.28.1 + +ADD ./ /luna +WORKDIR /luna + +RUN CC=gcc-4.9 CXX=g++-4.9 conan install --build=missing -s compiler="gcc" -s compiler.version="4.9" . +RUN cmake . -DCMAKE_CXX_COMPILER=g++-4.9 -DCMAKE_CC_COMPILER=gcc-4.9 +RUN cmake --build . diff --git a/frameworks/C++/luna/luna-epoll.dockerfile b/frameworks/C++/luna/luna-epoll.dockerfile new file mode 100644 index 00000000000..4f844b51e86 --- /dev/null +++ b/frameworks/C++/luna/luna-epoll.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/luna-base:0.1 + +CMD /luna/bin/lunabench_epoll 8080 $((2 * $(nproc))) diff --git a/frameworks/C++/luna/luna-thread.dockerfile b/frameworks/C++/luna/luna-thread.dockerfile new file mode 100644 index 00000000000..99355999e73 --- /dev/null +++ b/frameworks/C++/luna/luna-thread.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/luna-base:0.1 + +CMD /luna/bin/lunabench_thread 8080 diff --git a/frameworks/C++/luna/luna.dockerfile b/frameworks/C++/luna/luna.dockerfile new file mode 100644 index 00000000000..fa7be5464f7 --- /dev/null +++ b/frameworks/C++/luna/luna.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/luna-base:0.1 + +CMD /luna/bin/lunabench_default 8080 $((2 * $(nproc))) diff --git a/frameworks/C++/luna/setup.sh b/frameworks/C++/luna/setup.sh deleted file mode 100644 index f5be4788adc..00000000000 --- a/frameworks/C++/luna/setup.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends luna - -CC=gcc-4.9 CXX=g++-4.9 conan install --build=missing -s compiler="gcc" -s compiler.version="4.9" . -cmake . -DCMAKE_CXX_COMPILER=g++-4.9 -DCMAKE_CC_COMPILER=gcc-4.9 -cmake --build . - -MAX_THREADS=$((2 * $CPU_COUNT)) - -$TROOT/bin/lunabench_default 8080 $MAX_THREADS diff --git a/frameworks/C++/luna/setup_epoll.sh b/frameworks/C++/luna/setup_epoll.sh deleted file mode 100644 index 4874d4a200b..00000000000 --- a/frameworks/C++/luna/setup_epoll.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends luna - -CC=gcc-4.9 CXX=g++-4.9 conan install --build=missing -s compiler="gcc" -s compiler.version="4.9" . -cmake . -DCMAKE_CXX_COMPILER=g++-4.9 -DCMAKE_CC_COMPILER=gcc-4.9 -cmake --build . - -MAX_THREADS=$((2 * $CPU_COUNT)) - -$TROOT/bin/lunabench_epoll 8080 $MAX_THREADS diff --git a/frameworks/C++/luna/setup_thread.sh b/frameworks/C++/luna/setup_thread.sh deleted file mode 100644 index 84acd1f5a26..00000000000 --- a/frameworks/C++/luna/setup_thread.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends luna - -CC=gcc-4.9 CXX=g++-4.9 conan install --build=missing -s compiler="gcc" -s compiler.version="4.9" . -cmake . -DCMAKE_CXX_COMPILER=g++-4.9 -DCMAKE_CC_COMPILER=gcc-4.9 -cmake --build . - -$TROOT/bin/lunabench_thread 8080 diff --git a/frameworks/C++/poco/benchmark_config.json b/frameworks/C++/poco/benchmark_config.json index 1de4a1b0062..b1baccba118 100644 --- a/frameworks/C++/poco/benchmark_config.json +++ b/frameworks/C++/poco/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "poco", "tests": [{ "default": { - "setup_file": "setup", "plaintext_url": "/plaintext", "port": 8080, "approach": "Realistic", diff --git a/frameworks/C++/poco/poco.dockerfile b/frameworks/C++/poco/poco.dockerfile new file mode 100644 index 00000000000..f2262b5be24 --- /dev/null +++ b/frameworks/C++/poco/poco.dockerfile @@ -0,0 +1,27 @@ +FROM techempower/gcc-4.8:0.1 + +ENV IROOT=/install +ENV VERSION=1.6.1 +ENV POCO_HOME=$IROOT/poco_$VERSION + +RUN mkdir install + +WORKDIR /install + +RUN wget -q http://pocoproject.org/releases/poco-$VERSION/poco-$VERSION-all.tar.gz +RUN tar xf poco-$VERSION-all.tar.gz + +RUN cp -R poco-$VERSION-all/ $POCO_HOME + +WORKDIR $POCO_HOME + +RUN ./configure --no-tests --no-samples +RUN make --quiet PageCompiler-libexec XML-libexec JSON-libexec + +ENV LD_LIBRARY_PATH=$POCO_HOME/lib/Linux/x86_64 + +COPY ./benchmark.cpp ./ + +RUN g++-4.8 -O3 -DNDEBUG -std=c++0x -o poco benchmark.cpp -I$POCO_HOME/Foundation/include -I$POCO_HOME/Util/include -I$POCO_HOME/Net/include -L$POCO_HOME/lib/Linux/x86_64 -lPocoNet -lPocoUtil -lPocoFoundation -lPocoXML -lPocoJSON + +CMD ./poco 8080 $(nproc) diff --git a/frameworks/C++/poco/setup.sh b/frameworks/C++/poco/setup.sh deleted file mode 100644 index 23915dd806c..00000000000 --- a/frameworks/C++/poco/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends poco - -g++-4.8 -O3 -DNDEBUG -std=c++0x -o poco benchmark.cpp -I$POCO_HOME/Foundation/include -I$POCO_HOME/Util/include -I$POCO_HOME/Net/include -L$POCO_HOME/lib/Linux/x86_64 -lPocoNet -lPocoUtil -lPocoFoundation -lPocoXML -lPocoJSON -./poco 8080 $CPU_COUNT - diff --git a/frameworks/C++/silicon/.gitignore b/frameworks/C++/silicon/.gitignore deleted file mode 100644 index 84c048a73cc..00000000000 --- a/frameworks/C++/silicon/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build/ diff --git a/frameworks/C++/silicon/CMakeLists.txt b/frameworks/C++/silicon/CMakeLists.txt index 30fd269b5e7..54ea5b6ee8e 100644 --- a/frameworks/C++/silicon/CMakeLists.txt +++ b/frameworks/C++/silicon/CMakeLists.txt @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 2.8) project(silicon) -include_directories($ENV{IROOT}/include $ENV{MICROHTTPD_HOME}/include) +include_directories(/include $ENV{MICROHTTPD_HOME}/include) -link_directories($ENV{IROOT}/lib $ENV{MICROHTTPD_HOME}/lib) +link_directories(/lib $ENV{MICROHTTPD_HOME}/lib) add_definitions(-std=c++14 -ftemplate-depth=1024 -DNDEBUG -O3) diff --git a/frameworks/C++/silicon/benchmark_config.json b/frameworks/C++/silicon/benchmark_config.json index f89652759f9..408a7483ba3 100644 --- a/frameworks/C++/silicon/benchmark_config.json +++ b/frameworks/C++/silicon/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "silicon", "tests": [{ "default": { - "setup_file": "setup_mhd_tpc_mysql", "json_url" : "/json", "db_url" : "/db", "query_url" : "/queries?queries=", diff --git a/frameworks/C++/silicon/symbols.hh b/frameworks/C++/silicon/build/symbols.hh similarity index 100% rename from frameworks/C++/silicon/symbols.hh rename to frameworks/C++/silicon/build/symbols.hh diff --git a/frameworks/C++/silicon/techempower.hh b/frameworks/C++/silicon/build/techempower.hh similarity index 100% rename from frameworks/C++/silicon/techempower.hh rename to frameworks/C++/silicon/build/techempower.hh diff --git a/frameworks/C++/silicon/techempower_lwan.cc b/frameworks/C++/silicon/build/techempower_lwan.cc similarity index 100% rename from frameworks/C++/silicon/techempower_lwan.cc rename to frameworks/C++/silicon/build/techempower_lwan.cc diff --git a/frameworks/C++/silicon/techempower_microhttpd.cc b/frameworks/C++/silicon/build/techempower_microhttpd.cc similarity index 100% rename from frameworks/C++/silicon/techempower_microhttpd.cc rename to frameworks/C++/silicon/build/techempower_microhttpd.cc diff --git a/frameworks/C++/silicon/setup_lwan_mysql.sh b/frameworks/C++/silicon/setup_lwan_mysql.sh deleted file mode 100644 index 4155e774f67..00000000000 --- a/frameworks/C++/silicon/setup_lwan_mysql.sh +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/bash - -fw_depends mysql silicon lwan - -rm -rf build -mkdir build -cd build -cmake .. -DCMAKE_CXX_COMPILER=clang++-3.9 -make silicon_lwan_mysql - -$TROOT/build/silicon_lwan_mysql ${DBHOST} 8080 & diff --git a/frameworks/C++/silicon/setup_mhd_epoll_mysql.sh b/frameworks/C++/silicon/setup_mhd_epoll_mysql.sh deleted file mode 100644 index 7e5f777517f..00000000000 --- a/frameworks/C++/silicon/setup_mhd_epoll_mysql.sh +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/bash - -fw_depends mysql silicon microhttpd - -rm -rf build -mkdir build -cd build -cmake .. -DCMAKE_CXX_COMPILER=clang++-3.9 -make silicon_epoll_mysql - -$TROOT/build/silicon_epoll_mysql ${DBHOST} 8080 ${CPU_COUNT} & diff --git a/frameworks/C++/silicon/setup_mhd_tpc_mysql.sh b/frameworks/C++/silicon/setup_mhd_tpc_mysql.sh deleted file mode 100644 index f3d55c70cb9..00000000000 --- a/frameworks/C++/silicon/setup_mhd_tpc_mysql.sh +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/bash - -fw_depends mysql silicon microhttpd - -rm -rf build -mkdir build -cd build -cmake .. -DCMAKE_CXX_COMPILER=clang++-3.9 -make silicon_tpc_mysql - -$TROOT/build/silicon_tpc_mysql ${DBHOST} 8080 ${CPU_COUNT} & diff --git a/frameworks/C++/silicon/silicon-base.dockerfile b/frameworks/C++/silicon/silicon-base.dockerfile new file mode 100644 index 00000000000..6472d62381d --- /dev/null +++ b/frameworks/C++/silicon/silicon-base.dockerfile @@ -0,0 +1,12 @@ +FROM techempower/microhttpd:0.1 + +RUN apt install -yqq libboost-dev cmake + +ENV SILICON=/silicon + +COPY ./ ./ + +RUN git clone https://github.com/matt-42/silicon.git && \ + cd silicon && \ + git checkout ecaf04887c9dbbf0f457afab1f487268f6aeffab && \ + CC=clang-3.9 CXX=clang++-3.9 ./install.sh / diff --git a/frameworks/C++/silicon/silicon.dockerfile b/frameworks/C++/silicon/silicon.dockerfile new file mode 100644 index 00000000000..7078e0465c8 --- /dev/null +++ b/frameworks/C++/silicon/silicon.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/silicon-base:0.1 + +RUN cd build && \ + cmake .. -DCMAKE_CXX_COMPILER=clang++-3.9 && \ + make silicon_tpc_mysql + +CMD /build/silicon_tpc_mysql ${DBHOST} 8080 $(nproc) diff --git a/frameworks/C++/treefrog/benchmark_config.json b/frameworks/C++/treefrog/benchmark_config.json index fd5402314f1..4cef6406120 100644 --- a/frameworks/C++/treefrog/benchmark_config.json +++ b/frameworks/C++/treefrog/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "treefrog", "tests": [{ "default": { - "setup_file": "setup-thread", "json_url": "/json/json", "db_url": "/world/random", "query_url": "/world/queries/", @@ -25,7 +24,6 @@ "versus": "" }, "hybrid": { - "setup_file": "setup", "json_url": "/json/json", "db_url": "/world/random", "query_url": "/world/queries/", @@ -49,7 +47,6 @@ "versus": "treefrog" }, "postgres": { - "setup_file": "setup-postgres", "json_url": "/json/json", "db_url": "/world/random", "query_url": "/world/queries/", @@ -73,7 +70,6 @@ "versus": "" }, "mongodb": { - "setup_file": "setup-mongodb", "json_url": "/json/json", "db_url": "/world/mrandom", "query_url": "/world/mqueries/", diff --git a/frameworks/C++/treefrog/setup-mongodb.sh b/frameworks/C++/treefrog/setup-mongodb.sh deleted file mode 100755 index c5ae4ddc9b3..00000000000 --- a/frameworks/C++/treefrog/setup-mongodb.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -sed -i 's|HostName=.*|HostName='"$DBHOST"'|g' config/database.ini -sed -i 's|HostName=.*|HostName='"$DBHOST"'|g' config/mongodb.ini -sed -i 's|DriverType=.*|DriverType=QMYSQL|g' config/database.ini -sed -i 's|MultiProcessingModule=.*|MultiProcessingModule=thread|g' config/application.ini - -fw_depends mongodb treefrog - -# 1. Generate Makefile -qmake -r CONFIG+=release - -# 2. Compile applicaton -make - -# 3. Clean log files -rm -f log/*.log - -# 4. Start TreeFrog -treefrog -d $TROOT diff --git a/frameworks/C++/treefrog/setup-postgres.sh b/frameworks/C++/treefrog/setup-postgres.sh deleted file mode 100755 index 794724b8f77..00000000000 --- a/frameworks/C++/treefrog/setup-postgres.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -sed -i 's|HostName=.*|HostName='"$DBHOST"'|g' config/database.ini -sed -i 's|HostName=.*|HostName='"$DBHOST"'|g' config/mongodb.ini -sed -i 's|DriverType=.*|DriverType=QPSQL|g' config/database.ini -sed -i 's|MultiProcessingModule=.*|MultiProcessingModule=thread|g' config/application.ini - -fw_depends postgresql treefrog - -# 1. Generate Makefile -qmake -r CONFIG+=release - -# 2. Compile applicaton -make - -# 3. Clean log files -rm -f log/*.log - -# 4. Start TreeFrog -treefrog -d $TROOT diff --git a/frameworks/C++/treefrog/setup-thread.sh b/frameworks/C++/treefrog/setup-thread.sh deleted file mode 100755 index c64b73f43ee..00000000000 --- a/frameworks/C++/treefrog/setup-thread.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -sed -i 's|HostName=.*|HostName='"$DBHOST"'|g' config/database.ini -sed -i 's|HostName=.*|HostName='"$DBHOST"'|g' config/mongodb.ini -sed -i 's|DriverType=.*|DriverType=QMYSQL|g' config/database.ini -sed -i 's|MultiProcessingModule=.*|MultiProcessingModule=thread|g' config/application.ini - -fw_depends mysql treefrog - -# 1. Generate Makefile -qmake -r CONFIG+=release - -# 2. Compile applicaton -make - -# 3. Clean log files -rm -f log/*.log - -# 4. Start TreeFrog -treefrog -d $TROOT diff --git a/frameworks/C++/treefrog/setup.sh b/frameworks/C++/treefrog/setup.sh deleted file mode 100755 index a5693d2c9ee..00000000000 --- a/frameworks/C++/treefrog/setup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -sed -i 's|HostName=.*|HostName='"$DBHOST"'|g' config/database.ini -sed -i 's|HostName=.*|HostName='"$DBHOST"'|g' config/mongodb.ini -sed -i 's|DriverType=.*|DriverType=QMYSQL|g' config/database.ini -sed -i 's|MultiProcessingModule=.*|MultiProcessingModule=hybrid|g' config/application.ini - -fw_depends mysql treefrog - -# 1. Generate Makefile -qmake -r CONFIG+=release - -# 2. Compile applicaton -make - -# 3. Clean log files -rm -f log/*.log - -# 4. Start TreeFrog -treefrog -d $TROOT diff --git a/frameworks/C++/treefrog/treefrog-base.dockerfile b/frameworks/C++/treefrog/treefrog-base.dockerfile new file mode 100644 index 00000000000..02567f9b968 --- /dev/null +++ b/frameworks/C++/treefrog/treefrog-base.dockerfile @@ -0,0 +1,24 @@ +FROM techempower/base:0.1 + +ENV TFVER=1.19.0 + +RUN apt install -yqq g++ gcc libjemalloc-dev qt5-qmake qt5-default qtbase5-dev \ + qtbase5-dev-tools libqt5sql5 libqt5sql5-mysql libqt5sql5-psql libqt5qml5 libqt5xml5 \ + qtdeclarative5-dev libqt5quick5 libqt5quickparticles5 libqt5gui5 libqt5printsupport5 \ + libqt5widgets5 libqt5opengl5-dev libqt5quicktest5 + +RUN wget -q https://github.com/treefrogframework/treefrog-framework/archive/v${TFVER}.tar.gz +RUN tar xf v${TFVER}.tar.gz +RUN cd treefrog-framework-${TFVER} && \ + ./configure && \ + cd src && \ + make -j4 && \ + make install && \ + cd ../tools && \ + make -j4 && \ + make install + +COPY ./ ./ + +RUN sed -i 's|HostName=.*|HostName='"$DBHOST"'|g' config/database.ini +RUN sed -i 's|HostName=.*|HostName='"$DBHOST"'|g' config/mongodb.ini diff --git a/frameworks/C++/treefrog/treefrog-hybrid.dockerfile b/frameworks/C++/treefrog/treefrog-hybrid.dockerfile new file mode 100644 index 00000000000..1a520fb6ce8 --- /dev/null +++ b/frameworks/C++/treefrog/treefrog-hybrid.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/treefrog-base:0.1 + +RUN sed -i 's|DriverType=.*|DriverType=QMYSQL|g' config/database.ini +RUN sed -i 's|MultiProcessingModule=.*|MultiProcessingModule=hybrid|g' config/application.ini + +# 1. Generate Makefile +RUN qmake -r CONFIG+=release + +# 2. Compile applicaton +RUN make + +# 3. Start TreeFrog +CMD treefrog / diff --git a/frameworks/C++/treefrog/treefrog-mongodb.dockerfile b/frameworks/C++/treefrog/treefrog-mongodb.dockerfile new file mode 100644 index 00000000000..ad4cd991459 --- /dev/null +++ b/frameworks/C++/treefrog/treefrog-mongodb.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/treefrog-base:0.1 + +RUN sed -i 's|DriverType=.*|DriverType=QMYSQL|g' config/database.ini +RUN sed -i 's|MultiProcessingModule=.*|MultiProcessingModule=thread|g' config/application.ini + +# 1. Generate Makefile +RUN qmake -r CONFIG+=release + +# 2. Compile applicaton +RUN make + +# 3. Start TreeFrog +CMD treefrog / diff --git a/frameworks/C++/treefrog/treefrog-postgres.dockerfile b/frameworks/C++/treefrog/treefrog-postgres.dockerfile new file mode 100644 index 00000000000..c5c6840e91a --- /dev/null +++ b/frameworks/C++/treefrog/treefrog-postgres.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/treefrog-base:0.1 + +RUN sed -i 's|DriverType=.*|DriverType=QPSQL|g' config/database.ini +RUN sed -i 's|MultiProcessingModule=.*|MultiProcessingModule=thread|g' config/application.ini + +# 1. Generate Makefile +RUN qmake -r CONFIG+=release + +# 2. Compile applicaton +RUN make + +# 3. Start TreeFrog +CMD treefrog / diff --git a/frameworks/C++/treefrog/treefrog.dockerfile b/frameworks/C++/treefrog/treefrog.dockerfile new file mode 100644 index 00000000000..ad4cd991459 --- /dev/null +++ b/frameworks/C++/treefrog/treefrog.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/treefrog-base:0.1 + +RUN sed -i 's|DriverType=.*|DriverType=QMYSQL|g' config/database.ini +RUN sed -i 's|MultiProcessingModule=.*|MultiProcessingModule=thread|g' config/application.ini + +# 1. Generate Makefile +RUN qmake -r CONFIG+=release + +# 2. Compile applicaton +RUN make + +# 3. Start TreeFrog +CMD treefrog / diff --git a/frameworks/C++/ulib/benchmark_config.json b/frameworks/C++/ulib/benchmark_config.json index a0774516ef7..2a2d58809dd 100644 --- a/frameworks/C++/ulib/benchmark_config.json +++ b/frameworks/C++/ulib/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "ulib", "tests": [{ "default": { - "setup_file": "setup_plaintext", "plaintext_url": "/plaintext", "port": 8080, "approach": "Realistic", @@ -20,7 +19,6 @@ "versus": "" }, "plaintext_fit": { - "setup_file": "setup_plaintext_fit", "plaintext_url": "/plaintext", "port": 8080, "approach": "Realistic", @@ -38,7 +36,6 @@ "versus": "" }, "json": { - "setup_file": "setup_json", "json_url": "/json", "port": 8080, "approach": "Realistic", @@ -56,7 +53,6 @@ "versus": "" }, "json_fit": { - "setup_file": "setup_json_fit", "json_url": "/json", "port": 8080, "approach": "Realistic", @@ -74,7 +70,6 @@ "versus": "" }, "mysql": { - "setup_file": "setup_mysql", "db_url": "/db", "query_url": "/query?queries=", "fortune_url": "/fortune", @@ -96,7 +91,6 @@ "versus": "" }, "postgres": { - "setup_file": "setup_postgres", "db_url": "/db", "query_url": "/query?queries=", "fortune_url": "/fortune", @@ -118,7 +112,6 @@ "versus": "" }, "postgres_fit": { - "setup_file": "setup_postgres_fit", "db_url": "/db", "query_url": "/query?queries=", "fortune_url": "/fortune", diff --git a/frameworks/C++/ulib/setup_elasticsearch.sh b/frameworks/C++/ulib/setup_elasticsearch.sh deleted file mode 100755 index a0f1896ec6e..00000000000 --- a/frameworks/C++/ulib/setup_elasticsearch.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -fw_depends ulib - -MAX_THREADS=$(( 2 * $CPU_COUNT )) - -# 1. Change ULib Server (userver_tcp) configuration -sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg -sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg -sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD ${MAX_THREADS}|g" $IROOT/ULib/benchmark.cfg -sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg - -# 2. Start ULib Server (userver_tcp) -export ELASTICSEARCH_HOST=$DBHOST -export UMEMPOOL="1261,0,0,49,274,-14,-15,-24,40" - -# Never use setcap inside of TRAVIS -[ "$TRAVIS" != "true" ] || { \ -if [ `ulimit -r` -eq 99 ]; then - sudo setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp -fi -} - -$IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg & diff --git a/frameworks/C++/ulib/setup_json.sh b/frameworks/C++/ulib/setup_json.sh deleted file mode 100755 index 032f21a4f1e..00000000000 --- a/frameworks/C++/ulib/setup_json.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_depends ulib - -# Travis is broken -if [ "$TRAVIS" != "true" ]; then -MAX_THREADS=$(( 3 * $CPU_COUNT / 2 )) -else -MAX_THREADS=$(( 2 * $CPU_COUNT )) -fi - -# 1. Change ULib Server (userver_tcp) configuration -sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg -sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg -sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD ${MAX_THREADS}|g" $IROOT/ULib/benchmark.cfg -sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg - -# 2. Start ULib Server (userver_tcp) -export UMEMPOOL="58,0,0,41,273,-15,-14,-20,36" - -# Never use setcap inside of TRAVIS -[ "$TRAVIS" != "true" ] || { \ -if [ `ulimit -r` -eq 99 ]; then - sudo setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp -fi -} - -$IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg & diff --git a/frameworks/C++/ulib/setup_json_extra.sh b/frameworks/C++/ulib/setup_json_extra.sh deleted file mode 100755 index 5f7bf95eed8..00000000000 --- a/frameworks/C++/ulib/setup_json_extra.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_depends ulib - -# Travis is broken -if [ "$TRAVIS" != "true" ]; then -MAX_THREADS=$(( 3 * $CPU_COUNT )) -else -MAX_THREADS=$(( 2 * $CPU_COUNT )) -fi - -# 1. Change ULib Server (userver_tcp) configuration -sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg -sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg -sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD ${MAX_THREADS}|g" $IROOT/ULib/benchmark.cfg -sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg - -# 2. Start ULib Server (userver_tcp) -export UMEMPOOL="58,0,0,41,273,-15,-14,-20,36" - -# Never use setcap inside of TRAVIS -[ "$TRAVIS" != "true" ] || { \ -if [ `ulimit -r` -eq 99 ]; then - sudo setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp -fi -} - -$IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg & diff --git a/frameworks/C++/ulib/setup_json_fit.sh b/frameworks/C++/ulib/setup_json_fit.sh deleted file mode 100755 index efcefa18416..00000000000 --- a/frameworks/C++/ulib/setup_json_fit.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_depends ulib - -# Travis is broken -if [ "$TRAVIS" != "true" ]; then -MAX_THREADS=$CPU_COUNT -else -MAX_THREADS=$(( 2 * $CPU_COUNT )) -fi - -# 1. Change ULib Server (userver_tcp) configuration -sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg -sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg -sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD ${MAX_THREADS}|g" $IROOT/ULib/benchmark.cfg -sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg - -# 2. Start ULib Server (userver_tcp) -export UMEMPOOL="58,0,0,41,273,-15,-14,-20,36" - -# Never use setcap inside of TRAVIS -[ "$TRAVIS" != "true" ] || { \ -if [ `ulimit -r` -eq 99 ]; then - sudo setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp -fi -} - -$IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg & diff --git a/frameworks/C++/ulib/setup_json_large.sh b/frameworks/C++/ulib/setup_json_large.sh deleted file mode 100755 index 2e774903e8f..00000000000 --- a/frameworks/C++/ulib/setup_json_large.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -fw_depends ulib - -MAX_THREADS=$(( 2 * $CPU_COUNT )) - -# 1. Change ULib Server (userver_tcp) configuration -sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg -sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg -sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD ${MAX_THREADS}|g" $IROOT/ULib/benchmark.cfg -sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg - -# 2. Start ULib Server (userver_tcp) -export UMEMPOOL="58,0,0,41,273,-15,-14,-20,36" - -# Never use setcap inside of TRAVIS -[ "$TRAVIS" != "true" ] || { \ -if [ `ulimit -r` -eq 99 ]; then - sudo setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp -fi -} - -$IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg & diff --git a/frameworks/C++/ulib/setup_json_medium.sh b/frameworks/C++/ulib/setup_json_medium.sh deleted file mode 100755 index 032f21a4f1e..00000000000 --- a/frameworks/C++/ulib/setup_json_medium.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_depends ulib - -# Travis is broken -if [ "$TRAVIS" != "true" ]; then -MAX_THREADS=$(( 3 * $CPU_COUNT / 2 )) -else -MAX_THREADS=$(( 2 * $CPU_COUNT )) -fi - -# 1. Change ULib Server (userver_tcp) configuration -sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg -sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg -sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD ${MAX_THREADS}|g" $IROOT/ULib/benchmark.cfg -sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg - -# 2. Start ULib Server (userver_tcp) -export UMEMPOOL="58,0,0,41,273,-15,-14,-20,36" - -# Never use setcap inside of TRAVIS -[ "$TRAVIS" != "true" ] || { \ -if [ `ulimit -r` -eq 99 ]; then - sudo setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp -fi -} - -$IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg & diff --git a/frameworks/C++/ulib/setup_mongodb.sh b/frameworks/C++/ulib/setup_mongodb.sh deleted file mode 100755 index 9dbcd2b6c2c..00000000000 --- a/frameworks/C++/ulib/setup_mongodb.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -fw_depends mongodb ulib - -# Travis is broken -if [ "$TRAVIS" != "true" ]; then -MAX_THREADS=$(( 3 * $CPU_COUNT / 2 )) -else -MAX_THREADS=$(( 2 * $CPU_COUNT )) -fi - -# 1. Change ULib Server (userver_tcp) configuration -sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg -sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg -sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD ${MAX_THREADS}|g" $IROOT/ULib/benchmark.cfg -sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg - -# 2. Start ULib Server (userver_tcp) -export MONGODB_HOST=$DBHOST -export UMEMPOOL="96,0,0,47,16401,-14,-20,-18,26" - -# Never use setcap inside of TRAVIS -[ "$TRAVIS" != "true" ] || { \ -if [ `ulimit -r` -eq 99 ]; then - sudo setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp -fi -} - -$IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg & diff --git a/frameworks/C++/ulib/setup_mysql.sh b/frameworks/C++/ulib/setup_mysql.sh deleted file mode 100755 index 289823f17b8..00000000000 --- a/frameworks/C++/ulib/setup_mysql.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -fw_depends mysql ulib - -# Travis is broken -if [ "$TRAVIS" != "true" ]; then -MAX_THREADS=$CPU_COUNT -else -MAX_THREADS=$(( 2 * $CPU_COUNT )) -fi - -# 1. Change ULib Server (userver_tcp) configuration -sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET -2|g" $IROOT/ULib/benchmark.cfg -sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg -sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD ${MAX_THREADS}|g" $IROOT/ULib/benchmark.cfg -sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg - -# 2. Start ULib Server (userver_tcp) -export ORM_DRIVER="mysql" -export UMEMPOOL="581,0,0,59,16409,-7,-20,-23,31" -export ORM_OPTION="host=${DBHOST} user=benchmarkdbuser password=benchmarkdbpass character-set=utf8 dbname=hello_world" - -# Never use setcap inside of TRAVIS -[ "$TRAVIS" != "true" ] || { \ -if [ `ulimit -r` -eq 99 ]; then - sudo setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp -fi -} - -$IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg & diff --git a/frameworks/C++/ulib/setup_plaintext.sh b/frameworks/C++/ulib/setup_plaintext.sh deleted file mode 100755 index f26772f5fe3..00000000000 --- a/frameworks/C++/ulib/setup_plaintext.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_depends ulib - -# Travis is broken -if [ "$TRAVIS" != "true" ]; then -MAX_THREADS=$(( 3 * $CPU_COUNT / 2 )) -else -MAX_THREADS=$(( 2 * $CPU_COUNT )) -fi - -# 1. Change ULib Server (userver_tcp) configuration -sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg -sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 16384|g" $IROOT/ULib/benchmark.cfg -sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD ${MAX_THREADS}|g" $IROOT/ULib/benchmark.cfg -sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 8000|g" $IROOT/ULib/benchmark.cfg - -# 2. Start ULib Server (userver_tcp) -export UMEMPOOL="58,0,0,41,16401,-14,-15,11,25" - -# Never use setcap inside of TRAVIS -[ "$TRAVIS" != "true" ] || { \ -if [ `ulimit -r` -eq 99 ]; then - sudo setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp -fi -} - -$IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg & diff --git a/frameworks/C++/ulib/setup_plaintext_fit.sh b/frameworks/C++/ulib/setup_plaintext_fit.sh deleted file mode 100755 index e56b0f5beec..00000000000 --- a/frameworks/C++/ulib/setup_plaintext_fit.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_depends ulib - -# Travis is broken -if [ "$TRAVIS" != "true" ]; then -MAX_THREADS=$CPU_COUNT -else -MAX_THREADS=$(( 2 * $CPU_COUNT )) -fi - -# 1. Change ULib Server (userver_tcp) configuration -sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg -sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 16384|g" $IROOT/ULib/benchmark.cfg -sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD ${MAX_THREADS}|g" $IROOT/ULib/benchmark.cfg -sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 8000|g" $IROOT/ULib/benchmark.cfg - -# 2. Start ULib Server (userver_tcp) -export UMEMPOOL="58,0,0,41,16401,-14,-15,11,25" - -# Never use setcap inside of TRAVIS -[ "$TRAVIS" != "true" ] || { \ -if [ `ulimit -r` -eq 99 ]; then - sudo setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp -fi -} - -$IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg & diff --git a/frameworks/C++/ulib/setup_postgres.sh b/frameworks/C++/ulib/setup_postgres.sh deleted file mode 100755 index 3902e8e5b64..00000000000 --- a/frameworks/C++/ulib/setup_postgres.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -fw_depends postgresql ulib - -MAX_THREADS=$(( 2 * $CPU_COUNT )) - -# 1. Change ULib Server (userver_tcp) configuration -sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET -2|g" $IROOT/ULib/benchmark.cfg -sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg -sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD ${MAX_THREADS}|g" $IROOT/ULib/benchmark.cfg -sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg - -# 2. Start ULib Server (userver_tcp) -export ORM_DRIVER="pgsql" -export UMEMPOOL="581,0,0,59,16409,-7,-20,-23,31" -export ORM_OPTION="host=${DBHOST} user=benchmarkdbuser password=benchmarkdbpass dbname=hello_world client_encoding=UTF8" - -# Never use setcap inside of TRAVIS -[ "$TRAVIS" != "true" ] || { \ -if [ `ulimit -r` -eq 99 ]; then - sudo setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp -fi -} - -$IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg & diff --git a/frameworks/C++/ulib/setup_postgres_fit.sh b/frameworks/C++/ulib/setup_postgres_fit.sh deleted file mode 100755 index e37a62479e7..00000000000 --- a/frameworks/C++/ulib/setup_postgres_fit.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -fw_depends postgresql ulib - -# Travis is broken -if [ "$TRAVIS" != "true" ]; then -MAX_THREADS=$CPU_COUNT -else -MAX_THREADS=$(( 2 * $CPU_COUNT )) -fi - -# 1. Change ULib Server (userver_tcp) configuration -sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET -2|g" $IROOT/ULib/benchmark.cfg -sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg -sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD ${MAX_THREADS}|g" $IROOT/ULib/benchmark.cfg -sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg - -# 2. Start ULib Server (userver_tcp) -export ORM_DRIVER="pgsql" -export UMEMPOOL="581,0,0,59,16409,-7,-20,-23,31" -export ORM_OPTION="host=${DBHOST} user=benchmarkdbuser password=benchmarkdbpass dbname=hello_world client_encoding=UTF8" - -# Never use setcap inside of TRAVIS -[ "$TRAVIS" != "true" ] || { \ -if [ `ulimit -r` -eq 99 ]; then - sudo setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp -fi -} - -$IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg & diff --git a/frameworks/C++/ulib/setup_redis.sh b/frameworks/C++/ulib/setup_redis.sh deleted file mode 100755 index 78fd0802770..00000000000 --- a/frameworks/C++/ulib/setup_redis.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -fw_depends ulib - -# Travis is broken -if [ "$TRAVIS" != "true" ]; then -MAX_THREADS=$(( 3 * $CPU_COUNT / 2 )) -else -MAX_THREADS=$(( 2 * $CPU_COUNT )) -fi - -# 1. Change ULib Server (userver_tcp) configuration -sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg -sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg -sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD ${MAX_THREADS}|g" $IROOT/ULib/benchmark.cfg -sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg - -# 2. Start ULib Server (userver_tcp) -export REDIS_HOST=$DBHOST -export UMEMPOOL="1261,0,0,49,274,-14,-15,-24,40" - -# Never use setcap inside of TRAVIS -[ "$TRAVIS" != "true" ] || { \ -if [ `ulimit -r` -eq 99 ]; then - sudo setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp -fi -} - -$IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg & diff --git a/frameworks/C++/ulib/setup_sqlite.sh b/frameworks/C++/ulib/setup_sqlite.sh deleted file mode 100755 index 7648c8b5c06..00000000000 --- a/frameworks/C++/ulib/setup_sqlite.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -fw_depends ulib - -# Travis is broken -if [ "$TRAVIS" != "true" ]; then -MAX_THREADS=$(( 3 * $CPU_COUNT / 2 )) -else -MAX_THREADS=$(( 2 * $CPU_COUNT )) -fi - -# 1. Change ULib Server (userver_tcp) configuration -sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg -sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg -sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD ${MAX_THREADS}|g" $IROOT/ULib/benchmark.cfg -sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg - -# 2. Start ULib Server (userver_tcp) -export ORM_DRIVER="sqlite" -export UMEMPOOL="581,0,0,59,16409,-7,-20,-23,31" -export ORM_OPTION="host=${DBHOST} user=benchmarkdbuser password=benchmarkdbpass character-set=utf8 dbname=${IROOT}/ULib/db/%.*s" - -# Never use setcap inside of TRAVIS -[ "$TRAVIS" != "true" ] || { \ -if [ `ulimit -r` -eq 99 ]; then - sudo setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp -fi -} - -$IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg & diff --git a/frameworks/C++/ulib/ulib-base.dockerfile b/frameworks/C++/ulib/ulib-base.dockerfile new file mode 100644 index 00000000000..d4393e1f8a2 --- /dev/null +++ b/frameworks/C++/ulib/ulib-base.dockerfile @@ -0,0 +1,72 @@ +FROM techempower/gcc-6:0.1 + +ENV IROOT=/install +ENV ULIB_VERSION=1.4.2 +ENV ULIB_ROOT=$IROOT/ULib +ENV ULIB_DOCUMENT_ROOT=$ULIB_ROOT/ULIB_DOCUMENT_ROOT +ENV CC=gcc-6 +ENV CXX=g++-6 +ENV AR=gcc-ar-6 +ENV RANLIB=gcc-ranlib-6 + +RUN mkdir -p $ULIB_ROOT +RUN mkdir -p $ULIB_DOCUMENT_ROOT + +RUN apt install -yqq postgresql-server-dev-all libcap2-bin + +WORKDIR $IROOT + +# We need to install mongo-c-driver (we don't have a ubuntu package) +RUN wget -q https://github.com/mongodb/mongo-c-driver/releases/download/1.1.10/mongo-c-driver-1.1.10.tar.gz +RUN tar -xzf mongo-c-driver-1.1.10.tar.gz +RUN cd mongo-c-driver-1.1.10/ && \ + ./configure --prefix=$IROOT --libdir=$IROOT && \ + make && make install + +# 1. Download ULib +RUN wget -q -O ULib-${ULIB_VERSION}.tar.gz https://github.com/stefanocasazza/ULib/archive/v${ULIB_VERSION}.tar.gz +RUN tar xf ULib-${ULIB_VERSION}.tar.gz + +# 2. Compile application (userver_tcp) +# AVOID "configure: error: newly created file is older than distributed files! Check your system clock" +WORKDIR $IROOT/ULib-$ULIB_VERSION +RUN find . -exec touch {} \; +RUN cp -r tests/examples/benchmark/FrameworkBenchmarks/ULib/db $ULIB_ROOT + +RUN echo "userver {" >> $ULIB_ROOT/benchmark.cfg +RUN echo "PORT 8080" >> $ULIB_ROOT/benchmark.cfg +RUN echo "PREFORK_CHILD 2" >> $ULIB_ROOT/benchmark.cfg +RUN echo "TCP_LINGER_SET 0 " >> $ULIB_ROOT/benchmark.cfg +RUN echo "LISTEN_BACKLOG 16384" >> $ULIB_ROOT/benchmark.cfg +RUN echo "ORM_DRIVER \"mysql pgsql\"" >> $ULIB_ROOT/benchmark.cfg +RUN echo "CLIENT_FOR_PARALLELIZATION 100" >> $ULIB_ROOT/benchmark.cfg +RUN echo "DOCUMENT_ROOT $ULIB_DOCUMENT_ROOT " >> $ULIB_ROOT/benchmark.cfg +RUN echo "}" >> $ULIB_ROOT/benchmark.cfg + +RUN USP_FLAGS="-DAS_cpoll_cppsp_DO" \ + ./configure --prefix=$ULIB_ROOT \ + --disable-static --disable-examples \ + --with-mysql --with-pgsql \ + --without-ssl --without-pcre --without-expat \ + --without-libz --without-libuuid --without-magic --without-libares \ + --enable-static-orm-driver='mysql pgsql' --enable-static-server-plugin=http \ + --with-mongodb --with-mongodb-includes="-I$IROOT/include/libbson-1.0 -I$IROOT/include/libmongoc-1.0" --with-mongodb-ldflags="-L$IROOT" +# --enable-debug \ +#USP_LIBS="-ljson" \ +#cp $TROOT/src/* src/ulib/net/server/plugin/usp + +RUN make install +RUN cd examples/userver && make install + +# Compile usp pages (no more REDIS) +RUN cd src/ulib/net/server/plugin/usp && \ + make json.la plaintext.la db.la query.la update.la fortune.la cached_worlds.la \ + mdb.la mquery.la mupdate.la mfortune.la && \ + cp .libs/json.so .libs/plaintext.so \ + .libs/db.so .libs/query.so .libs/update.so .libs/fortune.so .libs/cached_worlds.so \ + .libs/mdb.so .libs/mquery.so .libs/mupdate.so .libs/mfortune.so $ULIB_DOCUMENT_ROOT + +ENV PATH=${ULIB_ROOT}/bin:${PATH} + +ADD ./ /ulib +WORKDIR /ulib diff --git a/frameworks/C++/ulib/ulib-json.dockerfile b/frameworks/C++/ulib/ulib-json.dockerfile new file mode 100644 index 00000000000..ffcc99268e4 --- /dev/null +++ b/frameworks/C++/ulib/ulib-json.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/ulib-base:0.1 + +# 1. Change ULib Server (userver_tcp) configuration +RUN sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg + +# 2. Start ULib Server (userver_tcp) +ENV UMEMPOOL="58,0,0,41,273,-15,-14,-20,36" + +CMD sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD $(( 3 * $(nproc) / 2 ))|g" $IROOT/ULib/benchmark.cfg && \ + setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp && \ + $IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg diff --git a/frameworks/C++/ulib/ulib-json_fit.dockerfile b/frameworks/C++/ulib/ulib-json_fit.dockerfile new file mode 100644 index 00000000000..4f013e16993 --- /dev/null +++ b/frameworks/C++/ulib/ulib-json_fit.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/ulib-base:0.1 + +# 1. Change ULib Server (userver_tcp) configuration +RUN sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg + +# 2. Start ULib Server (userver_tcp) +ENV UMEMPOOL="58,0,0,41,273,-15,-14,-20,36" + +CMD sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD $(nproc)|g" $IROOT/ULib/benchmark.cfg && \ + setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp && \ + $IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg diff --git a/frameworks/C++/ulib/ulib-mongodb.dockerfile b/frameworks/C++/ulib/ulib-mongodb.dockerfile new file mode 100644 index 00000000000..784f21d53f0 --- /dev/null +++ b/frameworks/C++/ulib/ulib-mongodb.dockerfile @@ -0,0 +1,14 @@ +FROM techempower/ulib-base:0.1 + +# 1. Change ULib Server (userver_tcp) configuration +RUN sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg + +# 2. Start ULib Server (userver_tcp) +ENV MONGODB_HOST=tfb-database +ENV UMEMPOOL="96,0,0,47,16401,-14,-20,-18,26" + +CMD sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD $(( 3 * $(nproc) / 2 ))|g" $IROOT/ULib/benchmark.cfg && \ + setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp && \ + $IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg diff --git a/frameworks/C++/ulib/ulib-mysql.dockerfile b/frameworks/C++/ulib/ulib-mysql.dockerfile new file mode 100644 index 00000000000..7905980b76d --- /dev/null +++ b/frameworks/C++/ulib/ulib-mysql.dockerfile @@ -0,0 +1,15 @@ +FROM techempower/ulib-base:0.1 + +# 1. Change ULib Server (userver_tcp) configuration +RUN sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET -2|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg + +# 2. Start ULib Server (userver_tcp) +ENV ORM_DRIVER="mysql" +ENV UMEMPOOL="581,0,0,59,16409,-7,-20,-23,31" +ENV ORM_OPTION="host=tfb-database user=benchmarkdbuser password=benchmarkdbpass character-set=utf8 dbname=hello_world" + +CMD sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD $(nproc)|g" $IROOT/ULib/benchmark.cfg && \ + setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp && \ + $IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg diff --git a/frameworks/C++/ulib/ulib-plaintext_fit.dockerfile b/frameworks/C++/ulib/ulib-plaintext_fit.dockerfile new file mode 100644 index 00000000000..1023df476af --- /dev/null +++ b/frameworks/C++/ulib/ulib-plaintext_fit.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/ulib-base:0.1 + +# 1. Change ULib Server (userver_tcp) configuration +RUN sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 16384|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 8000|g" $IROOT/ULib/benchmark.cfg + +# 2. Start ULib Server (userver_tcp) +ENV UMEMPOOL="58,0,0,41,16401,-14,-15,11,25" + +CMD sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD $(nproc)|g" $IROOT/ULib/benchmark.cfg && \ + setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp && \ + $IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg diff --git a/frameworks/C++/ulib/ulib-postgres.dockerfile b/frameworks/C++/ulib/ulib-postgres.dockerfile new file mode 100644 index 00000000000..9f23e993df5 --- /dev/null +++ b/frameworks/C++/ulib/ulib-postgres.dockerfile @@ -0,0 +1,15 @@ +FROM techempower/ulib-base:0.1 + +# 1. Change ULib Server (userver_tcp) configuration +RUN sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET -2|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg + +# 2. Start ULib Server (userver_tcp) +ENV ORM_DRIVER="pgsql" +ENV UMEMPOOL="581,0,0,59,16409,-7,-20,-23,31" +ENV ORM_OPTION="host=tfb-database user=benchmarkdbuser password=benchmarkdbpass dbname=hello_world client_encoding=UTF8" + +CMD sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD $(( 2 * $(nproc)))|g" $IROOT/ULib/benchmark.cfg && \ + setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp && \ + $IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg diff --git a/frameworks/C++/ulib/ulib-postgres_fit.dockerfile b/frameworks/C++/ulib/ulib-postgres_fit.dockerfile new file mode 100644 index 00000000000..f9d89c8fb9e --- /dev/null +++ b/frameworks/C++/ulib/ulib-postgres_fit.dockerfile @@ -0,0 +1,15 @@ +FROM techempower/ulib-base:0.1 + +# 1. Change ULib Server (userver_tcp) configuration +RUN sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET -2|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 256|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 100|g" $IROOT/ULib/benchmark.cfg + +# 2. Start ULib Server (userver_tcp) +ENV ORM_DRIVER="pgsql" +ENV UMEMPOOL="581,0,0,59,16409,-7,-20,-23,31" +ENV ORM_OPTION="host=tfb-database user=benchmarkdbuser password=benchmarkdbpass dbname=hello_world client_encoding=UTF8" + +CMD sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD $(nproc)|g" $IROOT/ULib/benchmark.cfg && \ + setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp && \ + $IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg diff --git a/frameworks/C++/ulib/ulib.dockerfile b/frameworks/C++/ulib/ulib.dockerfile new file mode 100644 index 00000000000..d4c417f0bc0 --- /dev/null +++ b/frameworks/C++/ulib/ulib.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/ulib-base:0.1 + +# 1. Change ULib Server (userver_tcp) configuration +RUN sed -i "s|TCP_LINGER_SET .*|TCP_LINGER_SET 0|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|LISTEN_BACKLOG .*|LISTEN_BACKLOG 16384|g" $IROOT/ULib/benchmark.cfg +RUN sed -i "s|CLIENT_FOR_PARALLELIZATION .*|CLIENT_FOR_PARALLELIZATION 8000|g" $IROOT/ULib/benchmark.cfg + +# 2. Start ULib Server (userver_tcp) +ENV UMEMPOOL="58,0,0,41,16401,-14,-15,11,25" + +CMD sed -i "s|PREFORK_CHILD .*|PREFORK_CHILD $(( 3 * $(nproc) / 2 ))|g" $IROOT/ULib/benchmark.cfg && \ + setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp && \ + $IROOT/ULib/bin/userver_tcp -c $IROOT/ULib/benchmark.cfg diff --git a/frameworks/C++/wt/.gitignore b/frameworks/C++/wt/.gitignore deleted file mode 100644 index 512f5486d18..00000000000 --- a/frameworks/C++/wt/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/benchmark.wt -/benchmark_postgres.wt diff --git a/frameworks/C++/wt/benchmark_config.json b/frameworks/C++/wt/benchmark_config.json index f9da97fb324..e67bf1108c2 100644 --- a/frameworks/C++/wt/benchmark_config.json +++ b/frameworks/C++/wt/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "wt", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -26,7 +25,6 @@ "versus": "wt" }, "postgres": { - "setup_file": "setup_postgres", "db_url": "/db", "query_url": "/queries?queries=", "fortune_url": "/fortune", @@ -37,7 +35,7 @@ "database": "Postgres", "framework": "wt", "language": "C++", - "flavor": "None", + "flavor": "None", "orm": "Full", "platform": "None", "webserver": "None", @@ -45,7 +43,7 @@ "database_os": "Linux", "display_name": "wt-postgres", "notes": "", - "versus": "wt" + "versus": "wt" } }] } diff --git a/frameworks/C++/wt/setup.sh b/frameworks/C++/wt/setup.sh deleted file mode 100755 index 737ceebcb52..00000000000 --- a/frameworks/C++/wt/setup.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -fw_depends wt - -g++-6 \ - -std=c++14 \ - -O3 -march=native -DNDEBUG \ - -I${BOOST_INC} \ - -L${BOOST_LIB} \ - -I${WT_INC} \ - -L${WT_LIB} \ - -o te-benchmark.wt \ - benchmark.cpp \ - -lwthttp -lwt \ - -lwtdbo -lwtdbomysql \ - -lboost_system \ - -lboost_program_options \ - -lboost_thread \ - -lboost_filesystem \ - -lpthread \ - -lmysqlclient - -./te-benchmark.wt -c wt_config.xml -t ${CPU_COUNT} --docroot . --approot . --http-listen 0.0.0.0:8080 --accesslog=- --no-compression diff --git a/frameworks/C++/wt/setup_postgres.sh b/frameworks/C++/wt/setup_postgres.sh deleted file mode 100755 index f59f5d49d18..00000000000 --- a/frameworks/C++/wt/setup_postgres.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -fw_depends wt - -g++-6 \ - -std=c++14 \ - -O3 -march=native -DNDEBUG \ - -I${BOOST_INC} \ - -L${BOOST_LIB} \ - -I${WT_INC} \ - -L${WT_LIB} \ - -o te-benchmark-pg.wt \ - -DBENCHMARK_USE_POSTGRES \ - benchmark.cpp \ - -lwthttp -lwt \ - -lwtdbo -lwtdbopostgres \ - -lboost_system \ - -lboost_program_options \ - -lboost_thread \ - -lboost_filesystem \ - -lpthread \ - -lpq - -./te-benchmark-pg.wt -c wt_config.xml -t ${CPU_COUNT} --docroot . --approot . --http-listen 0.0.0.0:8080 --accesslog=- --no-compression diff --git a/frameworks/C++/wt/wt-base.dockerfile b/frameworks/C++/wt/wt-base.dockerfile new file mode 100644 index 00000000000..b0886f5f59e --- /dev/null +++ b/frameworks/C++/wt/wt-base.dockerfile @@ -0,0 +1,55 @@ +FROM techempower/gcc-6:0.1 + +ENV WT_VERSION=4.0.2 +ENV BOOST_ROOT=${IROOT}/boost +ENV BOOST_INC=${BOOST_ROOT}/include +ENV BOOST_LIB=${BOOST_ROOT}/lib +ENV WT_ROOT=${IROOT}/wt +ENV WT_LIB=${WT_ROOT}/lib +ENV WT_INC=${WT_ROOT}/include +ENV LD_LIBRARY_PATH="${BOOST_LIB}:${WT_LIB}:${LD_LIBRARY_PATH}" +ENV CPLUS_INCLUDE_PATH=/usr/include/postgresql:/usr/include/postgresql/9.3/server:$CPLUS_INCLUDE_PATH + +# Install CMake 3.x +RUN apt-add-repository --yes ppa:george-edison55/cmake-3.x +RUN apt-get update -qq +RUN apt-get install -qqy cmake + +# Build boost_thread, boost_system, boost_filesystem and boost_program_options +RUN wget -q https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz +RUN tar xf boost_1_65_1.tar.gz +RUN cd boost_1_65_1 && \ + ./bootstrap.sh && \ + ./b2 \ + -d0 \ + toolset=gcc-6 \ + variant=release \ + link=static \ + cxxflags="-std=c++14 -march=native" \ + cflags="-march=native" \ + --prefix=${BOOST_ROOT} \ + --with-system \ + --with-thread \ + --with-program_options \ + --with-filesystem \ + install + +RUN wget -q https://github.com/emweb/wt/archive/$WT_VERSION.tar.gz +RUN mv $WT_VERSION.tar.gz wt-$WT_VERSION.tar.gz +RUN tar xf wt-$WT_VERSION.tar.gz + +RUN cd wt-$WT_VERSION && \ + mkdir -p build && \ + cd build && \ + cmake .. -DCMAKE_CXX_STANDARD=14 -DCMAKE_BUILD_TYPE=Release \ + -DBOOST_PREFIX=${BOOST_ROOT} \ + -DCMAKE_INSTALL_PREFIX=${IROOT}/wt -DCONFIGDIR=${IROOT}/wt/etc \ + -DCMAKE_C_COMPILER=$(which gcc-6) \ + -DCMAKE_CXX_COMPILER=$(which g++-6) -DDESTDIR=${IROOT}/wt \ + -DWEBUSER=$(id -u -n) -DWEBGROUP=$(id -g -n) \ + -DENABLE_SSL=OFF -DHTTP_WITH_ZLIB=OFF \ + -DCMAKE_C_FLAGS_RELEASE="-O3 -march=native -DNDEBUG" \ + -DCMAKE_CXX_FLAGS_RELEASE="-O3 -march=native -DNDEBUG" \ + -DBUILD_TESTS=OFF -DENABLE_LIBWTTEST=OFF \ + -DSHARED_LIBS=OFF && \ + make && make install diff --git a/frameworks/C++/wt/wt-postgres.dockerfile b/frameworks/C++/wt/wt-postgres.dockerfile new file mode 100644 index 00000000000..d8bfe28e5b7 --- /dev/null +++ b/frameworks/C++/wt/wt-postgres.dockerfile @@ -0,0 +1,26 @@ +FROM techempower/wt-base:0.1 + +COPY ./ ./ + +RUN g++-6 \ + -std=c++14 \ + -O3 -march=native -DNDEBUG \ + -I${BOOST_INC} \ + -L${BOOST_LIB} \ + -I${WT_INC} \ + -L${WT_LIB} \ + -o te-benchmark-pg.wt \ + -DBENCHMARK_USE_POSTGRES \ + benchmark.cpp \ + -lwthttp -lwt \ + -lwtdbo -lwtdbopostgres \ + -lboost_system \ + -lboost_program_options \ + -lboost_thread \ + -lboost_filesystem \ + -lpthread \ + -lpq + +ENV DBHOST=tfb-database + +CMD ./te-benchmark-pg.wt -c wt_config.xml -t $(nproc) --docroot . --approot . --http-listen 0.0.0.0:8080 --accesslog=- --no-compression diff --git a/frameworks/C++/wt/wt.dockerfile b/frameworks/C++/wt/wt.dockerfile new file mode 100644 index 00000000000..d1bb513c88b --- /dev/null +++ b/frameworks/C++/wt/wt.dockerfile @@ -0,0 +1,25 @@ +FROM techempower/wt-base:0.1 + +COPY ./ ./ + +RUN g++-6 \ + -std=c++14 \ + -O3 -march=native -DNDEBUG \ + -I${BOOST_INC} \ + -L${BOOST_LIB} \ + -I${WT_INC} \ + -L${WT_LIB} \ + -o te-benchmark.wt \ + benchmark.cpp \ + -lwthttp -lwt \ + -lwtdbo -lwtdbomysql \ + -lboost_system \ + -lboost_program_options \ + -lboost_thread \ + -lboost_filesystem \ + -lpthread \ + -lmysqlclient + +ENV DBHOST=tfb-database + +CMD ./te-benchmark.wt -c wt_config.xml -t $(nproc) --docroot . --approot . --http-listen 0.0.0.0:8080 --accesslog=- --no-compression diff --git a/frameworks/C/duda/.gitignore b/frameworks/C/duda/.gitignore deleted file mode 100644 index 1b8920ba616..00000000000 --- a/frameworks/C/duda/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.o -*~ -/Makefile -/main.d -/ws.duda diff --git a/frameworks/C/duda/README.md b/frameworks/C/duda/README.md index 90b44a07254..7ced12ed71a 100644 --- a/frameworks/C/duda/README.md +++ b/frameworks/C/duda/README.md @@ -25,3 +25,5 @@ Most of tests that are related to database query are pending and will be availab ## Contact Eduardo Silva + + diff --git a/frameworks/C/duda/benchmark_config.json b/frameworks/C/duda/benchmark_config.json index c063d162711..e8885751e0a 100644 --- a/frameworks/C/duda/benchmark_config.json +++ b/frameworks/C/duda/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "duda", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 2001, diff --git a/frameworks/C/duda/duda.dockerfile b/frameworks/C/duda/duda.dockerfile new file mode 100644 index 00000000000..dabccf6e908 --- /dev/null +++ b/frameworks/C/duda/duda.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/base:0.1 + +RUN apt install git python -y + +COPY ./ ./ +# Get v0.31 (no official releases that work 2015-06-25) + +RUN git clone https://github.com/monkey/dudac.git +RUN cd dudac && git checkout 7c3d5b03b09fb4cb5f5e338fff72df2e25e95ef0 && \ + ./dudac -r && \ + ./dudac -s + +CMD ["./dudac/dudac", "-w", "webservice", "-p", "2001"] diff --git a/frameworks/C/duda/setup.sh b/frameworks/C/duda/setup.sh deleted file mode 100755 index 30f98c08085..00000000000 --- a/frameworks/C/duda/setup.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends duda - -dudac -w $TROOT/webservice -p 2001 & diff --git a/frameworks/C/facil.io/.gitignore b/frameworks/C/facil.io/.gitignore deleted file mode 100755 index 652e9e1c692..00000000000 --- a/frameworks/C/facil.io/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# Add any files that are created at build/run-time -# -# Example: *.class, *.pyc, bin/ - -facil_app/ diff --git a/frameworks/C/facil.io/bench_app.c b/frameworks/C/facil.io/bench_app.c index 9308fbe116d..13109208bf4 100755 --- a/frameworks/C/facil.io/bench_app.c +++ b/frameworks/C/facil.io/bench_app.c @@ -1,9 +1,9 @@ /* -This is an incomplete example meant to be used as a benchmark application for -the TechEmpower Framework Benchmarks. See: +This is a short implementation fo the TechEmpower Framework Benchmarks. See: http://frameworkbenchmarks.readthedocs.io/en/latest/ -At the moment it's incomplete and might be broken. +At the moment it's incomplete and only answers the plaintext and json tests +using the full HTTP framework stack (without any DB support). */ #include "http.h" diff --git a/frameworks/C/facil.io/benchmark_config.json b/frameworks/C/facil.io/benchmark_config.json index ececc0b1ce3..70db6b09b07 100755 --- a/frameworks/C/facil.io/benchmark_config.json +++ b/frameworks/C/facil.io/benchmark_config.json @@ -3,7 +3,6 @@ "tests": [ { "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/C/facil.io/facil.io.dockerfile b/frameworks/C/facil.io/facil.io.dockerfile new file mode 100644 index 00000000000..a19303dcb43 --- /dev/null +++ b/frameworks/C/facil.io/facil.io.dockerfile @@ -0,0 +1,21 @@ +FROM techempower/base:0.1 + +COPY ./ ./ + +# using a common installation script will allow implementation variations (in future updates) +RUN ./setup-common.sh + +# set compiler to gcc-6 (avoid gcc-4.8.4)... do we need this? +# ENV CC="gcc-6" + +# we don't need more than 32K concurrent connections +ENV CFLAGS="-DLIB_SOCK_MAX_CAPACITY=32768" + +# compile test +RUN cp -f bench_app.c facil_app/src/app.c + +# Build the app +RUN cd facil_app && make -j build + +# Run the app +CMD ./facil_app/tmp/demo -p 8080 -db "tfb-database" -w 4 -t -4 diff --git a/frameworks/C/facil.io/setup-common.sh b/frameworks/C/facil.io/setup-common.sh new file mode 100755 index 00000000000..70cbe40bd7e --- /dev/null +++ b/frameworks/C/facil.io/setup-common.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# Don't redownload facil.io unless using the FIO_EDGE flag. +if [[ (! -d facil_app) || (-n "${FIO_EDGE}") ]] ; then + # remove existing installation, if any + if [ -e facil_app ] ; then + rm -R facil_app + fi + + # create new installation folder + mkdir facil_app + cd facil_app + + #### Download and unpack + + # Download source selection + # Setting FIO_EDGE will test against the master branch on the development machine. i.e.: + # $ FIO_EDGE=1 tfb --mode verify --test facil.io + if [[ -z "${FIO_EDGE}" ]]; then + FIO_URL="https://api.github.com/repos/boazsegev/facil.io/tarball/0.6.1" + else + echo "INFO: development mode detected, loading facil.io from master." + FIO_URL="https://github.com/boazsegev/facil.io/archive/master.tar.gz" + fi + # Download + curl -s -o facil.io.tar.gz -LJO $FIO_URL + # Unpack + tar --strip-components=1 -xzf facil.io.tar.gz + if [ $? -ne 0 ]; then echo "Couldn't extract tar."; exit 1; fi + # Cleanup + rm facil.io.tar.gz + ./scripts/new/cleanup + cd .. +fi + +# remove any existing source files, such as boiler plate +rm -R facil_app/src +mkdir facil_app/src diff --git a/frameworks/C/facil.io/setup.sh b/frameworks/C/facil.io/setup.sh deleted file mode 100755 index 4034ded6a8a..00000000000 --- a/frameworks/C/facil.io/setup.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -# enter root folder -cd $TROOT - -# remove existing installation, if any -if [ -d facil_app ] ; then - rm -R facil_app -fi - -# create new installation folder -mkdir facil_app -cd facil_app - -# Download and unpack - -curl -s -o facil.io.tar.gz -LJO https://api.github.com/repos/boazsegev/facil.io/tarball/0.6.0.beta.6 -tar --strip-components=1 -xzf facil.io.tar.gz -if [ $? -ne 0 ]; then echo "Couldn't extract tar."; exit 1; fi -rm facil.io.tar.gz -./scripts/new/cleanup -cd .. - - -# compile test -rm -r facil_app/src -mkdir facil_app/src -cp bench_app.c facil_app/src -cd facil_app - -# we don't need more than 32K concurrent connections -export CFLAGS="-DLIB_SOCK_MAX_CAPACITY=32768" - -# Build the app -make -j build - -# Run the upp -cd tmp -./demo -p 8080 -db "TFB-database" -w -1 -t 1 & -# step out of app folder -cd ../.. - diff --git a/frameworks/C/h2o/benchmark_config.json b/frameworks/C/h2o/benchmark_config.json index 2b70a4d7c99..52fb6b22354 100644 --- a/frameworks/C/h2o/benchmark_config.json +++ b/frameworks/C/h2o/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "h2o", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/C/h2o/h2o.dockerfile b/frameworks/C/h2o/h2o.dockerfile new file mode 100644 index 00000000000..69c9e6100d3 --- /dev/null +++ b/frameworks/C/h2o/h2o.dockerfile @@ -0,0 +1,56 @@ +FROM techempower/ruby-2.4:0.1 + +COPY ./ ./ + +RUN ls + +RUN apt install -yqq cmake automake libpq-dev libnuma-dev checkinstall autoconf pkg-config libtool python-sphinx libcunit1-dev nettle-dev libyaml-dev + +### Install mustache-c + +RUN git clone https://github.com/x86-64/mustache-c.git && \ + cd mustache-c && \ + git checkout 55dafd1e95adaca90ea50efb9a8573786514c85a && \ + CFLAGS="-O3 -flto -march=native" ./configure --prefix=/mustache-c && \ + make -j "$(nproc)" install + +ENV MUSTACHE_C_HOME=/mustache-c +ENV LD_LIBRARY_PATH=/mustache-c/lib:${LD_LIBRARY_PATH} + +### Install yajl + +ENV YAJL_VERSION="2.1.0" +ENV YAJL_ARCHIVE="${YAJL_VERSION}.tar.gz" +ENV YAJL_BUILD_DIR="yajl-${YAJL_VERSION}" + +RUN wget -q https://github.com/lloyd/yajl/archive/${YAJL_ARCHIVE} && \ + tar xf ${YAJL_ARCHIVE} && \ + cd ${YAJL_BUILD_DIR} && \ + ./configure -p /yajl && \ + make -j "$(nproc)" install + +ENV YAJL_HOME=/yajl +ENV LD_LIBRARY_PATH=/yajl/lib:${LD_LIBRARY_PATH} + +### Install h2o + +ENV IROOT="/install" +ENV H2O_HOME="${IROOT}/h2o" +ENV VERSION="2.2.4" +ENV ARCHIVE="v${VERSION}.tar.gz" +ENV BUILD_DIR="h2o-${VERSION}" + +RUN mkdir install +RUN cd "${IROOT}" && \ + wget -q "https://github.com/h2o/h2o/archive/$ARCHIVE" && \ + tar xf "$ARCHIVE" && \ + cd "$BUILD_DIR" && \ + cmake -DCMAKE_INSTALL_PREFIX="$H2O_HOME" -DCMAKE_C_FLAGS="-flto -march=native" \ + -DCMAKE_AR=/usr/bin/gcc-ar -DCMAKE_RANLIB=/usr/bin/gcc-ranlib -DWITH_MRUBY=on && \ + make -j "$(nproc)" install + +ENV PATH=${H2O_HOME}/bin:${PATH} + +RUN chmod a+wrx start-servers.sh + +CMD ["./start-servers.sh"] diff --git a/frameworks/C/h2o/setup.sh b/frameworks/C/h2o/setup.sh deleted file mode 100755 index 33d9b8614f5..00000000000 --- a/frameworks/C/h2o/setup.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash - -fw_depends postgresql h2o mustache-c yajl - -H2O_APP_HOME="${IROOT}/h2o_app" -BUILD_DIR="${H2O_APP_HOME}_build" -H2O_APP_PROFILE_PORT=54321 -H2O_APP_PROFILE_URL="http://127.0.0.1:$H2O_APP_PROFILE_PORT" -NUM_WORKERS="$CPU_COUNT" - -# A hacky way to detect whether we are running in the physical hardware or the cloud environment. -if [[ "$CPU_COUNT" -gt 16 ]]; then - USE_PROCESSES=false - # In the physical hardware environment the number of threads used by the application is not - # the same as the number of logical CPU cores that the database server has, so we need to - # adjust the maximum number of database connections per thread accordingly. - DB_CONN=1 -else - USE_PROCESSES=false - DB_CONN=16 -fi - -build_h2o_app() -{ - cmake -DCMAKE_INSTALL_PREFIX="$H2O_APP_HOME" -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_PREFIX_PATH="${H2O_HOME};${MUSTACHE_C_HOME};${YAJL_HOME}" \ - -DCMAKE_C_FLAGS="-march=native $1" "$TROOT" - make -j "$CPU_COUNT" -} - -run_curl() -{ - for ((i = 0; i < 10; i++)); do - curl "${H2O_APP_PROFILE_URL}/$1" > /dev/null 2>&1 - done -} - -run_h2o_app() -{ - taskset -c "$1" "$2/h2o_app" -a20 -f "$3/template/fortunes.mustache" -m "$DB_CONN" "$4" "$5" \ - -d "host=TFB-database dbname=hello_world user=benchmarkdbuser password=benchmarkdbpass" & -} - -generate_profile_data() -{ - run_h2o_app 0 . "${TROOT}" -p$H2O_APP_PROFILE_PORT -t1 - local -r H2O_APP_PROFILE_PID=$! - while ! curl ${H2O_APP_PROFILE_URL} > /dev/null 2>&1; do sleep 1; done - run_curl json - run_curl db - run_curl queries?queries=20 - run_curl fortunes - run_curl updates?queries=20 - run_curl plaintext - run_curl cached-worlds?queries=20 - kill -s SIGTERM $H2O_APP_PROFILE_PID - wait $H2O_APP_PROFILE_PID -} - -install -d "$BUILD_DIR" -pushd "$BUILD_DIR" -build_h2o_app "-fprofile-generate" -generate_profile_data -make clean -rm -f CMakeCache.txt -build_h2o_app "-fprofile-use" -make -j "$CPU_COUNT" install -popd -rm -rf "$BUILD_DIR" -echo "Maximum database connections per thread: $DB_CONN" - -if "$USE_PROCESSES"; then - echo "h2o_app processes: $NUM_WORKERS" - - for ((i = 0; i < NUM_WORKERS; i++)); do - run_h2o_app "$i" "${H2O_APP_HOME}/bin" "${H2O_APP_HOME}/share/h2o_app" -t1 - done -else - echo "Running h2o_app multithreaded." - run_h2o_app 0 "${H2O_APP_HOME}/bin" "${H2O_APP_HOME}/share/h2o_app" -fi diff --git a/frameworks/C/h2o/start-servers.sh b/frameworks/C/h2o/start-servers.sh new file mode 100644 index 00000000000..6090d066f1a --- /dev/null +++ b/frameworks/C/h2o/start-servers.sh @@ -0,0 +1,83 @@ +#!/bin/bash + +TROOT="/" +H2O_APP_HOME="${IROOT}/h2o_app" +BUILD_DIR="${H2O_APP_HOME}_build" +H2O_APP_PROFILE_PORT=54321 +H2O_APP_PROFILE_URL="http://127.0.0.1:$H2O_APP_PROFILE_PORT" +NUM_WORKERS=$(nproc) +CPU_COUNT=$(nproc) + +# A hacky way to detect whether we are running in the physical hardware or the cloud environment. +if [[ "$CPU_COUNT" -gt 16 ]]; then + USE_PROCESSES=false + # In the physical hardware environment the number of threads used by the application is not + # the same as the number of logical CPU cores that the database server has, so we need to + # adjust the maximum number of database connections per thread accordingly. + DB_CONN=2 +else + USE_PROCESSES=false + DB_CONN=8 +fi + +build_h2o_app() +{ + cmake -DCMAKE_INSTALL_PREFIX="$H2O_APP_HOME" -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_PREFIX_PATH="${H2O_HOME};${MUSTACHE_C_HOME};${YAJL_HOME}" \ + -DCMAKE_C_FLAGS="-march=native $1" "$TROOT" + make -j "$CPU_COUNT" +} + +run_curl() +{ + for ((i = 0; i < 10; i++)); do + curl "${H2O_APP_PROFILE_URL}/$1" > /dev/null 2>&1 + done +} + +run_h2o_app() +{ + taskset -c "$1" "$2/h2o_app" -a20 -f "$3/template/fortunes.mustache" -m "$DB_CONN" "$4" "$5" \ + -d "host=tfb-database dbname=hello_world user=benchmarkdbuser password=benchmarkdbpass" & +} + +generate_profile_data() +{ + run_h2o_app 0 . "${TROOT}" -p$H2O_APP_PROFILE_PORT -t1 + local -r H2O_APP_PROFILE_PID=$! + while ! curl ${H2O_APP_PROFILE_URL} > /dev/null 2>&1; do sleep 1; done + run_curl json + run_curl db + run_curl queries?queries=20 + run_curl fortunes + run_curl updates?queries=20 + run_curl plaintext + run_curl cached-worlds?queries=20 + kill -s SIGTERM $H2O_APP_PROFILE_PID + wait $H2O_APP_PROFILE_PID +} + +install -d "$BUILD_DIR" +pushd "$BUILD_DIR" +build_h2o_app "-fprofile-generate" +generate_profile_data +make clean +rm -f CMakeCache.txt +build_h2o_app "-fprofile-use" +make -j "$CPU_COUNT" install +popd +rm -rf "$BUILD_DIR" +echo "Maximum database connections per thread: $DB_CONN" + +if "$USE_PROCESSES"; then + echo "h2o_app processes: $NUM_WORKERS" + + for ((i = 0; i < NUM_WORKERS; i++)); do + run_h2o_app "$i" "${H2O_APP_HOME}/bin" "${H2O_APP_HOME}/share/h2o_app" -t1 + done +else + echo "Running h2o_app multithreaded." + run_h2o_app 0 "${H2O_APP_HOME}/bin" "${H2O_APP_HOME}/share/h2o_app" +fi + +wait diff --git a/frameworks/C/libreactor/benchmark_config.json b/frameworks/C/libreactor/benchmark_config.json index 3fd5bd098c5..a6137c0fcb6 100755 --- a/frameworks/C/libreactor/benchmark_config.json +++ b/frameworks/C/libreactor/benchmark_config.json @@ -3,7 +3,6 @@ "tests": [ { "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/C/libreactor/libreactor.dockerfile b/frameworks/C/libreactor/libreactor.dockerfile new file mode 100644 index 00000000000..33c06a7402a --- /dev/null +++ b/frameworks/C/libreactor/libreactor.dockerfile @@ -0,0 +1,25 @@ +FROM techempower/gcc-6:0.1 + +COPY ./ ./ + +RUN wget -q https://github.com/fredrikwidlund/libdynamic/releases/download/v1.1.0/libdynamic-1.1.0.tar.gz && \ + tar xfz libdynamic-1.1.0.tar.gz && \ + cd libdynamic-1.1.0 && \ + ./configure CC=gcc-6 AR=gcc-ar-6 NM=gcc-nm-6 RANLIB=gcc-ranlib-6 && \ + make && make install + +RUN wget -q https://github.com/fredrikwidlund/libreactor/releases/download/v1.0.0/libreactor-1.0.0.tar.gz && \ + tar xfz libreactor-1.0.0.tar.gz && \ + cd libreactor-1.0.0 && \ + ./configure CC=gcc-6 AR=gcc-ar-6 NM=gcc-nm-6 RANLIB=gcc-ranlib-6 && \ + make && make install + +RUN wget -q https://github.com/fredrikwidlund/libclo/releases/download/v0.1.0/libclo-0.1.0.tar.gz && \ + tar xfz libclo-0.1.0.tar.gz && \ + cd libclo-0.1.0 && \ + ./configure CC=gcc-6 AR=gcc-ar-6 NM=gcc-nm-6 RANLIB=gcc-ranlib-6 && \ + make && make install + +RUN make clean && make + +CMD ["./libreactor"] diff --git a/frameworks/C/libreactor/setup.sh b/frameworks/C/libreactor/setup.sh deleted file mode 100755 index 12ef5674b32..00000000000 --- a/frameworks/C/libreactor/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends libreactor - -make clean && make - -./libreactor & diff --git a/frameworks/C/octane/benchmark_config.json b/frameworks/C/octane/benchmark_config.json index c5cba523cc3..13490081094 100644 --- a/frameworks/C/octane/benchmark_config.json +++ b/frameworks/C/octane/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "octane", "tests": [{ "default": { - "setup_file": "setup", "plaintext_url": "/plaintext", "json_url": "/json", "port": 8000, diff --git a/frameworks/C/octane/octane.dockerfile b/frameworks/C/octane/octane.dockerfile new file mode 100644 index 00000000000..c277cf82625 --- /dev/null +++ b/frameworks/C/octane/octane.dockerfile @@ -0,0 +1,16 @@ +FROM techempower/base:0.1 + +COPY ./ ./ + +RUN apt install -yqq cmake automake libtool + +# May 22nd, 2017 +RUN git clone https://github.com/simongui/octane.git && \ + cd octane && \ + git checkout 8c28b1b83f1aa2817a401a3e8437a0af4ec53c28 && \ + make + +ENV PATH=octane/build/:${PATH} +ENV LD_PRELOAD=octane/lib/lockless_allocator/libllalloc.so.1.3 + +CMD ["techempower_benchmarks"] diff --git a/frameworks/C/octane/setup.sh b/frameworks/C/octane/setup.sh deleted file mode 100644 index 55bff7cc83c..00000000000 --- a/frameworks/C/octane/setup.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends octane - -LD_PRELOAD="$OCTANE_HOME/lib/lockless_allocator/libllalloc.so.1.3" techempower_benchmarks & diff --git a/frameworks/C/onion/.gitignore b/frameworks/C/onion/.gitignore deleted file mode 100644 index 8186f63f20a..00000000000 --- a/frameworks/C/onion/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/assets.h -/onion diff --git a/frameworks/C/onion/benchmark_config.json b/frameworks/C/onion/benchmark_config.json index 682dbeea910..8dd102bc60d 100644 --- a/frameworks/C/onion/benchmark_config.json +++ b/frameworks/C/onion/benchmark_config.json @@ -2,26 +2,7 @@ "framework": "onion", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", - "port": 8080, - "approach": "Realistic", - "classification": "Platform", - "database": "None", - "framework": "None", - "language": "C", - "flavor": "None", - "orm": "Raw", - "platform": "None", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "onion", - "notes": "", - "versus": "onion" - }, - "raw": { - "setup_file": "setup", "db_url": "/db", "query_url": "/queries?queries=", "fortune_url": "/fortune", diff --git a/frameworks/C/onion/hello.c b/frameworks/C/onion/hello.c index ea61cfc5e2a..3c297883ec6 100644 --- a/frameworks/C/onion/hello.c +++ b/frameworks/C/onion/hello.c @@ -334,7 +334,7 @@ int main(void){ ONION_ERROR("Cant create db connection: %s", mysql_error(data.db[i])); return 1; } - if (mysql_real_connect(data.db[i], "127.0.0.1", + if (mysql_real_connect(data.db[i], "tfb-database", "benchmarkdbuser", "benchmarkdbpass", "hello_world", 0, NULL, 0) == NULL) { ONION_ERROR("Error %u: %s\n", mysql_errno(data.db[i]), mysql_error(data.db[i])); return 1; diff --git a/frameworks/C/onion/onion.dockerfile b/frameworks/C/onion/onion.dockerfile new file mode 100644 index 00000000000..d524190cafe --- /dev/null +++ b/frameworks/C/onion/onion.dockerfile @@ -0,0 +1,24 @@ +FROM techempower/base:0.1 + +COPY ./ ./ + +RUN apt install -yqq cmake libmysqlclient-dev libjson0-dev libgnutls-dev libgcrypt-dev + +ENV ONION_LOG noinfo + +# Latest commit on master as of July 10 2014 +# This is post tag v0.7, but pre any later tags + +RUN git clone https://github.com/davidmoreno/onion.git && \ + cd onion && \ + git checkout c460557bfc7d45fb6ba61cb6b7259480a67dde82 && \ + mkdir -p build && \ + cd build && \ + cmake .. && \ + make + +RUN make clean && \ + rm -f onion/build/CMakeCache.txt && \ + make + +CMD ["./hello"] diff --git a/frameworks/C/onion/setup.sh b/frameworks/C/onion/setup.sh deleted file mode 100755 index 566701dc465..00000000000 --- a/frameworks/C/onion/setup.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends mysql onion - -sed -i 's|127.0.0.1|'${DBHOST}'|g' hello.c - -make clean -ln -s $IROOT/onion onion -rm -f onion/build/CMakeCache.txt -make -./hello & diff --git a/frameworks/CSharp/HttpListener/.gitignore b/frameworks/CSharp/HttpListener/.gitignore deleted file mode 100644 index 9bebd649577..00000000000 --- a/frameworks/CSharp/HttpListener/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.pyc -*.user -*.suo -*/bin/ -*/obj/ -.nuget/NuGet.exe -packages/ -!packages/repositories.config diff --git a/frameworks/CSharp/HttpListener/.nuget/NuGet.Config b/frameworks/CSharp/HttpListener/.nuget/NuGet.Config deleted file mode 100644 index 67f8ea046ef..00000000000 --- a/frameworks/CSharp/HttpListener/.nuget/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/frameworks/CSharp/HttpListener/.nuget/NuGet.targets b/frameworks/CSharp/HttpListener/.nuget/NuGet.targets deleted file mode 100644 index 46a1b6ced78..00000000000 --- a/frameworks/CSharp/HttpListener/.nuget/NuGet.targets +++ /dev/null @@ -1,133 +0,0 @@ - - - - $(MSBuildProjectDirectory)\..\ - - - false - - - false - - - true - - - false - - - - - - - - - - - $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) - $([System.IO.Path]::Combine($(ProjectDir), "packages.config")) - - - - - $(SolutionDir).nuget - packages.config - - - - - $(NuGetToolsPath)\NuGet.exe - @(PackageSource) - - "$(NuGetExePath)" - mono --runtime=v4.0.30319 $(NuGetExePath) - - $(TargetDir.Trim('\\')) - - -RequireConsent - -NonInteractive - - - $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir "$(SolutionDir) " - $(NuGetCommand) pack "$(ProjectPath)" -Properties Configuration=$(Configuration) $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols - - - - RestorePackages; - $(BuildDependsOn); - - - - - $(BuildDependsOn); - BuildPackage; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/frameworks/CSharp/HttpListener/HttpListener.sln b/frameworks/CSharp/HttpListener/HttpListener.sln deleted file mode 100644 index b5ba2342502..00000000000 --- a/frameworks/CSharp/HttpListener/HttpListener.sln +++ /dev/null @@ -1,27 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HttpListener", "HttpListener\HttpListener.csproj", "{C788981C-7F54-4408-B477-C94E486A1AF5}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{967712FE-DCC3-412D-A3E4-55F92B833B16}" - ProjectSection(SolutionItems) = preProject - .nuget\NuGet.Config = .nuget\NuGet.Config - .nuget\NuGet.exe = .nuget\NuGet.exe - .nuget\NuGet.targets = .nuget\NuGet.targets - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C788981C-7F54-4408-B477-C94E486A1AF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C788981C-7F54-4408-B477-C94E486A1AF5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C788981C-7F54-4408-B477-C94E486A1AF5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C788981C-7F54-4408-B477-C94E486A1AF5}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/frameworks/CSharp/HttpListener/HttpListener/App.config b/frameworks/CSharp/HttpListener/HttpListener/App.config deleted file mode 100644 index 8b136ae752b..00000000000 --- a/frameworks/CSharp/HttpListener/HttpListener/App.config +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/frameworks/CSharp/HttpListener/HttpListener/Fortunes.cshtml b/frameworks/CSharp/HttpListener/HttpListener/Fortunes.cshtml deleted file mode 100644 index eb2b67fd195..00000000000 --- a/frameworks/CSharp/HttpListener/HttpListener/Fortunes.cshtml +++ /dev/null @@ -1,11 +0,0 @@ -@* Generator: Template *@@* -*@@using System.Web;@* -*@@functions { - public IEnumerable Model { get; set; } -}@* -*@Fortunes@* -*@@foreach (var fortune in Model) -{ -@* -*@} -
idmessage
@fortune.ID@HttpUtility.HtmlEncode(fortune.Message)
\ No newline at end of file diff --git a/frameworks/CSharp/HttpListener/HttpListener/Fortunes.generated.cs b/frameworks/CSharp/HttpListener/HttpListener/Fortunes.generated.cs deleted file mode 100644 index 49cff0c44aa..00000000000 --- a/frameworks/CSharp/HttpListener/HttpListener/Fortunes.generated.cs +++ /dev/null @@ -1,106 +0,0 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.18047 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace HttpListener -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - - #line 2 "..\..\Fortunes.cshtml" - using System.Web; - - #line default - #line hidden - - [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")] - public partial class Fortunes : RazorGenerator.Templating.RazorTemplateBase - { -#line hidden - - #line 3 "..\..\Fortunes.cshtml" - - public IEnumerable Model { get; set; } - - #line default - #line hidden - - public override void Execute() - { - - - - - - - - - - -WriteLiteral("Fortunes"); - - - - - - #line 7 "..\..\Fortunes.cshtml" - foreach (var fortune in Model) -{ - - - #line default - #line hidden -WriteLiteral(""); - - - - #line 9 "..\..\Fortunes.cshtml" - - - #line default - #line hidden - - - #line 10 "..\..\Fortunes.cshtml" - } - - - #line default - #line hidden -WriteLiteral("
id<" + -"/th>message
"); - - - - #line 9 "..\..\Fortunes.cshtml" - Write(fortune.ID); - - - #line default - #line hidden -WriteLiteral(""); - - - - #line 9 "..\..\Fortunes.cshtml" - Write(HttpUtility.HtmlEncode(fortune.Message)); - - - #line default - #line hidden -WriteLiteral("
"); - - - } - } -} -#pragma warning restore 1591 diff --git a/frameworks/CSharp/HttpListener/HttpListener/HttpListener.csproj b/frameworks/CSharp/HttpListener/HttpListener/HttpListener.csproj deleted file mode 100644 index cbd76c57801..00000000000 --- a/frameworks/CSharp/HttpListener/HttpListener/HttpListener.csproj +++ /dev/null @@ -1,140 +0,0 @@ - - - - - Debug - AnyCPU - {C788981C-7F54-4408-B477-C94E486A1AF5} - Exe - Properties - HttpListener - HttpListener - v4.5 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - ..\ - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\EntityFramework.6.0.0-beta1\lib\net45\EntityFramework.dll - - - ..\packages\EntityFramework.6.0.0-beta1\lib\net45\EntityFramework.SqlServer.dll - - - ..\packages\mongocsharpdriver.1.8.1\lib\net35\MongoDB.Bson.dll - - - ..\packages\mongocsharpdriver.1.8.1\lib\net35\MongoDB.Driver.dll - - - ..\packages\Npgsql.EF6.2.0.12-pre4\lib\net45\Mono.Security.dll - - - ..\packages\Npgsql.EF6.2.0.12-pre4\lib\net45\Mono.Security.Protocol.Tls.dll - - - ..\packages\MySql.Data.Entity.6.7.2-beta-ef6\lib\net45\MySql.Data.dll - - - ..\packages\MySql.Data.Entity.6.7.2-beta-ef6\lib\net45\MySql.Data.Entity.dll - - - ..\packages\Npgsql.EF6.2.0.12-pre4\lib\net45\Npgsql.dll - - - ..\packages\RazorGenerator.Templating.2.1.1\lib\net40\RazorGenerator.Templating.dll - - - - - - - - - - - - - - - - True - True - Fortunes.cshtml - - - - - - - - - - - RazorGenerator - Fortunes.generated.cs - - - - - - False - Microsoft .NET Framework 4.5 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - - - - \ No newline at end of file diff --git a/frameworks/CSharp/HttpListener/HttpListener/Models/Fortune.cs b/frameworks/CSharp/HttpListener/HttpListener/Models/Fortune.cs deleted file mode 100644 index 974207fe03f..00000000000 --- a/frameworks/CSharp/HttpListener/HttpListener/Models/Fortune.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace Benchmarks.AspNet.Models -{ - public class Fortune : IComparable - { - public int ID { get; set; } - public string Message { get; set; } - - public int CompareTo(Fortune other) - { - return Message.CompareTo(other.Message); - } - } -} \ No newline at end of file diff --git a/frameworks/CSharp/HttpListener/HttpListener/Models/MongoDB.cs b/frameworks/CSharp/HttpListener/HttpListener/Models/MongoDB.cs deleted file mode 100644 index 1a4b5c6962f..00000000000 --- a/frameworks/CSharp/HttpListener/HttpListener/Models/MongoDB.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Configuration; -using System.Web.Script.Serialization; - -using MongoDB.Bson; -using MongoDB.Bson.Serialization; -using MongoDB.Driver; - -namespace Benchmarks.AspNet.Models -{ - public class MongoDB - { - public MongoCollection Worlds { get; private set; } - public MongoCollection Fortunes { get; private set; } - - static MongoDB() - { - BsonClassMap.RegisterClassMap(m => - { - m.MapProperty(w => w.id); - m.MapProperty(w => w.randomNumber); - }); - - BsonClassMap.RegisterClassMap(m => - { - m.MapIdProperty(w => w._id); - }); - - BsonClassMap.RegisterClassMap(m => - { - m.MapProperty(f => f.ID).SetElementName("id"); - m.MapProperty(f => f.Message).SetElementName("message"); - }); - } - - public MongoDB(string connectionStringName) - { - string connectionString = ConfigurationManager.ConnectionStrings[connectionStringName].ConnectionString; - - MongoClient client = new MongoClient(connectionString); - MongoServer server = client.GetServer(); - MongoDatabase database = server.GetDatabase("hello_world"); - - Worlds = database.GetCollection("world"); - Fortunes = database.GetCollection("fortune"); - } - } - - public class MongoWorld : World - { - [ScriptIgnore] - public ObjectId _id { get; set; } - } -} \ No newline at end of file diff --git a/frameworks/CSharp/HttpListener/HttpListener/Models/World.cs b/frameworks/CSharp/HttpListener/HttpListener/Models/World.cs deleted file mode 100644 index fc19f7c222b..00000000000 --- a/frameworks/CSharp/HttpListener/HttpListener/Models/World.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Benchmarks.AspNet.Models -{ - public class World - { - public int id { get; set; } - public int randomNumber { get; set; } - } -} \ No newline at end of file diff --git a/frameworks/CSharp/HttpListener/HttpListener/Program.cs b/frameworks/CSharp/HttpListener/HttpListener/Program.cs deleted file mode 100644 index 66f9f8c7251..00000000000 --- a/frameworks/CSharp/HttpListener/HttpListener/Program.cs +++ /dev/null @@ -1,456 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Configuration; -using System.Data; -using System.Data.Common; -using System.Linq; -using System.Net; -using System.Threading; -using System.Web.Script.Serialization; - -using MongoDB.Driver.Builders; - -using Benchmarks.AspNet.Models; -using System.Reflection; -using System.Runtime.InteropServices; - -namespace HttpListener -{ - class Program - { - private static void RequestCallback(Object state) - { - HttpListenerContext context = (HttpListenerContext)state; - HttpListenerRequest request = context.Request; - HttpListenerResponse response = context.Response; - - try - { - string responseString = null; - switch (request.Url.LocalPath) - { - case "/plaintext": - responseString = Plaintext(response); - break; - case "/json": - responseString = Json(response); - break; - case "/db": - responseString = Db(request, response); - break; - case "/fortunes": - responseString = Fortunes(request, response); - break; - case "/updates": - responseString = Updates(request, response); - break; - case "/mongodbdb": - responseString = MongoDBDb(request, response); - break; - case "/mongodbfortunes": - responseString = MongoDBFortunes(request, response); - break; - case "/mongodbupdates": - responseString = MongoDBUpdates(request, response); - break; - default: - responseString = NotFound(response); - break; - } - WriteResponse(response, responseString); - } - finally - { - response.Close(); - } - } - - private static void WriteResponse(HttpListenerResponse response, String responseString) - { - response.ContentType = response.ContentType + "; charset=utf-8"; - byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString); - response.ContentLength64 = buffer.Length; - try - { - response.OutputStream.Write(buffer, 0, buffer.Length); - } - catch (Win32Exception) - { - // Ignore I/O errors - } - } - - private static void Threads() - { - // To improve CPU utilization, increase the number of threads that the .NET thread pool expands by when - // a burst of requests come in. We could do this by editing machine.config/system.web/processModel/minWorkerThreads, - // but that seems too global a change, so we do it in code for just our AppPool. More info: - // - // http://support.microsoft.com/kb/821268 - // http://blogs.msdn.com/b/tmarq/archive/2007/07/21/asp-net-thread-usage-on-iis-7-0-and-6-0.aspx - // http://blogs.msdn.com/b/perfworld/archive/2010/01/13/how-can-i-improve-the-performance-of-asp-net-by-adjusting-the-clr-thread-throttling-properties.aspx - - int newMinWorkerThreads = Convert.ToInt32(ConfigurationManager.AppSettings["minWorkerThreadsPerLogicalProcessor"]); - if (newMinWorkerThreads > 0) - { - int minWorkerThreads, minCompletionPortThreads; - ThreadPool.GetMinThreads(out minWorkerThreads, out minCompletionPortThreads); - ThreadPool.SetMinThreads(Environment.ProcessorCount * newMinWorkerThreads, minCompletionPortThreads); - } - } - - static void Main(string[] args) - { - Threads(); - - System.Net.HttpListener listener = new System.Net.HttpListener(); - // This doesn't seem to ignore all write exceptions, so in WriteResponse(), we still have a catch block. - listener.IgnoreWriteExceptions = true; - listener.Prefixes.Add("http://*:8080/"); - - try - { - listener.Start(); - - // Increase the HTTP.SYS backlog queue from the default of 1000 to 65535. - // To verify that this works, run `netsh http show servicestate`. - Network.Utils.HttpApi.SetRequestQueueLength(listener, 65535); - - for (;;) - { - HttpListenerContext context = null; - try - { - context = listener.GetContext(); - - ThreadPool.QueueUserWorkItem(new WaitCallback(RequestCallback), context); - context = null; // ownership has been transferred to RequestCallback - } - catch (HttpListenerException ex) - { - Console.WriteLine(ex.Message); - } - finally - { - if (context != null) - context.Response.Close(); - } - } - } - catch (HttpListenerException ex) - { - Console.WriteLine(ex.Message); - } - finally - { - // Stop listening for requests. - listener.Close(); - Console.WriteLine("Done Listening."); - } - } - - public static DbConnection CreateConnection(HttpListenerRequest request) - { - string providerName = request.QueryString["provider"]; - if (providerName == null) - { - throw new ApplicationException("Missing provider querystring argument"); - } - ConnectionStringSettings connectionSettings = ConfigurationManager.ConnectionStrings[providerName]; - DbProviderFactory factory = DbProviderFactories.GetFactory(connectionSettings.ProviderName); - DbConnection connection = factory.CreateConnection(); - connection.ConnectionString = connectionSettings.ConnectionString; - return connection; - } - - public static int GetQueries(HttpListenerRequest request) - { - int queries = 1; - string queriesString = request.QueryString["queries"]; - if (queriesString != null) - { - // If this fails to parse, queries will be set to zero. - int.TryParse(queriesString, out queries); - queries = Math.Max(1, Math.Min(500, queries)); - } - return queries; - } - - private static string NotFound(HttpListenerResponse response) - { - response.StatusCode = (int)HttpStatusCode.NotFound; - response.ContentType = "text/plain"; - return "not found"; - } - - private static string Plaintext(HttpListenerResponse response) - { - response.ContentType = "text/plain"; - return "Hello, World!"; - } - - private static string Json(HttpListenerResponse response) - { - response.ContentType = "application/json"; - return new JavaScriptSerializer().Serialize(new { message = "Hello, World!" }); - } - - private static string Db(HttpListenerRequest request, HttpListenerResponse response) - { - Random random = new Random(); - - int queries = GetQueries(request); - List worlds = new List(queries); - - using (DbConnection connection = CreateConnection(request)) - { - connection.Open(); - - using (DbCommand command = connection.CreateCommand()) - { - command.CommandText = "SELECT * FROM World WHERE id = @ID"; - - DbParameter parameter = command.CreateParameter(); - parameter.ParameterName = "@ID"; - - command.Parameters.Add(parameter); - - for (int i = 0; i < worlds.Capacity; i++) - { - int randomID = random.Next(0, 10000) + 1; - - parameter.Value = randomID; - - // Don't use CommandBehavior.SingleRow because that will make the MySql provider - // send two extra commands to limit the result to one row. - using (DbDataReader reader = command.ExecuteReader()) - { - if (reader.Read()) - { - worlds.Add(new World - { - id = reader.GetInt32(0), - randomNumber = reader.GetInt32(1) - }); - } - } - } - } - } - - response.ContentType = "application/json"; - return new JavaScriptSerializer().Serialize( - worlds.Count > 1 ? (Object)worlds : (Object)worlds[0]); - } - - private static string Fortunes(HttpListenerRequest request, HttpListenerResponse response) - { - List fortunes = new List(); - - using (DbConnection connection = CreateConnection(request)) - { - connection.Open(); - - using (DbCommand command = connection.CreateCommand()) - { - command.CommandText = "SELECT * FROM Fortune"; - - using (DbDataReader reader = command.ExecuteReader(CommandBehavior.SequentialAccess)) - { - while (reader.Read()) - { - fortunes.Add(new Fortune - { - ID = reader.GetInt32(0), - Message = reader.GetString(1) - }); - } - } - } - } - - fortunes.Add(new Fortune { ID = 0, Message = "Additional fortune added at request time." }); - fortunes.Sort(); - - response.ContentType = "text/html"; - var template = new Fortunes { Model = fortunes }; - return template.TransformText(); - } - - private static string Updates(HttpListenerRequest request, HttpListenerResponse response) - { - Random random = new Random(); - List worlds = new List(GetQueries(request)); - - using (DbConnection connection = CreateConnection(request)) - { - connection.Open(); - - using (DbCommand selectCommand = connection.CreateCommand(), - updateCommand = connection.CreateCommand()) - { - selectCommand.CommandText = "SELECT * FROM World WHERE id = @ID"; - updateCommand.CommandText = "UPDATE World SET randomNumber = @Number WHERE id = @ID"; - - for (int i = 0; i < worlds.Capacity; i++) - { - int randomID = random.Next(0, 10000) + 1; - int randomNumber = random.Next(0, 10000) + 1; - - DbParameter idParameter = selectCommand.CreateParameter(); - idParameter.ParameterName = "@ID"; - idParameter.Value = randomID; - - selectCommand.Parameters.Clear(); - selectCommand.Parameters.Add(idParameter); - - World world = null; - - // Don't use CommandBehavior.SingleRow because that will make the MySql provider - // send two extra commands to limit the result to one row. - using (DbDataReader reader = selectCommand.ExecuteReader()) - { - if (reader.Read()) - { - world = new World - { - id = reader.GetInt32(0), - randomNumber = reader.GetInt32(1) - }; - } - } - - DbParameter idUpdateParameter = updateCommand.CreateParameter(); - idUpdateParameter.ParameterName = "@ID"; - idUpdateParameter.Value = randomID; - - DbParameter numberParameter = updateCommand.CreateParameter(); - numberParameter.ParameterName = "@Number"; - numberParameter.Value = randomNumber; - - updateCommand.Parameters.Clear(); - updateCommand.Parameters.Add(idUpdateParameter); - updateCommand.Parameters.Add(numberParameter); - - updateCommand.ExecuteNonQuery(); - - world.randomNumber = randomNumber; - worlds.Add(world); - } - } - } - - response.ContentType = "application/json"; - return new JavaScriptSerializer().Serialize( - worlds.Count > 1 ? (Object)worlds : (Object)worlds[0]); - } - - private static string MongoDBDb(HttpListenerRequest request, HttpListenerResponse response) - { - Random random = new Random(); - - int queries = GetQueries(request); - List worlds = new List(queries); - - Benchmarks.AspNet.Models.MongoDB db = new Benchmarks.AspNet.Models.MongoDB("MongoDB"); - - for (int i = 0; i < worlds.Capacity; i++) - { - int randomID = random.Next(0, 10000) + 1; - worlds.Add(db.Worlds.FindOne(Query.EQ(w => w.id, randomID))); - } - - response.ContentType = "application/json"; - return new JavaScriptSerializer().Serialize( - worlds.Count > 1 ? (Object)worlds : (Object)worlds[0]); - } - - private static string MongoDBFortunes(HttpListenerRequest request, HttpListenerResponse response) - { - Benchmarks.AspNet.Models.MongoDB db = new Benchmarks.AspNet.Models.MongoDB("MongoDB"); - - List fortunes = db.Fortunes.FindAll().ToList(); - - fortunes.Add(new Fortune { ID = 0, Message = "Additional fortune added at request time." }); - fortunes.Sort(); - - response.ContentType = "text/html"; - var template = new Fortunes { Model = fortunes }; - return template.TransformText(); - } - - private static string MongoDBUpdates(HttpListenerRequest request, HttpListenerResponse response) - { - Random random = new Random(); - - Benchmarks.AspNet.Models.MongoDB db = new Benchmarks.AspNet.Models.MongoDB("MongoDB"); - - int queries = GetQueries(request); - List worlds = new List(queries); - - for (int i = 0; i < worlds.Capacity; i++) - { - int randomID = random.Next(0, 10000) + 1; - int randomNumber = random.Next(0, 10000) + 1; - - World world = db.Worlds.FindOne(Query.EQ(w => w.id, randomID)); - world.randomNumber = randomNumber; - worlds.Add(world); - - db.Worlds.Save(world); - } - - response.ContentType = "application/json"; - return new JavaScriptSerializer().Serialize( - worlds.Count > 1 ? (Object)worlds : (Object)worlds[0]); - } - } -} - -// Adapted from: -// http://stackoverflow.com/questions/15417062/changing-http-sys-kernel-queue-limit-when-using-net-httplistener -namespace Network.Utils -{ - public static class HttpApi - { - public static void SetRequestQueueLength(System.Net.HttpListener listener, uint len) - { - var listenerType = typeof(System.Net.HttpListener); - var requestQueueHandleProperty = listenerType.GetProperties(BindingFlags.NonPublic | BindingFlags.Instance).First(p => p.Name == "RequestQueueHandle"); - - var requestQueueHandle = (CriticalHandle)requestQueueHandleProperty.GetValue(listener); - var result = HttpSetRequestQueueProperty(requestQueueHandle, HTTP_SERVER_PROPERTY.HttpServerQueueLengthProperty, ref len, (uint)Marshal.SizeOf(len), 0, IntPtr.Zero); - - if (result != 0) - { - throw new HttpListenerException((int)result); - } - } - - internal enum HTTP_SERVER_PROPERTY - { - HttpServerAuthenticationProperty, - HttpServerLoggingProperty, - HttpServerQosProperty, - HttpServerTimeoutsProperty, - HttpServerQueueLengthProperty, - HttpServerStateProperty, - HttpServer503VerbosityProperty, - HttpServerBindingProperty, - HttpServerExtendedAuthenticationProperty, - HttpServerListenEndpointProperty, - HttpServerChannelBindProperty, - HttpServerProtectionLevelProperty, - } - - [DllImport("httpapi.dll", CallingConvention = CallingConvention.StdCall)] - internal static extern uint HttpSetRequestQueueProperty( - CriticalHandle requestQueueHandle, - HTTP_SERVER_PROPERTY serverProperty, - ref uint pPropertyInfo, - uint propertyInfoLength, - uint reserved, - IntPtr pReserved); - } -} diff --git a/frameworks/CSharp/HttpListener/HttpListener/Properties/AssemblyInfo.cs b/frameworks/CSharp/HttpListener/HttpListener/Properties/AssemblyInfo.cs deleted file mode 100644 index 2c4b03989c5..00000000000 --- a/frameworks/CSharp/HttpListener/HttpListener/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("HttpListener")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("HttpListener")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("ac13325e-f037-4665-89ed-2de2c30e22c7")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/frameworks/CSharp/HttpListener/HttpListener/packages.config b/frameworks/CSharp/HttpListener/HttpListener/packages.config deleted file mode 100644 index 2e83f9c328f..00000000000 --- a/frameworks/CSharp/HttpListener/HttpListener/packages.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/frameworks/CSharp/HttpListener/README.md b/frameworks/CSharp/HttpListener/README.md deleted file mode 100644 index f5bed3c9283..00000000000 --- a/frameworks/CSharp/HttpListener/README.md +++ /dev/null @@ -1,5 +0,0 @@ -This uses [.NET's HttpListener class](http://msdn.microsoft.com/en-us/library/system.net.httplistener.aspx) which is somewhat similar to Go's net/http package or node.js's built-in HTTP server. HttpListener is a .NET Framework wrapper around [HTTP.SYS](http://www.iis.net/learn/get-started/introduction-to-iis/introduction-to-iis-architecture#Hypertext), the kernel-mode HTTP driver that is used by IIS. - -These tests are based on [aspnet](https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/aspnet) by [@pdonald](https://github.com/pdonald/). - -By using .NET's HttpListener class, we eliminate the overhead of IIS and ASP.NET. This does not use ASP.NET WebForms (.aspx), but instead uses Razor (.cshtml), with the the template parsed at design-time into C# by RazorGenerator. \ No newline at end of file diff --git a/frameworks/CSharp/HttpListener/benchmark_config.json b/frameworks/CSharp/HttpListener/benchmark_config.json deleted file mode 100644 index c03715f0d6a..00000000000 --- a/frameworks/CSharp/HttpListener/benchmark_config.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "framework": "HttpListener", - "tests": [{ - "default": { - "setup_file": "setup", - "json_url": "/json", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Stripped", - "classification": "Platform", - "database": "None", - "framework": "None", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": "None", - "webserver": "None", - "os": "Windows", - "database_os": "Linux", - "display_name": "http-listener", - "notes": "", - "versus": "HttpListener" - }, - "mysql-raw": { - "setup_file": "setup", - "db_url": "/db?provider=mysql", - "query_url": "/db?provider=mysql&queries=", - "fortune_url": "/fortunes?provider=mysql", - "update_url": "/updates?provider=mysql&queries=", - "port": 8080, - "approach": "Stripped", - "classification": "Platform", - "database": "MySQL", - "framework": "None", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": "None", - "webserver": "None", - "os": "Windows", - "database_os": "Linux", - "display_name": "http-listener", - "notes": "", - "versus": "httplistener" - }, - "postgresql-raw": { - "setup_file": "setup", - "db_url": "/db?provider=postgresql", - "query_url": "/db?provider=postgresql&queries=", - "fortune_url": "/fortunes?provider=postgresql", - "update_url": "/updates?provider=postgresql&queries=", - "port": 8080, - "approach": "Stripped", - "classification": "Platform", - "database": "Postgres", - "framework": "None", - "language": "C#", - "orm": "Raw", - "platform": "None", - "webserver": "None", - "os": "Windows", - "database_os": "Linux", - "display_name": "http-listener", - "notes": "", - "versus": "httplistener" - }, - "mongodb-raw": { - "setup_file": "setup", - "db_url": "/mongodbdb", - "query_url": "/mongodbdb?queries=", - "fortune_url": "/mongodbfortunes", - "update_url": "/mongodbupdates?queries=", - "port": 8080, - "approach": "Stripped", - "classification": "Platform", - "database": "MongoDB", - "framework": "None", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": "None", - "webserver": "None", - "os": "Windows", - "database_os": "Linux", - "display_name": "http-listener", - "notes": "", - "versus": "httplistener" - }, - "sqlserver-raw": { - "setup_file": "setup", - "db_url": "/db?provider=sqlserver", - "query_url": "/db?provider=sqlserver&queries=", - "fortune_url": "/fortunes?provider=sqlserver", - "update_url": "/updates?provider=sqlserver&queries=", - "port": 8080, - "approach": "Stripped", - "classification": "Platform", - "database": "SQLServer", - "framework": "None", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": "None", - "webserver": "None", - "os": "Windows", - "database_os": "Windows", - "display_name": "http-listener", - "notes": "", - "versus": "httplistener" - } - }] -} diff --git a/frameworks/CSharp/HttpListener/install.sh b/frameworks/CSharp/HttpListener/install.sh deleted file mode 100755 index a9bf588e2f8..00000000000 --- a/frameworks/CSharp/HttpListener/install.sh +++ /dev/null @@ -1 +0,0 @@ -#!/bin/bash diff --git a/frameworks/CSharp/HttpListener/setup.ps1 b/frameworks/CSharp/HttpListener/setup.ps1 deleted file mode 100644 index fa3406a4c8b..00000000000 --- a/frameworks/CSharp/HttpListener/setup.ps1 +++ /dev/null @@ -1,32 +0,0 @@ -param($action) - -$ErrorActionPreference = 'Stop' - -# From http://zduck.com/2012/powershell-batch-files-exit-codes/ -function Exec -{ - [CmdletBinding()] - param ( - [Parameter(Position=0, Mandatory=1)] - [scriptblock]$Command, - [Parameter(Position=1, Mandatory=0)] - [string]$ErrorMessage = "Execution of command failed.`n$Command" - ) - & $Command - if ($LastExitCode -ne 0) { - throw "Exec: $ErrorMessage" - } -} - -$root = "C:\FrameworkBenchmarks\HttpListener" -$msbuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" - -# Stop -Get-Process | Where-Object { $_.Name -ieq "HttpListener" } | Stop-Process - -if ($action -eq 'start') { - # Build the project - Exec { & $msbuild "$root\HttpListener.sln" /p:DownloadNuGetExe=true /p:RequireRestoreConsent=false /p:Configuration=Release /t:Rebuild } - - Start-Process "$root\HttpListener\bin\Release\HttpListener.exe" -} \ No newline at end of file diff --git a/frameworks/CSharp/HttpListener/setup.py b/frameworks/CSharp/HttpListener/setup.py deleted file mode 100644 index d3a78439a45..00000000000 --- a/frameworks/CSharp/HttpListener/setup.py +++ /dev/null @@ -1,22 +0,0 @@ -import subprocess -import sys -import setup_util -import os - -def start(args, logfile, errfile): - if os.name != 'nt': - return 1 - - try: - setup_util.replace_text("HttpListener/HttpListener/App.config", "localhost", args.database_host) - subprocess.check_call("powershell -Command .\\setup.ps1 start", cwd="HttpListener", stderr=errfile, stdout=logfile) - return 0 - except subprocess.CalledProcessError: - return 1 - -def stop(logfile, errfile): - if os.name != 'nt': - return 0 - - subprocess.check_call("powershell -Command .\\setup.ps1 stop", cwd="HttpListener", stderr=errfile, stdout=logfile) - return 0 \ No newline at end of file diff --git a/frameworks/CSharp/HttpListener/source_code b/frameworks/CSharp/HttpListener/source_code deleted file mode 100644 index 3ef56553954..00000000000 --- a/frameworks/CSharp/HttpListener/source_code +++ /dev/null @@ -1,13 +0,0 @@ -./HttpListener/HttpListener/ -./HttpListener/HttpListener/Models -./HttpListener/HttpListener/Models/Fortune.cs -./HttpListener/HttpListener/Models/MongoDB.cs -./HttpListener/HttpListener/Models/World.cs -./HttpListener/HttpListener/Fortunes.generated.cs -./HttpListener/HttpListener/Fortunes.cshtml -./HttpListener/HttpListener/HttpListener.csproj -./HttpListener/HttpListener/Program.cs -./HttpListener/HttpListener/packages.config -./HttpListener/HttpListener/App.config -./HttpListener/HttpListener/Properties -./HttpListener/HttpListener/Properties/AssemblyInfo.cs diff --git a/frameworks/CSharp/aspnet-stripped/.gitignore b/frameworks/CSharp/aspnet-stripped/.gitignore deleted file mode 100644 index b9965942aae..00000000000 --- a/frameworks/CSharp/aspnet-stripped/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -*.user -*.suo -*/bin/* -*/obj/* -lib/* -!lib/.nuget diff --git a/frameworks/CSharp/aspnet-stripped/NuGet.exe b/frameworks/CSharp/aspnet-stripped/NuGet.exe deleted file mode 100644 index cb3ed0367e1..00000000000 Binary files a/frameworks/CSharp/aspnet-stripped/NuGet.exe and /dev/null differ diff --git a/frameworks/CSharp/aspnet-stripped/README.md b/frameworks/CSharp/aspnet-stripped/README.md deleted file mode 100644 index b52870f50a1..00000000000 --- a/frameworks/CSharp/aspnet-stripped/README.md +++ /dev/null @@ -1,11 +0,0 @@ -This is a heavily stripped-down version of [pdonald](https://github.com/pdonald/)'s aspnet tests. -Right now this is designed to run on Windows. - -For CPU-bound tests such as db, json, fortunes, and plaintext, this is approximately twice as fast as the non-stripped aspnet tests. The performance is obtained by using ASP.NET IHttpHandlers, old-style .aspx files (when HTML is output) and removing unnecessary IIS/ASP.NET modules, especially ones related to URL routing and especially ones written in .NET. - -To replace ASP.NET's URL routing, we directly specify the path to IHttpHandlers in web.config. The idea is that native code in IIS probably (definitely?) does the routing for handlers specified this way, so the routing should be extremely fast, as opposed to ASP.NET's System.Web.Routing code that is extremely configurable. To route to an .aspx page, we use NoAspxHandlerFactory, a small piece of 'middleware' that can directly route from this web.config setting to a .aspx file. - -This is stripped down so much that I'm not sure if anyone would actually want to use these techniques in production. The point of this is the following: - -1. To provide a better comparison against microframeworks/microplatforms that barely do anything. -2. To give us a sense of the upperbound of performance for more realistic tests. \ No newline at end of file diff --git a/frameworks/CSharp/aspnet-stripped/benchmark_config.json b/frameworks/CSharp/aspnet-stripped/benchmark_config.json deleted file mode 100644 index f77dba364c1..00000000000 --- a/frameworks/CSharp/aspnet-stripped/benchmark_config.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "framework": "aspnet-stripped", - "tests": [{ - "default": { - "setup_file": "setup_iis", - "json_url": "/json", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Stripped", - "classification": "Fullstack", - "database": "None", - "framework": "ASP.NET", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "asp.net-stripped", - "notes": "", - "versus": "aspnet-stripped" - }, - "mysql-raw": { - "setup_file": "setup_iis", - "db_url": "/db?provider=mysql", - "query_url": "/db?provider=mysql&queries=", - "fortune_url": "/fortunes?provider=mysql", - "update_url": "/updates?provider=mysql&queries=", - "port": 8080, - "approach": "Stripped", - "classification": "Fullstack", - "database": "MySQL", - "framework": "ASP.NET", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "asp.net-stripped-raw", - "notes": "", - "versus": "aspnet-stripped" - }, - "postgresql-raw": { - "setup_file": "setup_iis", - "db_url": "/db?provider=postgresql", - "query_url": "/db?provider=postgresql&queries=", - "fortune_url": "/fortunes?provider=postgresql", - "update_url": "/updates?provider=postgresql&queries=", - "port": 8080, - "approach": "Stripped", - "classification": "Fullstack", - "database": "Postgres", - "framework": "ASP.NET", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "asp.net-stripped-raw", - "notes": "", - "versus": "asnet-stripped" - }, - "mongodb-raw": { - "setup_file": "setup_iis", - "db_url": "/mongodbdb", - "query_url": "/mongodbdb?queries=", - "fortune_url": "/mongodbfortunes", - "update_url": "/mongodbupdates?queries=", - "port": 8080, - "approach": "Stripped", - "classification": "Fullstack", - "database": "MongoDB", - "framework": "ASP.NET", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "asp.net-stripped-raw", - "notes": "", - "versus": "aspnet-stripped" - }, - "sqlserver-raw": { - "setup_file": "setup_iis", - "db_url": "/db?provider=sqlserver", - "query_url": "/db?provider=sqlserver&queries=", - "fortune_url": "/fortunes?provider=sqlserver", - "update_url": "/updates?provider=sqlserver&queries=", - "port": 8080, - "approach": "Stripped", - "classification": "Fullstack", - "database": "SQLServer", - "framework": "ASP.NET", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Windows", - "display_name": "asp.net-stripped-raw", - "notes": "", - "versus": "aspnet-stripped" - } - }] -} diff --git a/frameworks/CSharp/aspnet-stripped/install.sh b/frameworks/CSharp/aspnet-stripped/install.sh deleted file mode 100755 index 8c8d4ba1a07..00000000000 --- a/frameworks/CSharp/aspnet-stripped/install.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -fw_depends mono diff --git a/frameworks/CSharp/aspnet-stripped/setup_iis.ps1 b/frameworks/CSharp/aspnet-stripped/setup_iis.ps1 deleted file mode 100644 index c8e1a5e98e4..00000000000 --- a/frameworks/CSharp/aspnet-stripped/setup_iis.ps1 +++ /dev/null @@ -1,40 +0,0 @@ -param($action) - -$ErrorActionPreference = 'Stop' - -# From http://zduck.com/2012/powershell-batch-files-exit-codes/ -function Exec -{ - [CmdletBinding()] - param ( - [Parameter(Position=0, Mandatory=1)] - [scriptblock]$Command, - [Parameter(Position=1, Mandatory=0)] - [string]$ErrorMessage = "Execution of command failed.`n$Command" - ) - & $Command - if ($LastExitCode -ne 0) { - throw "Exec: $ErrorMessage" - } -} - -$source = "C:\FrameworkBenchmarks\aspnet-stripped\src" - -# Stop -if (Get-WebSite -Name Benchmarks) { Remove-WebSite -Name Benchmarks } - -if ($action -eq 'start') { - # Because we don't use msbuild to compile the code, we do this all manually. - - Exec { & .\NuGet.exe install -o src\packages src\packages.config } - - if (-Not (Test-Path src\bin)) { New-Item -Path src\bin -ItemType directory | Out-Null } - - $dlls = Get-ChildItem -path src\packages -recurse -include *.dll - foreach ($dll in $dlls) { - Copy-Item $dll src\bin - } - - # Create a website in IIS - New-WebSite -Name Benchmarks -Port 8080 -PhysicalPath $source -} diff --git a/frameworks/CSharp/aspnet-stripped/setup_iis.py b/frameworks/CSharp/aspnet-stripped/setup_iis.py deleted file mode 100644 index 1427ff45c9f..00000000000 --- a/frameworks/CSharp/aspnet-stripped/setup_iis.py +++ /dev/null @@ -1,22 +0,0 @@ -import subprocess -import sys -import setup_util -import os - -def start(args, logfile, errfile): - if os.name != 'nt': - return 1 - - try: - setup_util.replace_text("aspnet-stripped/src/Web.config", "localhost", args.database_host) - subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="aspnet-stripped", stderr=errfile, stdout=logfile) - return 0 - except subprocess.CalledProcessError: - return 1 - -def stop(logfile, errfile): - if os.name != 'nt': - return 0 - - subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="aspnet-stripped", stderr=errfile, stdout=logfile) - return 0 \ No newline at end of file diff --git a/frameworks/CSharp/aspnet-stripped/source_code b/frameworks/CSharp/aspnet-stripped/source_code deleted file mode 100644 index 6d4b5fbf041..00000000000 --- a/frameworks/CSharp/aspnet-stripped/source_code +++ /dev/null @@ -1,14 +0,0 @@ -./aspnet-stripped/src/App_Code/ -./aspnet-stripped/src/App_Code/MyModule.cs -./aspnet-stripped/src/App_Code/UpdatesHandler.cs -./aspnet-stripped/src/App_Code/FortunesPage.cs -./aspnet-stripped/src/App_Code/Models -./aspnet-stripped/src/App_Code/Models/Fortune.cs -./aspnet-stripped/src/App_Code/Models/MongoDB.cs -./aspnet-stripped/src/App_Code/Models/World.cs -./aspnet-stripped/src/App_Code/Common.cs -./aspnet-stripped/src/App_Code/MongoDBHandlers.cs -./aspnet-stripped/src/App_Code/PlaintextHandler.cs -./aspnet-stripped/src/App_Code/DbHandler.cs -./aspnet-stripped/src/App_Code/JsonHandler.cs -./aspnet-stripped/src/App_Code/NoAspxHandlerFactory.cs diff --git a/frameworks/CSharp/aspnet-stripped/src/App_Code/Common.cs b/frameworks/CSharp/aspnet-stripped/src/App_Code/Common.cs deleted file mode 100644 index c306479161e..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/App_Code/Common.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Configuration; -using System.Data; -using System.Data.Common; -using System.Web; - -public class Common -{ - public static DbConnection CreateConnection(HttpRequest request) - { - string providerName = request.QueryString["provider"]; - if (providerName == null) { - throw new ApplicationException("Missing provider querystring argument"); - } - ConnectionStringSettings connectionSettings = ConfigurationManager.ConnectionStrings[providerName]; - DbProviderFactory factory = DbProviderFactories.GetFactory(connectionSettings.ProviderName); - DbConnection connection = factory.CreateConnection(); - connection.ConnectionString = connectionSettings.ConnectionString; - return connection; - } - - public static int GetQueries(HttpRequest request) { - int queries = 1; - string queriesString = request.QueryString["queries"]; - if (queriesString != null) { - // If this fails to parse, queries will be set to zero. - int.TryParse(queriesString, out queries); - queries = Math.Max(1, Math.Min(500, queries)); - } - return queries; - } -} \ No newline at end of file diff --git a/frameworks/CSharp/aspnet-stripped/src/App_Code/DbHandler.cs b/frameworks/CSharp/aspnet-stripped/src/App_Code/DbHandler.cs deleted file mode 100644 index ff5a70a05ba..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/App_Code/DbHandler.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Data.Common; -using System.Threading; -using System.Threading.Tasks; -using System.Web; -using System.Web.Script.Serialization; - -using Benchmarks.AspNet.Models; - -public class DbHandler : IHttpHandler -{ - bool IHttpHandler.IsReusable - { - get { return true; } - } - - void IHttpHandler.ProcessRequest(HttpContext context) - { - Random random = new Random(); - - int queries = Common.GetQueries(context.Request); - List worlds = new List(queries); - - using (DbConnection connection = Common.CreateConnection(context.Request)) - { - connection.Open(); - - using (DbCommand command = connection.CreateCommand()) - { - command.CommandText = "SELECT * FROM World WHERE id = @ID"; - - DbParameter parameter = command.CreateParameter(); - parameter.ParameterName = "@ID"; - - command.Parameters.Add(parameter); - - for (int i = 0; i < worlds.Capacity; i++) - { - int randomID = random.Next(0, 10000) + 1; - - parameter.Value = randomID; - - // Don't use CommandBehavior.SingleRow because that will make the MySql provider - // send two extra commands to limit the result to one row. - using (DbDataReader reader = command.ExecuteReader()) - { - if (reader.Read()) - { - worlds.Add(new World - { - id = reader.GetInt32(0), - randomNumber = reader.GetInt32(1) - }); - } - } - } - } - } - - HttpResponse response = context.Response; - response.ContentType = "application/json"; - response.Write(new JavaScriptSerializer().Serialize( - worlds.Count > 1 ? (Object)worlds : (Object)worlds[0])); - } -} \ No newline at end of file diff --git a/frameworks/CSharp/aspnet-stripped/src/App_Code/FortunesPage.cs b/frameworks/CSharp/aspnet-stripped/src/App_Code/FortunesPage.cs deleted file mode 100644 index 374f582a6e0..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/App_Code/FortunesPage.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Data.Common; -using System.Linq; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.HtmlControls; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Xml.Linq; -using System.Runtime.Serialization.Json; -using System.IO; -using System.Text; - -using Benchmarks.AspNet.Models; - -public partial class FortunesPage : System.Web.UI.Page -{ - protected void Page_Load(object sender, EventArgs e) - { - List fortunes = new List(); - - using (DbConnection connection = Common.CreateConnection(Request)) - { - connection.Open(); - - using (DbCommand command = connection.CreateCommand()) - { - command.CommandText = "SELECT * FROM Fortune"; - - using (DbDataReader reader = command.ExecuteReader(CommandBehavior.SequentialAccess)) - { - while (reader.Read()) - { - fortunes.Add(new Fortune - { - ID = reader.GetInt32(0), - Message = reader.GetString(1) - }); - } - } - } - } - - fortunes.Add(new Fortune { ID = 0, Message = "Additional fortune added at request time." }); - fortunes.Sort(); - - Fortunes = fortunes; - } - - public List Fortunes - { - get; set; - } -} diff --git a/frameworks/CSharp/aspnet-stripped/src/App_Code/JsonHandler.cs b/frameworks/CSharp/aspnet-stripped/src/App_Code/JsonHandler.cs deleted file mode 100644 index 30a35a63256..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/App_Code/JsonHandler.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Web; -using System.Web.Script.Serialization; - -public class JsonHandler : IHttpHandler -{ - bool IHttpHandler.IsReusable - { - get { return true; } - } - - void IHttpHandler.ProcessRequest(HttpContext context) - { - HttpResponse response = context.Response; - response.ContentType = "application/json"; - response.Write(new JavaScriptSerializer().Serialize(new { message = "Hello, World!" })); - } -} \ No newline at end of file diff --git a/frameworks/CSharp/aspnet-stripped/src/App_Code/Models/Fortune.cs b/frameworks/CSharp/aspnet-stripped/src/App_Code/Models/Fortune.cs deleted file mode 100644 index e145aeda9bc..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/App_Code/Models/Fortune.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace Benchmarks.AspNet.Models -{ - public class Fortune : IComparable - { - public int ID { get; set; } - public string Message { get; set; } - - public int CompareTo(Fortune other) - { - return Message.CompareTo(other.Message); - } - } -} \ No newline at end of file diff --git a/frameworks/CSharp/aspnet-stripped/src/App_Code/Models/MongoDB.cs b/frameworks/CSharp/aspnet-stripped/src/App_Code/Models/MongoDB.cs deleted file mode 100644 index 1a4b5c6962f..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/App_Code/Models/MongoDB.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Configuration; -using System.Web.Script.Serialization; - -using MongoDB.Bson; -using MongoDB.Bson.Serialization; -using MongoDB.Driver; - -namespace Benchmarks.AspNet.Models -{ - public class MongoDB - { - public MongoCollection Worlds { get; private set; } - public MongoCollection Fortunes { get; private set; } - - static MongoDB() - { - BsonClassMap.RegisterClassMap(m => - { - m.MapProperty(w => w.id); - m.MapProperty(w => w.randomNumber); - }); - - BsonClassMap.RegisterClassMap(m => - { - m.MapIdProperty(w => w._id); - }); - - BsonClassMap.RegisterClassMap(m => - { - m.MapProperty(f => f.ID).SetElementName("id"); - m.MapProperty(f => f.Message).SetElementName("message"); - }); - } - - public MongoDB(string connectionStringName) - { - string connectionString = ConfigurationManager.ConnectionStrings[connectionStringName].ConnectionString; - - MongoClient client = new MongoClient(connectionString); - MongoServer server = client.GetServer(); - MongoDatabase database = server.GetDatabase("hello_world"); - - Worlds = database.GetCollection("world"); - Fortunes = database.GetCollection("fortune"); - } - } - - public class MongoWorld : World - { - [ScriptIgnore] - public ObjectId _id { get; set; } - } -} \ No newline at end of file diff --git a/frameworks/CSharp/aspnet-stripped/src/App_Code/Models/World.cs b/frameworks/CSharp/aspnet-stripped/src/App_Code/Models/World.cs deleted file mode 100644 index fc19f7c222b..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/App_Code/Models/World.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Benchmarks.AspNet.Models -{ - public class World - { - public int id { get; set; } - public int randomNumber { get; set; } - } -} \ No newline at end of file diff --git a/frameworks/CSharp/aspnet-stripped/src/App_Code/MongoDBHandlers.cs b/frameworks/CSharp/aspnet-stripped/src/App_Code/MongoDBHandlers.cs deleted file mode 100644 index e2d4b2397b0..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/App_Code/MongoDBHandlers.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Linq; -using System.Web; -using System.Web.Script.Serialization; - -using MongoDB.Driver.Builders; - -using Benchmarks.AspNet.Models; - -public class MongoDBDbHandler : IHttpHandler -{ - bool IHttpHandler.IsReusable - { - get { return true; } - } - - void IHttpHandler.ProcessRequest(HttpContext context) - { - Random random = new Random(); - - int queries = Common.GetQueries(context.Request); - List worlds = new List(queries); - - Benchmarks.AspNet.Models.MongoDB db = new Benchmarks.AspNet.Models.MongoDB("MongoDB"); - - for (int i = 0; i < worlds.Capacity; i++) - { - int randomID = random.Next(0, 10000) + 1; - worlds.Add(db.Worlds.FindOne(Query.EQ(w => w.id, randomID))); - } - - HttpResponse response = context.Response; - response.ContentType = "application/json"; - response.Write(new JavaScriptSerializer().Serialize( - worlds.Count > 1 ? (Object)worlds : (Object)worlds[0])); - } -} - -public partial class MongoDBFortunesPage : System.Web.UI.Page -{ - protected void Page_Load(object sender, EventArgs e) - { - Benchmarks.AspNet.Models.MongoDB db = new Benchmarks.AspNet.Models.MongoDB("MongoDB"); - - List fortunes = db.Fortunes.FindAll().ToList(); - - fortunes.Add(new Fortune { ID = 0, Message = "Additional fortune added at request time." }); - fortunes.Sort(); - - Fortunes = fortunes; - } - - public List Fortunes - { - get; set; - } -} - -public class MongoDBUpdatesHandler : IHttpHandler -{ - bool IHttpHandler.IsReusable - { - get { return true; } - } - - void IHttpHandler.ProcessRequest(HttpContext context) - { - Random random = new Random(); - - Benchmarks.AspNet.Models.MongoDB db = new Benchmarks.AspNet.Models.MongoDB("MongoDB"); - - int queries = Common.GetQueries(context.Request); - List worlds = new List(queries); - - for (int i = 0; i < worlds.Capacity; i++) - { - int randomID = random.Next(0, 10000) + 1; - int randomNumber = random.Next(0, 10000) + 1; - - World world = db.Worlds.FindOne(Query.EQ(w => w.id, randomID)); - world.randomNumber = randomNumber; - worlds.Add(world); - - db.Worlds.Save(world); - } - - HttpResponse response = context.Response; - response.ContentType = "application/json"; - response.Write(new JavaScriptSerializer().Serialize( - worlds.Count > 1 ? (Object)worlds : (Object)worlds[0])); - } -} \ No newline at end of file diff --git a/frameworks/CSharp/aspnet-stripped/src/App_Code/MyModule.cs b/frameworks/CSharp/aspnet-stripped/src/App_Code/MyModule.cs deleted file mode 100644 index e9a89703d70..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/App_Code/MyModule.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Configuration; -using System.Threading; -using System.Web; - -public class MyModule: IHttpModule -{ - private static volatile bool started = false; - private static object locker = new object(); - - public void Init(HttpApplication context) - { - if (!started) - { - lock (locker) - { - Start(); - started = true; - } - } - } - - private void Start() - { - Threads(); - } - - private void Threads() - { - // To improve CPU utilization, increase the number of threads that the .NET thread pool expands by when - // a burst of requests come in. We could do this by editing machine.config/system.web/processModel/minWorkerThreads, - // but that seems too global a change, so we do it in code for just our AppPool. More info: - // - // http://support.microsoft.com/kb/821268 - // http://blogs.msdn.com/b/tmarq/archive/2007/07/21/asp-net-thread-usage-on-iis-7-0-and-6-0.aspx - // http://blogs.msdn.com/b/perfworld/archive/2010/01/13/how-can-i-improve-the-performance-of-asp-net-by-adjusting-the-clr-thread-throttling-properties.aspx - - int newMinWorkerThreads = Convert.ToInt32(ConfigurationManager.AppSettings["minWorkerThreadsPerLogicalProcessor"]); - if (newMinWorkerThreads > 0) - { - int minWorkerThreads, minCompletionPortThreads; - ThreadPool.GetMinThreads(out minWorkerThreads, out minCompletionPortThreads); - ThreadPool.SetMinThreads(Environment.ProcessorCount * newMinWorkerThreads, minCompletionPortThreads); - } - } - - public void Dispose() - { - } -} diff --git a/frameworks/CSharp/aspnet-stripped/src/App_Code/NoAspxHandlerFactory.cs b/frameworks/CSharp/aspnet-stripped/src/App_Code/NoAspxHandlerFactory.cs deleted file mode 100644 index a15eda0753f..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/App_Code/NoAspxHandlerFactory.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Web; -using System.Web.UI; -using System.Web.Compilation; - -// This bit of magic lets us access /fortunes.aspx as /fortunes. This could be used for any URL specified -// in Web.config. -public class NoAspxHandlerFactory : IHttpHandlerFactory -{ - public virtual IHttpHandler GetHandler(HttpContext context, string requestType, string virtualPath, string path) - { - // virtualPath is like "/fortunes", turn that into "/fortunes.aspx" - return BuildManager.CreateInstanceFromVirtualPath(virtualPath + ".aspx", typeof(Page)) as Page; - } - - public virtual void ReleaseHandler(IHttpHandler handler) - { - } -} \ No newline at end of file diff --git a/frameworks/CSharp/aspnet-stripped/src/App_Code/PlaintextHandler.cs b/frameworks/CSharp/aspnet-stripped/src/App_Code/PlaintextHandler.cs deleted file mode 100644 index 097590bbc30..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/App_Code/PlaintextHandler.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Web; -using System.Web.Script.Serialization; - -public class PlaintextHandler : IHttpHandler -{ - bool IHttpHandler.IsReusable - { - get { return true; } - } - - void IHttpHandler.ProcessRequest(HttpContext context) - { - HttpResponse response = context.Response; - response.ContentType = "text/plain"; - response.Write("Hello, World!"); - } -} \ No newline at end of file diff --git a/frameworks/CSharp/aspnet-stripped/src/App_Code/UpdatesHandler.cs b/frameworks/CSharp/aspnet-stripped/src/App_Code/UpdatesHandler.cs deleted file mode 100644 index e5716d35312..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/App_Code/UpdatesHandler.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Data.Common; -using System.Threading; -using System.Threading.Tasks; -using System.Web; -using System.Web.Script.Serialization; - -using Benchmarks.AspNet.Models; - -public class UpdatesHandler : IHttpHandler -{ - bool IHttpHandler.IsReusable - { - get { return true; } - } - - void IHttpHandler.ProcessRequest(HttpContext context) - { - Random random = new Random(); - List worlds = new List(Common.GetQueries(context.Request)); - - using (DbConnection connection = Common.CreateConnection(context.Request)) - { - connection.Open(); - - using (DbCommand selectCommand = connection.CreateCommand(), - updateCommand = connection.CreateCommand()) - { - selectCommand.CommandText = "SELECT * FROM World WHERE id = @ID"; - updateCommand.CommandText = "UPDATE World SET randomNumber = @Number WHERE id = @ID"; - - for (int i = 0; i < worlds.Capacity; i++) - { - int randomID = random.Next(0, 10000) + 1; - int randomNumber = random.Next(0, 10000) + 1; - - DbParameter idParameter = selectCommand.CreateParameter(); - idParameter.ParameterName = "@ID"; - idParameter.Value = randomID; - - selectCommand.Parameters.Clear(); - selectCommand.Parameters.Add(idParameter); - - World world = null; - - // Don't use CommandBehavior.SingleRow because that will make the MySql provider - // send two extra commands to limit the result to one row. - using (DbDataReader reader = selectCommand.ExecuteReader()) - { - if (reader.Read()) - { - world = new World - { - id = reader.GetInt32(0), - randomNumber = reader.GetInt32(1) - }; - } - } - - DbParameter idUpdateParameter = updateCommand.CreateParameter(); - idUpdateParameter.ParameterName = "@ID"; - idUpdateParameter.Value = randomID; - - DbParameter numberParameter = updateCommand.CreateParameter(); - numberParameter.ParameterName = "@Number"; - numberParameter.Value = randomNumber; - - updateCommand.Parameters.Clear(); - updateCommand.Parameters.Add(idUpdateParameter); - updateCommand.Parameters.Add(numberParameter); - - updateCommand.ExecuteNonQuery(); - - world.randomNumber = randomNumber; - worlds.Add(world); - } - } - } - - HttpResponse response = context.Response; - response.ContentType = "application/json"; - response.Write(new JavaScriptSerializer().Serialize( - worlds.Count > 1 ? (Object)worlds : (Object)worlds[0])); - } -} \ No newline at end of file diff --git a/frameworks/CSharp/aspnet-stripped/src/Web.config b/frameworks/CSharp/aspnet-stripped/src/Web.config deleted file mode 100644 index b8da9b2d08b..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/Web.config +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/frameworks/CSharp/aspnet-stripped/src/fortunes.aspx b/frameworks/CSharp/aspnet-stripped/src/fortunes.aspx deleted file mode 100644 index 614ba56328a..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/fortunes.aspx +++ /dev/null @@ -1 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" Inherits="FortunesPage" %>Fortunes<% foreach (var fortune in Fortunes) { %><% } %>
idmessage
<% = fortune.ID %><%: fortune.Message %>
\ No newline at end of file diff --git a/frameworks/CSharp/aspnet-stripped/src/mongodbfortunes.aspx b/frameworks/CSharp/aspnet-stripped/src/mongodbfortunes.aspx deleted file mode 100644 index 131b8a3cc71..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/mongodbfortunes.aspx +++ /dev/null @@ -1 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" Inherits="MongoDBFortunesPage" %>Fortunes<% foreach (var fortune in Fortunes) { %><% } %>
idmessage
<% = fortune.ID %><%: fortune.Message %>
\ No newline at end of file diff --git a/frameworks/CSharp/aspnet-stripped/src/packages.config b/frameworks/CSharp/aspnet-stripped/src/packages.config deleted file mode 100644 index 7e3c6e9f861..00000000000 --- a/frameworks/CSharp/aspnet-stripped/src/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/frameworks/CSharp/aspnet/.gitignore b/frameworks/CSharp/aspnet/.gitignore deleted file mode 100644 index d8379475bd3..00000000000 --- a/frameworks/CSharp/aspnet/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -*.user -*.suo -*/bin/* -*/obj/* -*/packages/* -nginx.upstream.conf diff --git a/frameworks/CSharp/aspnet/aspnet-base.dockerfile b/frameworks/CSharp/aspnet/aspnet-base.dockerfile new file mode 100644 index 00000000000..cf1884d4754 --- /dev/null +++ b/frameworks/CSharp/aspnet/aspnet-base.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/mono:0.1 + +ADD ./ /aspnet +WORKDIR /aspnet + +RUN xbuild src/Benchmarks.build.proj /t:Clean +RUN xbuild src/Benchmarks.build.proj /t:Build diff --git a/frameworks/CSharp/aspnet/aspnet-mono-jsonnet.dockerfile b/frameworks/CSharp/aspnet/aspnet-mono-jsonnet.dockerfile new file mode 100644 index 00000000000..3755571d5f1 --- /dev/null +++ b/frameworks/CSharp/aspnet/aspnet-mono-jsonnet.dockerfile @@ -0,0 +1,2 @@ +FROM techempower/aspnet-base:0.1 +CMD bash run.sh diff --git a/frameworks/CSharp/aspnet/aspnet-mono-mysql-entityframework.dockerfile b/frameworks/CSharp/aspnet/aspnet-mono-mysql-entityframework.dockerfile new file mode 100644 index 00000000000..aec5baef38d --- /dev/null +++ b/frameworks/CSharp/aspnet/aspnet-mono-mysql-entityframework.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/aspnet-base:0.1 + +CMD bash run.sh diff --git a/frameworks/CSharp/aspnet/aspnet-mono-mysql-raw.dockerfile b/frameworks/CSharp/aspnet/aspnet-mono-mysql-raw.dockerfile new file mode 100644 index 00000000000..aec5baef38d --- /dev/null +++ b/frameworks/CSharp/aspnet/aspnet-mono-mysql-raw.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/aspnet-base:0.1 + +CMD bash run.sh diff --git a/frameworks/CSharp/aspnet/aspnet-mono-servicestack.dockerfile b/frameworks/CSharp/aspnet/aspnet-mono-servicestack.dockerfile new file mode 100644 index 00000000000..aec5baef38d --- /dev/null +++ b/frameworks/CSharp/aspnet/aspnet-mono-servicestack.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/aspnet-base:0.1 + +CMD bash run.sh diff --git a/frameworks/CSharp/aspnet/aspnet.dockerfile b/frameworks/CSharp/aspnet/aspnet.dockerfile new file mode 100644 index 00000000000..aec5baef38d --- /dev/null +++ b/frameworks/CSharp/aspnet/aspnet.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/aspnet-base:0.1 + +CMD bash run.sh diff --git a/frameworks/CSharp/aspnet/benchmark_config.json b/frameworks/CSharp/aspnet/benchmark_config.json index 6dcacb299a6..2ad03efc998 100644 --- a/frameworks/CSharp/aspnet/benchmark_config.json +++ b/frameworks/CSharp/aspnet/benchmark_config.json @@ -2,219 +2,6 @@ "framework": "aspnet", "tests": [{ "default": { - "setup_file": "setup_iis", - "json_url": "/json/default", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "None", - "framework": "ASP.NET", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "asp.net", - "notes": "", - "versus": "aspnet" - }, - "jsonnet": { - "setup_file": "setup_iis", - "json_url": "/json/jsonnet", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "None", - "framework": "ASP.NET", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "jsonnet", - "notes": "", - "versus": "aspnet" - }, - "servicestack": { - "setup_file": "setup_iis", - "json_url": "/json/servicestack", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "None", - "framework": "ASP.NET", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "servicestack", - "notes": "", - "versus": "aspnet" - }, - "mysql-raw": { - "setup_file": "setup_iis", - "db_url": "/ado/mysql", - "query_url": "/ado/mysql?queries=", - "fortune_url": "/ado/mysql/fortunes", - "update_url": "/ado/mysql/update?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "MySQL", - "framework": "ASP.NET", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "asp.net-raw", - "notes": "", - "versus": "aspnet" - }, - "postgresql-raw": { - "setup_file": "setup_iis", - "db_url": "/ado/postgresql", - "query_url": "/ado/postgresql?queries=", - "fortune_url": "/ado/postgresql/fortunes", - "update_url": "/ado/postgresql/update?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "Postgres", - "framework": "ASP.NET", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "asp.net-raw", - "notes": "", - "versus": "aspnet" - }, - "mongodb-raw": { - "setup_file": "setup_iis", - "db_url": "/mongodb", - "query_url": "/mongodb?queries=", - "fortune_url": "/mongodb/fortunes", - "update_url": "/mongodb/update?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "MongoDB", - "framework": "ASP.NET", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "asp.net-raw", - "notes": "", - "versus": "aspnet" - }, - "sqlserver-raw": { - "setup_file": "setup_iis", - "db_url": "/ado/sqlserver", - "query_url": "/ado/sqlserver?queries=", - "fortune_url": "/ado/sqlserver/fortunes", - "update_url": "/ado/sqlserver/update?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "SQLServer", - "framework": "ASP.NET", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Windows", - "display_name": "aspnet-raw", - "notes": "", - "versus": "aspnet" - }, - "mysql-entityframework": { - "setup_file": "setup_iis", - "db_url": "/entityframework/mysql", - "query_url": "/entityframework/mysql?queries=", - "fortune_url": "/entityframework/mysql/fortunes", - "update_url": "/entityframework/mysql/update?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "MySQL", - "framework": "ASP.NET", - "language": "C#", - "flavor": "Microsoft", - "orm": "Full", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "EntityFramework", - "notes": "", - "versus": "aspnet" - }, - "postgresql-entityframework": { - "setup_file": "setup_iis", - "db_url": "/entityframework/postgresql", - "query_url": "/entityframework/postgresql?queries=", - "fortune_url": "/entityframework/postgresql/fortunes", - "update_url": "/entityframework/postgresql/update?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "Postgres", - "framework": "ASP.NET", - "language": "C#", - "flavor": "Microsoft", - "orm": "Full", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "EntityFramework", - "notes": "", - "versus": "aspnet" - }, - "sqlserver-entityframework": { - "setup_file": "setup_iis", - "db_url": "/entityframework/sqlserver", - "query_url": "/entityframework/sqlserver?queries=", - "fortune_url": "/entityframework/sqlserver/fortunes", - "update_url": "/entityframework/sqlserver/update?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "SQLServer", - "framework": "ASP.NET", - "language": "C#", - "flavor": "Microsoft", - "orm": "Full", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Windows", - "display_name": "EntityFramework", - "notes": "", - "versus": "aspnet" - }, - "mono": { - "setup_file": "setup_nginx", "json_url": "/json/default", "plaintext_url": "/plaintext", "port": 8080, @@ -234,7 +21,6 @@ "versus": "aspnet-mono" }, "mono-jsonnet": { - "setup_file": "setup_nginx", "json_url": "/json/jsonnet", "port": 8080, "approach": "Realistic", @@ -253,7 +39,6 @@ "versus": "aspnet-mono" }, "mono-servicestack": { - "setup_file": "setup_nginx", "json_url": "/json/servicestack", "port": 8080, "approach": "Realistic", @@ -272,7 +57,6 @@ "versus": "aspnet-mono" }, "mono-mysql-raw": { - "setup_file": "setup_mysql", "json_url": "/json/default", "plaintext_url": "/plaintext", "db_url": "/ado/mysql", @@ -296,7 +80,6 @@ "versus": "aspnet" }, "mono-mysql-entityframework": { - "setup_file": "setup_mysql", "db_url": "/entityframework/mysql", "query_url": "/entityframework/mysql?queries=", "fortune_url": "/entityframework/mysql/fortunes", diff --git a/frameworks/CSharp/aspnet/run.sh b/frameworks/CSharp/aspnet/run.sh new file mode 100644 index 00000000000..8c1a69dbde1 --- /dev/null +++ b/frameworks/CSharp/aspnet/run.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +CPU_COUNT=$(nproc) + +# one fastcgi instance for each thread +# load balanced by nginx +port_start=9001 +port_end=$(($port_start+$CPU_COUNT)) + +# To debug, use --printlog --verbose --loglevels=All +for port in $(seq $port_start $port_end); do + MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 --applications=/:/aspnet/src --socket=tcp:127.0.0.1:$port & +done + +sleep 5s + +# nginx +conf="upstream mono {\n" +for port in $(seq $port_start $port_end); do + conf+="\tserver 127.0.0.1:${port};\n" +done +conf+="}" + +echo -e $conf > nginx.upstream.conf +nginx -c /aspnet/nginx.conf -g "worker_processes ${CPU_COUNT};" + +wait diff --git a/frameworks/CSharp/aspnet/setup_iis.ps1 b/frameworks/CSharp/aspnet/setup_iis.ps1 deleted file mode 100644 index 01478e8b7bb..00000000000 --- a/frameworks/CSharp/aspnet/setup_iis.ps1 +++ /dev/null @@ -1,39 +0,0 @@ -param($action) - -$ErrorActionPreference = 'Stop' - -# From http://zduck.com/2012/powershell-batch-files-exit-codes/ -function Exec -{ - [CmdletBinding()] - param ( - [Parameter(Position=0, Mandatory=1)] - [scriptblock]$Command, - [Parameter(Position=1, Mandatory=0)] - [string]$ErrorMessage = "Execution of command failed.`n$Command" - ) - & $Command - if ($LastExitCode -ne 0) { - throw "Exec: $ErrorMessage" - } -} - -$wwwroot = "C:\FrameworkBenchmarks\aspnet\www" -$source = "C:\FrameworkBenchmarks\aspnet\src" -$msbuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" - -# Stop -if (Get-WebSite -Name Benchmarks) { Remove-WebSite -Name Benchmarks } -Get-ChildItem -Path $wwwroot -Recurse -ErrorAction 'SilentlyContinue' | Remove-Item -Force -Recurse -ErrorAction 'SilentlyContinue' | Out-Null -Remove-Item -Force -Recurse $wwwroot -ErrorAction 'SilentlyContinue' | Out-Null - -if ($action -eq 'start') { - # Create a website in IIS - New-Item -Path $wwwroot -Type Directory -ErrorAction 'SilentlyContinue' | Out-Null - New-WebSite -Name Benchmarks -Port 8080 -PhysicalPath $wwwroot - - # Build the project - Exec { & $msbuild "$source\Benchmarks.AspNet.csproj" /t:RestorePackages } - Exec { & $msbuild "$source\Benchmarks.AspNet.csproj" /p:Configuration=Release /p:Platform=x64 /t:Clean } - Exec { & $msbuild "$source\Benchmarks.AspNet.csproj" /p:Configuration=Release /p:Platform=x64 /p:DeployOnBuild=true /p:PublishProfile=IIS } -} diff --git a/frameworks/CSharp/aspnet/setup_iis.py b/frameworks/CSharp/aspnet/setup_iis.py deleted file mode 100644 index 69fb681b170..00000000000 --- a/frameworks/CSharp/aspnet/setup_iis.py +++ /dev/null @@ -1,22 +0,0 @@ -import subprocess -import sys -import setup_util -import os - -def start(args, logfile, errfile): - if os.name != 'nt': - return 1 - - try: - setup_util.replace_text("aspnet/src/Web.config", "localhost", args.database_host) - subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="aspnet", stderr=errfile, stdout=logfile) - return 0 - except subprocess.CalledProcessError: - return 1 - -def stop(logfile, errfile): - if os.name != 'nt': - return 0 - - subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="aspnet", stderr=errfile, stdout=logfile) - return 0 \ No newline at end of file diff --git a/frameworks/CSharp/aspnet/setup_mongodb.sh b/frameworks/CSharp/aspnet/setup_mongodb.sh deleted file mode 100644 index 191e32213ad..00000000000 --- a/frameworks/CSharp/aspnet/setup_mongodb.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends mongodb - -source ./setup_nginx.sh \ No newline at end of file diff --git a/frameworks/CSharp/aspnet/setup_mysql.sh b/frameworks/CSharp/aspnet/setup_mysql.sh deleted file mode 100644 index 105002bb141..00000000000 --- a/frameworks/CSharp/aspnet/setup_mysql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends mysql - -source ./setup_nginx.sh \ No newline at end of file diff --git a/frameworks/CSharp/aspnet/setup_nginx.sh b/frameworks/CSharp/aspnet/setup_nginx.sh deleted file mode 100755 index 98565886a4e..00000000000 --- a/frameworks/CSharp/aspnet/setup_nginx.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -fw_depends nginx mono - -# extra cleaning -rm -rf src/bin src/obj -rm -rf /tmp/nuget - -xbuild src/Benchmarks.build.proj /t:Clean -xbuild src/Benchmarks.build.proj /t:Build - -# one fastcgi instance for each thread -# load balanced by nginx -port_start=9001 -port_end=$(($port_start+$CPU_COUNT)) - -# nginx -conf="upstream mono {\n" -for port in $(seq $port_start $port_end); do - conf+="\tserver 127.0.0.1:${port};\n" -done -conf+="}" -echo -e $conf > $TROOT/nginx.upstream.conf - -nginx -c $TROOT/nginx.conf -g "worker_processes ${CPU_COUNT};" - -# To debug, use --printlog --verbose --loglevels=All -for port in $(seq $port_start $port_end); do - fastcgi-mono-server4 --applications=/:$TROOT/src --socket=tcp:127.0.0.1:$port & -done diff --git a/frameworks/CSharp/aspnet/setup_postgresql.sh b/frameworks/CSharp/aspnet/setup_postgresql.sh deleted file mode 100644 index 316b111da75..00000000000 --- a/frameworks/CSharp/aspnet/setup_postgresql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends postgresql - -source ./setup_nginx.sh \ No newline at end of file diff --git a/frameworks/CSharp/aspnet/src/Web.config b/frameworks/CSharp/aspnet/src/Web.config index 6e0ef0d6e69..36a015880ff 100644 --- a/frameworks/CSharp/aspnet/src/Web.config +++ b/frameworks/CSharp/aspnet/src/Web.config @@ -6,10 +6,10 @@ - - - - + + + + diff --git a/frameworks/CSharp/aspnetcore/Benchmarks/Benchmarks.csproj b/frameworks/CSharp/aspnetcore/Benchmarks/Benchmarks.csproj index 02b076556f3..7db57c4b763 100644 --- a/frameworks/CSharp/aspnetcore/Benchmarks/Benchmarks.csproj +++ b/frameworks/CSharp/aspnetcore/Benchmarks/Benchmarks.csproj @@ -12,18 +12,18 @@ - - - - - - - + + + + + + + - - + + diff --git a/frameworks/CSharp/aspnetcore/Benchmarks/appsettings.postgresql.json b/frameworks/CSharp/aspnetcore/Benchmarks/appsettings.postgresql.json index 56747edd3ed..cc2c3a53902 100644 --- a/frameworks/CSharp/aspnetcore/Benchmarks/appsettings.postgresql.json +++ b/frameworks/CSharp/aspnetcore/Benchmarks/appsettings.postgresql.json @@ -1,4 +1,4 @@ { - "ConnectionString": "Server={db_server_placeholder};Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=1024;NoResetOnClose=true;Max Auto Prepare=3", + "ConnectionString": "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=1024;NoResetOnClose=true;Max Auto Prepare=3", "Database": "postgresql" -} +} \ No newline at end of file diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-base.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-base.dockerfile new file mode 100644 index 00000000000..8afb05c91f3 --- /dev/null +++ b/frameworks/CSharp/aspnetcore/aspnetcore-base.dockerfile @@ -0,0 +1,15 @@ +FROM techempower/base:0.1 + +ADD ./ /aspnetcore +WORKDIR /aspnetcore + +ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE true +ENV DOTNET_CLI_TELEMETRY_OPTOUT true + +RUN apt-get install apt-transport-https +RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg +RUN sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list' +RUN apt-get update +RUN apt-get install -y dotnet-sdk-2.1.4 + +ENV PATH="/root/.dotnet:${PATH}" diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-middleware-dapper.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-middleware-dapper.dockerfile new file mode 100644 index 00000000000..15ed601c91b --- /dev/null +++ b/frameworks/CSharp/aspnetcore/aspnetcore-middleware-dapper.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/aspnetcore-base:0.1 + +CMD bash setup-dapper.sh diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-middleware-ef.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-middleware-ef.dockerfile new file mode 100644 index 00000000000..788d8383b32 --- /dev/null +++ b/frameworks/CSharp/aspnetcore/aspnetcore-middleware-ef.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/aspnetcore-base:0.1 + +CMD bash setup-ef.sh diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-middleware-json.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-middleware-json.dockerfile new file mode 100644 index 00000000000..be5352e4bde --- /dev/null +++ b/frameworks/CSharp/aspnetcore/aspnetcore-middleware-json.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/aspnetcore-base:0.1 + +CMD bash setup-json.sh diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-middleware-raw.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-middleware-raw.dockerfile new file mode 100644 index 00000000000..371cf2d097c --- /dev/null +++ b/frameworks/CSharp/aspnetcore/aspnetcore-middleware-raw.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/aspnetcore-base:0.1 + +CMD bash setup-raw.sh diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-mvc-dapper.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-mvc-dapper.dockerfile new file mode 100644 index 00000000000..a71a09bbc85 --- /dev/null +++ b/frameworks/CSharp/aspnetcore/aspnetcore-mvc-dapper.dockerfile @@ -0,0 +1,2 @@ +FROM techempower/aspnetcore-base:0.1 +CMD bash setup-mvc-dapper.sh diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-mvc-ef.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-mvc-ef.dockerfile new file mode 100644 index 00000000000..a768502a780 --- /dev/null +++ b/frameworks/CSharp/aspnetcore/aspnetcore-mvc-ef.dockerfile @@ -0,0 +1,2 @@ +FROM techempower/aspnetcore-base:0.1 +CMD bash setup-mvc-ef.sh diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-mvc-json.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-mvc-json.dockerfile new file mode 100644 index 00000000000..30a4ea64069 --- /dev/null +++ b/frameworks/CSharp/aspnetcore/aspnetcore-mvc-json.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/aspnetcore-base:0.1 + +CMD bash setup-mvc-json.sh diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-mvc-raw.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-mvc-raw.dockerfile new file mode 100644 index 00000000000..6d2fc6260e3 --- /dev/null +++ b/frameworks/CSharp/aspnetcore/aspnetcore-mvc-raw.dockerfile @@ -0,0 +1,2 @@ +FROM techempower/aspnetcore-base:0.1 +CMD bash setup-mvc-raw.sh diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-mvc.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-mvc.dockerfile new file mode 100644 index 00000000000..2019616d271 --- /dev/null +++ b/frameworks/CSharp/aspnetcore/aspnetcore-mvc.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/aspnetcore-base:0.1 + +CMD bash setup-mvc-plaintext.sh diff --git a/frameworks/CSharp/aspnetcore/aspnetcore.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore.dockerfile new file mode 100644 index 00000000000..b835ad6d3a2 --- /dev/null +++ b/frameworks/CSharp/aspnetcore/aspnetcore.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/aspnetcore-base:0.1 + +CMD bash setup-plaintext.sh diff --git a/frameworks/CSharp/aspnetcore/benchmark_config.json b/frameworks/CSharp/aspnetcore/benchmark_config.json index 6efa528293d..f8c8e45d187 100644 --- a/frameworks/CSharp/aspnetcore/benchmark_config.json +++ b/frameworks/CSharp/aspnetcore/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "aspnetcore", "tests": [{ "default": { - "setup_file": "setup-plaintext", "plaintext_url": "/plaintext", "port": 8080, "approach": "Realistic", @@ -13,7 +12,7 @@ "orm": "Raw", "platform": ".NET", "flavor": "CoreCLR", - "webserver": "None", + "webserver": "Kestrel", "os": "Linux", "database_os": "Linux", "display_name": "aspnetcore-linux", @@ -21,7 +20,6 @@ "versus": "" }, "middleware-json": { - "setup_file": "setup-json", "json_url": "/json", "port": 8080, "approach": "Realistic", @@ -32,7 +30,7 @@ "orm": "Raw", "platform": ".NET", "flavor": "CoreCLR", - "webserver": "None", + "webserver": "Kestrel", "os": "Linux", "database_os": "Linux", "display_name": "aspnetcore-linux", @@ -40,7 +38,6 @@ "versus": "" }, "middleware-raw": { - "setup_file": "setup-raw", "db_url": "/db/raw", "query_url": "/queries/raw?queries=", "update_url": "/updates/raw?queries=", @@ -54,7 +51,7 @@ "orm": "Raw", "platform": ".NET", "flavor": "CoreCLR", - "webserver": "None", + "webserver": "Kestrel", "os": "Linux", "database_os": "Linux", "display_name": "aspnetcore-middleware-raw", @@ -62,7 +59,6 @@ "versus": "" }, "middleware-ef": { - "setup_file": "setup-ef", "db_url": "/db/ef", "query_url": "/queries/ef?queries=", "update_url": "/updates/ef?queries=", @@ -76,7 +72,7 @@ "orm": "Full", "platform": ".NET", "flavor": "CoreCLR", - "webserver": "None", + "webserver": "Kestrel", "os": "Linux", "database_os": "Linux", "display_name": "aspnetcore-middleware-ef", @@ -84,7 +80,6 @@ "versus": "" }, "middleware-dapper": { - "setup_file": "setup-dapper", "db_url": "/db/dapper", "query_url": "/queries/dapper?queries=", "update_url": "/updates/dapper?queries=", @@ -98,15 +93,14 @@ "orm": "Micro", "platform": ".NET", "flavor": "CoreCLR", - "webserver": "None", + "webserver": "Kestrel", "os": "Linux", "database_os": "Linux", "display_name": "aspnetcore-middleware-dapper", "notes": "", "versus": "" }, - "mvc-linux": { - "setup_file": "setup-mvc-plaintext", + "mvc": { "plaintext_url": "/mvc/plaintext", "port": 8080, "approach": "Realistic", @@ -117,15 +111,14 @@ "orm": "Raw", "platform": ".NET", "flavor": "CoreCLR", - "webserver": "None", + "webserver": "Kestrel", "os": "Linux", "database_os": "Linux", "display_name": "aspnetcore-mvc-linux", "notes": "", "versus": "" }, - "mvc-linux-json": { - "setup_file": "setup-mvc-json", + "mvc-json": { "json_url": "/mvc/json", "port": 8080, "approach": "Realistic", @@ -136,7 +129,7 @@ "orm": "Raw", "platform": ".NET", "flavor": "CoreCLR", - "webserver": "None", + "webserver": "Kestrel", "os": "Linux", "database_os": "Linux", "display_name": "aspnetcore-mvc-linux", @@ -144,7 +137,6 @@ "versus": "" }, "mvc-raw": { - "setup_file": "setup-mvc-raw", "db_url": "/mvc/db/raw", "query_url": "/mvc/queries/raw?queries=", "update_url": "/mvc/updates/raw?queries=", @@ -158,7 +150,7 @@ "orm": "Raw", "platform": ".NET", "flavor": "CoreCLR", - "webserver": "None", + "webserver": "Kestrel", "os": "Linux", "database_os": "Linux", "display_name": "aspnetcore-mvc-raw", @@ -166,7 +158,6 @@ "versus": "" }, "mvc-ef": { - "setup_file": "setup-mvc-ef", "db_url": "/mvc/db/ef", "query_url": "/mvc/queries/ef?queries=", "update_url": "/mvc/updates/ef?queries=", @@ -180,7 +171,7 @@ "orm": "Full", "platform": ".NET", "flavor": "CoreCLR", - "webserver": "None", + "webserver": "Kestrel", "os": "Linux", "database_os": "Linux", "display_name": "aspnetcore-mvc-ef", @@ -188,7 +179,6 @@ "versus": "" }, "mvc-dapper": { - "setup_file": "setup-mvc-dapper", "db_url": "/mvc/db/dapper", "query_url": "/mvc/queries/dapper?queries=", "update_url": "/mvc/updates/dapper?queries=", @@ -202,92 +192,12 @@ "orm": "Micro", "platform": ".NET", "flavor": "CoreCLR", - "webserver": "None", + "webserver": "Kestrel", "os": "Linux", "database_os": "Linux", "display_name": "aspnetcore-mvc-dapper", "notes": "", "versus": "" - }, - "win": { - "setup_file": "setup-windows", - "json_url": "/json", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "None", - "framework": "ASP.NET Core", - "language": "C#", - "orm": "Raw", - "platform": ".NET", - "flavor": "CoreCLR", - "webserver": "None", - "os": "Windows", - "database_os": "Linux", - "display_name": "aspnetcore-win", - "notes": "", - "versus": "" - }, - "mvc-win": { - "setup_file": "setup-mvc-windows", - "json_url": "/mvc/json", - "plaintext_url": "/mvc/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "None", - "framework": "ASP.NET Core", - "language": "C#", - "orm": "Raw", - "platform": ".NET", - "flavor": "CoreCLR", - "webserver": "None", - "os": "Windows", - "database_os": "Linux", - "display_name": "aspnetcore-mvc-win", - "notes": "", - "versus": "" - }, - "httpsys": { - "setup_file": "setup-httpsys", - "json_url": "/json", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "None", - "framework": "ASP.NET Core", - "language": "C#", - "orm": "Raw", - "platform": ".NET", - "flavor": "CoreCLR", - "webserver": "None", - "os": "Windows", - "database_os": "Linux", - "display_name": "aspnetcore-httpsys", - "notes": "", - "versus": "" - }, - "mvc-httpsys": { - "setup_file": "setup-mvc-httpsys", - "json_url": "/mvc/json", - "plaintext_url": "/mvc/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "None", - "framework": "ASP.NET Core", - "language": "C#", - "orm": "Raw", - "platform": ".NET", - "flavor": "CoreCLR", - "webserver": "None", - "os": "Windows", - "database_os": "Linux", - "display_name": "aspnetcore-mvc-httpsys", - "notes": "", - "versus": "" } }] } diff --git a/frameworks/CSharp/aspnetcore/run-linux.sh b/frameworks/CSharp/aspnetcore/run-linux.sh index d1de1aa0cd2..9001c790dbf 100755 --- a/frameworks/CSharp/aspnetcore/run-linux.sh +++ b/frameworks/CSharp/aspnetcore/run-linux.sh @@ -1,5 +1,4 @@ #!/bin/bash -fw_depends dotnetcore threadCount=$2 if [ "$threadCount" -lt "1" ] @@ -9,8 +8,7 @@ fi cd Benchmarks cp appsettings.postgresql.json appsettings.json -sed -i 's|{db_server_placeholder}|'"${DBHOST}"'|g' appsettings.json dotnet restore dotnet publish --configuration Release --output bin/Release/publish -dotnet bin/Release/publish/Benchmarks.dll server.urls=http://*:8080 scenarios=$1 server=kestrel threadCount=$threadCount NonInteractive=true & +dotnet bin/Release/publish/Benchmarks.dll server.urls=http://*:8080 scenarios=$1 server=kestrel threadCount=$threadCount NonInteractive=true diff --git a/frameworks/CSharp/aspnetcore/run-windows.ps1 b/frameworks/CSharp/aspnetcore/run-windows.ps1 deleted file mode 100644 index 61981e94596..00000000000 --- a/frameworks/CSharp/aspnetcore/run-windows.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -param([string]$scenarios="[default]", [string]$server="kestrel") - -$scenarios = (-split $scenarios) -join "," - -cd Benchmarks -dotnet restore -dotnet publish --configuration Release --output bin\Release\publish -Start-Process -NoNewWindow dotnet -ArgumentList "bin\Release\publish\Benchmarks.dll", "server.urls=http://*:8080", "server=$server", "threadCount=1", "NonInteractive=true", "scenarios=$scenarios" diff --git a/frameworks/CSharp/aspnetcore/setup-dapper.sh b/frameworks/CSharp/aspnetcore/setup-dapper.sh index 27dd7b978fe..615c19a1740 100755 --- a/frameworks/CSharp/aspnetcore/setup-dapper.sh +++ b/frameworks/CSharp/aspnetcore/setup-dapper.sh @@ -1,5 +1,3 @@ #!/bin/bash -fw_depends postgresql - source run-linux.sh 'DbSingleQueryDapper,DbMultiQueryDapper,DbMultiUpdateDapper,DbFortunesDapper' $(($(nproc)/2)) diff --git a/frameworks/CSharp/aspnetcore/setup-ef.sh b/frameworks/CSharp/aspnetcore/setup-ef.sh index f1cb5d7cae7..7f965acfa94 100755 --- a/frameworks/CSharp/aspnetcore/setup-ef.sh +++ b/frameworks/CSharp/aspnetcore/setup-ef.sh @@ -1,5 +1,3 @@ #!/bin/bash -fw_depends postgresql - source run-linux.sh 'DbSingleQueryEf,DbMultiQueryEf,DbMultiUpdateEf,DbFortunesEf' $(($(nproc)/2)) diff --git a/frameworks/CSharp/aspnetcore/setup-httpsys.sh b/frameworks/CSharp/aspnetcore/setup-httpsys.sh deleted file mode 100755 index e187758966d..00000000000 --- a/frameworks/CSharp/aspnetcore/setup-httpsys.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -fw_depends dotnetcore -powershell ./run-windows.ps1 -scenarios [default] -server httpsys diff --git a/frameworks/CSharp/aspnetcore/setup-mvc-dapper.sh b/frameworks/CSharp/aspnetcore/setup-mvc-dapper.sh index 1cfa14d8c51..91d60085561 100755 --- a/frameworks/CSharp/aspnetcore/setup-mvc-dapper.sh +++ b/frameworks/CSharp/aspnetcore/setup-mvc-dapper.sh @@ -1,5 +1,3 @@ #!/bin/bash -fw_depends postgresql - source run-linux.sh 'MvcDbSingleQueryDapper,MvcDbMultiQueryDapper,MvcDbMultiUpdateDapper,MvcDbFortunesDapper' $(($(nproc)/2)) diff --git a/frameworks/CSharp/aspnetcore/setup-mvc-ef.sh b/frameworks/CSharp/aspnetcore/setup-mvc-ef.sh index 8a0e6082fb2..3b4d55ca78b 100755 --- a/frameworks/CSharp/aspnetcore/setup-mvc-ef.sh +++ b/frameworks/CSharp/aspnetcore/setup-mvc-ef.sh @@ -1,5 +1,3 @@ #!/bin/bash -fw_depends postgresql - source run-linux.sh 'MvcDbSingleQueryEf,MvcDbMultiQueryEf,MvcDbMultiUpdateEf,MvcDbFortunesEf' $(($(nproc)/2)) diff --git a/frameworks/CSharp/aspnetcore/setup-mvc-httpsys.sh b/frameworks/CSharp/aspnetcore/setup-mvc-httpsys.sh deleted file mode 100755 index d8566a499d6..00000000000 --- a/frameworks/CSharp/aspnetcore/setup-mvc-httpsys.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -fw_depends dotnetcore -powershell ./run-windows.ps1 -scenarios 'mvcjson,mvcplain' -server httpsys diff --git a/frameworks/CSharp/aspnetcore/setup-mvc-plaintext.sh b/frameworks/CSharp/aspnetcore/setup-mvc-plaintext.sh index 060268c48b9..7e7ad5fb1de 100755 --- a/frameworks/CSharp/aspnetcore/setup-mvc-plaintext.sh +++ b/frameworks/CSharp/aspnetcore/setup-mvc-plaintext.sh @@ -1,3 +1,3 @@ #!/bin/bash -source run-linux.sh mvcplaintext $(($(nproc)*3/10)) +source run-linux.sh mvcplaintext 2 diff --git a/frameworks/CSharp/aspnetcore/setup-mvc-raw.sh b/frameworks/CSharp/aspnetcore/setup-mvc-raw.sh index 761a851226c..0e8f78e3b1b 100755 --- a/frameworks/CSharp/aspnetcore/setup-mvc-raw.sh +++ b/frameworks/CSharp/aspnetcore/setup-mvc-raw.sh @@ -1,5 +1,3 @@ #!/bin/bash -fw_depends postgresql - source run-linux.sh 'MvcDbSingleQueryRaw,MvcDbMultiQueryRaw,MvcDbMultiUpdateRaw,MvcDbFortunesRaw' $(($(nproc)/2)) diff --git a/frameworks/CSharp/aspnetcore/setup-mvc-windows.sh b/frameworks/CSharp/aspnetcore/setup-mvc-windows.sh deleted file mode 100755 index 6566d05e452..00000000000 --- a/frameworks/CSharp/aspnetcore/setup-mvc-windows.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -fw_depends dotnetcore -powershell ./run-windows.ps1 -scenarios 'mvcjson,mvcplain' -server kestrel diff --git a/frameworks/CSharp/aspnetcore/setup-plaintext.sh b/frameworks/CSharp/aspnetcore/setup-plaintext.sh index cccb704396d..fb1da490737 100755 --- a/frameworks/CSharp/aspnetcore/setup-plaintext.sh +++ b/frameworks/CSharp/aspnetcore/setup-plaintext.sh @@ -5,6 +5,11 @@ then threadCount=24 fi +if [ "$(nproc)" -eq "28" ] +then + threadCount=8 +fi + if [ "$(nproc)" -eq "4" ] then threadCount=2 diff --git a/frameworks/CSharp/aspnetcore/setup-raw.sh b/frameworks/CSharp/aspnetcore/setup-raw.sh index a55311e5d89..e4af9ac2f5b 100755 --- a/frameworks/CSharp/aspnetcore/setup-raw.sh +++ b/frameworks/CSharp/aspnetcore/setup-raw.sh @@ -1,5 +1,3 @@ #!/bin/bash -fw_depends postgresql - source run-linux.sh 'DbSingleQueryRaw,DbMultiQueryRaw,DbMultiUpdateRaw,DbFortunesRaw' $(($(nproc)/2)) diff --git a/frameworks/CSharp/aspnetcore/setup-windows.sh b/frameworks/CSharp/aspnetcore/setup-windows.sh deleted file mode 100755 index f5bf240ba6c..00000000000 --- a/frameworks/CSharp/aspnetcore/setup-windows.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -fw_depends dotnetcore -powershell ./run-windows.ps1 -scenarios [default] -server kestrel diff --git a/frameworks/CSharp/evhttp-sharp/.gitignore b/frameworks/CSharp/evhttp-sharp/.gitignore deleted file mode 100644 index 23abfee342d..00000000000 --- a/frameworks/CSharp/evhttp-sharp/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.user -*.suo -*/bin/* -*/obj/* -obj/ -[Bb]in -[Dd]ebug*/ -[Rr]elease*/ \ No newline at end of file diff --git a/frameworks/CSharp/evhttp-sharp/benchmark_config.json b/frameworks/CSharp/evhttp-sharp/benchmark_config.json index 13dc31fb23d..b5a1223b4bd 100644 --- a/frameworks/CSharp/evhttp-sharp/benchmark_config.json +++ b/frameworks/CSharp/evhttp-sharp/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "evhttp-sharp", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/", "plaintext_url": "/plaintext", "port": 8085, diff --git a/frameworks/CSharp/evhttp-sharp/evhttp-sharp.dockerfile b/frameworks/CSharp/evhttp-sharp/evhttp-sharp.dockerfile new file mode 100644 index 00000000000..4fd8629ed4a --- /dev/null +++ b/frameworks/CSharp/evhttp-sharp/evhttp-sharp.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/mono:0.1 + +ADD ./ /evhttp +WORKDIR /evhttp + +RUN xbuild src/EvHttpSharpBenchmark.csproj /t:Clean +RUN xbuild src/EvHttpSharpBenchmark.csproj /p:Configuration=Release + +ENV MONO_GC_PARAMS nursery-size=64m + +CMD mono -O=all src/bin/Release/EvHttpSharpBenchmark.exe 127.0.0.1 8085 $(nproc) diff --git a/frameworks/CSharp/evhttp-sharp/setup.sh b/frameworks/CSharp/evhttp-sharp/setup.sh deleted file mode 100644 index 3438715fbbb..00000000000 --- a/frameworks/CSharp/evhttp-sharp/setup.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -fw_depends mono - -#extra cleaning -rm -rf src/bin src/obj - -xbuild src/EvHttpSharpBenchmark.csproj /t:Clean -xbuild src/EvHttpSharpBenchmark.csproj /p:Configuration=Release - -export MONO_GC_PARAMS=nursery-size=64m - -mono -O=all $TROOT/src/bin/Release/EvHttpSharpBenchmark.exe 127.0.0.1 8085 $CPU_COUNT & diff --git a/frameworks/CSharp/nancy/.gitignore b/frameworks/CSharp/nancy/.gitignore deleted file mode 100644 index 23abfee342d..00000000000 --- a/frameworks/CSharp/nancy/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.user -*.suo -*/bin/* -*/obj/* -obj/ -[Bb]in -[Dd]ebug*/ -[Rr]elease*/ \ No newline at end of file diff --git a/frameworks/CSharp/nancy/benchmark_config.json b/frameworks/CSharp/nancy/benchmark_config.json index 7630dad1355..570b16a5be7 100644 --- a/frameworks/CSharp/nancy/benchmark_config.json +++ b/frameworks/CSharp/nancy/benchmark_config.json @@ -2,29 +2,6 @@ "framework": "nancy", "tests": [{ "default": { - "setup_file": "setup_iis", - "plaintext_url":"/plaintext", - "json_url": "/json", - "db_url": "/db", - "query_url": "/query/", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "MySQL", - "framework": "nancy", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": ".NET", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "nancy", - "notes": "", - "versus": "nancy" - }, - "mono": { - "setup_file": "setup_nginx", "plaintext_url":"/plaintext", "json_url": "/json", "db_url": "/db", diff --git a/frameworks/CSharp/nancy/nancy.dockerfile b/frameworks/CSharp/nancy/nancy.dockerfile new file mode 100644 index 00000000000..dff37c021d9 --- /dev/null +++ b/frameworks/CSharp/nancy/nancy.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/mono:0.1 + +ADD ./ /nancy +WORKDIR /nancy + +RUN xbuild src/NancyBenchmark.csproj /t:Clean +RUN xbuild src/NancyBenchmark.csproj /p:Configuration=Release + +CMD bash run.sh diff --git a/frameworks/CSharp/nancy/nginx.conf b/frameworks/CSharp/nancy/nginx.conf index 8c101c51877..3d3ab460eaa 100644 --- a/frameworks/CSharp/nancy/nginx.conf +++ b/frameworks/CSharp/nancy/nginx.conf @@ -19,7 +19,7 @@ http { location / { fastcgi_pass mono; - include nginx.osenv.conf; # read os env from this file + include /nginx/conf/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } diff --git a/frameworks/CSharp/nancy/nginx.conf.libevent b/frameworks/CSharp/nancy/nginx.conf.libevent deleted file mode 100644 index 2568fff2efc..00000000000 --- a/frameworks/CSharp/nancy/nginx.conf.libevent +++ /dev/null @@ -1,24 +0,0 @@ -# worker_processes n; -pid /tmp/nginx.pid; -error_log stderr error; - -events { - worker_connections 8192; -} - -http { - access_log off; - - #upstream mono { - # server 127.0.0.1:9001; - #} - include nginx.upstream.conf; - - server { - listen 8080; - - location / { - proxy_pass http://mono; - } - } -} diff --git a/frameworks/CSharp/nancy/run.sh b/frameworks/CSharp/nancy/run.sh new file mode 100644 index 00000000000..2243af54023 --- /dev/null +++ b/frameworks/CSharp/nancy/run.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +CPU_COUNT=$(nproc) + +# one fastcgi instance for each thread +# load balanced by nginx +port_start=9001 +port_end=$(($port_start+$CPU_COUNT)) + +# To debug, use --printlog --verbose --loglevels=All +for port in $(seq $port_start $port_end); do + MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 --applications=/:/nancy/src --socket=tcp:127.0.0.1:$port & +done + +sleep 5s + +# nginx +conf="upstream mono {\n" +for port in $(seq $port_start $port_end); do + conf+="\tserver 127.0.0.1:${port};\n" +done +conf+="}" + +echo -e $conf > nginx.upstream.conf +nginx -c /nancy/nginx.conf -g "worker_processes ${CPU_COUNT};" + +wait diff --git a/frameworks/CSharp/nancy/setup_iis.ps1 b/frameworks/CSharp/nancy/setup_iis.ps1 deleted file mode 100644 index 2a8ba1afdf1..00000000000 --- a/frameworks/CSharp/nancy/setup_iis.ps1 +++ /dev/null @@ -1,38 +0,0 @@ -param($action) - -$ErrorActionPreference = 'Stop' - -# From http://zduck.com/2012/powershell-batch-files-exit-codes/ -function Exec -{ - [CmdletBinding()] - param ( - [Parameter(Position=0, Mandatory=1)] - [scriptblock]$Command, - [Parameter(Position=1, Mandatory=0)] - [string]$ErrorMessage = "Execution of command failed.`n$Command" - ) - & $Command - if ($LastExitCode -ne 0) { - throw "Exec: $ErrorMessage" - } -} - -$wwwroot = "C:\FrameworkBenchmarks\nancy\www" -$source = "C:\FrameworkBenchmarks\nancy\src" -$msbuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" - -# Stop -if (Get-WebSite -Name Benchmarks) { Remove-WebSite -Name Benchmarks } -Get-ChildItem -Path $wwwroot -Recurse -ErrorAction 'SilentlyContinue' | Remove-Item -Force -Recurse -ErrorAction 'SilentlyContinue'; -Remove-Item -Force -Recurse $wwwroot -ErrorAction 'SilentlyContinue' - -if ($action -eq 'start') { - # Create a website in IIS - New-Item -Path $wwwroot -Type directory | Out-Null - New-WebSite -Name Benchmarks -Port 8080 -PhysicalPath $wwwroot - - # Build the project - Exec { & $msbuild "$source\NancyBenchmark.csproj" /p:Configuration=Release /p:Platform="AnyCPU" /t:Clean } - Exec { & $msbuild "$source\NancyBenchmark.csproj" /p:Configuration=Release /p:Platform="AnyCPU" /p:DeployOnBuild=true /p:PublishProfile=IIS } -} diff --git a/frameworks/CSharp/nancy/setup_iis.py b/frameworks/CSharp/nancy/setup_iis.py deleted file mode 100644 index c21c6982d2d..00000000000 --- a/frameworks/CSharp/nancy/setup_iis.py +++ /dev/null @@ -1,22 +0,0 @@ -import subprocess -import sys -import setup_util -import os - -def start(args, logfile, errfile): - if os.name != 'nt': - return 1 - - try: - setup_util.replace_text("nancy/src/Web.config", "localhost", args.database_host) - subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="nancy", stderr=errfile, stdout=logfile) - return 0 - except subprocess.CalledProcessError: - return 1 - -def stop(logfile, errfile): - if os.name != 'nt': - return 0 - - subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="nancy", stderr=errfile, stdout=logfile) - return 0 \ No newline at end of file diff --git a/frameworks/CSharp/nancy/setup_libevent.py b/frameworks/CSharp/nancy/setup_libevent.py deleted file mode 100644 index 7fe986b4982..00000000000 --- a/frameworks/CSharp/nancy/setup_libevent.py +++ /dev/null @@ -1,40 +0,0 @@ -import subprocess -import sys -import setup_util -import os - -root = os.getcwd() + "/nancy" -app = root + "/src" - -def start(args, logfile, errfile): - if os.name == 'nt': - return 1 - - setup_util.replace_text(app + "/Web.config", "localhost", args.database_host) - - try: - # build - subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stderr=errfile, stdout=logfile) - subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app, stderr=errfile, stdout=logfile) - - # nginx - workers = 'worker_processes ' + str(args.max_threads) + ';' - subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True, stderr=errfile, stdout=logfile); - subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf.libevent -g "' + workers + '"', shell=True, stderr=errfile, stdout=logfile) - - # fastcgi - os.environ['MONO_GC_PARAMS']="nursery-size=16m" - for port in range(9001, 9001 + args.max_threads): - subprocess.Popen("mono-sgen -O=all LibeventHost/bin/Release/LibeventHost.exe 127.0.0.1 " + str(port) + " " + args.database_host + " &", shell=True, cwd=app, stderr=errfile, stdout=logfile) - return 0 - except subprocess.CalledProcessError: - return 1 - -def stop(logfile, errfile): - if os.name == 'nt': - return 0 - - subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True, stderr=errfile, stdout=logfile) - subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True, stderr=errfile, stdout=logfile) - subprocess.check_call("pkill -9 mono-sgen", shell=True, stderr=errfile, stdout=logfile) - return 0 \ No newline at end of file diff --git a/frameworks/CSharp/nancy/setup_libevent.sh b/frameworks/CSharp/nancy/setup_libevent.sh deleted file mode 100644 index a5d52600343..00000000000 --- a/frameworks/CSharp/nancy/setup_libevent.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -export NGINX_HOME=${IROOT}/nginx -export LIBEVENTHOST_HOME=${TROOT}/src/LibeventHost -export MONO_GC_PARAMS="nursery-size=16m" - -. ${IROOT}/mono.installed - -sed -i 's|localhost|'"${DBHOST}"'|g' src/Web.config - -rm -rf src/bin src/obj -xbuild src/NancyBenchmark.csproj /t:Clean -xbuild src/NancyBenchmark.csproj /p:Configuration=Release - -rm -rf ${LIBEVENTHOST_HOME}/bin ${LIBEVENTHOST_HOME}/obj -xbuild ${LIBEVENTHOST_HOME}/LibeventHost.csproj /p:Configuration=Release - -# nginx -port_start=9001 -port_end=$((${port_start}+${CPU_COUNT})) -conf="upstream mono {\n" -for port in $(seq ${port_start} ${port_end} ); do - conf+="\tserver 127.0.0.1:${port};\n" -done -conf+="}" - -echo -e $conf > ${TROOT}/nginx.upstream.conf -${NGINX_HOME}/sbin/nginx -c ${TROOT}/nginx.conf.libevent -g "worker_processes '"${CPU_COUNT}"';" - -# Start fastcgi for each thread -# To debug, use --printlog --verbose --loglevels=All -for port in $(seq ${port_start} ${port_end} ); do - mono-sgen -O=all ${LIBEVENTHOST_HOME}/bin/Release/LibeventHost.exe 127.0.0.1 ${port} ${DBHOST} & -done diff --git a/frameworks/CSharp/nancy/setup_nginx.sh b/frameworks/CSharp/nancy/setup_nginx.sh deleted file mode 100755 index b8ca8cd6916..00000000000 --- a/frameworks/CSharp/nancy/setup_nginx.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -fw_depends mysql nginx mono - -sed -i 's|localhost|'"${DBHOST}"'|g' src/Web.config -sed -i 's|include /usr/local/nginx/conf/fastcgi_params;|include '"${NGINX_HOME}"'/conf/fastcgi_params;|g' nginx.conf - -# build -rm -rf src/bin src/obj -xbuild src/NancyBenchmark.csproj /t:Clean -xbuild src/NancyBenchmark.csproj /p:Configuration=Release - -# nginx -port_start=9001 -port_end=$((${port_start}+${CPU_COUNT})) -conf="upstream mono {\n" -for port in $(seq ${port_start} $port_end); do - conf+="\tserver 127.0.0.1:${port};\n" -done -conf+="}" - -# Store path of fastcgi_params dynamically in a file called "nginx.osenv.conf". -# The reason why I do this is Ngix "include" cannot recognize variables. (Well known issue of Nginx) -# To use OS Environment at ngix.conf 3rd party library or perl module is needed -# Current approach is one trick to solve the problem without utilize those 3rd party libraries. -echo "include $IROOT/nginx/conf/fastcgi_params;" > $TROOT/nginx.osenv.conf - - -echo -e $conf > $TROOT/nginx.upstream.conf -${NGINX_HOME}/sbin/nginx -c $TROOT/nginx.conf -g "worker_processes '"${CPU_COUNT}"';" - -# Start fastcgi for each thread -# To debug, use --printlog --verbose --loglevels=All -for port in $(seq ${port_start} $port_end); do - MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 --applications=/:$TROOT/src --socket=tcp:127.0.0.1:$port & -done diff --git a/frameworks/CSharp/nancy/src/Web.config b/frameworks/CSharp/nancy/src/Web.config index 80bed2f65d2..4ac38ab2b90 100644 --- a/frameworks/CSharp/nancy/src/Web.config +++ b/frameworks/CSharp/nancy/src/Web.config @@ -1,9 +1,9 @@  - - - + + + @@ -29,4 +29,4 @@ - \ No newline at end of file + diff --git a/frameworks/CSharp/revenj/.gitignore b/frameworks/CSharp/revenj/.gitignore deleted file mode 100644 index 4dc99df423b..00000000000 --- a/frameworks/CSharp/revenj/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -*.user -*.suo -*.jar -*.zip -dsl-compiler.* -*/bin/* -*/obj/* -exe/ -tmp/ diff --git a/frameworks/CSharp/revenj/Revenj.Http.exe.config b/frameworks/CSharp/revenj/Revenj.Http.exe.config index 75e4597a3d8..b724c85022f 100644 --- a/frameworks/CSharp/revenj/Revenj.Http.exe.config +++ b/frameworks/CSharp/revenj/Revenj.Http.exe.config @@ -6,7 +6,7 @@ - + diff --git a/frameworks/CSharp/revenj/benchmark_config.json b/frameworks/CSharp/revenj/benchmark_config.json index 268d088d861..8472ef41d12 100644 --- a/frameworks/CSharp/revenj/benchmark_config.json +++ b/frameworks/CSharp/revenj/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "revenj", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/bench/json", "db_url": "/bench/db", "query_url": "/bench/queries/", @@ -24,30 +23,6 @@ "display_name": "Revenj", "notes": "", "versus": "Revenj" - }, - "windows": { - "setup_file": "setup_windows", - "json_url": "/bench/json", - "db_url": "/bench/db", - "query_url": "/bench/queries/", - "plaintext_url": "/bench/plaintext", - "update_url": "/bench/updates/", - "fortune_url": "/bench/fortunes", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "Postgres", - "database_os": "Linux", - "framework": "Revenj", - "language": "C#", - "flavor": "Microsoft", - "orm": "Full", - "platform": "None", - "webserver": "None", - "os": "Windows", - "display_name": "Revenj", - "notes": "", - "versus": "Revenj" } }] } diff --git a/frameworks/CSharp/revenj/install.sh b/frameworks/CSharp/revenj/install.sh deleted file mode 100644 index 57123f00aff..00000000000 --- a/frameworks/CSharp/revenj/install.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -fw_depends mono java dsl_platform \ No newline at end of file diff --git a/frameworks/CSharp/revenj/revenj.dockerfile b/frameworks/CSharp/revenj/revenj.dockerfile new file mode 100644 index 00000000000..2fc5b19ccb3 --- /dev/null +++ b/frameworks/CSharp/revenj/revenj.dockerfile @@ -0,0 +1,32 @@ +FROM techempower/java:0.1 as java +FROM techempower/mono:0.1 +COPY --from=java /java /java +ENV JAVA_HOME=/java/jdk-9.0.4 +ENV PATH="${JAVA_HOME}/bin:${PATH}" + +ADD ./ /revenj +WORKDIR /revenj + +RUN curl -sL -O https://github.com/ngs-doo/revenj/releases/download/1.4.2/dsl-compiler.zip +RUN unzip dsl-compiler.zip +RUN rm dsl-compiler.zip + +RUN curl -sL -O https://github.com/ngs-doo/dsl-compiler-client/releases/download/1.8.2/dsl-clc.jar +RUN curl -sL -O https://github.com/ngs-doo/revenj/releases/download/1.4.2/http-server.zip +RUN unzip http-server.zip -d /revenj/exe + +RUN java -jar dsl-clc.jar \ + temp=/revenj/tmp/ \ + force \ + dsl=/revenj/Revenj.Bench \ + manual-json \ + compiler=/revenj/dsl-compiler.exe \ + revenj.net=/revenj/exe/ServerModel.dll \ + no-prompt \ + dependencies:revenj.net=/revenj/exe + +RUN xbuild /revenj/Revenj.Bench/Revenj.Bench.csproj /t:Rebuild /p:Configuration=Release + +RUN mv /revenj/Revenj.Http.exe.config /revenj/exe/Revenj.Http.exe.config + +CMD mono /revenj/exe/Revenj.Http.exe diff --git a/frameworks/CSharp/revenj/setup.sh b/frameworks/CSharp/revenj/setup.sh deleted file mode 100644 index 1e9c392a4dc..00000000000 --- a/frameworks/CSharp/revenj/setup.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -fw_depends postgresql java mono dsl_platform - -echo "Cleaning up..." -rm -rf $TROOT/exe $TROOT/tmp $TROOT/dsl-clc.jar $TROOT/http-server.zip - -echo "Download DSL compiler client" -wget -O $TROOT/dsl-clc.jar https://github.com/ngs-doo/dsl-compiler-client/releases/download/1.8.2/dsl-clc.jar - -echo "Download Revenj.NET HTTP server 1.4.2" -wget -O $TROOT/http-server.zip https://github.com/ngs-doo/revenj/releases/download/1.4.2/http-server.zip - -echo "Unzipping HTTP server" -unzip $TROOT/http-server.zip -d $TROOT/exe - -echo "Compiling the server model and downloading dependencies..." -java -jar $TROOT/dsl-clc.jar \ - temp=$TROOT/tmp/ \ - force \ - dsl=$TROOT/Revenj.Bench \ - manual-json \ - compiler=$IROOT/dsl-compiler.exe \ - revenj.net=$TROOT/exe/ServerModel.dll \ - no-prompt \ - dependencies:revenj.net=$TROOT/exe - -echo "Compiling the benchmark project..." -xbuild $TROOT/Revenj.Bench/Revenj.Bench.csproj /t:Rebuild /p:Configuration=Release - -echo "Copying the configuration template" -cat $TROOT/Revenj.Http.exe.config | sed 's|\(ConnectionString.*server=\)localhost|\1'"${DBHOST}"'|' > $TROOT/exe/Revenj.Http.exe.config - -echo "Running the Revenj instance" -mono $TROOT/exe/Revenj.Http.exe diff --git a/frameworks/CSharp/revenj/setup_windows.ps1 b/frameworks/CSharp/revenj/setup_windows.ps1 deleted file mode 100644 index 0a9f0d49e24..00000000000 --- a/frameworks/CSharp/revenj/setup_windows.ps1 +++ /dev/null @@ -1,64 +0,0 @@ -param($action) - -if (!$TROOT) { - $TROOT = "C:\FrameworkBenchmarks\frameworks\CSharp\revenj" -} -if (!$IROOT) { - $IROOT = "C:\FrameworkBenchmarks\installs" -} -if (!$DBHOST) { - $DBHOST = "localhost" -} - -Add-Type -AssemblyName System.IO.Compression.FileSystem - -$msbuild = $Env:windir + "\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" -$java=$Env:JAVA_HOME + "\bin\java" -$dslclc=$TROOT + "\dsl-clc.jar" -$httpZip=$TROOT + "\http-server.zip" -$sln=$TROOT + "\Revenj.Bench.sln" -$revenj=$TROOT + "\exe\Revenj.Http.exe" -$exe=$TROOT + "\exe\" -$config=$TROOT + "\exe\Revenj.Http.exe.config" - -echo "Stopping existing Revenj.Http" -Stop-Process -Name "Revenj.Http*" -ErrorAction 'SilentlyContinue' | Out-Null - -if ($action -eq 'start') { - - echo "Cleaning up..." - If (Test-Path $TROOT/exe) { - rmdir $TROOT/exe -recurse -force - } - if (Test-Path $TROOT/dsl-clc.jar) { - rm $TROOT/dsl-clc.jar - } - if (Test-Path $TROOT/http-server.zip) { - rm $TROOT/http-server.zip - } - - echo "Download DSL compiler client" - $client = new-object System.Net.WebClient - $client.DownloadFile( "https://github.com/ngs-doo/dsl-compiler-client/releases/download/1.8.2/dsl-clc.jar", $dslclc ) - - echo "Download Revenj HTTP server" - $client = new-object System.Net.WebClient - $client.DownloadFile( "https://github.com/ngs-doo/revenj/releases/download/1.4.2/http-server.zip", $httpZip ) - - echo "Unzipping HTTP server" - [System.IO.Compression.ZipFile]::ExtractToDirectory($httpZip, $exe) - - echo "Compiling the server model and downloading DSL Platform compiler..." - &$java -jar $dslclc temp=$TROOT/tmp/ force dsl=$TROOT/Revenj.Bench manual-json revenj.net=$TROOT/exe/ServerModel.dll no-prompt dependencies:revenj.net=$TROOT/exe compiler=$IROOT/dsl-compiler.exe - - echo "Compiling the benchmark project..." - &$msbuild $sln /p:Configuration=Release /t:Rebuild - - echo "Copying the configuration template" - $template = Get-Content $TROOT/Revenj.Http.exe.config - $Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding($False) - [System.IO.File]::WriteAllText($config, $template.Replace("server=localhost", "server=" + $DBHOST), $Utf8NoBomEncoding) - - echo "Starting Revenj..." - Start-Process $revenj -} diff --git a/frameworks/CSharp/servicestack/.gitignore b/frameworks/CSharp/servicestack/.gitignore deleted file mode 100644 index 6190362b2ee..00000000000 --- a/frameworks/CSharp/servicestack/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -*.pyc -*.user -*.suo -*/bin/ -*/obj/ -obj/ -[Bb]in -[Dd]ebug*/ -[Rr]elease*/ -nuget.exe -packages/ -!packages/repositories.config -lib/* \ No newline at end of file diff --git a/frameworks/CSharp/servicestack/benchmark_config.json b/frameworks/CSharp/servicestack/benchmark_config.json index e9e1d72c587..355dda825ae 100644 --- a/frameworks/CSharp/servicestack/benchmark_config.json +++ b/frameworks/CSharp/servicestack/benchmark_config.json @@ -2,116 +2,6 @@ "framework": "servicestack", "tests": [{ "default": { - "setup_file": "setup_iis", - "json_url": "/json", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "None", - "framework": "servicestack", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": "None", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "servicestack", - "notes": "", - "versus": "servicestack" - }, - "iis-sqlserver": { - "setup_file": "setup_iis", - "db_url": "/sqlserver/db", - "query_url": "/sqlserver/queries/", - "fortune_url": "/sqlserver/fortunes", - "update_url": "/sqlserver/updates/", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "SQLServer", - "framework": "servicestack", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": "None", - "webserver": "IIS", - "os": "Windows", - "database_os": "Windows", - "display_name": "servicestack", - "notes": "", - "versus": "servicestack" - }, - "iis-mysql": { - "setup_file": "setup_iis", - "db_url": "/mysql/db", - "query_url": "/mysql/queries/", - "fortune_url": "/mysql/fortunes", - "update_url": "/mysql/updates/", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "MySQL", - "framework": "servicestack", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": "None", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "servicestack", - "notes": "", - "versus": "servicestack" - }, - "iis-postgresql": { - "setup_file": "setup_iis", - "db_url": "/postgresql/db", - "query_url": "/postgresql/queries/", - "fortune_url": "/postgresql/fortunes", - "update_url": "/postgresql/updates/", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "Postgres", - "framework": "servicestack", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": "None", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "servicestack", - "notes": "", - "versus": "servicestack" - }, - "iis-mongodb": { - "setup_file": "setup_iis", - "os": "nt", - "db_url": "/mongodb/db", - "query_url": "/mongodb/queries/", - "fortune_url": "/mongodb/fortunes", - "update_url": "/mongodb/updates/", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "MongoDB", - "framework": "servicestack", - "language": "C#", - "flavor": "Microsoft", - "orm": "Raw", - "platform": "None", - "webserver": "IIS", - "os": "Windows", - "database_os": "Linux", - "display_name": "servicestack", - "notes": "", - "versus": "servicestack" - }, - "nginx-default": { - "setup_file": "setup_nginx", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/CSharp/servicestack/nginx.conf b/frameworks/CSharp/servicestack/nginx.conf index 183f0412685..03ff0b55290 100644 --- a/frameworks/CSharp/servicestack/nginx.conf +++ b/frameworks/CSharp/servicestack/nginx.conf @@ -19,7 +19,7 @@ http { location / { fastcgi_pass mono; - include /usr/local/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } diff --git a/frameworks/CSharp/servicestack/run.sh b/frameworks/CSharp/servicestack/run.sh new file mode 100644 index 00000000000..23b215f604e --- /dev/null +++ b/frameworks/CSharp/servicestack/run.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +CPU_COUNT=$(nproc) + +# one fastcgi instance for each thread +# load balanced by nginx +port_start=9001 +port_end=$(($port_start+$CPU_COUNT)) + +# To debug, use --printlog --verbose --loglevels=All +for port in $(seq $port_start $port_end); do + MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 --applications=/:/servicestack/src --socket=tcp:127.0.0.1:$port & +done + +sleep 5s + +# nginx +conf="upstream mono {\n" +for port in $(seq $port_start $port_end); do + conf+="\tserver 127.0.0.1:${port};\n" +done +conf+="}" + +echo -e $conf > nginx.upstream.conf +nginx -c /servicestack/nginx.conf -g "worker_processes ${CPU_COUNT};" + +wait diff --git a/frameworks/CSharp/servicestack/servicestack.dockerfile b/frameworks/CSharp/servicestack/servicestack.dockerfile new file mode 100644 index 00000000000..90991319cdb --- /dev/null +++ b/frameworks/CSharp/servicestack/servicestack.dockerfile @@ -0,0 +1,12 @@ +FROM techempower/mono:0.1 + +ADD ./ /servicestack +WORKDIR /servicestack + +RUN mkdir lib +RUN curl -sL -O https://dist.nuget.org/win-x86-commandline/latest/nuget.exe +RUN mono nuget.exe install src/packages.config -OutputDirectory lib/ +RUN xbuild src/ServiceStackBenchmark.csproj /t:Clean +RUN xbuild src/ServiceStackBenchmark.csproj /t:Build + +CMD bash run.sh diff --git a/frameworks/CSharp/servicestack/setup_iis.ps1 b/frameworks/CSharp/servicestack/setup_iis.ps1 deleted file mode 100644 index fe4dd3e201c..00000000000 --- a/frameworks/CSharp/servicestack/setup_iis.ps1 +++ /dev/null @@ -1,23 +0,0 @@ -param($action) - -$wwwroot = "C:\FrameworkBenchmarks\servicestack\www" -$source = "C:\FrameworkBenchmarks\servicestack\src" -$msbuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" - - -# Stop -if (Get-WebSite -Name Benchmarks) { Remove-WebSite -Name Benchmarks } -Get-ChildItem -Path $wwwroot -Recurse -ErrorAction 'SilentlyContinue' | Remove-Item -Force -Recurse -ErrorAction 'SilentlyContinue' | Out-Null -Remove-Item -Force -Recurse $wwwroot -ErrorAction 'SilentlyContinue' | Out-Null - -if ($action -eq 'start') { - # Create a website in IIS - New-Item -Path $wwwroot -Type Directory -ErrorAction 'SilentlyContinue' | Out-Null - New-WebSite -Name Benchmarks -Port 8080 -PhysicalPath $wwwroot - - # Build the project - &$msbuild "$source\ServiceStackBenchmark.csproj" /t:RestorePackages - &$msbuild "$source\ServiceStackBenchmark.csproj" /p:Configuration=Release /p:Platform="x64" /t:Clean - &$msbuild "$source\ServiceStackBenchmark.csproj" /p:Configuration=Release /p:Platform="x64" /p:DeployOnBuild=true /p:PublishProfile=IIS -} - diff --git a/frameworks/CSharp/servicestack/setup_iis.py b/frameworks/CSharp/servicestack/setup_iis.py deleted file mode 100644 index 5df1ce17a20..00000000000 --- a/frameworks/CSharp/servicestack/setup_iis.py +++ /dev/null @@ -1,22 +0,0 @@ -import subprocess -import sys -import setup_util -import os - -def start(args, logfile, errfile): - if os.name != 'nt': - return 1 - - try: - setup_util.replace_text("servicestack/src/Web.config", "localhost", args.database_host) - subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="servicestack", stderr=errfile, stdout=logfile) - return 0 - except subprocess.CalledProcessError: - return 1 - -def stop(logfile, errfile): - if os.name != 'nt': - return 0 - - subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="servicestack", stderr=errfile, stdout=logfile) - return 0 \ No newline at end of file diff --git a/frameworks/CSharp/servicestack/setup_nginx.sh b/frameworks/CSharp/servicestack/setup_nginx.sh deleted file mode 100644 index 6cc91fd3e24..00000000000 --- a/frameworks/CSharp/servicestack/setup_nginx.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -fw_depends mysql postgresql mongodb nginx mono - -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' nginx.conf - -rm -rf lib/ -mkdir lib - -wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -O nuget.exe - -mono nuget.exe install src/packages.config -OutputDirectory lib/ - -# extra cleaning -rm -rf src/bin src/obj -xbuild src/ServiceStackBenchmark.csproj /t:Clean -xbuild src/ServiceStackBenchmark.csproj /t:Build -# one fastcgi instance for each thread -# load balanced by nginx -port_start=9001 -port_end=$(($port_start+$CPU_COUNT)) -# nginx -conf="upstream mono {\n" -for port in $(seq $port_start $port_end); do -conf+="\tserver 127.0.0.1:${port};\n" -done -conf+="}" -echo -e $conf > $TROOT/nginx.upstream.conf -nginx -c $TROOT/nginx.conf -g "worker_processes ${CPU_COUNT};" -# To debug, use --printlog --verbose --loglevels=All -for port in $(seq $port_start $port_end); do - MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 --applications=/:$TROOT/src --socket=tcp:127.0.0.1:$port & -done diff --git a/frameworks/CSharp/servicestack/setup_self.ps1 b/frameworks/CSharp/servicestack/setup_self.ps1 deleted file mode 100644 index 6131f582169..00000000000 --- a/frameworks/CSharp/servicestack/setup_self.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -param($action) - -$source = "C:\FrameworkBenchmarks\servicestack\src" -$msbuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" - -# Stop -Stop-Process -Name servicestack -ErrorAction 'SilentlyContinue' | Out-Null - -if ($action -eq 'start') { - # Build the project - &$msbuild "$source\ServiceStackBenchmark.sln" /t:RestorePackages - &$msbuild "$source\ServiceStackBenchmark.sln" /p:DownloadNuGetExe=true /p:RequireRestoreConsent=false /p:Configuration=Release /p:Platform=x64 /t:Rebuild - - Start-Process "$source\SelfHost\bin\Release\ServiceStackBenchmark.SelfHost.exe http://*:8080" -} - diff --git a/frameworks/CSharp/servicestack/setup_self.py b/frameworks/CSharp/servicestack/setup_self.py deleted file mode 100644 index 23675e12ab9..00000000000 --- a/frameworks/CSharp/servicestack/setup_self.py +++ /dev/null @@ -1,22 +0,0 @@ -import subprocess -import sys -import setup_util -import os - -def start(args, logfile, errfile): - if os.name != 'nt': - return 1 - - try: - setup_util.replace_text("servicestack/svc/SelfHost/App.config", "localhost", args.database_host) - subprocess.check_call("powershell -Command .\\setup_self.ps1 start", cwd="servicestack", stderr=errfile, stdout=logfile) - return 0 - except subprocess.CalledProcessError: - return 1 - -def stop(logfile, errfile): - if os.name != 'nt': - return 0 - - subprocess.check_call("powershell -Command .\\setup_self.ps1 stop", cwd="servicestack", stderr=errfile, stdout=logfile) - return 0 \ No newline at end of file diff --git a/frameworks/CSharp/servicestack/setup_xsp.sh b/frameworks/CSharp/servicestack/setup_xsp.sh deleted file mode 100644 index 81518e99047..00000000000 --- a/frameworks/CSharp/servicestack/setup_xsp.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -fw_depends mysql postgresql mongodb nginx mono - -rm -rf lib/ -mkdir lib - -wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -O nuget.exe - -mono src/.nuget/nuget.exe install src/packages.config -OutputDirectory lib/ - -# extra cleaning -rm -rf src/bin src/obj -xbuild src/ServiceStackBenchmark.csproj /t:Clean -xbuild src/ServiceStackBenchmark.csproj /p:Configuration=Release -# xsp -MONO_OPTIONS=--gc=sgen xsp4 --port 8080 -nonstop & diff --git a/frameworks/CSharp/servicestack/src/Web.config b/frameworks/CSharp/servicestack/src/Web.config index 9936ec7da98..89b68c087fd 100644 --- a/frameworks/CSharp/servicestack/src/Web.config +++ b/frameworks/CSharp/servicestack/src/Web.config @@ -5,11 +5,11 @@
- - - + + + - + - - - - 31556926000 - - - diff --git a/frameworks/Java/gemini/benchmark_config.json b/frameworks/Java/gemini/benchmark_config.json index 97fc77271b3..ab1389d3669 100644 --- a/frameworks/Java/gemini/benchmark_config.json +++ b/frameworks/Java/gemini/benchmark_config.json @@ -1,71 +1,70 @@ { "framework": "gemini", - "tests": [{ - "default": { - "setup_file": "start", - "json_url": "/json", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "None", - "framework": "Gemini", - "language": "Java", - "flavor": "None", - "orm": "Micro", - "platform": "Servlet", - "webserver": "Resin", - "os": "Linux", - "database_os": "Linux", - "display_name": "Gemini", - "notes": "", - "versus": "servlet" - }, - "mysql": { - "setup_file": "start", - "db_url": "/db", - "query_url": "/query?queries=", - "cached_query_url": "/cached_query?queries=", - "fortune_url": "/fortunes", - "update_url": "/update?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "MySQL", - "framework": "gemini", - "language": "Java", - "flavor": "None", - "orm": "Micro", - "platform": "Servlet", - "webserver": "Resin", - "os": "Linux", - "database_os": "Linux", - "display_name": "Gemini", - "notes": "", - "versus": "servlet" - }, - "postgres": { - "setup_file": "start_postgresql", - "db_url": "/db", - "query_url": "/query?queries=", - "cached_query_url": "/cached_query?queries=", - "fortune_url": "/fortunes", - "update_url": "/update?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "Postgres", - "framework": "gemini", - "language": "Java", - "flavor": "None", - "orm": "Micro", - "platform": "Servlet", - "webserver": "Resin", - "os": "Linux", - "database_os": "Linux", - "display_name": "Gemini", - "notes": "", - "versus": "servlet" - } - }] -} + "tests": [ + { + "default": { + "json_url": "/json", + "plaintext_url": "/plaintext", + "port": 8080, + "approach": "Realistic", + "classification": "Fullstack", + "database": "None", + "framework": "Gemini", + "language": "Java", + "flavor": "None", + "orm": "Micro", + "platform": "Servlet", + "webserver": "Resin", + "os": "Linux", + "database_os": "Linux", + "display_name": "Gemini", + "notes": "", + "versus": "servlet" + }, + "mysql": { + "db_url": "/db", + "query_url": "/query?queries=", + "cached_query_url": "/cached_query?queries=", + "fortune_url": "/fortunes", + "update_url": "/update?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Fullstack", + "database": "MySQL", + "framework": "gemini", + "language": "Java", + "flavor": "None", + "orm": "Micro", + "platform": "Servlet", + "webserver": "Resin", + "os": "Linux", + "database_os": "Linux", + "display_name": "Gemini", + "notes": "", + "versus": "servlet" + }, + "postgres": { + "db_url": "/db", + "query_url": "/query?queries=", + "cached_query_url": "/cached_query?queries=", + "fortune_url": "/fortunes", + "update_url": "/update?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Fullstack", + "database": "Postgres", + "framework": "gemini", + "language": "Java", + "flavor": "None", + "orm": "Micro", + "platform": "Servlet", + "webserver": "Resin", + "os": "Linux", + "database_os": "Linux", + "display_name": "Gemini", + "notes": "", + "versus": "servlet" + } + } + ] +} \ No newline at end of file diff --git a/frameworks/Java/gemini/gemini-mysql.dockerfile b/frameworks/Java/gemini/gemini-mysql.dockerfile new file mode 100755 index 00000000000..8e0374de88d --- /dev/null +++ b/frameworks/Java/gemini/gemini-mysql.dockerfile @@ -0,0 +1,20 @@ +FROM techempower/ant:0.1 as ant + +RUN apt-get install -qqy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ + ant + +ADD Docroot/ /gemini/Docroot +ADD Source/ /gemini/Source +ADD build.xml /gemini/ +ADD ivy.xml /gemini/ +ADD ivysettings.xml /gemini/ + +RUN cd /gemini/Docroot/WEB-INF; mv gemini-mysql.conf GeminiHello.conf; + +RUN cd /gemini; mkdir -p Docroot/WEB-INF/classes; mkdir -p Docroot/WEB-INF/lib; ant resolve; ant compile + +FROM techempower/resin:0.1 + +COPY --from=ant /gemini /gemini + +CMD java -jar ${RESIN_HOME}/lib/resin.jar -conf /gemini/Docroot/WEB-INF/resin.xml console \ No newline at end of file diff --git a/frameworks/Java/gemini/gemini-postgres.dockerfile b/frameworks/Java/gemini/gemini-postgres.dockerfile new file mode 100755 index 00000000000..9b2a0872b19 --- /dev/null +++ b/frameworks/Java/gemini/gemini-postgres.dockerfile @@ -0,0 +1,20 @@ +FROM techempower/ant:0.1 as ant + +RUN apt-get install -qqy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ + ant + +ADD Docroot/ /gemini/Docroot +ADD Source/ /gemini/Source +ADD build.xml /gemini/ +ADD ivy.xml /gemini/ +ADD ivysettings.xml /gemini/ + +RUN cd /gemini/Docroot/WEB-INF; mv gemini-postgres.conf GeminiHello.conf; + +RUN cd /gemini; mkdir -p Docroot/WEB-INF/classes; mkdir -p Docroot/WEB-INF/lib; ant resolve; ant compile + +FROM techempower/resin:0.1 + +COPY --from=ant /gemini /gemini + +CMD java -jar ${RESIN_HOME}/lib/resin.jar -conf /gemini/Docroot/WEB-INF/resin.xml console \ No newline at end of file diff --git a/frameworks/Java/gemini/gemini.dockerfile b/frameworks/Java/gemini/gemini.dockerfile new file mode 100755 index 00000000000..68a79f1ee96 --- /dev/null +++ b/frameworks/Java/gemini/gemini.dockerfile @@ -0,0 +1,17 @@ +FROM techempower/ant:0.1 as ant + +ADD Docroot/ /gemini/Docroot +ADD Source/ /gemini/Source +ADD build.xml /gemini/ +ADD ivy.xml /gemini/ +ADD ivysettings.xml /gemini/ + +RUN cd /gemini/Docroot/WEB-INF; mv gemini.conf GeminiHello.conf; + +RUN cd /gemini; mkdir -p Docroot/WEB-INF/classes; mkdir -p Docroot/WEB-INF/lib; ant resolve; ant compile + +FROM techempower/resin:0.1 + +COPY --from=ant /gemini /gemini + +CMD java -jar ${RESIN_HOME}/lib/resin.jar -conf /gemini/Docroot/WEB-INF/resin.xml console \ No newline at end of file diff --git a/frameworks/Java/gemini/start.sh b/frameworks/Java/gemini/start.sh deleted file mode 100755 index 6efc426cf1f..00000000000 --- a/frameworks/Java/gemini/start.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends mysql java resin maven ant - -sed -i 's|db.ConnectString = .*/|db.ConnectString = '"$DBHOST"':3306/|g' Docroot/WEB-INF/GeminiHello.conf -sed -i 's|root-directory=".*/FrameworkBenchmarks/frameworks/Java/gemini|root-directory="'"$TROOT"'|g' Docroot/WEB-INF/resin.xml -sed -i 's|db.Driver.Class = .*|db.Driver.Class = com.mysql.jdbc.Driver|g' Docroot/WEB-INF/GeminiHello.conf -sed -i 's|db.Driver.UrlPrefix = .*|db.Driver.UrlPrefix = jdbc:mysql://|g' Docroot/WEB-INF/GeminiHello.conf -mkdir -p Docroot/WEB-INF/classes -ant resolve -ant compile -resinctl -conf $TROOT/Docroot/WEB-INF/resin.xml console diff --git a/frameworks/Java/gemini/start_postgresql.sh b/frameworks/Java/gemini/start_postgresql.sh deleted file mode 100755 index 09609bfe685..00000000000 --- a/frameworks/Java/gemini/start_postgresql.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends postgresql java ant resin maven - -sed -i 's|db.ConnectString = .*/|db.ConnectString = '"$DBHOST"':5432/|g' Docroot/WEB-INF/GeminiHello.conf -sed -i 's|root-directory=".*/FrameworkBenchmarks/frameworks/Java/gemini|root-directory="'"$TROOT"'|g' Docroot/WEB-INF/resin.xml -sed -i 's|db.Driver.Class = .*|db.Driver.Class = org.postgresql.Driver|g' Docroot/WEB-INF/GeminiHello.conf -sed -i 's|db.Driver.UrlPrefix = .*|db.Driver.UrlPrefix = jdbc:postgresql://|g' Docroot/WEB-INF/GeminiHello.conf -mkdir -p Docroot/WEB-INF/classes -ant resolve -ant compile -resinctl -conf $TROOT/Docroot/WEB-INF/resin.xml console diff --git a/frameworks/Java/grizzly-bm/README.md b/frameworks/Java/grizzly-bm/README.md deleted file mode 100644 index 00f43c85d55..00000000000 --- a/frameworks/Java/grizzly-bm/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# Grizzly Benchmarking Test - -This is the Grizzly portion of a [benchmarking test suite](../) comparing a variety of web development platforms. There is a subfolder `grizzly-jersey` where the combination of these two projects is used. - -### Plain text serialization test -* [Plain text test resource](src/main/java/org/glassfish/grizzly/bm/PlainTextHttpHandler.java) - -### JSON serialization test -* [JSON test resource](src/main/java/org/glassfish/grizzly/bm/JsonHttpHandler.java) - -### Database tests -* N/A - -### Fortunes test -* N/A - -## Versions - -* [Oracle Java 1.8](http://openjdk.java.net/) -* [Grizzly 2.3.34](http://grizzly.java.net/) -* [Jackson 2.9.3](http://wiki.fasterxml.com/JacksonHome) - -## Test URLs - -### Plain text test - - http://localhost:8080/plaintext - -### JSON serialization test - - http://localhost:8080/json diff --git a/frameworks/Java/grizzly-bm/benchmark_config.json b/frameworks/Java/grizzly-bm/benchmark_config.json deleted file mode 100644 index c54b195e660..00000000000 --- a/frameworks/Java/grizzly-bm/benchmark_config.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "framework": "grizzly", - "tests": [{ - "default": { - "setup_file": "setup", - "json_url": "/json", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "None", - "framework": "Grizzly", - "language": "Java", - "flavor": "None", - "orm": "Raw", - "platform": "Servlet", - "webserver": "Grizzly", - "os": "Linux", - "database_os": "Linux", - "display_name": "grizzly", - "notes": "", - "versus": "" - }, - "jersey": { - "setup_file": "setup-grizzly-jersey", - "json_url": "/json", - "db_url": "/db?single=true", - "query_url": "/db?queries=", - "fortune_url": "/fortunes", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "MySQL", - "framework": "Grizzly", - "language": "Java", - "flavor": "None", - "orm": "Full", - "platform": "JAX-RS", - "webserver": "Grizzly", - "os": "Linux", - "database_os": "Linux", - "display_name": "grizzly", - "notes": "", - "versus": "" - } - }] -} diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/.gitignore b/frameworks/Java/grizzly-bm/grizzly-jersey/.gitignore deleted file mode 100644 index 89540d82355..00000000000 --- a/frameworks/Java/grizzly-bm/grizzly-jersey/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/dependency-reduced-pom.xml diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/README.md b/frameworks/Java/grizzly-bm/grizzly-jersey/README.md deleted file mode 100644 index 0b1c4f15584..00000000000 --- a/frameworks/Java/grizzly-bm/grizzly-jersey/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Grizzly+Jersey Benchmarking Test - -This is the Grizzly+Jersey portion of a [benchmarking test suite](../) comparing a variety of web development platforms. - -### JSON serialization test -* [JSON test resource](src/main/java/hello/JsonResource.java) - -### Database tests -* [Database tests resource](src/main/java/hello/DbResource.java) - -### Fortunes test -* [Fortunes test resource](src/main/java/hello/FortunesResource.java) - -## Versions - -* [Java OpenJDK 1.7.0_09](http://openjdk.java.net/) -* [Jersey 1.17.1](http://jersey.java.net/) -* [Grizzly 2.3.2](http://grizzly.java.net/) -* [Jackson 2.3.0](http://wiki.fasterxml.com/JacksonHome) -* [Mustache.java 0.8.12](https://github.com/spullara/mustache.java) -* [Jersey Mustache 1.0.0](https://github.com/trautonen/jersey-mustache) -* [Hibernate 4.2.1](http://www.hibernate.org/) - -## Test URLs - -### JSON serialization test - - http://localhost:8080/json - -### Database tests - - http://localhost:8080/db - - http://localhost:8080/db?queries=10 - -### Fortunes test - - http://localhost:8080/fortunes diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/source_code b/frameworks/Java/grizzly-bm/grizzly-jersey/source_code deleted file mode 100644 index 7ef18cc243d..00000000000 --- a/frameworks/Java/grizzly-bm/grizzly-jersey/source_code +++ /dev/null @@ -1,17 +0,0 @@ -./grizzly-jersey/src/main/ -./grizzly-jersey/src/main/java -./grizzly-jersey/src/main/java/hello -./grizzly-jersey/src/main/java/hello/Common.java -./grizzly-jersey/src/main/java/hello/DbResource.java -./grizzly-jersey/src/main/java/hello/FortunesResource.java -./grizzly-jersey/src/main/java/hello/SessionFactoryProvider.java -./grizzly-jersey/src/main/java/hello/JsonMessageBodyWriter.java -./grizzly-jersey/src/main/java/hello/JerseyWebServer.java -./grizzly-jersey/src/main/java/hello/ServerResponseFilter.java -./grizzly-jersey/src/main/java/hello/domain -./grizzly-jersey/src/main/java/hello/domain/World.java -./grizzly-jersey/src/main/java/hello/domain/Fortune.java -./grizzly-jersey/src/main/java/hello/JsonResource.java -./grizzly-jersey/src/main/resources -./grizzly-jersey/src/main/resources/hibernate.cfg.xml -./grizzly-jersey/src/main/resources/fortunes.mustache diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/resources/hibernate.cfg.xml b/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/resources/hibernate.cfg.xml deleted file mode 100644 index 92ddc30801e..00000000000 --- a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/resources/hibernate.cfg.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - org.hibernate.hikaricp.internal.HikariCPConnectionProvider - org.hibernate.dialect.MySQLDialect - false - false - 256 - 256 - 30000 - com.mysql.jdbc.jdbc2.optional.MysqlDataSource - jdbc:mysql://localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false - benchmarkdbuser - benchmarkdbpass - - diff --git a/frameworks/Java/grizzly-bm/setup-grizzly-jersey.sh b/frameworks/Java/grizzly-bm/setup-grizzly-jersey.sh deleted file mode 100755 index eac12ff64a9..00000000000 --- a/frameworks/Java/grizzly-bm/setup-grizzly-jersey.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql java maven - -cd grizzly-jersey -mvn clean package -java -jar target/grizzly-jersey-example.jar -dbhost ${DBHOST} & diff --git a/frameworks/Java/grizzly-bm/setup.sh b/frameworks/Java/grizzly-bm/setup.sh deleted file mode 100755 index 9b112a51d74..00000000000 --- a/frameworks/Java/grizzly-bm/setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends java maven - -mvn clean compile assembly:single - -cd target -java -Dorg.glassfish.grizzly.nio.transport.TCPNIOTransport.max-receive-buffer-size=16384 -Dorg.glassfish.grizzly.http.io.OutputBuffer.default-buffer-size=1024 -Dorg.glassfish.grizzly.memory.BuffersBuffer.bb-cache-size=32 -jar grizzly-bm-0.1-jar-with-dependencies.jar & diff --git a/frameworks/Java/grizzly-bm/source_code b/frameworks/Java/grizzly-bm/source_code deleted file mode 100644 index b83a20c99cb..00000000000 --- a/frameworks/Java/grizzly-bm/source_code +++ /dev/null @@ -1,5 +0,0 @@ -./grizzly-bm/src/main/java/org/glassfish/grizzly/bm/ -./grizzly-bm/src/main/java/org/glassfish/grizzly/bm/Server.java -./grizzly-bm/src/main/java/org/glassfish/grizzly/bm/PlainTextHttpHandler.java -./grizzly-bm/src/main/java/org/glassfish/grizzly/bm/RootHttpHandler.java -./grizzly-bm/src/main/java/org/glassfish/grizzly/bm/JsonHttpHandler.java diff --git a/frameworks/Java/grizzly-jersey/benchmark_config.json b/frameworks/Java/grizzly-jersey/benchmark_config.json new file mode 100644 index 00000000000..71fe638aea6 --- /dev/null +++ b/frameworks/Java/grizzly-jersey/benchmark_config.json @@ -0,0 +1,27 @@ +{ + "framework": "grizzly-jersey", + "tests": [{ + "default": { + "json_url": "/json", + "db_url": "/db?single=true", + "query_url": "/db?queries=", + "fortune_url": "/fortunes", + "plaintext_url": "/plaintext", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "MySQL", + "framework": "Grizzly", + "language": "Java", + "flavor": "None", + "orm": "Full", + "platform": "JAX-RS", + "webserver": "Grizzly", + "os": "Linux", + "database_os": "Linux", + "display_name": "grizzly", + "notes": "", + "versus": "" + } + }] +} diff --git a/frameworks/Java/grizzly-jersey/grizzly-jersey.dockerfile b/frameworks/Java/grizzly-jersey/grizzly-jersey.dockerfile new file mode 100644 index 00000000000..88eae3e1e3c --- /dev/null +++ b/frameworks/Java/grizzly-jersey/grizzly-jersey.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/maven:0.1 + +ADD ./ /grizzly-jersey +WORKDIR /grizzly-jersey +RUN mvn clean package +CMD java -jar target/grizzly-jersey-example.jar diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/pom.xml b/frameworks/Java/grizzly-jersey/pom.xml similarity index 100% rename from frameworks/Java/grizzly-bm/grizzly-jersey/pom.xml rename to frameworks/Java/grizzly-jersey/pom.xml diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/Common.java b/frameworks/Java/grizzly-jersey/src/main/java/hello/Common.java similarity index 100% rename from frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/Common.java rename to frameworks/Java/grizzly-jersey/src/main/java/hello/Common.java diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/DbResource.java b/frameworks/Java/grizzly-jersey/src/main/java/hello/DbResource.java similarity index 100% rename from frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/DbResource.java rename to frameworks/Java/grizzly-jersey/src/main/java/hello/DbResource.java diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/FortunesResource.java b/frameworks/Java/grizzly-jersey/src/main/java/hello/FortunesResource.java similarity index 100% rename from frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/FortunesResource.java rename to frameworks/Java/grizzly-jersey/src/main/java/hello/FortunesResource.java diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/JerseyWebServer.java b/frameworks/Java/grizzly-jersey/src/main/java/hello/JerseyWebServer.java similarity index 100% rename from frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/JerseyWebServer.java rename to frameworks/Java/grizzly-jersey/src/main/java/hello/JerseyWebServer.java diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/JsonMessageBodyWriter.java b/frameworks/Java/grizzly-jersey/src/main/java/hello/JsonMessageBodyWriter.java similarity index 100% rename from frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/JsonMessageBodyWriter.java rename to frameworks/Java/grizzly-jersey/src/main/java/hello/JsonMessageBodyWriter.java diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/JsonResource.java b/frameworks/Java/grizzly-jersey/src/main/java/hello/JsonResource.java similarity index 100% rename from frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/JsonResource.java rename to frameworks/Java/grizzly-jersey/src/main/java/hello/JsonResource.java diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/MustacheViewProcessor.java b/frameworks/Java/grizzly-jersey/src/main/java/hello/MustacheViewProcessor.java similarity index 100% rename from frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/MustacheViewProcessor.java rename to frameworks/Java/grizzly-jersey/src/main/java/hello/MustacheViewProcessor.java diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/PlaintextResource.java b/frameworks/Java/grizzly-jersey/src/main/java/hello/PlaintextResource.java similarity index 100% rename from frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/PlaintextResource.java rename to frameworks/Java/grizzly-jersey/src/main/java/hello/PlaintextResource.java diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/ServerHeaderFilter.java b/frameworks/Java/grizzly-jersey/src/main/java/hello/ServerHeaderFilter.java similarity index 100% rename from frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/ServerHeaderFilter.java rename to frameworks/Java/grizzly-jersey/src/main/java/hello/ServerHeaderFilter.java diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/SessionFactoryProvider.java b/frameworks/Java/grizzly-jersey/src/main/java/hello/SessionFactoryProvider.java similarity index 79% rename from frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/SessionFactoryProvider.java rename to frameworks/Java/grizzly-jersey/src/main/java/hello/SessionFactoryProvider.java index 5bb779ac7bf..22390eeea49 100644 --- a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/SessionFactoryProvider.java +++ b/frameworks/Java/grizzly-jersey/src/main/java/hello/SessionFactoryProvider.java @@ -22,11 +22,11 @@ public SessionFactoryProvider(@Context ResourceConfig rc) { private static SessionFactory createSessionFactory(ResourceConfig rc) { Configuration configuration = new Configuration().configure(); - String url = configuration.getProperty("hibernate.hikari.dataSource.url"); - url = url.replace( - "//localhost:3306/", - "//" + rc.getProperty("dbhost") + ":" + rc.getProperty("dbport") + "/"); - configuration.setProperty("hibernate.hikari.dataSource.url", url); +// String url = configuration.getProperty("hibernate.hikari.dataSource.url"); +// url = url.replace( +// "//localhost:3306/", +// "//" + rc.getProperty("dbhost") + ":" + rc.getProperty("dbport") + "/"); +// configuration.setProperty("hibernate.hikari.dataSource.url", url); configuration.addAnnotatedClass(World.class); configuration.addAnnotatedClass(Fortune.class); StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder(); diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/domain/Fortune.java b/frameworks/Java/grizzly-jersey/src/main/java/hello/domain/Fortune.java similarity index 100% rename from frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/domain/Fortune.java rename to frameworks/Java/grizzly-jersey/src/main/java/hello/domain/Fortune.java diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/domain/World.java b/frameworks/Java/grizzly-jersey/src/main/java/hello/domain/World.java similarity index 100% rename from frameworks/Java/grizzly-bm/grizzly-jersey/src/main/java/hello/domain/World.java rename to frameworks/Java/grizzly-jersey/src/main/java/hello/domain/World.java diff --git a/frameworks/Java/grizzly-bm/grizzly-jersey/src/main/resources/fortunes.mustache b/frameworks/Java/grizzly-jersey/src/main/resources/fortunes.mustache similarity index 100% rename from frameworks/Java/grizzly-bm/grizzly-jersey/src/main/resources/fortunes.mustache rename to frameworks/Java/grizzly-jersey/src/main/resources/fortunes.mustache diff --git a/frameworks/Java/grizzly-jersey/src/main/resources/hibernate.cfg.xml b/frameworks/Java/grizzly-jersey/src/main/resources/hibernate.cfg.xml new file mode 100644 index 00000000000..f81f26dbebb --- /dev/null +++ b/frameworks/Java/grizzly-jersey/src/main/resources/hibernate.cfg.xml @@ -0,0 +1,16 @@ + + + + org.hibernate.hikaricp.internal.HikariCPConnectionProvider + org.hibernate.dialect.MySQLDialect + false + false + 256 + 256 + 30000 + com.mysql.jdbc.jdbc2.optional.MysqlDataSource + jdbc:mysql://tfb-database:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false + benchmarkdbuser + benchmarkdbpass + + diff --git a/frameworks/Java/grizzly/benchmark_config.json b/frameworks/Java/grizzly/benchmark_config.json new file mode 100644 index 00000000000..0b74556ee07 --- /dev/null +++ b/frameworks/Java/grizzly/benchmark_config.json @@ -0,0 +1,24 @@ +{ + "framework": "grizzly", + "tests": [{ + "default": { + "json_url": "/json", + "plaintext_url": "/plaintext", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "None", + "framework": "Grizzly", + "language": "Java", + "flavor": "None", + "orm": "Raw", + "platform": "Servlet", + "webserver": "Grizzly", + "os": "Linux", + "database_os": "Linux", + "display_name": "grizzly", + "notes": "", + "versus": "" + } + }] +} diff --git a/frameworks/Java/grizzly/grizzly.dockerfile b/frameworks/Java/grizzly/grizzly.dockerfile new file mode 100644 index 00000000000..b5e5cac13ae --- /dev/null +++ b/frameworks/Java/grizzly/grizzly.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/maven:0.1 + +ADD ./ /grizzly +WORKDIR /grizzly +RUN mvn clean compile assembly:single +CMD java \ + -Dorg.glassfish.grizzly.nio.transport.TCPNIOTransport.max-receive-buffer-size=16384 \ + -Dorg.glassfish.grizzly.http.io.OutputBuffer.default-buffer-size=1024 \ + -Dorg.glassfish.grizzly.memory.BuffersBuffer.bb-cache-size=32 \ + -jar target/grizzly-bm-0.1-jar-with-dependencies.jar diff --git a/frameworks/Java/grizzly-bm/pom.xml b/frameworks/Java/grizzly/pom.xml similarity index 100% rename from frameworks/Java/grizzly-bm/pom.xml rename to frameworks/Java/grizzly/pom.xml diff --git a/frameworks/Java/grizzly-bm/src/main/java/org/glassfish/grizzly/bm/JsonHttpHandler.java b/frameworks/Java/grizzly/src/main/java/org/glassfish/grizzly/bm/JsonHttpHandler.java similarity index 100% rename from frameworks/Java/grizzly-bm/src/main/java/org/glassfish/grizzly/bm/JsonHttpHandler.java rename to frameworks/Java/grizzly/src/main/java/org/glassfish/grizzly/bm/JsonHttpHandler.java diff --git a/frameworks/Java/grizzly-bm/src/main/java/org/glassfish/grizzly/bm/PlainText2HttpHandler.java b/frameworks/Java/grizzly/src/main/java/org/glassfish/grizzly/bm/PlainText2HttpHandler.java similarity index 100% rename from frameworks/Java/grizzly-bm/src/main/java/org/glassfish/grizzly/bm/PlainText2HttpHandler.java rename to frameworks/Java/grizzly/src/main/java/org/glassfish/grizzly/bm/PlainText2HttpHandler.java diff --git a/frameworks/Java/grizzly-bm/src/main/java/org/glassfish/grizzly/bm/PlainTextHttpHandler.java b/frameworks/Java/grizzly/src/main/java/org/glassfish/grizzly/bm/PlainTextHttpHandler.java similarity index 100% rename from frameworks/Java/grizzly-bm/src/main/java/org/glassfish/grizzly/bm/PlainTextHttpHandler.java rename to frameworks/Java/grizzly/src/main/java/org/glassfish/grizzly/bm/PlainTextHttpHandler.java diff --git a/frameworks/Java/grizzly-bm/src/main/java/org/glassfish/grizzly/bm/RootHttpHandler.java b/frameworks/Java/grizzly/src/main/java/org/glassfish/grizzly/bm/RootHttpHandler.java similarity index 100% rename from frameworks/Java/grizzly-bm/src/main/java/org/glassfish/grizzly/bm/RootHttpHandler.java rename to frameworks/Java/grizzly/src/main/java/org/glassfish/grizzly/bm/RootHttpHandler.java diff --git a/frameworks/Java/grizzly-bm/src/main/java/org/glassfish/grizzly/bm/Server.java b/frameworks/Java/grizzly/src/main/java/org/glassfish/grizzly/bm/Server.java similarity index 100% rename from frameworks/Java/grizzly-bm/src/main/java/org/glassfish/grizzly/bm/Server.java rename to frameworks/Java/grizzly/src/main/java/org/glassfish/grizzly/bm/Server.java diff --git a/frameworks/Java/jawn/README.md b/frameworks/Java/jawn/README.md index 62c356a8d99..7558096c6e4 100644 --- a/frameworks/Java/jawn/README.md +++ b/frameworks/Java/jawn/README.md @@ -5,14 +5,11 @@ of web development platforms. ## Running the application -If you have [gradle](http://gradle.org) installed: +Have [gradle](http://gradle.org) installed, then: ``` gradle run ``` -Or use the included wrapper: -``` -./gradlew run -``` + Point your browser at `localhost:8080/json` ### A couple of commands to get going with the benchmark framework diff --git a/frameworks/Java/jawn/benchmark_config.json b/frameworks/Java/jawn/benchmark_config.json index 149b5d265e1..1e04e049b6e 100644 --- a/frameworks/Java/jawn/benchmark_config.json +++ b/frameworks/Java/jawn/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "jawn", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Java/jawn/gradle/wrapper/gradle-wrapper.jar b/frameworks/Java/jawn/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 6b6ea3ab4ff..00000000000 Binary files a/frameworks/Java/jawn/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/frameworks/Java/jawn/gradle/wrapper/gradle-wrapper.properties b/frameworks/Java/jawn/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 0e680f3759f..00000000000 --- a/frameworks/Java/jawn/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-bin.zip diff --git a/frameworks/Java/jawn/gradlew b/frameworks/Java/jawn/gradlew deleted file mode 100755 index cccdd3d517f..00000000000 --- a/frameworks/Java/jawn/gradlew +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env sh - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/frameworks/Java/jawn/gradlew.bat b/frameworks/Java/jawn/gradlew.bat deleted file mode 100644 index e95643d6a2c..00000000000 --- a/frameworks/Java/jawn/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/frameworks/Java/jawn/jawn.dockerfile b/frameworks/Java/jawn/jawn.dockerfile new file mode 100644 index 00000000000..4f94f680f1d --- /dev/null +++ b/frameworks/Java/jawn/jawn.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/java8:0.1 +FROM techempower/gradle-java8:0.1 + +ADD ./ /jawn +WORKDIR /jawn +RUN gradle clean +CMD gradle --no-daemon --refresh-dependencies run -Pargs=8080,production diff --git a/frameworks/Java/jawn/setup.sh b/frameworks/Java/jawn/setup.sh deleted file mode 100644 index db053367648..00000000000 --- a/frameworks/Java/jawn/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql java8 - -./gradlew clean - -./gradlew --no-daemon --refresh-dependencies run -Pargs=8080,production diff --git a/frameworks/Java/jawn/src/main/java/app/BenchmarkMain.java b/frameworks/Java/jawn/src/main/java/app/BenchmarkMain.java index 9853ecc1167..a29bb7b8838 100644 --- a/frameworks/Java/jawn/src/main/java/app/BenchmarkMain.java +++ b/frameworks/Java/jawn/src/main/java/app/BenchmarkMain.java @@ -15,7 +15,7 @@ public class BenchmarkMain extends Jawn { private static final byte[] bytemessage = message.getBytes(); - String host = "TFB-database:5432"; + String host = "tfb-database:5432"; String dbUrl = "jdbc:postgresql://"+host+"/hello_world"; // implicit constructor diff --git a/frameworks/Java/jetty/benchmark_config.json b/frameworks/Java/jetty/benchmark_config.json index 2c6ce8777c4..04f8b07b2f0 100644 --- a/frameworks/Java/jetty/benchmark_config.json +++ b/frameworks/Java/jetty/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "jetty", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -22,7 +21,6 @@ "versus": "servlet" }, "servlet": { - "setup_file": "setup_servlet", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/Java/jetty/jetty-servlet.dockerfile b/frameworks/Java/jetty/jetty-servlet.dockerfile new file mode 100644 index 00000000000..8f8a7c97c30 --- /dev/null +++ b/frameworks/Java/jetty/jetty-servlet.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/maven:0.1 + +ADD ./ /jetty +WORKDIR /jetty +RUN mvn -P servlet clean compile assembly:single +CMD java \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -jar target/jetty-example-0.1-jar-with-dependencies.jar diff --git a/frameworks/Java/jetty/jetty.dockerfile b/frameworks/Java/jetty/jetty.dockerfile new file mode 100644 index 00000000000..4886fdb06b2 --- /dev/null +++ b/frameworks/Java/jetty/jetty.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/maven:0.1 + +ADD ./ /jetty +WORKDIR /jetty +RUN mvn clean compile assembly:single +CMD java \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -jar target/jetty-example-0.1-jar-with-dependencies.jar diff --git a/frameworks/Java/jetty/setup.sh b/frameworks/Java/jetty/setup.sh deleted file mode 100755 index b5e779871a6..00000000000 --- a/frameworks/Java/jetty/setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends java maven - -mvn clean compile assembly:single - -cd target -java -XX:+UseNUMA -XX:+UseParallelGC -jar jetty-example-0.1-jar-with-dependencies.jar & diff --git a/frameworks/Java/jetty/setup_servlet.sh b/frameworks/Java/jetty/setup_servlet.sh deleted file mode 100755 index 6e33a7e85b5..00000000000 --- a/frameworks/Java/jetty/setup_servlet.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends java maven - -mvn -P servlet clean compile assembly:single - -cd target -java -XX:+UseNUMA -XX:+UseParallelGC -jar jetty-example-0.1-jar-with-dependencies.jar & diff --git a/frameworks/Java/jlhttp/benchmark_config.json b/frameworks/Java/jlhttp/benchmark_config.json index d5ea8d3c7a3..ea546d232a0 100755 --- a/frameworks/Java/jlhttp/benchmark_config.json +++ b/frameworks/Java/jlhttp/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "jlhttp", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/Java/jlhttp/jlhttp.dockerfile b/frameworks/Java/jlhttp/jlhttp.dockerfile new file mode 100644 index 00000000000..41b7e09fe27 --- /dev/null +++ b/frameworks/Java/jlhttp/jlhttp.dockerfile @@ -0,0 +1,12 @@ +FROM techempower/maven:0.1 + +ADD ./ /jlhttp +WORKDIR /jlhttp +RUN mvn clean compile assembly:single +CMD java \ + -server \ + -Xss256k \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -jar target/jlhttp-1.0-jar-with-dependencies.jar diff --git a/frameworks/Java/jlhttp/pom.xml b/frameworks/Java/jlhttp/pom.xml index 380ef28b7f1..d468b77efee 100755 --- a/frameworks/Java/jlhttp/pom.xml +++ b/frameworks/Java/jlhttp/pom.xml @@ -16,17 +16,17 @@ net.freeutils jlhttp - 2.2 + 2.3 com.fasterxml.jackson.core jackson-databind - 2.7.4 + 2.9.5 com.fasterxml.jackson.module jackson-module-afterburner - 2.7.4 + 2.9.5 @@ -36,7 +36,7 @@ true org.apache.maven.plugins maven-compiler-plugin - 2.5.1 + 3.7.0 1.7 1.7 @@ -46,7 +46,7 @@ maven-assembly-plugin - 2.5.4 + 3.1.0 diff --git a/frameworks/Java/jlhttp/setup.sh b/frameworks/Java/jlhttp/setup.sh deleted file mode 100755 index 435713cbf64..00000000000 --- a/frameworks/Java/jlhttp/setup.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -# specify build requirements -fw_depends java maven - -# build project -mvn clean compile assembly:single - -# run server -cd target -java -server -Xss256k -XX:+UseNUMA -XX:+UseParallelGC -XX:+AggressiveOpts -jar jlhttp-1.0-jar-with-dependencies.jar & diff --git a/frameworks/Java/jooby/benchmark_config.json b/frameworks/Java/jooby/benchmark_config.json index fe79f084ab1..0806b954d69 100644 --- a/frameworks/Java/jooby/benchmark_config.json +++ b/frameworks/Java/jooby/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "jooby", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "db_url": "/db", diff --git a/frameworks/Java/jooby/conf/application.conf b/frameworks/Java/jooby/conf/application.conf index da56b954224..95114793bb8 100644 --- a/frameworks/Java/jooby/conf/application.conf +++ b/frameworks/Java/jooby/conf/application.conf @@ -9,6 +9,6 @@ server.threads.Max = ${runtime.processors-x2} netty.threads.Worker = 4 ## database -db.url = "jdbc:postgresql://TFB-database:5432/hello_world" +db.url = "jdbc:postgresql://tfb-database:5432/hello_world" db.user = benchmarkdbuser db.password = benchmarkdbpass diff --git a/frameworks/Java/jooby/jooby.dockerfile b/frameworks/Java/jooby/jooby.dockerfile new file mode 100644 index 00000000000..ecc369eda33 --- /dev/null +++ b/frameworks/Java/jooby/jooby.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/maven:0.1 + +ADD ./ /jooby +WORKDIR /jooby +RUN mvn clean package +CMD java \ + -server \ + -Xms512m \ + -Xmx2g \ + -jar target/jooby-1.0.jar diff --git a/frameworks/Java/jooby/setup.sh b/frameworks/Java/jooby/setup.sh deleted file mode 100755 index 1b5e751b96a..00000000000 --- a/frameworks/Java/jooby/setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends postgresql java maven - -mvn clean package - -cd target -java -server -Xms512m -Xmx2g -jar jooby-1.0.jar & diff --git a/frameworks/Java/light-java/benchmark_config.json b/frameworks/Java/light-java/benchmark_config.json index 1d19f36bfc4..b207d01de0e 100644 --- a/frameworks/Java/light-java/benchmark_config.json +++ b/frameworks/Java/light-java/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "light-4j", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -22,7 +21,6 @@ "versus": "" }, "postgresql" : { - "setup_file": "setup_postgresql", "db_url": "/db", "query_url": "/queries?queries=", "fortune_url": "/fortunes", diff --git a/frameworks/Java/light-java/dependency-reduced-pom.xml b/frameworks/Java/light-java/dependency-reduced-pom.xml deleted file mode 100644 index 4ce10f30eea..00000000000 --- a/frameworks/Java/light-java/dependency-reduced-pom.xml +++ /dev/null @@ -1,165 +0,0 @@ - - - - oss-parent - org.sonatype.oss - 5 - ../pom.xml/pom.xml - - 4.0.0 - com.networknt - techempower - techempower - 1.0.0 - - 2.2.0 - - - install - target - ${project.artifactId}-${project.version} - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-compiler-plugin - [3.7.0,) - - compile - testCompile - - - - - - - - - - - - - - - maven-shade-plugin - 2.4.3 - - - package - - shade - - - - - - - - - - - maven-jar-plugin - 2.6 - - - - com.networknt.server.Server - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.4.0 - - java - - -jar - target/${project.build.finalName}.jar - - - - - maven-compiler-plugin - 3.7.0 - - - org.codehaus.plexus - plexus-compiler-javac-errorprone - 2.8.2 - - - com.google.errorprone - error_prone_core - 2.1.3 - - - - javac-with-errorprone - true - true - - true - ${java.version} - ${java.version} - - - - - - - - sonatype-snapshots - https://oss.sonatype.org/content/repositories/snapshots - - - - - junit - junit - 4.12 - test - - - hamcrest-core - org.hamcrest - - - - - - 2.6.1 - 4.1.2 - 1.10 - 2.2.0 - UTF-8 - 1.2 - 4.5.2 - 1.2.5.Final - 0.5.2 - 2.6 - 1.8 - 2.8.2 - 1.2.5 - 1.5.10 - 2.1.0-beta.124 - 1.7.22 - 2.5 - 1.1.9 - 4.12 - 42.1.4 - 4.5.3 - 5.1.41 - 1.2.5 - - - diff --git a/frameworks/Java/light-java/docker-compose.yml b/frameworks/Java/light-java/docker-compose.yml deleted file mode 100644 index 690767d604e..00000000000 --- a/frameworks/Java/light-java/docker-compose.yml +++ /dev/null @@ -1,28 +0,0 @@ - version: '2' - services: - mysqldb: - image: mysql:5.7.16 - volumes: - - ./docker/db/mysql:/var/lib/mysql - - ./src/main/resources/script/mysql:/docker-entrypoint-initdb.d - environment: - MYSQL_ROOT_PASSWORD: my-secret-pw - postgresdb: - image: postgres:9.6.0 - volumes: - - ./docker/db/postgres:/var/lib/postgresql/data - - ./src/main/resources/script/postgres:/docker-entrypoint-initdb.d - environment: - POSTGRES_PASSWORD: my-secret-pw - POSTGRES_DB: hello_world - -# light: -# depends_on: -# - mysqldb -# - postgresdb -# image: networknt/example-database:latest -# links: -# - mysqldb -# - postgresdb -# ports: -# - 8080:8080 diff --git a/frameworks/Java/light-java/light-4j-postgresql.dockerfile b/frameworks/Java/light-java/light-4j-postgresql.dockerfile new file mode 100644 index 00000000000..b821fc0c1c7 --- /dev/null +++ b/frameworks/Java/light-java/light-4j-postgresql.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/maven:0.1 + +ADD ./ /light-4j +WORKDIR /light-4j +RUN mvn clean package +CMD java \ + -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 \ + -server \ + -Xms512m \ + -Xmx2g \ + -jar target/techempower-1.0.0.jar diff --git a/frameworks/Java/light-java/light-4j.dockerfile b/frameworks/Java/light-java/light-4j.dockerfile new file mode 100644 index 00000000000..b821fc0c1c7 --- /dev/null +++ b/frameworks/Java/light-java/light-4j.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/maven:0.1 + +ADD ./ /light-4j +WORKDIR /light-4j +RUN mvn clean package +CMD java \ + -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 \ + -server \ + -Xms512m \ + -Xmx2g \ + -jar target/techempower-1.0.0.jar diff --git a/frameworks/Java/light-java/setup.sh b/frameworks/Java/light-java/setup.sh deleted file mode 100755 index 9c9ac184075..00000000000 --- a/frameworks/Java/light-java/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql mysql java maven - -mvn clean package -cd target -java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -server -Xms512m -Xmx2g -jar techempower-1.0.0.jar & diff --git a/frameworks/Java/light-java/setup_mysql.sh b/frameworks/Java/light-java/setup_mysql.sh deleted file mode 100644 index 8c83cf989ea..00000000000 --- a/frameworks/Java/light-java/setup_mysql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends mysql - -source ./setup.sh \ No newline at end of file diff --git a/frameworks/Java/light-java/setup_postgresql.sh b/frameworks/Java/light-java/setup_postgresql.sh deleted file mode 100644 index 4c1aa956d38..00000000000 --- a/frameworks/Java/light-java/setup_postgresql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends postgresql - -source ./setup.sh \ No newline at end of file diff --git a/frameworks/Java/light-java/src/main/resources/config/mysql.json b/frameworks/Java/light-java/src/main/resources/config/mysql.json index 93e2cc5aa82..ac5e50303f8 100644 --- a/frameworks/Java/light-java/src/main/resources/config/mysql.json +++ b/frameworks/Java/light-java/src/main/resources/config/mysql.json @@ -1,6 +1,6 @@ { "description": "mysql connection", - "jdbcUrl": "jdbc:mysql://TFB-database:3306/hello_world", + "jdbcUrl": "jdbc:mysql://tfb-database:3306/hello_world", "username": "benchmarkdbuser", "password": "benchmarkdbpass", "maximumPoolSize": 256, @@ -10,4 +10,4 @@ "prepStmtCacheSize": 4096, "prepStmtCacheSqlLimit": 2048, "useSSL": false -} +} \ No newline at end of file diff --git a/frameworks/Java/light-java/src/main/resources/config/postgres.json b/frameworks/Java/light-java/src/main/resources/config/postgres.json index ba5838f43bf..71272258744 100644 --- a/frameworks/Java/light-java/src/main/resources/config/postgres.json +++ b/frameworks/Java/light-java/src/main/resources/config/postgres.json @@ -1,7 +1,7 @@ { "description": "postgresql connection", - "jdbcUrl": "jdbc:postgresql://TFB-database:5432/hello_world", + "jdbcUrl": "jdbc:postgresql://tfb-database:5432/hello_world", "username": "benchmarkdbuser", "password": "benchmarkdbpass", "maximumPoolSize": 256 -} +} \ No newline at end of file diff --git a/frameworks/Java/minijax/benchmark_config.json b/frameworks/Java/minijax/benchmark_config.json index eaf0a0d1756..013552d580b 100644 --- a/frameworks/Java/minijax/benchmark_config.json +++ b/frameworks/Java/minijax/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "minijax", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "db_url": "/db", diff --git a/frameworks/Java/minijax/minijax.dockerfile b/frameworks/Java/minijax/minijax.dockerfile new file mode 100644 index 00000000000..b670ddab80f --- /dev/null +++ b/frameworks/Java/minijax/minijax.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/maven:0.1 + +ADD ./ /minijax +WORKDIR /minijax +RUN mvn clean package +CMD java \ + -server \ + -Xms512m \ + -Xmx2g \ + -XX:+AggressiveOpts \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -jar target/minijax-techempower-0.0.1.jar diff --git a/frameworks/Java/minijax/minijax.properties b/frameworks/Java/minijax/minijax.properties index fc2dd72048b..cc9dece626b 100644 --- a/frameworks/Java/minijax/minijax.properties +++ b/frameworks/Java/minijax/minijax.properties @@ -1,4 +1,4 @@ -javax.persistence.jdbc.url=jdbc:mysql://localhost:3306/hello_world?jdbcCompliantTruncation=false&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts=true&cacheRSMetadata=true&useSSL=false +javax.persistence.jdbc.url=jdbc:mysql://tfb-database:3306/hello_world?jdbcCompliantTruncation=false&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts=true&cacheRSMetadata=true&useSSL=false javax.persistence.jdbc.driver=com.mysql.cj.jdbc.Driver javax.persistence.jdbc.user=benchmarkdbuser javax.persistence.jdbc.password=benchmarkdbpass diff --git a/frameworks/Java/minijax/setup.sh b/frameworks/Java/minijax/setup.sh deleted file mode 100644 index 6612ac8fd69..00000000000 --- a/frameworks/Java/minijax/setup.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends mysql java maven - -sed -i 's|localhost|'${DBHOST}'|g' minijax.properties - -mvn clean package - -java -server -Xms512m -Xmx2g -XX:+AggressiveOpts -XX:+UseNUMA -XX:+UseParallelGC -jar target/minijax-techempower-0.0.1.jar & diff --git a/frameworks/Java/netty/benchmark_config.json b/frameworks/Java/netty/benchmark_config.json index 30b2c2e84a2..0202931297c 100644 --- a/frameworks/Java/netty/benchmark_config.json +++ b/frameworks/Java/netty/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "netty", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/Java/netty/netty.dockerfile b/frameworks/Java/netty/netty.dockerfile new file mode 100644 index 00000000000..09bcb1b1e10 --- /dev/null +++ b/frameworks/Java/netty/netty.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/maven:0.1 + +ADD ./ /netty +WORKDIR /netty +RUN mvn clean compile assembly:single +CMD java \ + -server \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -jar target/netty-example-0.1-jar-with-dependencies.jar diff --git a/frameworks/Java/netty/setup.sh b/frameworks/Java/netty/setup.sh deleted file mode 100755 index 18bf514c2f9..00000000000 --- a/frameworks/Java/netty/setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends java maven - -mvn clean compile assembly:single - -cd target -java -server -XX:+UseNUMA -XX:+UseParallelGC -XX:+AggressiveOpts -jar netty-example-0.1-jar-with-dependencies.jar & diff --git a/frameworks/Java/ninja-standalone/benchmark_config.json b/frameworks/Java/ninja-standalone/benchmark_config.json index bdfda5c6414..9a3b73db56f 100644 --- a/frameworks/Java/ninja-standalone/benchmark_config.json +++ b/frameworks/Java/ninja-standalone/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "ninja-standalone", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Java/ninja-standalone/ninja-standalone.dockerfile b/frameworks/Java/ninja-standalone/ninja-standalone.dockerfile new file mode 100644 index 00000000000..66e62023357 --- /dev/null +++ b/frameworks/Java/ninja-standalone/ninja-standalone.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/maven:0.1 + +ADD ./ /ninja-standalone +WORKDIR /ninja-standalone +RUN mvn clean compile assembly:single +CMD java -Dninja.port=8080 -jar target/ninja-standalone-0.0.1-SNAPSHOT-jar-with-dependencies.jar diff --git a/frameworks/Java/ninja-standalone/setup.sh b/frameworks/Java/ninja-standalone/setup.sh deleted file mode 100755 index f8c85296763..00000000000 --- a/frameworks/Java/ninja-standalone/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -sed -i 's|mysql://.*:3306|mysql://'"${DBHOST}"':3306|g' src/main/java/conf/application.conf -sed -i 's|mysql://.*:3306|mysql://'"${DBHOST}"':3306|g' src/main/resources/META-INF/persistence.xml - -fw_depends mysql java maven - -mvn clean compile assembly:single - -java -Dninja.port=8080 -jar target/ninja-standalone-0.0.1-SNAPSHOT-jar-with-dependencies.jar & diff --git a/frameworks/Java/ninja-standalone/src/main/java/conf/application.conf b/frameworks/Java/ninja-standalone/src/main/java/conf/application.conf index 6a316676979..202f1b19c89 100644 --- a/frameworks/Java/ninja-standalone/src/main/java/conf/application.conf +++ b/frameworks/Java/ninja-standalone/src/main/java/conf/application.conf @@ -31,7 +31,7 @@ application.session.transferred_over_https_only=false ninja.migration.run=false %prod.ninja.jpa.persistence_unit_name = mysql -%prod.db.connection.url=jdbc:mysql://localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false +%prod.db.connection.url=jdbc:mysql://tfb-database:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false %prod.db.connection.username=benchmarkdbuser %prod.db.connection.password=benchmarkdbpass diff --git a/frameworks/Java/ninja-standalone/src/main/resources/META-INF/persistence.xml b/frameworks/Java/ninja-standalone/src/main/resources/META-INF/persistence.xml index 56ef2bc1a4e..d30c05ddecf 100644 --- a/frameworks/Java/ninja-standalone/src/main/resources/META-INF/persistence.xml +++ b/frameworks/Java/ninja-standalone/src/main/resources/META-INF/persistence.xml @@ -36,7 +36,7 @@ - + diff --git a/frameworks/Java/play1/benchmark_config.json b/frameworks/Java/play1/benchmark_config.json index 35a87811c35..a39cabcec45 100644 --- a/frameworks/Java/play1/benchmark_config.json +++ b/frameworks/Java/play1/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "play1", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/db?queries=", diff --git a/frameworks/Java/play1/conf/application.conf b/frameworks/Java/play1/conf/application.conf index 6bfa0ce20a0..02d35c1cde6 100644 --- a/frameworks/Java/play1/conf/application.conf +++ b/frameworks/Java/play1/conf/application.conf @@ -115,14 +115,14 @@ db.pool.minSize=10 # generic "destroy" method : # db.destroyMethod=close db.driver= com.mysql.jdbc.Driver -db.url=jdbc:mysql://127.0.0.1:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false -#db.url=jdbc:mysql://127.0.0.1:3306/hello_world +db.url=jdbc:mysql://tfb-database:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false +#db.url=jdbc:mysql://tfb-database:3306/hello_world db.user=benchmarkdbuser db.pass=benchmarkdbpass #db.jndiName=DefaultDS #db.default.driver= com.mysql.jdbc.Driver -#db.default.url=jdbc:mysql://127.0.0.1:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true +#db.default.url=jdbc:mysql://tfb-database:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true #db.default.user=benchmarkdbuser #db.default.pass=benchmarkdbpass #db.default.jndiName=DefaultDS diff --git a/frameworks/Java/play1/play1.dockerfile b/frameworks/Java/play1/play1.dockerfile new file mode 100644 index 00000000000..4a00ae0640f --- /dev/null +++ b/frameworks/Java/play1/play1.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/java:0.1 + +ADD ./ /play1 +WORKDIR /play1 +RUN wget -nv https://downloads.typesafe.com/play/1.5.0/play-1.5.0.zip +RUN unzip -q play-1.5.0.zip +RUN apt-get install -y python +CMD play-1.5.0/play run --%prod diff --git a/frameworks/Java/play1/setup.sh b/frameworks/Java/play1/setup.sh deleted file mode 100755 index bce2489ad72..00000000000 --- a/frameworks/Java/play1/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -sed -i 's|jdbc:mysql://.*:3306|jdbc:mysql://'"${DBHOST}"':3306|g' conf/application.conf - -fw_depends mysql java play1 - -$PLAY1_HOME/play start --%prod diff --git a/frameworks/Java/play2-java/benchmark_config.json b/frameworks/Java/play2-java/benchmark_config.json index 55aa3e71323..656715008e0 100644 --- a/frameworks/Java/play2-java/benchmark_config.json +++ b/frameworks/Java/play2-java/benchmark_config.json @@ -1,10 +1,8 @@ { - "framework": "play2", + "framework": "play2-java", "tests": [ { "default": { - "display_name": "play2-java", - "setup_file": "setup_java", "framework": "play2", "language": "Java", "flavor": "None", @@ -22,9 +20,7 @@ "json_url": "/json", "plaintext_url": "/plaintext" }, - "java-netty": { - "display_name": "play2-java-netty", - "setup_file": "setup_java_netty", + "netty": { "framework": "play2", "language": "Java", "flavor": "None", @@ -42,9 +38,7 @@ "json_url": "/json", "plaintext_url": "/plaintext" }, - "java-ebean-hikaricp": { - "display_name": "play2-java-ebean-hikaricp", - "setup_file": "setup_java_ebean_hikaricp", + "ebean-hikaricp": { "framework": "play2", "language": "Java", "flavor": "None", @@ -64,9 +58,7 @@ "fortune_url": "/fortunes", "update_url": "/update?queries=" }, - "java-ebean-hikaricp-netty": { - "display_name": "play2-java-ebean-hikaricp-netty", - "setup_file": "setup_java_ebean_hikaricp_netty", + "ebean-hikaricp-netty": { "framework": "play2", "language": "Java", "flavor": "None", @@ -86,9 +78,7 @@ "fortune_url": "/fortunes", "update_url": "/update?queries=" }, - "java-jpa-hikaricp": { - "display_name": "play2-java-jpa-hikaricp", - "setup_file": "setup_java_jpa_hikaricp", + "jpa-hikaricp": { "framework": "play2", "language": "Java", "flavor": "None", @@ -108,9 +98,7 @@ "fortune_url": "/fortunes", "update_url": "/update?queries=" }, - "java-jpa-hikaricp-netty": { - "display_name": "play2-java-jpa-hikaricp-netty", - "setup_file": "setup_java_jpa_hikaricp_netty", + "jpa-hikaricp-netty": { "framework": "play2", "language": "Java", "flavor": "None", @@ -130,9 +118,7 @@ "fortune_url": "/fortunes", "update_url": "/update?queries=" }, - "java-jooq-hikaricp": { - "display_name": "play2-java-jooq-hikaricp", - "setup_file": "setup_java_jooq_hikaricp", + "jooq-hikaricp": { "framework": "play2", "language": "Java", "flavor": "None", @@ -152,9 +138,7 @@ "fortune_url": "/fortunes", "update_url": "/update?queries=" }, - "java-jooq-hikaricp-netty": { - "display_name": "play2-java-jooq-hikaricp-netty", - "setup_file": "setup_java_jooq_hikaricp_netty", + "jooq-hikaricp-netty": { "framework": "play2", "language": "Java", "flavor": "None", diff --git a/frameworks/Java/play2-java/play2-java-ebean-hikaricp-netty.dockerfile b/frameworks/Java/play2-java/play2-java-ebean-hikaricp-netty.dockerfile new file mode 100644 index 00000000000..5caa6ac8247 --- /dev/null +++ b/frameworks/Java/play2-java/play2-java-ebean-hikaricp-netty.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-java-ebean-hikaricp /play2-java-ebean-hikaricp +WORKDIR /play2-java-ebean-hikaricp +RUN sbt stage +CMD target/universal/stage/bin/play2-java-ebean-hikaricp \ + -Dplay.server.provider=play.core.server.NettyServerProvider diff --git a/frameworks/Java/play2-java/play2-java-ebean-hikaricp.dockerfile b/frameworks/Java/play2-java/play2-java-ebean-hikaricp.dockerfile new file mode 100644 index 00000000000..daed36e9bdc --- /dev/null +++ b/frameworks/Java/play2-java/play2-java-ebean-hikaricp.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-java-ebean-hikaricp /play2-java-ebean-hikaricp +WORKDIR /play2-java-ebean-hikaricp +RUN sbt stage +CMD target/universal/stage/bin/play2-java-ebean-hikaricp \ + -Dplay.server.provider=play.core.server.AkkaHttpServerProvider diff --git a/frameworks/Java/play2-java/play2-java-ebean-hikaricp/build.sbt b/frameworks/Java/play2-java/play2-java-ebean-hikaricp/build.sbt index 158515d1988..c589572e2aa 100644 --- a/frameworks/Java/play2-java/play2-java-ebean-hikaricp/build.sbt +++ b/frameworks/Java/play2-java/play2-java-ebean-hikaricp/build.sbt @@ -4,7 +4,7 @@ version := "1.0-SNAPSHOT" lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayEbean, PlayNettyServer) -scalaVersion := "2.12.4" +scalaVersion := "2.12.5" libraryDependencies ++= Seq( guice, diff --git a/frameworks/Java/play2-java/play2-java-ebean-hikaricp/conf/application.conf b/frameworks/Java/play2-java/play2-java-ebean-hikaricp/conf/application.conf index 0b9918e2669..9611d6f2e81 100644 --- a/frameworks/Java/play2-java/play2-java-ebean-hikaricp/conf/application.conf +++ b/frameworks/Java/play2-java/play2-java-ebean-hikaricp/conf/application.conf @@ -71,7 +71,7 @@ database.dispatcher { db { default { # https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration - url = "jdbc:mysql://TFB-database:3306/hello_world" + url = "jdbc:mysql://tfb-database:3306/hello_world" username = "benchmarkdbuser" password = "benchmarkdbpass" hikaricp { diff --git a/frameworks/Java/play2-java/play2-java-ebean-hikaricp/project/build.properties b/frameworks/Java/play2-java/play2-java-ebean-hikaricp/project/build.properties index 394cb75cfe9..05313438a19 100644 --- a/frameworks/Java/play2-java/play2-java-ebean-hikaricp/project/build.properties +++ b/frameworks/Java/play2-java/play2-java-ebean-hikaricp/project/build.properties @@ -1 +1 @@ -sbt.version=1.0.4 +sbt.version=1.1.2 diff --git a/frameworks/Java/play2-java/play2-java-jooq-hikaricp-netty.dockerfile b/frameworks/Java/play2-java/play2-java-jooq-hikaricp-netty.dockerfile new file mode 100644 index 00000000000..91e70e4098a --- /dev/null +++ b/frameworks/Java/play2-java/play2-java-jooq-hikaricp-netty.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-java-jooq-hikaricp /play2-java-jooq-hikaricp +WORKDIR /play2-java-jooq-hikaricp +RUN sbt stage +CMD target/universal/stage/bin/play2-java-jooq-hikaricp \ + -Dplay.server.provider=play.core.server.NettyServerProvider diff --git a/frameworks/Java/play2-java/play2-java-jooq-hikaricp.dockerfile b/frameworks/Java/play2-java/play2-java-jooq-hikaricp.dockerfile new file mode 100644 index 00000000000..3d84a728120 --- /dev/null +++ b/frameworks/Java/play2-java/play2-java-jooq-hikaricp.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-java-jooq-hikaricp /play2-java-jooq-hikaricp +WORKDIR /play2-java-jooq-hikaricp +RUN sbt stage +CMD target/universal/stage/bin/play2-java-jooq-hikaricp \ + -Dplay.server.provider=play.core.server.AkkaHttpServerProvider diff --git a/frameworks/Java/play2-java/play2-java-jooq-hikaricp/build.sbt b/frameworks/Java/play2-java/play2-java-jooq-hikaricp/build.sbt index 0c8739624d7..438915822ce 100644 --- a/frameworks/Java/play2-java/play2-java-jooq-hikaricp/build.sbt +++ b/frameworks/Java/play2-java/play2-java-jooq-hikaricp/build.sbt @@ -4,7 +4,7 @@ version := "1.0-SNAPSHOT" lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayNettyServer) -scalaVersion := "2.12.4" +scalaVersion := "2.12.5" val jOOQVersion = "3.10.3" diff --git a/frameworks/Java/play2-java/play2-java-jooq-hikaricp/conf/application.conf b/frameworks/Java/play2-java/play2-java-jooq-hikaricp/conf/application.conf index f3a071ab741..4fcd62ee852 100644 --- a/frameworks/Java/play2-java/play2-java-jooq-hikaricp/conf/application.conf +++ b/frameworks/Java/play2-java/play2-java-jooq-hikaricp/conf/application.conf @@ -71,7 +71,7 @@ database.dispatcher { db { default { # https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration - url = "jdbc:mysql://TFB-database:3306/hello_world" + url = "jdbc:mysql://tfb-database:3306/hello_world" username = "benchmarkdbuser" password = "benchmarkdbpass" hikaricp { diff --git a/frameworks/Java/play2-java/play2-java-jooq-hikaricp/project/build.properties b/frameworks/Java/play2-java/play2-java-jooq-hikaricp/project/build.properties index 394cb75cfe9..05313438a19 100644 --- a/frameworks/Java/play2-java/play2-java-jooq-hikaricp/project/build.properties +++ b/frameworks/Java/play2-java/play2-java-jooq-hikaricp/project/build.properties @@ -1 +1 @@ -sbt.version=1.0.4 +sbt.version=1.1.2 diff --git a/frameworks/Java/play2-java/play2-java-jpa-hikaricp-netty.dockerfile b/frameworks/Java/play2-java/play2-java-jpa-hikaricp-netty.dockerfile new file mode 100644 index 00000000000..9b19d32b095 --- /dev/null +++ b/frameworks/Java/play2-java/play2-java-jpa-hikaricp-netty.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-java-jpa-hikaricp /play2-java-jpa-hikaricp +WORKDIR /play2-java-jpa-hikaricp +RUN sbt stage +CMD target/universal/stage/bin/play2-java-jpa-hikaricp \ + -Dplay.server.provider=play.core.server.NettyServerProvider diff --git a/frameworks/Java/play2-java/play2-java-jpa-hikaricp.dockerfile b/frameworks/Java/play2-java/play2-java-jpa-hikaricp.dockerfile new file mode 100644 index 00000000000..42cf41deff6 --- /dev/null +++ b/frameworks/Java/play2-java/play2-java-jpa-hikaricp.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-java-jpa-hikaricp /play2-java-jpa-hikaricp +WORKDIR /play2-java-jpa-hikaricp +RUN sbt stage +CMD target/universal/stage/bin/play2-java-jpa-hikaricp \ + -Dplay.server.provider=play.core.server.AkkaHttpServerProvider diff --git a/frameworks/Java/play2-java/play2-java-jpa-hikaricp/build.sbt b/frameworks/Java/play2-java/play2-java-jpa-hikaricp/build.sbt index deb5833f0f9..204a4be37a4 100644 --- a/frameworks/Java/play2-java/play2-java-jpa-hikaricp/build.sbt +++ b/frameworks/Java/play2-java/play2-java-jpa-hikaricp/build.sbt @@ -4,7 +4,7 @@ version := "1.0-SNAPSHOT" lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayNettyServer) -scalaVersion := "2.12.4" +scalaVersion := "2.12.5" libraryDependencies ++= Seq( guice, diff --git a/frameworks/Java/play2-java/play2-java-jpa-hikaricp/conf/application.conf b/frameworks/Java/play2-java/play2-java-jpa-hikaricp/conf/application.conf index aa1cb2c9ff8..8731e95ac31 100644 --- a/frameworks/Java/play2-java/play2-java-jpa-hikaricp/conf/application.conf +++ b/frameworks/Java/play2-java/play2-java-jpa-hikaricp/conf/application.conf @@ -71,7 +71,7 @@ database.dispatcher { db { default { # https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration - url = "jdbc:mysql://TFB-database:3306/hello_world" + url = "jdbc:mysql://tfb-database:3306/hello_world" username = "benchmarkdbuser" password = "benchmarkdbpass" hikaricp { diff --git a/frameworks/Java/play2-java/play2-java-jpa-hikaricp/project/build.properties b/frameworks/Java/play2-java/play2-java-jpa-hikaricp/project/build.properties index 394cb75cfe9..05313438a19 100644 --- a/frameworks/Java/play2-java/play2-java-jpa-hikaricp/project/build.properties +++ b/frameworks/Java/play2-java/play2-java-jpa-hikaricp/project/build.properties @@ -1 +1 @@ -sbt.version=1.0.4 +sbt.version=1.1.2 diff --git a/frameworks/Java/play2-java/play2-java-netty.dockerfile b/frameworks/Java/play2-java/play2-java-netty.dockerfile new file mode 100644 index 00000000000..b3786f5ecab --- /dev/null +++ b/frameworks/Java/play2-java/play2-java-netty.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-java /play2-java +WORKDIR /play2-java +RUN sbt stage +CMD target/universal/stage/bin/play2-java \ + -Dplay.server.provider=play.core.server.NettyServerProvider diff --git a/frameworks/Java/play2-java/play2-java.dockerfile b/frameworks/Java/play2-java/play2-java.dockerfile new file mode 100644 index 00000000000..eec2cf29837 --- /dev/null +++ b/frameworks/Java/play2-java/play2-java.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-java /play2-java +WORKDIR /play2-java +RUN sbt stage +CMD target/universal/stage/bin/play2-java \ + -Dplay.server.provider=play.core.server.AkkaHttpServerProvider diff --git a/frameworks/Java/play2-java/play2-java/build.sbt b/frameworks/Java/play2-java/play2-java/build.sbt index 3c35a4b8e5f..65b1938df3a 100644 --- a/frameworks/Java/play2-java/play2-java/build.sbt +++ b/frameworks/Java/play2-java/play2-java/build.sbt @@ -4,6 +4,6 @@ version := "1.0-SNAPSHOT" lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayNettyServer) -scalaVersion := "2.12.4" +scalaVersion := "2.12.5" libraryDependencies += guice diff --git a/frameworks/Java/play2-java/play2-java/project/build.properties b/frameworks/Java/play2-java/play2-java/project/build.properties index 394cb75cfe9..05313438a19 100644 --- a/frameworks/Java/play2-java/play2-java/project/build.properties +++ b/frameworks/Java/play2-java/play2-java/project/build.properties @@ -1 +1 @@ -sbt.version=1.0.4 +sbt.version=1.1.2 diff --git a/frameworks/Java/play2-java/setup_java.sh b/frameworks/Java/play2-java/setup_java.sh deleted file mode 100755 index a44877e67a1..00000000000 --- a/frameworks/Java/play2-java/setup_java.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends java8 sbt - -cd play2-java - -rm -rf target/ project/target/ project/project/ - -sbt stage -target/universal/stage/bin/play2-java -Dplay.server.provider=play.core.server.AkkaHttpServerProvider & diff --git a/frameworks/Java/play2-java/setup_java_ebean_hikaricp.sh b/frameworks/Java/play2-java/setup_java_ebean_hikaricp.sh deleted file mode 100755 index 684d763a7fc..00000000000 --- a/frameworks/Java/play2-java/setup_java_ebean_hikaricp.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql java8 sbt - -cd play2-java-ebean-hikaricp - -rm -rf target/ project/target/ project/project/ - -sbt stage -target/universal/stage/bin/play2-java-ebean-hikaricp -Dplay.server.provider=play.core.server.AkkaHttpServerProvider & diff --git a/frameworks/Java/play2-java/setup_java_ebean_hikaricp_netty.sh b/frameworks/Java/play2-java/setup_java_ebean_hikaricp_netty.sh deleted file mode 100755 index 6a717451a51..00000000000 --- a/frameworks/Java/play2-java/setup_java_ebean_hikaricp_netty.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql java8 sbt - -cd play2-java-ebean-hikaricp - -rm -rf target/ project/target/ project/project/ - -sbt stage -target/universal/stage/bin/play2-java-ebean-hikaricp -Dplay.server.provider=play.core.server.NettyServerProvider & diff --git a/frameworks/Java/play2-java/setup_java_jooq_hikaricp.sh b/frameworks/Java/play2-java/setup_java_jooq_hikaricp.sh deleted file mode 100755 index b324d238262..00000000000 --- a/frameworks/Java/play2-java/setup_java_jooq_hikaricp.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql java8 sbt - -cd play2-java-jooq-hikaricp - -rm -rf target/ project/target/ project/project/ - -sbt stage -target/universal/stage/bin/play2-java-jooq-hikaricp -Dplay.server.provider=play.core.server.AkkaHttpServerProvider & diff --git a/frameworks/Java/play2-java/setup_java_jooq_hikaricp_netty.sh b/frameworks/Java/play2-java/setup_java_jooq_hikaricp_netty.sh deleted file mode 100755 index 9949fb68d6e..00000000000 --- a/frameworks/Java/play2-java/setup_java_jooq_hikaricp_netty.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql java8 sbt - -cd play2-java-jooq-hikaricp - -rm -rf target/ project/target/ project/project/ - -sbt stage -target/universal/stage/bin/play2-java-jooq-hikaricp -Dplay.server.provider=play.core.server.NettyServerProvider & diff --git a/frameworks/Java/play2-java/setup_java_jpa_hikaricp.sh b/frameworks/Java/play2-java/setup_java_jpa_hikaricp.sh deleted file mode 100755 index 86d0a68afb9..00000000000 --- a/frameworks/Java/play2-java/setup_java_jpa_hikaricp.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql java8 sbt - -cd play2-java-jpa-hikaricp - -rm -rf target/ project/target/ project/project/ - -sbt stage -target/universal/stage/bin/play2-java-jpa-hikaricp -Dplay.server.provider=play.core.server.AkkaHttpServerProvider & diff --git a/frameworks/Java/play2-java/setup_java_jpa_hikaricp_netty.sh b/frameworks/Java/play2-java/setup_java_jpa_hikaricp_netty.sh deleted file mode 100755 index 4e26863656b..00000000000 --- a/frameworks/Java/play2-java/setup_java_jpa_hikaricp_netty.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql java8 sbt - -cd play2-java-jpa-hikaricp - -rm -rf target/ project/target/ project/project/ - -sbt stage -target/universal/stage/bin/play2-java-jpa-hikaricp -Dplay.server.provider=play.core.server.NettyServerProvider & diff --git a/frameworks/Java/play2-java/setup_java_netty.sh b/frameworks/Java/play2-java/setup_java_netty.sh deleted file mode 100755 index 12f3d7f17ba..00000000000 --- a/frameworks/Java/play2-java/setup_java_netty.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends java8 sbt - -cd play2-java - -rm -rf target/ project/target/ project/project/ - -sbt stage -target/universal/stage/bin/play2-java -Dplay.server.provider=play.core.server.NettyServerProvider & diff --git a/frameworks/Java/proteus/benchmark_config.json b/frameworks/Java/proteus/benchmark_config.json index c98ebc5ade0..73829ffc566 100644 --- a/frameworks/Java/proteus/benchmark_config.json +++ b/frameworks/Java/proteus/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "proteus", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "fortune_url": "/fortunes", @@ -24,7 +23,6 @@ "versus": "" }, "mysql" : { - "setup_file": "setup", "db_url": "/db/mysql", "fortune_url": "/fortunes/mysql", "port": 8080, diff --git a/frameworks/Java/proteus/conf/application.conf b/frameworks/Java/proteus/conf/application.conf index b586bda0d4d..a96885f8469 100644 --- a/frameworks/Java/proteus/conf/application.conf +++ b/frameworks/Java/proteus/conf/application.conf @@ -46,9 +46,9 @@ mysql { hikaricp { - jdbcUrl= "jdbc:mysql://TFB-database:3306/hello_world?useServerPrepStmts=true&cachePrepStmts=true&useSSL=false", + jdbcUrl= "jdbc:mysql://tfb-database:3306/hello_world?useServerPrepStmts=true&cachePrepStmts=true&useSSL=false", - #jdbcUrl= "jdbc:mysql://TFB-database:3306/hello_world?useServerPrepStmts=true&cachePrepStmts=true&useUnicode=true", + #jdbcUrl= "jdbc:mysql://tfb-database:3306/hello_world?useServerPrepStmts=true&cachePrepStmts=true&useUnicode=true", maximumPoolSize=48 username = benchmarkdbuser password = benchmarkdbpass @@ -61,7 +61,7 @@ postgres hikaricp { description="postgresql server" - jdbcUrl= "jdbc:postgresql://TFB-database:5432/hello_world", + jdbcUrl= "jdbc:postgresql://tfb-database:5432/hello_world", maximumPoolSize=256 username = benchmarkdbuser password = benchmarkdbpass diff --git a/frameworks/Java/proteus/proteus-base.dockerfile b/frameworks/Java/proteus/proteus-base.dockerfile new file mode 100644 index 00000000000..7e859184ea4 --- /dev/null +++ b/frameworks/Java/proteus/proteus-base.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/maven-java8:0.1 + +ADD ./ /proteus +WORKDIR /proteus +RUN mvn -U clean package diff --git a/frameworks/Java/proteus/proteus-mysql.dockerfile b/frameworks/Java/proteus/proteus-mysql.dockerfile new file mode 100644 index 00000000000..3221090661d --- /dev/null +++ b/frameworks/Java/proteus/proteus-mysql.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/proteus-base:0.1 + +CMD bash run.sh diff --git a/frameworks/Java/proteus/proteus.dockerfile b/frameworks/Java/proteus/proteus.dockerfile new file mode 100644 index 00000000000..3221090661d --- /dev/null +++ b/frameworks/Java/proteus/proteus.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/proteus-base:0.1 + +CMD bash run.sh diff --git a/frameworks/Java/proteus/run.sh b/frameworks/Java/proteus/run.sh new file mode 100644 index 00000000000..402bc49c2ce --- /dev/null +++ b/frameworks/Java/proteus/run.sh @@ -0,0 +1,13 @@ +#!/bin/bash +java \ + -Dlogback.configurationFile="conf/logback.xml" \ + -Dconfig.file="conf/application.conf" \ + -Xms2g \ + -Xmx2g \ + -XX:+AggressiveOpts \ + -server \ + -XX:-UseBiasedLocking \ + -XX:+UseStringDeduplication \ + -Djava.net.preferIPv4Stack=true \ + -classpath "/proteus/target/proteus-techempower-1.0.0.jar:/proteus/target/lib/*" \ + io.sinistral.ExampleApplication diff --git a/frameworks/Java/proteus/setup.sh b/frameworks/Java/proteus/setup.sh deleted file mode 100755 index 4acb994fcf9..00000000000 --- a/frameworks/Java/proteus/setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends postgresql mysql java8 maven - - -mvn -U clean package -cd target -java -Dlogback.configurationFile="conf/logback.xml" -Dconfig.file="conf/application.conf" -Xms2g -Xmx2g -XX:+AggressiveOpts -server -XX:-UseBiasedLocking -XX:+UseStringDeduplication -Djava.net.preferIPv4Stack=true -classpath "./proteus-techempower-1.0.0.jar:lib/*" io.sinistral.ExampleApplication diff --git a/frameworks/Java/proteus/src/main/java/io/sinistral/ExampleApplication.java b/frameworks/Java/proteus/src/main/java/io/sinistral/ExampleApplication.java index 11e8629ed36..f8e3acdafef 100644 --- a/frameworks/Java/proteus/src/main/java/io/sinistral/ExampleApplication.java +++ b/frameworks/Java/proteus/src/main/java/io/sinistral/ExampleApplication.java @@ -1,40 +1,29 @@ package io.sinistral; -import static io.undertow.util.Headers.CONTENT_TYPE; - -import java.nio.ByteBuffer; - import com.jsoniter.output.EncodingMode; import com.jsoniter.output.JsonStream; -import com.mysql.jdbc.log.Log; import io.sinistral.controllers.Benchmarks; -import io.sinistral.models.Message; import io.sinistral.proteus.ProteusApplication; import io.sinistral.proteus.controllers.handlers.BenchmarksRouteSupplier; import io.sinistral.proteus.services.AssetsService; import io.sinistral.proteus.services.SwaggerService; import io.sinistral.services.MySqlService; import io.sinistral.services.PostgresService; -import io.undertow.Handlers; import io.undertow.Undertow; import io.undertow.UndertowOptions; import io.undertow.server.HttpHandler; -import io.undertow.server.HttpServerExchange; -import io.undertow.server.handlers.PathHandler; import io.undertow.server.handlers.SetHeaderHandler; -import io.undertow.util.Headers; - public class ExampleApplication extends ProteusApplication { - + static { - - + + JsonStream.setMode(EncodingMode.STATIC_MODE); - - + + } @Override @@ -51,7 +40,7 @@ public void buildServer() this.ports.add(httpPort); - Benchmarks controller = this.getInjector().getInstance(Benchmarks.class); + Benchmarks controller = injector.getInstance(Benchmarks.class); HttpHandler pathsHandler = new BenchmarksRouteSupplier(controller, null).get(); @@ -60,18 +49,14 @@ public void buildServer() Undertow.Builder undertowBuilder = Undertow.builder().addHttpListener(httpPort, config.getString("application.host")) .setBufferSize(16 * 1024) .setIoThreads(Runtime.getRuntime().availableProcessors() * 2) -// .setServerOption(UndertowOptions.ALWAYS_SET_DATE, true) .setSocketOption(org.xnio.Options.BACKLOG, 10000) .setServerOption(UndertowOptions.ALWAYS_SET_KEEP_ALIVE, false) .setServerOption(UndertowOptions.RECORD_REQUEST_START_TIME, false) - .setServerOption(UndertowOptions.ENABLE_CONNECTOR_STATISTICS, false) .setServerOption(UndertowOptions.MAX_ENTITY_SIZE, config.getBytes("undertow.server.maxEntitySize")) .setWorkerThreads(200) .setHandler(rootHandler); this.undertow = undertowBuilder.build(); - - log.debug("Completed server build!"); } diff --git a/frameworks/Java/proteus/src/main/java/io/sinistral/controllers/Benchmarks.java b/frameworks/Java/proteus/src/main/java/io/sinistral/controllers/Benchmarks.java index a4592d05114..f22bc61e1f9 100644 --- a/frameworks/Java/proteus/src/main/java/io/sinistral/controllers/Benchmarks.java +++ b/frameworks/Java/proteus/src/main/java/io/sinistral/controllers/Benchmarks.java @@ -6,12 +6,7 @@ import static io.undertow.util.Headers.CONTENT_TYPE; import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.StringWriter; -import java.net.URISyntaxException; -import java.net.URL; import java.nio.ByteBuffer; -import java.nio.file.Paths; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -30,7 +25,6 @@ import com.fasterxml.jackson.module.afterburner.AfterburnerModule; import com.fizzed.rocker.runtime.StringBuilderOutput; import com.github.mustachejava.DefaultMustacheFactory; -import com.github.mustachejava.Mustache; import com.github.mustachejava.MustacheFactory; import com.google.inject.Inject; import com.google.inject.Singleton; @@ -105,7 +99,7 @@ public class Benchmarks - protected final MySqlService sqlService; + protected final MySqlService mySqlService; protected final PostgresService postgresService; @@ -116,9 +110,9 @@ public static int randomWorld() { } @Inject - public Benchmarks(PostgresService postgresService, MySqlService sqlService) + public Benchmarks(PostgresService postgresService, MySqlService mySqlService) { - this.sqlService = sqlService; + this.mySqlService = mySqlService; this.postgresService = postgresService; } @@ -167,7 +161,7 @@ public void dbMySql(HttpServerExchange exchange) { final World world; - try (final Connection connection = sqlService.getConnection()) + try (final Connection connection = mySqlService.getConnection()) { try (PreparedStatement statement = connection.prepareStatement("SELECT id,randomNumber FROM world WHERE id = ?")) { @@ -205,7 +199,7 @@ public void fortunesMysql(HttpServerExchange exchange ) throws Exception List fortunes = new ArrayList<>(); - try (final Connection connection = postgresService.getConnection()) + try (final Connection connection = mySqlService.getConnection()) { try (PreparedStatement statement = connection.prepareStatement("SELECT * FROM Fortune")) { diff --git a/frameworks/Java/rapidoid/benchmark_config.json b/frameworks/Java/rapidoid/benchmark_config.json index 9e89e07850e..78f14ff76bf 100644 --- a/frameworks/Java/rapidoid/benchmark_config.json +++ b/frameworks/Java/rapidoid/benchmark_config.json @@ -3,7 +3,6 @@ "tests": [ { "default": { - "setup_file": "setup-default", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -22,7 +21,6 @@ "versus": "" }, "mysql": { - "setup_file": "setup-mysql", "fortune_url": "/fortunes", "port": 8080, "approach": "Realistic", @@ -40,7 +38,6 @@ "versus": "" }, "postgres": { - "setup_file": "setup-postgresql", "fortune_url": "/fortunes", "port": 8080, "approach": "Realistic", @@ -58,7 +55,6 @@ "versus": "" }, "http-fast": { - "setup_file": "setup-http-fast", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/Java/rapidoid/rapidoid-base.dockerfile b/frameworks/Java/rapidoid/rapidoid-base.dockerfile new file mode 100644 index 00000000000..8e24815b2ff --- /dev/null +++ b/frameworks/Java/rapidoid/rapidoid-base.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/maven:0.1 + +ADD ./ /rapidoid +WORKDIR /rapidoid +RUN mvn clean compile assembly:single diff --git a/frameworks/Java/rapidoid/rapidoid-http-fast.dockerfile b/frameworks/Java/rapidoid/rapidoid-http-fast.dockerfile new file mode 100644 index 00000000000..250e072e32c --- /dev/null +++ b/frameworks/Java/rapidoid/rapidoid-http-fast.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/rapidoid-base:0.1 + +CMD java \ + -server \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -cp target/rapidoid-1.0-jar-with-dependencies.jar \ + lowlevel.Main \ + profiles=production diff --git a/frameworks/Java/rapidoid/rapidoid-mysql.dockerfile b/frameworks/Java/rapidoid/rapidoid-mysql.dockerfile new file mode 100644 index 00000000000..cbfbea1b679 --- /dev/null +++ b/frameworks/Java/rapidoid/rapidoid-mysql.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/rapidoid-base:0.1 + +CMD java \ + -server \ + -Xms512m \ + -Xmx2g \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -cp target/rapidoid-1.0-jar-with-dependencies.jar \ + highlevel.Main \ + profiles=mysql,production diff --git a/frameworks/Java/rapidoid/rapidoid-postgres.dockerfile b/frameworks/Java/rapidoid/rapidoid-postgres.dockerfile new file mode 100644 index 00000000000..7432472779a --- /dev/null +++ b/frameworks/Java/rapidoid/rapidoid-postgres.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/rapidoid-base:0.1 + +CMD java \ + -server \ + -Xms512m \ + -Xmx2g \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -cp target/rapidoid-1.0-jar-with-dependencies.jar \ + highlevel.Main \ + profiles=postgres,production diff --git a/frameworks/Java/rapidoid/rapidoid.dockerfile b/frameworks/Java/rapidoid/rapidoid.dockerfile new file mode 100644 index 00000000000..83e3d9ac244 --- /dev/null +++ b/frameworks/Java/rapidoid/rapidoid.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/rapidoid-base:0.1 + +CMD java \ + -server \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -cp target/rapidoid-1.0-jar-with-dependencies.jar \ + highlevel.Main \ + profiles=production diff --git a/frameworks/Java/rapidoid/setup-default.sh b/frameworks/Java/rapidoid/setup-default.sh deleted file mode 100755 index 987cbb5fe88..00000000000 --- a/frameworks/Java/rapidoid/setup-default.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends java maven - -mvn clean compile assembly:single - -cd target - -java -server \ - -XX:+UseNUMA -XX:+UseParallelGC -XX:+AggressiveOpts -cp \ - rapidoid-1.0-jar-with-dependencies.jar \ - highlevel.Main profiles=production dbhost="$DBHOST" & diff --git a/frameworks/Java/rapidoid/setup-http-fast.sh b/frameworks/Java/rapidoid/setup-http-fast.sh deleted file mode 100755 index 9a7288f0202..00000000000 --- a/frameworks/Java/rapidoid/setup-http-fast.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends java maven - -mvn clean compile assembly:single - -cd target - -java -server \ - -XX:+UseNUMA -XX:+UseParallelGC -XX:+AggressiveOpts \ - -cp rapidoid-1.0-jar-with-dependencies.jar \ - lowlevel.Main profiles=production dbhost="$DBHOST" & diff --git a/frameworks/Java/rapidoid/setup-mysql.sh b/frameworks/Java/rapidoid/setup-mysql.sh deleted file mode 100755 index c81ce595459..00000000000 --- a/frameworks/Java/rapidoid/setup-mysql.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends mysql java maven - -mvn clean compile assembly:single - -cd target - -java -server \ - -Xms512m -Xmx2g -XX:+UseParallelGC -XX:+AggressiveOpts \ - -cp rapidoid-1.0-jar-with-dependencies.jar \ - highlevel.Main profiles=mysql,production dbhost="$DBHOST" & diff --git a/frameworks/Java/rapidoid/setup-postgresql.sh b/frameworks/Java/rapidoid/setup-postgresql.sh deleted file mode 100755 index 4718344c3cc..00000000000 --- a/frameworks/Java/rapidoid/setup-postgresql.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends postgresql java maven - -mvn clean compile assembly:single - -cd target - -java -server \ - -Xms512m -Xmx2g -XX:+UseParallelGC -XX:+AggressiveOpts \ - -cp rapidoid-1.0-jar-with-dependencies.jar \ - highlevel.Main profiles=postgres,production dbhost="$DBHOST" & diff --git a/frameworks/Java/rapidoid/src/main/java/highlevel/Main.java b/frameworks/Java/rapidoid/src/main/java/highlevel/Main.java index 3ddcf00425a..e6199c203da 100644 --- a/frameworks/Java/rapidoid/src/main/java/highlevel/Main.java +++ b/frameworks/Java/rapidoid/src/main/java/highlevel/Main.java @@ -8,7 +8,6 @@ import org.rapidoid.http.MediaType; import org.rapidoid.jdbc.JDBC; import org.rapidoid.jdbc.JdbcClient; -import org.rapidoid.log.Log; import org.rapidoid.setup.App; import org.rapidoid.setup.On; @@ -36,16 +35,13 @@ private static void setupSimpleHandlers() { } private static void setupDbHandlers() { - String dbHost = Conf.ROOT.entry("dbhost").or("localhost"); - Log.info("Database hostname is: " + dbHost); - JdbcClient jdbc = JDBC.api(); if (Env.hasProfile("mysql")) { - jdbc.url("jdbc:mysql://" + dbHost + ":3306/hello_world?" + Helper.MYSQL_CONFIG); + jdbc.url("jdbc:mysql://tfb-database:3306/hello_world?" + Helper.MYSQL_CONFIG); } else if (Env.hasProfile("postgres")) { - jdbc.url("jdbc:postgresql://" + dbHost + ":5432/hello_world?" + Helper.POSTGRES_CONFIG); + jdbc.url("jdbc:postgresql://tfb-database:5432/hello_world?" + Helper.POSTGRES_CONFIG); } else { throw Err.notExpected(); diff --git a/frameworks/Java/restexpress/.project b/frameworks/Java/restexpress/.project deleted file mode 100644 index 71bfc0327a5..00000000000 --- a/frameworks/Java/restexpress/.project +++ /dev/null @@ -1,14 +0,0 @@ - - - world - A Minimal RestExpress Server. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. - - - - org.eclipse.jdt.core.javabuilder - - - - org.eclipse.jdt.core.javanature - - \ No newline at end of file diff --git a/frameworks/Java/restexpress/benchmark_config.json b/frameworks/Java/restexpress/benchmark_config.json index c72db69310d..1609e2c3097 100644 --- a/frameworks/Java/restexpress/benchmark_config.json +++ b/frameworks/Java/restexpress/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "restexpress", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/restexpress/json", "plaintext_url": "/restexpress/plaintext", "db_url": "/restexpress/mongodb", @@ -24,7 +23,6 @@ "versus": "netty" }, "mysql-raw": { - "setup_file": "setup", "db_url": "/restexpress/mysql", "query_url": "/restexpress/mysql?queries=", "port": 8080, diff --git a/frameworks/Java/restexpress/config/dev/environment.properties b/frameworks/Java/restexpress/config/dev/environment.properties index 8d5645db2a3..2f3b2667c7b 100644 --- a/frameworks/Java/restexpress/config/dev/environment.properties +++ b/frameworks/Java/restexpress/config/dev/environment.properties @@ -3,10 +3,10 @@ executor.threadPool.size = 300 # A MongoDB URI/Connection string # see: http://docs.mongodb.org/manual/reference/connection-string/ -mongodb.uri = mongodb://localhost:27017/hello_world?maxPoolSize=300 +mongodb.uri = mongodb://tfb-database:27017/hello_world?maxPoolSize=300 # A MySQL URI/Connection string -mysql.uri = jdbc:mysql://localhost:3306/hello_world +mysql.uri = jdbc:mysql://tfb-database:3306/hello_world # MySQL useConfigs value, See section "21.3.5.1.1. Properties Files for the useConfigs Option" of: # http://dev.mysql.com/doc/refman/5.6/en/connector-j-reference-configuration-properties.html diff --git a/frameworks/Java/restexpress/restexpress-base.dockerfile b/frameworks/Java/restexpress/restexpress-base.dockerfile new file mode 100644 index 00000000000..d77361cc71c --- /dev/null +++ b/frameworks/Java/restexpress/restexpress-base.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/maven:0.1 + +ADD ./ /restexpress +WORKDIR /restexpress +RUN mvn clean package +RUN mvn assembly:single +WORKDIR /restexpress/target +RUN unzip world-1.0-SNAPSHOT-zip-with-dependencies.zip +WORKDIR /restexpress/target/world-1.0-SNAPSHOT +CMD java -jar world-1.0-SNAPSHOT.jar + diff --git a/frameworks/Java/restexpress/restexpress-mysql-raw.dockerfile b/frameworks/Java/restexpress/restexpress-mysql-raw.dockerfile new file mode 100644 index 00000000000..4ce1c2f29e0 --- /dev/null +++ b/frameworks/Java/restexpress/restexpress-mysql-raw.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/restexpress-base:0.1 + +CMD java -jar world-1.0-SNAPSHOT.jar diff --git a/frameworks/Java/restexpress/restexpress.dockerfile b/frameworks/Java/restexpress/restexpress.dockerfile new file mode 100644 index 00000000000..4ce1c2f29e0 --- /dev/null +++ b/frameworks/Java/restexpress/restexpress.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/restexpress-base:0.1 + +CMD java -jar world-1.0-SNAPSHOT.jar diff --git a/frameworks/Java/restexpress/setup.sh b/frameworks/Java/restexpress/setup.sh deleted file mode 100755 index 22cd3063596..00000000000 --- a/frameworks/Java/restexpress/setup.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -sed -i 's|mongodb://.*/hello_world|mongodb://'"${DBHOST}"'/hello_world|g' config/dev/environment.properties -sed -i 's|mysql://.*:3306|mysql://'"${DBHOST}"':3306|g' config/dev/environment.properties - -fw_depends java maven mysql mongodb - -mvn clean package -mvn assembly:single -cd target -unzip world-1.0-SNAPSHOT-zip-with-dependencies.zip -cd world-1.0-SNAPSHOT -java -jar world-1.0-SNAPSHOT.jar & diff --git a/frameworks/Java/revenj-jvm/benchmark_config.json b/frameworks/Java/revenj-jvm/benchmark_config.json index ef5e09dda3c..4187598430b 100644 --- a/frameworks/Java/revenj-jvm/benchmark_config.json +++ b/frameworks/Java/revenj-jvm/benchmark_config.json @@ -2,13 +2,12 @@ "framework": "revenj-jvm", "tests": [{ "default": { - "setup_file": "setup", - "json_url": "/revenj/json", - "plaintext_url": "/revenj/plaintext", - "db_url": "/revenj/db", - "query_url": "/revenj/queries?queries=", - "update_url": "/revenj/updates?queries=", - "fortune_url": "/revenj/fortunes", + "json_url": "/json", + "plaintext_url": "/plaintext", + "db_url": "/db", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "fortune_url": "/fortunes", "port": 8080, "approach": "Realistic", "classification": "Fullstack", diff --git a/frameworks/Java/revenj-jvm/deploy.sh b/frameworks/Java/revenj-jvm/deploy.sh deleted file mode 100644 index 58b6440f14d..00000000000 --- a/frameworks/Java/revenj-jvm/deploy.sh +++ /dev/null @@ -1,2 +0,0 @@ -mvn install -cp ./target/revenj.war ~/opt/resin/webapps/ diff --git a/frameworks/Java/revenj-jvm/pom.xml b/frameworks/Java/revenj-jvm/pom.xml index 22156555e41..6143fb398b0 100644 --- a/frameworks/Java/revenj-jvm/pom.xml +++ b/frameworks/Java/revenj-jvm/pom.xml @@ -44,7 +44,7 @@ revenj.java ${project.build.sourceDirectory} dsl - ${project.basedir}/../../../installs/dsl-compiler.exe + ${project.basedir}/dsl-compiler.exe diff --git a/frameworks/Java/revenj-jvm/revenj-jvm.dockerfile b/frameworks/Java/revenj-jvm/revenj-jvm.dockerfile new file mode 100644 index 00000000000..ff3d90f91b8 --- /dev/null +++ b/frameworks/Java/revenj-jvm/revenj-jvm.dockerfile @@ -0,0 +1,18 @@ +FROM techempower/maven-java8:0.1 as maven + +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list +RUN apt-get update +RUN apt-get install -y mono-complete mono-fastcgi-server + +ADD ./ /revenj-jvm +WORKDIR /revenj-jvm +RUN wget -q https://github.com/ngs-doo/revenj/releases/download/1.4.2/dsl-compiler.zip +RUN unzip -o dsl-compiler.zip +RUN rm dsl-compiler.zip +RUN mvn clean compile war:war + +FROM techempower/resin-java8:0.1 + +COPY --from=maven /revenj-jvm/target/revenj.war ${RESIN_HOME}/webapps/ROOT.war +CMD java -jar ${RESIN_HOME}/lib/resin.jar console diff --git a/frameworks/Java/revenj-jvm/setup.sh b/frameworks/Java/revenj-jvm/setup.sh deleted file mode 100644 index 6f4a6116b23..00000000000 --- a/frameworks/Java/revenj-jvm/setup.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends postgresql java8 resin-java8 maven mono dsl_platform - -echo "Changing the database" -cat $TROOT/web.xml | sed 's/localhost/'$DBHOST'/g' > $TROOT/src/main/webapp/WEB-INF/web.xml - -mvn clean compile war:war -rm -rf $RESIN_HOME/webapps/* -cp target/revenj.war $RESIN_HOME/webapps/ -JAVA_EXE=$JAVA_HOME/bin/java resinctl console diff --git a/frameworks/Java/revenj-jvm/src/main/webapp/WEB-INF/web.xml b/frameworks/Java/revenj-jvm/src/main/webapp/WEB-INF/web.xml index 0004de8b5e1..4ca7f988dd7 100644 --- a/frameworks/Java/revenj-jvm/src/main/webapp/WEB-INF/web.xml +++ b/frameworks/Java/revenj-jvm/src/main/webapp/WEB-INF/web.xml @@ -2,7 +2,7 @@ revenj.jdbcUrl java.lang.String - jdbc:postgresql://localhost:5432/hello_world?user=benchmarkdbuser&password=benchmarkdbpass + jdbc:postgresql://tfb-database:5432/hello_world?user=benchmarkdbuser&password=benchmarkdbpass json diff --git a/frameworks/Java/servlet/README.md b/frameworks/Java/servlet/README.md index 804b128086d..41380de76cc 100644 --- a/frameworks/Java/servlet/README.md +++ b/frameworks/Java/servlet/README.md @@ -42,24 +42,24 @@ Please confirm the versions data with the latest install scripts of TFB project. ### Default Maven profile - * Plaintext - `http://localhost:8080/servlet/plaintext` - * JSON - `http://localhost:8080/servlet/json` + * Plaintext - `http://localhost:8080/plaintext` + * JSON - `http://localhost:8080/json` ### `afterburner` Maven profile - * JSON - `http://localhost:8080/servlet/json` + * JSON - `http://localhost:8080/json` ### `cjs` Maven profile - * JSON - `http://localhost:8080/servlet/json` + * JSON - `http://localhost:8080/json` ### `mysql` and `postgresql` Maven profiles - * DB - `http://localhost:8080/servlet/db` - * Queries - `http://localhost:8080/servlet/db?queries=` - * Updates - `http://localhost:8080/servlet/update?queries=` - * Fortune - `http://localhost:8080/servlet/fortunes` + * DB - `http://localhost:8080/db` + * Queries - `http://localhost:8080/db?queries=` + * Updates - `http://localhost:8080/update?queries=` + * Fortune - `http://localhost:8080/fortunes` ### `postgresql` Maven profile - * Cache - `http://localhost:8080/servlet/cached-worlds` + * Cache - `http://localhost:8080/cached-worlds` diff --git a/frameworks/Java/servlet/benchmark_config.json b/frameworks/Java/servlet/benchmark_config.json index 233eb4bbafb..5f68783e1dd 100644 --- a/frameworks/Java/servlet/benchmark_config.json +++ b/frameworks/Java/servlet/benchmark_config.json @@ -2,9 +2,8 @@ "framework": "servlet", "tests": [{ "default": { - "setup_file": "setup", - "json_url": "/servlet/json", - "plaintext_url": "/servlet/plaintext", + "json_url": "/json", + "plaintext_url": "/plaintext", "port": 8080, "approach": "Realistic", "classification": "Platform", @@ -22,8 +21,7 @@ "versus": "servlet" }, "afterburner": { - "setup_file": "setup_afterburner", - "json_url": "/servlet/json", + "json_url": "/json", "port": 8080, "approach": "Realistic", "classification": "Platform", @@ -41,8 +39,7 @@ "versus": "servlet" }, "cjs": { - "setup_file": "setup_cjs", - "json_url": "/servlet/json", + "json_url": "/json", "port": 8080, "approach": "Realistic", "classification": "Platform", @@ -59,12 +56,11 @@ "notes": "Jackson with custom serialization", "versus": "servlet" }, - "raw": { - "setup_file": "setup_mysql", - "db_url": "/servlet/db", - "query_url": "/servlet/queries?queries=", - "fortune_url": "/servlet/fortunes", - "update_url": "/servlet/update?queries=", + "mysql": { + "db_url": "/db", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "update_url": "/update?queries=", "port": 8080, "approach": "Realistic", "classification": "Platform", @@ -80,13 +76,12 @@ "display_name": "servlet", "notes": "" }, - "postgres-raw": { - "setup_file": "setup_postgresql", - "db_url": "/servlet/db", - "query_url": "/servlet/queries?queries=", - "cached_query_url": "/servlet/cached-worlds?queries=", - "fortune_url": "/servlet/fortunes", - "update_url": "/servlet/update?queries=", + "postgresql": { + "db_url": "/db", + "query_url": "/queries?queries=", + "cached_query_url": "/cached-worlds?queries=", + "fortune_url": "/fortunes", + "update_url": "/update?queries=", "port": 8080, "approach": "Realistic", "classification": "Platform", @@ -102,44 +97,6 @@ "display_name": "servlet", "notes": "", "versus": "servlet-raw" - }, - "async-tomcat": { - "setup_file": "servlet3-async", - "json_url": "/servlet3/json", - "plaintext_url": "/servlet3/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Platform", - "database": "None", - "framework": "None", - "language": "Java", - "orm": "Raw", - "platform": "Servlet", - "webserver": "Tomcat", - "os": "Linux", - "database_os": "Linux", - "display_name": "servlet3", - "notes": "Servlet 3.1 Async I/O", - "versus": "servlet" - }, - "sync-tomcat": { - "setup_file": "servlet3-sync", - "json_url": "/servlet3/json", - "plaintext_url": "/servlet3/plaintext", - "port": 8080, - "approach": "Realistic", - "classification" : "Platform", - "database": "None", - "framework": "None", - "language": "Java", - "orm": "Raw", - "platform": "Servlet", - "webserver": "Tomcat", - "os": "Linux", - "database_os": "Linux", - "display_name": "servlet3", - "notes": "", - "versus": "servlet" } }] } \ No newline at end of file diff --git a/frameworks/Java/servlet/servlet-afterburner.dockerfile b/frameworks/Java/servlet/servlet-afterburner.dockerfile new file mode 100644 index 00000000000..4c0bbaf8612 --- /dev/null +++ b/frameworks/Java/servlet/servlet-afterburner.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/maven:0.1 as maven + +ADD ./ /servlet +WORKDIR /servlet +RUN mvn clean compile war:war -P afterburner + +FROM techempower/resin:0.1 + +COPY --from=maven /servlet/target/servlet.war ${RESIN_HOME}/webapps/ROOT.war +CMD java -jar ${RESIN_HOME}/lib/resin.jar console diff --git a/frameworks/Java/servlet/servlet-cjs.dockerfile b/frameworks/Java/servlet/servlet-cjs.dockerfile new file mode 100644 index 00000000000..2e542326fb9 --- /dev/null +++ b/frameworks/Java/servlet/servlet-cjs.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/maven:0.1 as maven + +ADD ./ /servlet +WORKDIR /servlet +RUN mvn clean compile war:war -P cjs + +FROM techempower/resin:0.1 + +COPY --from=maven /servlet/target/servlet.war ${RESIN_HOME}/webapps/ROOT.war +CMD java -jar ${RESIN_HOME}/lib/resin.jar console diff --git a/frameworks/Java/servlet/servlet-mysql.dockerfile b/frameworks/Java/servlet/servlet-mysql.dockerfile new file mode 100644 index 00000000000..cbd41ca9bdc --- /dev/null +++ b/frameworks/Java/servlet/servlet-mysql.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/maven:0.1 as maven + +ADD ./ /servlet +WORKDIR /servlet +RUN mvn clean compile war:war -P mysql + +FROM techempower/resin:0.1 + +COPY --from=maven /servlet/target/servlet.war ${RESIN_HOME}/webapps/ROOT.war +CMD java -jar ${RESIN_HOME}/lib/resin.jar console diff --git a/frameworks/Java/servlet/servlet-postgresql.dockerfile b/frameworks/Java/servlet/servlet-postgresql.dockerfile new file mode 100644 index 00000000000..65d4b94eea4 --- /dev/null +++ b/frameworks/Java/servlet/servlet-postgresql.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/maven:0.1 as maven + +ADD ./ /servlet +WORKDIR /servlet +RUN mvn clean compile war:war -P postgresql + +FROM techempower/resin:0.1 + +COPY --from=maven /servlet/target/servlet.war ${RESIN_HOME}/webapps/ROOT.war +CMD java -jar ${RESIN_HOME}/lib/resin.jar console diff --git a/frameworks/Java/servlet/servlet.dockerfile b/frameworks/Java/servlet/servlet.dockerfile new file mode 100644 index 00000000000..8f71537bd76 --- /dev/null +++ b/frameworks/Java/servlet/servlet.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/maven:0.1 as maven + +ADD ./ /servlet +WORKDIR /servlet +RUN mvn clean compile war:war + +FROM techempower/resin:0.1 + +COPY --from=maven /servlet/target/servlet.war ${RESIN_HOME}/webapps/ROOT.war +CMD java -jar ${RESIN_HOME}/lib/resin.jar console diff --git a/frameworks/Java/servlet/servlet3-async.sh b/frameworks/Java/servlet/servlet3-async.sh deleted file mode 100644 index e7b9ea39d35..00000000000 --- a/frameworks/Java/servlet/servlet3-async.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends java tomcat maven - -cd servlet3 -mvn clean compile war:war -rm -rf $CATALINA_HOME/webapps/* -cp target/servlet3.war $CATALINA_HOME/webapps -$CATALINA_HOME/bin/startup.sh diff --git a/frameworks/Java/servlet/servlet3-sync.sh b/frameworks/Java/servlet/servlet3-sync.sh deleted file mode 100644 index c17b1133552..00000000000 --- a/frameworks/Java/servlet/servlet3-sync.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends java tomcat maven - -cd servlet3 -mvn clean compile war:war -P sync -rm -rf $CATALINA_HOME/webapps/* -cp target/servlet3.war $CATALINA_HOME/webapps -$CATALINA_HOME/bin/startup.sh diff --git a/frameworks/Java/servlet/servlet3/README.md b/frameworks/Java/servlet/servlet3/README.md deleted file mode 100644 index c67510f51b4..00000000000 --- a/frameworks/Java/servlet/servlet3/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Servlet 3.1 API benchmarking test - -This is Framework permutation based on the following technology stack - -* Java -* Tomcat 9 -* Servlet 3.1 with Async I/O -* Jackson 2 for JSON processing - -Currently implemented test types are Plaintext and JSON. Their implementation comes in two flavors: PO (plain old) Servlets and Servlets 3.1 with Async I/O. - -### Plaintext - -* [Async](src/main/java/com/gitlab/zloster/tfb/servlet3/async/Plaintext.java) -* [Sync](src/main/java/com/gitlab/zloster/tfb/servlet3/sync/Plaintext.java) - -### JSON - -* [Async](src/main/java/com/gitlab/zloster/tfb/servlet3/async/JSON.java) -* [Sync](src/main/java/com/gitlab/zloster/tfb/servlet3/sync/JSON.java) - -## Test URLs - -### Default Maven profile - -The `async` profile is activated by default. - -* Plaintext - `http://localhost:8080/servlet3/plaintext` -* JSON - `http://localhost:8080/servlet3/json` - -### `sync` Maven profile - -* Plaintext - `http://localhost:8080/servlet3/plaintext` -* JSON - `http://localhost:8080/servlet3/json` diff --git a/frameworks/Java/servlet/setup.sh b/frameworks/Java/servlet/setup.sh deleted file mode 100755 index 209526cfafe..00000000000 --- a/frameworks/Java/servlet/setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends java resin maven - -mvn clean install -rm -rf $RESIN_HOME/webapps/* -cp target/servlet.war $RESIN_HOME/webapps/ -resinctl console diff --git a/frameworks/Java/servlet/setup_afterburner.sh b/frameworks/Java/servlet/setup_afterburner.sh deleted file mode 100644 index a05ef4e831b..00000000000 --- a/frameworks/Java/servlet/setup_afterburner.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends java resin maven - -mvn clean compile war:war -P afterburner -rm -rf $RESIN_HOME/webapps/* -cp target/servlet.war $RESIN_HOME/webapps/ -resinctl console diff --git a/frameworks/Java/servlet/setup_cjs.sh b/frameworks/Java/servlet/setup_cjs.sh deleted file mode 100644 index 86111689886..00000000000 --- a/frameworks/Java/servlet/setup_cjs.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends java resin maven - -mvn clean compile war:war -P cjs -rm -rf $RESIN_HOME/webapps/* -cp target/servlet.war $RESIN_HOME/webapps/ -resinctl console diff --git a/frameworks/Java/servlet/setup_mysql.sh b/frameworks/Java/servlet/setup_mysql.sh deleted file mode 100644 index befaeff5636..00000000000 --- a/frameworks/Java/servlet/setup_mysql.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends java resin maven mysql - -mvn clean compile war:war -P mysql -rm -rf $RESIN_HOME/webapps/* -cp target/servlet.war $RESIN_HOME/webapps/ -resinctl console diff --git a/frameworks/Java/servlet/setup_postgresql.sh b/frameworks/Java/servlet/setup_postgresql.sh deleted file mode 100644 index 115805c73c9..00000000000 --- a/frameworks/Java/servlet/setup_postgresql.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends java resin maven postgresql - -mvn clean compile war:war -P postgresql -rm -rf $RESIN_HOME/webapps/* -cp target/servlet.war $RESIN_HOME/webapps/ -resinctl console diff --git a/frameworks/Java/servlet/source_code b/frameworks/Java/servlet/source_code deleted file mode 100644 index 096faa4d4a7..00000000000 --- a/frameworks/Java/servlet/source_code +++ /dev/null @@ -1,19 +0,0 @@ -./servlet/src/main/ -./servlet/src/main/webapp -./servlet/src/main/webapp/WEB-INF -./servlet/src/main/webapp/WEB-INF/resin-web.xml -./servlet/src/main/webapp/WEB-INF/web.xml -./servlet/src/main/webapp/WEB-INF/jsp -./servlet/src/main/webapp/WEB-INF/jsp/fortunes.jsp -./servlet/src/main/java -./servlet/src/main/java/hello -./servlet/src/main/java/hello/DbPoolServlet.java -./servlet/src/main/java/hello/FortunesServlet.java -./servlet/src/main/java/hello/Common.java -./servlet/src/main/java/hello/PostgresUpdateServlet.java -./servlet/src/main/java/hello/PostgresServlet.java -./servlet/src/main/java/hello/JsonServlet.java -./servlet/src/main/java/hello/PlaintextServlet.java -./servlet/src/main/java/hello/UpdateServlet.java -./servlet/src/main/java/hello/World.java -./servlet/src/main/java/hello/Fortune.java diff --git a/frameworks/Java/servlet/src/main/resources/WEB-INF/mysql/resin-web.xml b/frameworks/Java/servlet/src/main/resources/WEB-INF/mysql/resin-web.xml index 33aefcc362e..d9cca1dc426 100644 --- a/frameworks/Java/servlet/src/main/resources/WEB-INF/mysql/resin-web.xml +++ b/frameworks/Java/servlet/src/main/resources/WEB-INF/mysql/resin-web.xml @@ -4,7 +4,7 @@ com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource - jdbc:mysql://TFB-database:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false + jdbc:mysql://tfb-database:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false benchmarkdbuser benchmarkdbpass diff --git a/frameworks/Java/servlet/src/main/resources/WEB-INF/postgresql/resin-web.xml b/frameworks/Java/servlet/src/main/resources/WEB-INF/postgresql/resin-web.xml index 8d46ff8c7fb..dc27e378785 100644 --- a/frameworks/Java/servlet/src/main/resources/WEB-INF/postgresql/resin-web.xml +++ b/frameworks/Java/servlet/src/main/resources/WEB-INF/postgresql/resin-web.xml @@ -2,8 +2,8 @@ - org.postgresql.Driver - jdbc:postgresql://TFB-database:5432/hello_world + org.postgresql.jdbc3.Jdbc3ConnectionPool + jdbc:postgresql://tfb-database:5432/hello_world benchmarkdbuser benchmarkdbpass diff --git a/frameworks/Java/servlet3/README.md b/frameworks/Java/servlet3/README.md new file mode 100644 index 00000000000..5d042ea4e46 --- /dev/null +++ b/frameworks/Java/servlet3/README.md @@ -0,0 +1,34 @@ +# Servlet 3.1 API benchmarking test + +This is Framework permutation based on the following technology stack + +* Java +* Tomcat 9 +* Servlet 3.1 with Async I/O +* Jackson 2 for JSON processing + +Currently implemented test types are Plaintext and JSON. Their implementation comes in two flavors: PO (plain old) Servlets and Servlets 3.1 with Async I/O. + +### Plaintext + +* [Async](src/main/java/com/gitlab/zloster/tfb/servlet3/async/Plaintext.java) +* [Sync](src/main/java/com/gitlab/zloster/tfb/servlet3/sync/Plaintext.java) + +### JSON + +* [Async](src/main/java/com/gitlab/zloster/tfb/servlet3/async/JSON.java) +* [Sync](src/main/java/com/gitlab/zloster/tfb/servlet3/sync/JSON.java) + +## Test URLs + +### Default Maven profile + +The `async` profile is activated by default. + +* Plaintext - `http://localhost:8080/plaintext` +* JSON - `http://localhost:8080/json` + +### `sync` Maven profile + +* Plaintext - `http://localhost:8080/plaintext` +* JSON - `http://localhost:8080/json` diff --git a/frameworks/Java/servlet3/benchmark_config.json b/frameworks/Java/servlet3/benchmark_config.json new file mode 100644 index 00000000000..b6e4d1b5400 --- /dev/null +++ b/frameworks/Java/servlet3/benchmark_config.json @@ -0,0 +1,41 @@ +{ + "framework": "servlet3", + "tests": [{ + "default": { + "json_url": "/json", + "plaintext_url": "/plaintext", + "port": 8080, + "approach": "Realistic", + "classification": "Platform", + "database": "None", + "framework": "None", + "language": "Java", + "orm": "Raw", + "platform": "Servlet", + "webserver": "Tomcat", + "os": "Linux", + "database_os": "Linux", + "display_name": "servlet3", + "notes": "Servlet 3.1 Async I/O", + "versus": "servlet" + }, + "sync": { + "json_url": "/json", + "plaintext_url": "/plaintext", + "port": 8080, + "approach": "Realistic", + "classification" : "Platform", + "database": "None", + "framework": "None", + "language": "Java", + "orm": "Raw", + "platform": "Servlet", + "webserver": "Tomcat", + "os": "Linux", + "database_os": "Linux", + "display_name": "servlet3", + "notes": "", + "versus": "servlet" + } + }] +} diff --git a/frameworks/Java/servlet/servlet3/pom.xml b/frameworks/Java/servlet3/pom.xml similarity index 100% rename from frameworks/Java/servlet/servlet3/pom.xml rename to frameworks/Java/servlet3/pom.xml diff --git a/frameworks/Java/servlet3/server.xml b/frameworks/Java/servlet3/server.xml new file mode 100644 index 00000000000..89e7ba78d0d --- /dev/null +++ b/frameworks/Java/servlet3/server.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frameworks/Java/servlet3/servlet3-sync.dockerfile b/frameworks/Java/servlet3/servlet3-sync.dockerfile new file mode 100644 index 00000000000..8fd62014658 --- /dev/null +++ b/frameworks/Java/servlet3/servlet3-sync.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/maven:0.1 as maven + +ADD ./ /servlet3 +WORKDIR /servlet3 +RUN mvn clean compile war:war -P sync + +FROM techempower/tomcat:0.1 + +COPY --from=maven /servlet3/target/servlet3.war ${CATALINA_HOME}/webapps/ROOT.war +COPY --from=maven /servlet3/server.xml ${CATALINA_HOME}/conf/server.xml +CMD bash ${CATALINA_HOME}/bin/catalina.sh run diff --git a/frameworks/Java/servlet3/servlet3.dockerfile b/frameworks/Java/servlet3/servlet3.dockerfile new file mode 100644 index 00000000000..dd582dbbee1 --- /dev/null +++ b/frameworks/Java/servlet3/servlet3.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/maven:0.1 as maven + +ADD ./ /servlet3 +WORKDIR /servlet3 +RUN mvn clean compile war:war + +FROM techempower/tomcat:0.1 + +COPY --from=maven /servlet3/target/servlet3.war ${CATALINA_HOME}/webapps/ROOT.war +COPY --from=maven /servlet3/server.xml ${CATALINA_HOME}/conf/server.xml +CMD bash ${CATALINA_HOME}/bin/catalina.sh run diff --git a/frameworks/Java/servlet/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/HelloMessage.java b/frameworks/Java/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/HelloMessage.java similarity index 100% rename from frameworks/Java/servlet/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/HelloMessage.java rename to frameworks/Java/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/HelloMessage.java diff --git a/frameworks/Java/servlet/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/Helper.java b/frameworks/Java/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/Helper.java similarity index 100% rename from frameworks/Java/servlet/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/Helper.java rename to frameworks/Java/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/Helper.java diff --git a/frameworks/Java/servlet/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/World.java b/frameworks/Java/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/World.java similarity index 100% rename from frameworks/Java/servlet/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/World.java rename to frameworks/Java/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/World.java diff --git a/frameworks/Java/servlet/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/async/JSON.java b/frameworks/Java/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/async/JSON.java similarity index 100% rename from frameworks/Java/servlet/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/async/JSON.java rename to frameworks/Java/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/async/JSON.java diff --git a/frameworks/Java/servlet/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/async/Plaintext.java b/frameworks/Java/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/async/Plaintext.java similarity index 100% rename from frameworks/Java/servlet/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/async/Plaintext.java rename to frameworks/Java/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/async/Plaintext.java diff --git a/frameworks/Java/servlet/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/sync/JSON.java b/frameworks/Java/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/sync/JSON.java similarity index 100% rename from frameworks/Java/servlet/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/sync/JSON.java rename to frameworks/Java/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/sync/JSON.java diff --git a/frameworks/Java/servlet/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/sync/Plaintext.java b/frameworks/Java/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/sync/Plaintext.java similarity index 100% rename from frameworks/Java/servlet/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/sync/Plaintext.java rename to frameworks/Java/servlet3/src/main/java/com/gitlab/zloster/tfb/servlet3/sync/Plaintext.java diff --git a/frameworks/Java/servlet/servlet3/src/main/resources/logback.xml b/frameworks/Java/servlet3/src/main/resources/logback.xml similarity index 100% rename from frameworks/Java/servlet/servlet3/src/main/resources/logback.xml rename to frameworks/Java/servlet3/src/main/resources/logback.xml diff --git a/frameworks/Java/servlet/servlet3/src/main/webapp/jsp/error.jsp b/frameworks/Java/servlet3/src/main/webapp/jsp/error.jsp similarity index 100% rename from frameworks/Java/servlet/servlet3/src/main/webapp/jsp/error.jsp rename to frameworks/Java/servlet3/src/main/webapp/jsp/error.jsp diff --git a/frameworks/Java/spark/benchmark_config.json b/frameworks/Java/spark/benchmark_config.json index 09abab63b01..a6cbb047f5b 100644 --- a/frameworks/Java/spark/benchmark_config.json +++ b/frameworks/Java/spark/benchmark_config.json @@ -2,13 +2,12 @@ "framework": "spark", "tests": [{ "default": { - "setup_file": "setup", - "json_url": "/spark/json", - "db_url": "/spark/db", - "query_url": "/spark/db?queries=", - "update_url": "/spark/updates?queries=", - "plaintext_url": "/spark/plaintext", - "fortune_url": "/spark/fortunes", + "json_url": "/json", + "db_url": "/db", + "query_url": "/db?queries=", + "update_url": "/updates?queries=", + "plaintext_url": "/plaintext", + "fortune_url": "/fortunes", "port": 8080, "approach": "Realistic", "classification": "Micro", diff --git a/frameworks/Java/spark/pom.xml b/frameworks/Java/spark/pom.xml index 9b036acb2d4..cc5ff6a0632 100644 --- a/frameworks/Java/spark/pom.xml +++ b/frameworks/Java/spark/pom.xml @@ -15,7 +15,6 @@ 2.2.4 5.1.38 1.7.5 - localhost diff --git a/frameworks/Java/spark/setup.sh b/frameworks/Java/spark/setup.sh deleted file mode 100755 index 9f97ae4e2aa..00000000000 --- a/frameworks/Java/spark/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -sed -i 's|mysql://.*:3306|mysql://'"${DBHOST}"':3306|g' src/main/webapp/WEB-INF/resin-web.xml - -fw_depends mysql java8 resin-java8 maven - -mvn clean package -Ddb-host=${DBHOST} -rm -rf $RESIN_HOME/webapps/* -cp target/spark.war $RESIN_HOME/webapps/spark.war -resinctl console diff --git a/frameworks/Java/spark/spark.dockerfile b/frameworks/Java/spark/spark.dockerfile new file mode 100644 index 00000000000..50c6192b8fc --- /dev/null +++ b/frameworks/Java/spark/spark.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/maven-java8:0.1 as maven + +ADD ./ /spark +WORKDIR /spark +RUN mvn clean package + +FROM techempower/resin-java8:0.1 + +COPY --from=maven /spark/target/spark.war ${RESIN_HOME}/webapps/ROOT.war +CMD java -jar ${RESIN_HOME}/lib/resin.jar console diff --git a/frameworks/Java/spark/src/main/java/hello/web/HibernateUtil.java b/frameworks/Java/spark/src/main/java/hello/web/HibernateUtil.java index feeee901229..7b6d36898e2 100644 --- a/frameworks/Java/spark/src/main/java/hello/web/HibernateUtil.java +++ b/frameworks/Java/spark/src/main/java/hello/web/HibernateUtil.java @@ -39,8 +39,6 @@ public static void closeSession() { private static SessionFactory createSessionFactory() { try { Configuration configuration = configuration(); - String url = configuration.getProperty(AvailableSettings.URL); - configuration.setProperty(AvailableSettings.URL, url.replace("{db-host}", "localhost")); configuration.setProperty(AvailableSettings.DIALECT, MySQLDialect.class.getName()); configuration.setProperty(AvailableSettings.USE_QUERY_CACHE, "false"); configuration.setProperty(AvailableSettings.SHOW_SQL, "false"); diff --git a/frameworks/Java/spark/src/main/resources/hibernate-local.cfg.xml b/frameworks/Java/spark/src/main/resources/hibernate-local.cfg.xml index 2ed0a5d1129..ead8ba9261b 100644 --- a/frameworks/Java/spark/src/main/resources/hibernate-local.cfg.xml +++ b/frameworks/Java/spark/src/main/resources/hibernate-local.cfg.xml @@ -4,7 +4,7 @@ com.mysql.jdbc.Driver - jdbc:mysql://${db-host}:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false + jdbc:mysql://tfb-database:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false benchmarkdbuser benchmarkdbpass 32 diff --git a/frameworks/Java/spark/src/main/webapp/WEB-INF/resin-web.xml b/frameworks/Java/spark/src/main/webapp/WEB-INF/resin-web.xml index 4f6dcd3d53c..e55d85df4b7 100644 --- a/frameworks/Java/spark/src/main/webapp/WEB-INF/resin-web.xml +++ b/frameworks/Java/spark/src/main/webapp/WEB-INF/resin-web.xml @@ -3,7 +3,7 @@ com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource - jdbc:mysql://127.0.0.1:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false + jdbc:mysql://tfb-database:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false benchmarkdbuser benchmarkdbpass diff --git a/frameworks/Java/spring/benchmark_config.json b/frameworks/Java/spring/benchmark_config.json index 1aefa11225a..3a1023e7e5e 100644 --- a/frameworks/Java/spring/benchmark_config.json +++ b/frameworks/Java/spring/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "spring", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Java/spring/setup.sh b/frameworks/Java/spring/setup.sh deleted file mode 100755 index 2800cef126b..00000000000 --- a/frameworks/Java/spring/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql java maven - -mvn clean package -cd target -java -Ddatabase.host=${DBHOST} -jar spring.war & diff --git a/frameworks/Java/spring/spring.dockerfile b/frameworks/Java/spring/spring.dockerfile new file mode 100644 index 00000000000..fe3b5b9dcb5 --- /dev/null +++ b/frameworks/Java/spring/spring.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/maven:0.1 + +ADD ./ /spring +WORKDIR /spring +RUN mvn clean package +CMD java -jar target/spring.war diff --git a/frameworks/Java/spring/src/main/resources/application.yml b/frameworks/Java/spring/src/main/resources/application.yml index a3fe8f33d88..170ca805806 100644 --- a/frameworks/Java/spring/src/main/resources/application.yml +++ b/frameworks/Java/spring/src/main/resources/application.yml @@ -3,7 +3,7 @@ spring: datasource: initialize: false driverClassName: com.mysql.jdbc.Driver - url: jdbc:mysql://${database.host:localhost}:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false + url: jdbc:mysql://tfb-database:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false username: benchmarkdbuser password: benchmarkdbpass jpa: diff --git a/frameworks/Java/tapestry/benchmark_config.json b/frameworks/Java/tapestry/benchmark_config.json index 66a77fc9678..00709f573d6 100644 --- a/frameworks/Java/tapestry/benchmark_config.json +++ b/frameworks/Java/tapestry/benchmark_config.json @@ -2,12 +2,11 @@ "framework": "tapestry", "tests": [{ "default": { - "setup_file": "setup", - "json_url": "/tapestry/hellojson", - "db_url": "/tapestry/hellodb", - "query_url": "/tapestry/hellodbs?queries=", - "fortune_url": "/tapestry/hellofortune", - "plaintext_url": "/tapestry/helloplain", + "json_url": "/json", + "db_url": "/db", + "query_url": "/query?queries=", + "fortune_url": "/fortunes", + "plaintext_url": "/plaintext", "port": 8080, "approach": "Realistic", "classification": "Fullstack", diff --git a/frameworks/Java/tapestry/hello/.classpath b/frameworks/Java/tapestry/hello/.classpath deleted file mode 100644 index b17ed4f8352..00000000000 --- a/frameworks/Java/tapestry/hello/.classpath +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/frameworks/Java/tapestry/hello/.gitignore b/frameworks/Java/tapestry/hello/.gitignore deleted file mode 100644 index 49958b906e6..00000000000 --- a/frameworks/Java/tapestry/hello/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -target -build -.gradle -*.iml -*.ipr -*.iws - diff --git a/frameworks/Java/tapestry/hello/.project b/frameworks/Java/tapestry/hello/.project deleted file mode 100644 index a8313664bec..00000000000 --- a/frameworks/Java/tapestry/hello/.project +++ /dev/null @@ -1,14 +0,0 @@ - - - hello - NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. - - - - org.eclipse.jdt.core.javabuilder - - - - org.eclipse.jdt.core.javanature - - \ No newline at end of file diff --git a/frameworks/Java/tapestry/hello/.settings/org.eclipse.jdt.core.prefs b/frameworks/Java/tapestry/hello/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 82af81ad23d..00000000000 --- a/frameworks/Java/tapestry/hello/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Thu Apr 19 17:42:38 PDT 2012 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.source=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 diff --git a/frameworks/Java/tapestry/hello/src/main/java/hello/pages/HelloDB.java b/frameworks/Java/tapestry/hello/src/main/java/hello/pages/HelloDB.java deleted file mode 100644 index bcfd9bde622..00000000000 --- a/frameworks/Java/tapestry/hello/src/main/java/hello/pages/HelloDB.java +++ /dev/null @@ -1,52 +0,0 @@ -package hello.pages; - -import hello.entities.*; - -import java.util.*; -import java.util.concurrent.*; -import java.io.IOException; - -import org.apache.tapestry5.*; -import org.apache.tapestry5.annotations.*; -import org.apache.tapestry5.ioc.annotations.*; -import org.apache.tapestry5.json.*; -import org.apache.tapestry5.util.*; -import org.apache.tapestry5.services.*; -import org.hibernate.*; -import com.fasterxml.jackson.databind.*; - -/** - * Database Mapping Test - */ -public class HelloDB -{ - @Inject - private org.hibernate.Session session; - - @Inject - private Request request; - - private static final int DB_ROWS = 10000; - - private static final ObjectMapper mapper = new ObjectMapper(); - - StreamResponse onActivate() { - - // For generating a random row ID - final Random rand = ThreadLocalRandom.current(); - - final World world = (World)session.get(World.class, new Integer(rand.nextInt(DB_ROWS) + 1)); - - // Send reponse - String response = ""; - try - { - response = HelloDB.mapper.writeValueAsString(world); - } - catch (IOException ex) - { - // do nothing - } - return new TextStreamResponse("application/json", response); - } -} diff --git a/frameworks/Java/tapestry/hello/src/main/java/hello/pages/HelloDBs.java b/frameworks/Java/tapestry/hello/src/main/java/hello/pages/HelloDBs.java deleted file mode 100644 index 14adf598050..00000000000 --- a/frameworks/Java/tapestry/hello/src/main/java/hello/pages/HelloDBs.java +++ /dev/null @@ -1,74 +0,0 @@ -package hello.pages; - -import hello.entities.*; - -import java.util.*; -import java.util.concurrent.*; -import java.io.IOException; - -import org.apache.tapestry5.*; -import org.apache.tapestry5.annotations.*; -import org.apache.tapestry5.ioc.annotations.*; -import org.apache.tapestry5.json.*; -import org.apache.tapestry5.util.*; -import org.apache.tapestry5.services.*; -import org.hibernate.*; -import com.fasterxml.jackson.databind.*; - -/** - * Database Mapping Test - */ -public class HelloDBs -{ - @Inject - private org.hibernate.Session session; - - @Inject - private Request request; - - private static final int DB_ROWS = 10000; - - private static final ObjectMapper mapper = new ObjectMapper(); - - StreamResponse onActivate() { - - // Read queries from URL, but don't bother validating - int queries = 1; - String qString = this.request.getParameter("queries"); - if (qString != null) { - try { - queries = Integer.parseInt(qString); - } - catch (Exception e) { - queries = 1; - } - } - if (queries <= 0) { - queries = 1; - } - else if (queries > 500) { - queries = 500; - } - final World[] worlds = new World[queries]; - - // For generating a random row ID - final Random rand = ThreadLocalRandom.current(); - - for (int i = 0; i < queries; i++) { - // Read object from database - worlds[i] = (World)session.get(World.class, new Integer(rand.nextInt(DB_ROWS) + 1)); - } - - // Send reponse - String response = ""; - try - { - response = HelloDBs.mapper.writeValueAsString(worlds); - } - catch (IOException ex) - { - // do nothing - } - return new TextStreamResponse("application/json", response); - } -} diff --git a/frameworks/Java/tapestry/hello/src/main/java/hello/pages/HelloFortune.java b/frameworks/Java/tapestry/hello/src/main/java/hello/pages/HelloFortune.java deleted file mode 100644 index 61b5c8a700e..00000000000 --- a/frameworks/Java/tapestry/hello/src/main/java/hello/pages/HelloFortune.java +++ /dev/null @@ -1,37 +0,0 @@ -package hello.pages; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.apache.tapestry5.annotations.Property; -import org.apache.tapestry5.ioc.annotations.Inject; -import org.apache.tapestry5.services.Request; - -import hello.entities.Fortune; - -/** - * Test type 4: Fortunes - */ -public class HelloFortune { - @Inject - private org.hibernate.Session session; - - @Inject - private Request request; - - @Property - private Fortune currentFortune; - - public List getFortunes() { - final List fortunesFromDB = session.createCriteria(Fortune.class).list(); - final List fortunes = new ArrayList<>(fortunesFromDB.size() + 1); - fortunes.addAll(fortunesFromDB); - Fortune additionalFortune = new Fortune(); - additionalFortune.message = "Additional fortune added at request time."; - fortunes.add(additionalFortune); - Collections.sort(fortunes); - return fortunes; - } - -} diff --git a/frameworks/Java/tapestry/hello/src/main/java/hello/pages/HelloJSON.java b/frameworks/Java/tapestry/hello/src/main/java/hello/pages/HelloJSON.java deleted file mode 100644 index 5ecff034537..00000000000 --- a/frameworks/Java/tapestry/hello/src/main/java/hello/pages/HelloJSON.java +++ /dev/null @@ -1,38 +0,0 @@ -package hello.pages; - -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -import org.apache.tapestry5.*; -import org.apache.tapestry5.json.*; -import org.apache.tapestry5.util.*; - -import com.fasterxml.jackson.databind.*; - -/** - * JSON Encoding Test - */ -public class HelloJSON -{ - // Constant for setting the content type. - private static final String CONTENT_TYPE_JSON = "application/json"; - private static final ObjectMapper mapper = new ObjectMapper(); - - StreamResponse onActivate() { - Map data = new HashMap(); - data.put("message", "Hello, World!"); - - String response = ""; - try - { - response = HelloJSON.mapper.writeValueAsString(data); - } - catch (IOException ex) - { - // do nothing - } - - return new TextStreamResponse(CONTENT_TYPE_JSON, response); - } -} diff --git a/frameworks/Java/tapestry/hello/src/main/java/hello/pages/HelloPlain.java b/frameworks/Java/tapestry/hello/src/main/java/hello/pages/HelloPlain.java deleted file mode 100644 index 7f40b0bce91..00000000000 --- a/frameworks/Java/tapestry/hello/src/main/java/hello/pages/HelloPlain.java +++ /dev/null @@ -1,22 +0,0 @@ -package hello.pages; - -import org.apache.tapestry5.StreamResponse; -import org.apache.tapestry5.annotations.PageLoaded; -import org.apache.tapestry5.util.TextStreamResponse; - -/** - * Plain-text response test - */ -public class HelloPlain -{ - private TextStreamResponse response; - - @PageLoaded - void initializeResponse(){ - response = new TextStreamResponse("text/plain", "Hello, World!"); - } - - StreamResponse onActivate() { - return response; - } -} diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/favicon.ico b/frameworks/Java/tapestry/hello/src/main/webapp/favicon.ico deleted file mode 100644 index ffd53d63461..00000000000 Binary files a/frameworks/Java/tapestry/hello/src/main/webapp/favicon.ico and /dev/null differ diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img01.jpg b/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img01.jpg deleted file mode 100644 index b17fcc1ba58..00000000000 Binary files a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img01.jpg and /dev/null differ diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img03.jpg b/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img03.jpg deleted file mode 100644 index e5ab627a99e..00000000000 Binary files a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img03.jpg and /dev/null differ diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img04.jpg b/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img04.jpg deleted file mode 100644 index 869a3e31da6..00000000000 Binary files a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img04.jpg and /dev/null differ diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img08.gif b/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img08.gif deleted file mode 100644 index 95e6227d70c..00000000000 Binary files a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img08.gif and /dev/null differ diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img09.gif b/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img09.gif deleted file mode 100644 index d4fe2f153ec..00000000000 Binary files a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img09.gif and /dev/null differ diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img10.gif b/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img10.gif deleted file mode 100644 index d7f8530947e..00000000000 Binary files a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img10.gif and /dev/null differ diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img11.gif b/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img11.gif deleted file mode 100644 index f4aa4eae17a..00000000000 Binary files a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img11.gif and /dev/null differ diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img12.gif b/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img12.gif deleted file mode 100644 index 6fea9b159e2..00000000000 Binary files a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img12.gif and /dev/null differ diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img13.gif b/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img13.gif deleted file mode 100644 index a31e0494ebd..00000000000 Binary files a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img13.gif and /dev/null differ diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img14.gif b/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img14.gif deleted file mode 100644 index 8363ce6d766..00000000000 Binary files a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img14.gif and /dev/null differ diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img18.gif b/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img18.gif deleted file mode 100644 index 752a683ce21..00000000000 Binary files a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img18.gif and /dev/null differ diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img19.gif b/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img19.gif deleted file mode 100644 index da86ca8fd5c..00000000000 Binary files a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img19.gif and /dev/null differ diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img20.gif b/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img20.gif deleted file mode 100644 index 4cf147cccbb..00000000000 Binary files a/frameworks/Java/tapestry/hello/src/main/webapp/layout/images/img20.gif and /dev/null differ diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/layout/layout.css b/frameworks/Java/tapestry/hello/src/main/webapp/layout/layout.css deleted file mode 100644 index 5a7c786d78e..00000000000 --- a/frameworks/Java/tapestry/hello/src/main/webapp/layout/layout.css +++ /dev/null @@ -1,369 +0,0 @@ -/* -Design by Free CSS Templates -http://www.freecsstemplates.org -Released for free under a Creative Commons Attribution 2.5 License -*/ - -body { - margin: 0; - padding: 0; - background: #FFFFFF url(images/img01.jpg) repeat-x; - text-align: justify; - font: 15px Arial, Helvetica, sans-serif; - color: #626262; -} - -form { - margin: 0; - padding: 0; -} - -input { - padding: 5px; - background: #FEFEFE url(images/img13.gif) repeat-x; - border: 1px solid #626262; - font: normal 1em Arial, Helvetica, sans-serif; -} - -h1, h1 a, h2, h2 a, h3, h3 a { - margin: 0; - text-decoration: none; - font-family: Tahoma, Georgia, "Times New Roman", Times, serif; - font-weight: normal; - color: #444444; -} - -h1 { - letter-spacing: -1px; - font-size: 2.2em; - font-family: Verdana, Arial, Helvetica, sans-serif; -} - -h2 { - letter-spacing: -1px; - font-size: 2em; -} - -h3 { - font-size: 1em; -} - -p, ol, ul { - margin-bottom: 2em; - line-height: 200%; -} - -blockquote { - margin: 0 0 0 1.5em; - padding-left: 1em; - border-left: 5px solid #DDDDDD; -} - -a { - color: #1692B8; -} - -a:hover { - text-decoration: none; -} - -/* Header */ - -div.header { - height: 42px; -} - -div.logo h1, div.logo p { - float: left; - text-transform: lowercase; -} - -div.logo h1 { - padding: 0px 0 0 40px; -} - -div.logo p { - margin: 0; - padding: 14px 0 0 4px; - line-height: normal; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 14px; -} - -div.logo a { - text-decoration: none; - color: #D0C7A6; -} - -div.menu { - float: right; -} - -div.menu ul { - margin: 0; - padding: 0; - list-style: none; -} - -div.menu li { - display: block; - float: left; - height: 42px; -} - -div.menu a { - display: block; - padding: 8px 20px 0px 20px; - text-decoration: none; - text-align: center; - text-transform: lowercase; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-weight: normal; - font-size: 14px; - color: #CEC5A4; -} - -div.menu .last { - margin-right: 20px; -} - -div.menu a:hover { - color: #FFFFFF; -} - -div.menu .current_page_item A { - text-decoration: underline; -} - -div.menu .current_page_item a { -} - -/* Page */ - -div.page { - padding: 40px 40px 0 40px; -} - -/* Content */ - -div.content { - margin-right: 340px; -} - -.post { - margin-bottom: 10px; -} - -.post .title { - border-bottom: 1px #999999 dashed; - font-family: Tahoma, Georgia, "Times New Roman", Times, serif; -} - -.post .title h2 { - padding: 30px 30px 0 0px; - text-transform: lowercase; - font-weight: normal; - font-size: 2.2em; -} - -.post .title p { - margin: 0; - padding: 0 0 10px 0px; - line-height: normal; - color: #BABABA; -} - -.post .title p a { - color: #BABABA; -} - -.post .entry { - padding: 20px 0px 20px 0px; -} - -.post .links { - margin: 0; - padding: 0 30px 30px 0px; -} - -.post .links a { - display: block; - float: left; - margin-right: 10px; - margin-bottom: 5px; - text-align: center; - text-decoration: none; - font-weight: bold; - color: #FFFFFF; -} - -.post .links a:hover { -} - -.post .links .more { - width: 128px; - height: 30px; - background: url(images/img03.jpg) no-repeat left center; -} - -.post .links .comments { - width: 152px; - height: 30px; - background: url(images/img04.jpg) no-repeat left center; -} - -/* Sidebar */ - -div.sidebar { - float: right; - width: 300px; - margin-top: 30px; -} - -div.sidebar ul { - margin: 0; - padding: 0; - list-style: none; -} - -div.sidebar li { - margin-bottom: 10px; - background: url(images/img10.gif) no-repeat left bottom; -} - -div.sidebar li ul { - padding: 0 30px 40px 30px; -} - -div.sidebar li li { - margin: 0; - padding-left: 20px; -} - -div.sidebar h2 { - padding: 30px 30px 5px 10px; - background: url(images/img09.gif) no-repeat; - text-transform: lowercase; - font-weight: normal; - font-size: 1.6em; - color: #302D26; -} - -div.sidebar DIV.sidebar-content { - width: 265px; - margin-left: 10px; - padding-bottom: 1px; -} - -/* Search */ - -li.search { - padding: 20px 30px 40px 30px; -} - -li.search input { - padding: 0; - width: 70px; - height: 29px; - background: #DFDFDF url(images/img14.gif) repeat-x; - font-weight: bold; -} - -li.search #s { - padding: 5px; - width: 150px; - height: auto; - background: #FEFEFE url(images/img13.gif) repeat-x; - border: 1px solid #626262; - font: normal 1em Arial, Helvetica, sans-serif; -} - -li.search br { - display: none; -} - -/* Categories */ - -div.sidebar div.categories li { - background: url(images/img12.gif) no-repeat left center; -} - -/* Calendar */ - -div.calendar_wrap { - padding: 0 30px 40px 30px; -} - -div.calendar table { - width: 100%; - text-align: center; -} - -div.calendar thead { - background: #F1F1F1; -} - -div.calendar tbody td { - border: 1px solid #F1F1F1; -} - -div.calendar #prev { - text-align: left; -} - -div.calendar #next { - text-align: right; -} - -div.calendar tfoot a { - text-decoration: none; - font-weight: bold; -} - -div.calendar #today { - background: #FFF3A7; - border: 1px solid #EB1400; - font-weight: bold; - color: #EB1400 -} - -/* Footer */ - -div.footer { - padding: 70px 0 50px 0; - background: #757575 url(images/img08.gif) repeat-x; -} - -div.footer p { - margin-bottom: 1em; - text-align: center; - line-height: normal; - font-size: .9em; - color: #BABABA; -} - -div.footer a { - padding: 0 20px; - text-decoration: none; - color: #DDDDDD; -} - -div.footer a:hover { - color: #FFFFFF; -} - -div.footer .rss { - background: url(images/img18.gif) no-repeat left center; -} - -div.footer .xhtml { - background: url(images/img19.gif) no-repeat left center; -} - -div.footer .css { - background: url(images/img20.gif) no-repeat left center; -} - -div.footer .legal a { - padding: 0; -} diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/layout/license.txt b/frameworks/Java/tapestry/hello/src/main/webapp/layout/license.txt deleted file mode 100644 index 4a3e47b6bfb..00000000000 --- a/frameworks/Java/tapestry/hello/src/main/webapp/layout/license.txt +++ /dev/null @@ -1,243 +0,0 @@ -Creative Commons - -Creative Commons Legal Code - -*Attribution 2.5* - -CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE -LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN -ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION -ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE -INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM -ITS USE. - -/License/ - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE -COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY -COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS -AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE -TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE -RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS -AND CONDITIONS. - -*1. Definitions* - - 1. *"Collective Work"* means a work, such as a periodical issue, - anthology or encyclopedia, in which the Work in its entirety in - unmodified form, along with a number of other contributions, - constituting separate and independent works in themselves, are - assembled into a collective whole. A work that constitutes a - Collective Work will not be considered a Derivative Work (as - defined below) for the purposes of this License. - 2. *"Derivative Work"* means a work based upon the Work or upon the - Work and other pre-existing works, such as a translation, musical - arrangement, dramatization, fictionalization, motion picture - version, sound recording, art reproduction, abridgment, - condensation, or any other form in which the Work may be recast, - transformed, or adapted, except that a work that constitutes a - Collective Work will not be considered a Derivative Work for the - purpose of this License. For the avoidance of doubt, where the - Work is a musical composition or sound recording, the - synchronization of the Work in timed-relation with a moving image - ("synching") will be considered a Derivative Work for the purpose - of this License. - 3. *"Licensor"* means the individual or entity that offers the Work - under the terms of this License. - 4. *"Original Author"* means the individual or entity who created the - Work. - 5. *"Work"* means the copyrightable work of authorship offered under - the terms of this License. - 6. *"You"* means an individual or entity exercising rights under this - License who has not previously violated the terms of this License - with respect to the Work, or who has received express permission - from the Licensor to exercise rights under this License despite a - previous violation. - -*2. Fair Use Rights.* Nothing in this license is intended to reduce, -limit, or restrict any rights arising from fair use, first sale or other -limitations on the exclusive rights of the copyright owner under -copyright law or other applicable laws. - -*3. License Grant.* Subject to the terms and conditions of this License, -Licensor hereby grants You a worldwide, royalty-free, non-exclusive, -perpetual (for the duration of the applicable copyright) license to -exercise the rights in the Work as stated below: - - 1. to reproduce the Work, to incorporate the Work into one or more - Collective Works, and to reproduce the Work as incorporated in the - Collective Works; - 2. to create and reproduce Derivative Works; - 3. to distribute copies or phonorecords of, display publicly, perform - publicly, and perform publicly by means of a digital audio - transmission the Work including as incorporated in Collective Works; - 4. to distribute copies or phonorecords of, display publicly, perform - publicly, and perform publicly by means of a digital audio - transmission Derivative Works. - 5. - - For the avoidance of doubt, where the work is a musical composition: - - 1. *Performance Royalties Under Blanket Licenses*. Licensor - waives the exclusive right to collect, whether individually - or via a performance rights society (e.g. ASCAP, BMI, - SESAC), royalties for the public performance or public - digital performance (e.g. webcast) of the Work. - 2. *Mechanical Rights and Statutory Royalties*. Licensor waives - the exclusive right to collect, whether individually or via - a music rights agency or designated agent (e.g. Harry Fox - Agency), royalties for any phonorecord You create from the - Work ("cover version") and distribute, subject to the - compulsory license created by 17 USC Section 115 of the US - Copyright Act (or the equivalent in other jurisdictions). - 6. *Webcasting Rights and Statutory Royalties*. For the avoidance of - doubt, where the Work is a sound recording, Licensor waives the - exclusive right to collect, whether individually or via a - performance-rights society (e.g. SoundExchange), royalties for the - public digital performance (e.g. webcast) of the Work, subject to - the compulsory license created by 17 USC Section 114 of the US - Copyright Act (or the equivalent in other jurisdictions). - -The above rights may be exercised in all media and formats whether now -known or hereafter devised. The above rights include the right to make -such modifications as are technically necessary to exercise the rights -in other media and formats. All rights not expressly granted by Licensor -are hereby reserved. - -*4. Restrictions.*The license granted in Section 3 above is expressly -made subject to and limited by the following restrictions: - - 1. You may distribute, publicly display, publicly perform, or - publicly digitally perform the Work only under the terms of this - License, and You must include a copy of, or the Uniform Resource - Identifier for, this License with every copy or phonorecord of the - Work You distribute, publicly display, publicly perform, or - publicly digitally perform. You may not offer or impose any terms - on the Work that alter or restrict the terms of this License or - the recipients' exercise of the rights granted hereunder. You may - not sublicense the Work. You must keep intact all notices that - refer to this License and to the disclaimer of warranties. You may - not distribute, publicly display, publicly perform, or publicly - digitally perform the Work with any technological measures that - control access or use of the Work in a manner inconsistent with - the terms of this License Agreement. The above applies to the Work - as incorporated in a Collective Work, but this does not require - the Collective Work apart from the Work itself to be made subject - to the terms of this License. If You create a Collective Work, - upon notice from any Licensor You must, to the extent practicable, - remove from the Collective Work any credit as required by clause - 4(b), as requested. If You create a Derivative Work, upon notice - from any Licensor You must, to the extent practicable, remove from - the Derivative Work any credit as required by clause 4(b), as - requested. - 2. If you distribute, publicly display, publicly perform, or publicly - digitally perform the Work or any Derivative Works or Collective - Works, You must keep intact all copyright notices for the Work and - provide, reasonable to the medium or means You are utilizing: (i) - the name of the Original Author (or pseudonym, if applicable) if - supplied, and/or (ii) if the Original Author and/or Licensor - designate another party or parties (e.g. a sponsor institute, - publishing entity, journal) for attribution in Licensor's - copyright notice, terms of service or by other reasonable means, - the name of such party or parties; the title of the Work if - supplied; to the extent reasonably practicable, the Uniform - Resource Identifier, if any, that Licensor specifies to be - associated with the Work, unless such URI does not refer to the - copyright notice or licensing information for the Work; and in the - case of a Derivative Work, a credit identifying the use of the - Work in the Derivative Work (e.g., "French translation of the Work - by Original Author," or "Screenplay based on original Work by - Original Author"). Such credit may be implemented in any - reasonable manner; provided, however, that in the case of a - Derivative Work or Collective Work, at a minimum such credit will - appear where any other comparable authorship credit appears and in - a manner at least as prominent as such other comparable authorship - credit. - -*5. Representations, Warranties and Disclaimer* - -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR -OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY -KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, -INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, -FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF -LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, -WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -*6. Limitation on Liability.* EXCEPT TO THE EXTENT REQUIRED BY -APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL -THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY -DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF -LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -*7. Termination* - - 1. This License and the rights granted hereunder will terminate - automatically upon any breach by You of the terms of this License. - Individuals or entities who have received Derivative Works or - Collective Works from You under this License, however, will not - have their licenses terminated provided such individuals or - entities remain in full compliance with those licenses. Sections - 1, 2, 5, 6, 7, and 8 will survive any termination of this License. - 2. Subject to the above terms and conditions, the license granted - here is perpetual (for the duration of the applicable copyright in - the Work). Notwithstanding the above, Licensor reserves the right - to release the Work under different license terms or to stop - distributing the Work at any time; provided, however that any such - election will not serve to withdraw this License (or any other - license that has been, or is required to be, granted under the - terms of this License), and this License will continue in full - force and effect unless terminated as stated above. - -*8. Miscellaneous* - - 1. Each time You distribute or publicly digitally perform the Work or - a Collective Work, the Licensor offers to the recipient a license - to the Work on the same terms and conditions as the license - granted to You under this License. - 2. Each time You distribute or publicly digitally perform a - Derivative Work, Licensor offers to the recipient a license to the - original Work on the same terms and conditions as the license - granted to You under this License. - 3. If any provision of this License is invalid or unenforceable under - applicable law, it shall not affect the validity or enforceability - of the remainder of the terms of this License, and without further - action by the parties to this agreement, such provision shall be - reformed to the minimum extent necessary to make such provision - valid and enforceable. - 4. No term or provision of this License shall be deemed waived and no - breach consented to unless such waiver or consent shall be in - writing and signed by the party to be charged with such waiver or - consent. - 5. This License constitutes the entire agreement between the parties - with respect to the Work licensed here. There are no - understandings, agreements or representations with respect to the - Work not specified here. Licensor shall not be bound by any - additional provisions that may appear in any communication from - You. This License may not be modified without the mutual written - agreement of the Licensor and You. - -Creative Commons is not a party to this License, and makes no warranty -whatsoever in connection with the Work. Creative Commons will not be -liable to You or any party on any legal theory for any damages -whatsoever, including without limitation any general, special, -incidental or consequential damages arising in connection to this -license. Notwithstanding the foregoing two (2) sentences, if Creative -Commons has expressly identified itself as the Licensor hereunder, it -shall have all rights and obligations of Licensor. - -Except for the limited purpose of indicating to the public that the Work -is licensed under the CCPL, neither party will use the trademark -"Creative Commons" or any related trademark or logo of Creative Commons -without the prior written consent of Creative Commons. Any permitted use -will be in compliance with Creative Commons' then-current trademark -usage guidelines, as may be published on its website or otherwise made -available upon request from time to time. - -Creative Commons may be contacted at http://creativecommons.org/ -. - -� Back to Commons Deed <./> diff --git a/frameworks/Java/tapestry/hello/pom.xml b/frameworks/Java/tapestry/pom.xml similarity index 100% rename from frameworks/Java/tapestry/hello/pom.xml rename to frameworks/Java/tapestry/pom.xml diff --git a/frameworks/Java/tapestry/setup.sh b/frameworks/Java/tapestry/setup.sh deleted file mode 100755 index 4263545e068..00000000000 --- a/frameworks/Java/tapestry/setup.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends mysql java8 resin-java8 maven - -cd hello -mvn clean compile war:war -rm -rf $RESIN_HOME/webapps/* -cp target/tapestry.war $RESIN_HOME/webapps/tapestry.war -resinctl console diff --git a/frameworks/Java/tapestry/source_code b/frameworks/Java/tapestry/source_code deleted file mode 100644 index 00dbacaa2b7..00000000000 --- a/frameworks/Java/tapestry/source_code +++ /dev/null @@ -1,43 +0,0 @@ -./tapestry/hello/src/main/ -./tapestry/hello/src/main/webapp -./tapestry/hello/src/main/webapp/WEB-INF -./tapestry/hello/src/main/webapp/WEB-INF/app.properties -./tapestry/hello/src/main/webapp/WEB-INF/resin-web.xml -./tapestry/hello/src/main/webapp/WEB-INF/web.xml -./tapestry/hello/src/main/webapp/layout -./tapestry/hello/src/main/webapp/layout/license.txt -./tapestry/hello/src/main/webapp/layout/images -./tapestry/hello/src/main/webapp/layout/images/img08.gif -./tapestry/hello/src/main/webapp/layout/images/img20.gif -./tapestry/hello/src/main/webapp/layout/images/img11.gif -./tapestry/hello/src/main/webapp/layout/images/img10.gif -./tapestry/hello/src/main/webapp/layout/images/img12.gif -./tapestry/hello/src/main/webapp/layout/images/img04.jpg -./tapestry/hello/src/main/webapp/layout/images/img18.gif -./tapestry/hello/src/main/webapp/layout/images/img09.gif -./tapestry/hello/src/main/webapp/layout/images/img13.gif -./tapestry/hello/src/main/webapp/layout/images/img03.jpg -./tapestry/hello/src/main/webapp/layout/images/img19.gif -./tapestry/hello/src/main/webapp/layout/images/img14.gif -./tapestry/hello/src/main/webapp/layout/images/img01.jpg -./tapestry/hello/src/main/webapp/layout/layout.css -./tapestry/hello/src/main/webapp/favicon.ico -./tapestry/hello/src/main/java -./tapestry/hello/src/main/java/hello -./tapestry/hello/src/main/java/hello/services -./tapestry/hello/src/main/java/hello/services/AppModule.java -./tapestry/hello/src/main/java/hello/services/DevelopmentModule.java -./tapestry/hello/src/main/java/hello/services/QaModule.java -./tapestry/hello/src/main/java/hello/entities -./tapestry/hello/src/main/java/hello/entities/World.java -./tapestry/hello/src/main/java/hello/pages -./tapestry/hello/src/main/java/hello/pages/HelloDB.java -./tapestry/hello/src/main/java/hello/pages/HelloJSON.java -./tapestry/hello/src/main/java/hello/components -./tapestry/hello/src/main/java/hello/components/Layout.java -./tapestry/hello/src/main/resources -./tapestry/hello/src/main/resources/hibernate.cfg.xml -./tapestry/hello/src/main/resources/log4j.properties -./tapestry/hello/src/main/resources/hello -./tapestry/hello/src/main/resources/hello/components -./tapestry/hello/src/main/resources/hello/components/Layout.tml diff --git a/frameworks/Java/tapestry/hello/src/main/java/hello/components/Layout.java b/frameworks/Java/tapestry/src/main/java/hello/components/Layout.java similarity index 100% rename from frameworks/Java/tapestry/hello/src/main/java/hello/components/Layout.java rename to frameworks/Java/tapestry/src/main/java/hello/components/Layout.java diff --git a/frameworks/Java/tapestry/hello/src/main/java/hello/entities/Fortune.java b/frameworks/Java/tapestry/src/main/java/hello/entities/Fortune.java similarity index 100% rename from frameworks/Java/tapestry/hello/src/main/java/hello/entities/Fortune.java rename to frameworks/Java/tapestry/src/main/java/hello/entities/Fortune.java diff --git a/frameworks/Java/tapestry/hello/src/main/java/hello/entities/World.java b/frameworks/Java/tapestry/src/main/java/hello/entities/World.java similarity index 100% rename from frameworks/Java/tapestry/hello/src/main/java/hello/entities/World.java rename to frameworks/Java/tapestry/src/main/java/hello/entities/World.java diff --git a/frameworks/Java/tapestry/src/main/java/hello/pages/Db.java b/frameworks/Java/tapestry/src/main/java/hello/pages/Db.java new file mode 100644 index 00000000000..c4f55735ec0 --- /dev/null +++ b/frameworks/Java/tapestry/src/main/java/hello/pages/Db.java @@ -0,0 +1,52 @@ +package hello.pages; + +import hello.entities.*; + +import java.util.*; +import java.util.concurrent.*; +import java.io.IOException; + +import org.apache.tapestry5.*; +import org.apache.tapestry5.annotations.*; +import org.apache.tapestry5.ioc.annotations.*; +import org.apache.tapestry5.json.*; +import org.apache.tapestry5.util.*; +import org.apache.tapestry5.services.*; +import org.hibernate.*; +import com.fasterxml.jackson.databind.*; + +/** + * Database Mapping Test + */ +public class Db +{ + @Inject + private org.hibernate.Session session; + + @Inject + private Request request; + + private static final int DB_ROWS = 10000; + + private static final ObjectMapper mapper = new ObjectMapper(); + + StreamResponse onActivate() { + + // For generating a random row ID + final Random rand = ThreadLocalRandom.current(); + + final World world = (World)session.get(World.class, new Integer(rand.nextInt(DB_ROWS) + 1)); + + // Send reponse + String response = ""; + try + { + response = mapper.writeValueAsString(world); + } + catch (IOException ex) + { + // do nothing + } + return new TextStreamResponse("application/json", response); + } +} diff --git a/frameworks/Java/tapestry/src/main/java/hello/pages/Fortunes.java b/frameworks/Java/tapestry/src/main/java/hello/pages/Fortunes.java new file mode 100644 index 00000000000..438b62d2a1c --- /dev/null +++ b/frameworks/Java/tapestry/src/main/java/hello/pages/Fortunes.java @@ -0,0 +1,37 @@ +package hello.pages; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.apache.tapestry5.annotations.Property; +import org.apache.tapestry5.ioc.annotations.Inject; +import org.apache.tapestry5.services.Request; + +import hello.entities.Fortune; + +/** + * Test type 4: Fortunes + */ +public class Fortunes { + @Inject + private org.hibernate.Session session; + + @Inject + private Request request; + + @Property + private Fortune currentFortune; + + public List getFortunes() { + final List fortunesFromDB = session.createCriteria(Fortune.class).list(); + final List fortunes = new ArrayList<>(fortunesFromDB.size() + 1); + fortunes.addAll(fortunesFromDB); + Fortune additionalFortune = new Fortune(); + additionalFortune.message = "Additional fortune added at request time."; + fortunes.add(additionalFortune); + Collections.sort(fortunes); + return fortunes; + } + +} diff --git a/frameworks/Java/tapestry/src/main/java/hello/pages/Json.java b/frameworks/Java/tapestry/src/main/java/hello/pages/Json.java new file mode 100644 index 00000000000..d4efc8f0d41 --- /dev/null +++ b/frameworks/Java/tapestry/src/main/java/hello/pages/Json.java @@ -0,0 +1,38 @@ +package hello.pages; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +import org.apache.tapestry5.*; +import org.apache.tapestry5.json.*; +import org.apache.tapestry5.util.*; + +import com.fasterxml.jackson.databind.*; + +/** + * JSON Encoding Test + */ +public class Json +{ + // Constant for setting the content type. + private static final String CONTENT_TYPE_JSON = "application/json"; + private static final ObjectMapper mapper = new ObjectMapper(); + + StreamResponse onActivate() { + Map data = new HashMap(); + data.put("message", "Hello, World!"); + + String response = ""; + try + { + response = mapper.writeValueAsString(data); + } + catch (IOException ex) + { + // do nothing + } + + return new TextStreamResponse(CONTENT_TYPE_JSON, response); + } +} diff --git a/frameworks/Java/tapestry/src/main/java/hello/pages/Plaintext.java b/frameworks/Java/tapestry/src/main/java/hello/pages/Plaintext.java new file mode 100644 index 00000000000..778da28ef57 --- /dev/null +++ b/frameworks/Java/tapestry/src/main/java/hello/pages/Plaintext.java @@ -0,0 +1,22 @@ +package hello.pages; + +import org.apache.tapestry5.StreamResponse; +import org.apache.tapestry5.annotations.PageLoaded; +import org.apache.tapestry5.util.TextStreamResponse; + +/** + * Plain-text response test + */ +public class Plaintext +{ + private TextStreamResponse response; + + @PageLoaded + void initializeResponse(){ + response = new TextStreamResponse("text/plain", "Hello, World!"); + } + + StreamResponse onActivate() { + return response; + } +} diff --git a/frameworks/Java/tapestry/src/main/java/hello/pages/Query.java b/frameworks/Java/tapestry/src/main/java/hello/pages/Query.java new file mode 100644 index 00000000000..f38e77f51a4 --- /dev/null +++ b/frameworks/Java/tapestry/src/main/java/hello/pages/Query.java @@ -0,0 +1,74 @@ +package hello.pages; + +import hello.entities.*; + +import java.util.*; +import java.util.concurrent.*; +import java.io.IOException; + +import org.apache.tapestry5.*; +import org.apache.tapestry5.annotations.*; +import org.apache.tapestry5.ioc.annotations.*; +import org.apache.tapestry5.json.*; +import org.apache.tapestry5.util.*; +import org.apache.tapestry5.services.*; +import org.hibernate.*; +import com.fasterxml.jackson.databind.*; + +/** + * Database Mapping Test + */ +public class Query +{ + @Inject + private org.hibernate.Session session; + + @Inject + private Request request; + + private static final int DB_ROWS = 10000; + + private static final ObjectMapper mapper = new ObjectMapper(); + + StreamResponse onActivate() { + + // Read queries from URL, but don't bother validating + int queries = 1; + String qString = this.request.getParameter("queries"); + if (qString != null) { + try { + queries = Integer.parseInt(qString); + } + catch (Exception e) { + queries = 1; + } + } + if (queries <= 0) { + queries = 1; + } + else if (queries > 500) { + queries = 500; + } + final World[] worlds = new World[queries]; + + // For generating a random row ID + final Random rand = ThreadLocalRandom.current(); + + for (int i = 0; i < queries; i++) { + // Read object from database + worlds[i] = (World)session.get(World.class, new Integer(rand.nextInt(DB_ROWS) + 1)); + } + + // Send reponse + String response = ""; + try + { + response = mapper.writeValueAsString(worlds); + } + catch (IOException ex) + { + // do nothing + } + return new TextStreamResponse("application/json", response); + } +} diff --git a/frameworks/Java/tapestry/hello/src/main/java/hello/services/AppModule.java b/frameworks/Java/tapestry/src/main/java/hello/services/AppModule.java similarity index 100% rename from frameworks/Java/tapestry/hello/src/main/java/hello/services/AppModule.java rename to frameworks/Java/tapestry/src/main/java/hello/services/AppModule.java diff --git a/frameworks/Java/tapestry/hello/src/main/java/hello/services/DevelopmentModule.java b/frameworks/Java/tapestry/src/main/java/hello/services/DevelopmentModule.java similarity index 100% rename from frameworks/Java/tapestry/hello/src/main/java/hello/services/DevelopmentModule.java rename to frameworks/Java/tapestry/src/main/java/hello/services/DevelopmentModule.java diff --git a/frameworks/Java/tapestry/hello/src/main/java/hello/services/QaModule.java b/frameworks/Java/tapestry/src/main/java/hello/services/QaModule.java similarity index 100% rename from frameworks/Java/tapestry/hello/src/main/java/hello/services/QaModule.java rename to frameworks/Java/tapestry/src/main/java/hello/services/QaModule.java diff --git a/frameworks/Java/tapestry/hello/src/main/resources/hello/components/Layout.tml b/frameworks/Java/tapestry/src/main/resources/hello/components/Layout.tml similarity index 100% rename from frameworks/Java/tapestry/hello/src/main/resources/hello/components/Layout.tml rename to frameworks/Java/tapestry/src/main/resources/hello/components/Layout.tml diff --git a/frameworks/Java/tapestry/hello/src/main/resources/hello/pages/HelloFortune.tml b/frameworks/Java/tapestry/src/main/resources/hello/pages/Fortunes.tml similarity index 100% rename from frameworks/Java/tapestry/hello/src/main/resources/hello/pages/HelloFortune.tml rename to frameworks/Java/tapestry/src/main/resources/hello/pages/Fortunes.tml diff --git a/frameworks/Java/tapestry/hello/src/main/resources/hibernate.cfg.xml b/frameworks/Java/tapestry/src/main/resources/hibernate.cfg.xml similarity index 100% rename from frameworks/Java/tapestry/hello/src/main/resources/hibernate.cfg.xml rename to frameworks/Java/tapestry/src/main/resources/hibernate.cfg.xml diff --git a/frameworks/Java/tapestry/hello/src/main/resources/log4j.properties b/frameworks/Java/tapestry/src/main/resources/log4j.properties similarity index 100% rename from frameworks/Java/tapestry/hello/src/main/resources/log4j.properties rename to frameworks/Java/tapestry/src/main/resources/log4j.properties diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/WEB-INF/app.properties b/frameworks/Java/tapestry/src/main/webapp/WEB-INF/app.properties similarity index 100% rename from frameworks/Java/tapestry/hello/src/main/webapp/WEB-INF/app.properties rename to frameworks/Java/tapestry/src/main/webapp/WEB-INF/app.properties diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/WEB-INF/resin-web.xml b/frameworks/Java/tapestry/src/main/webapp/WEB-INF/resin-web.xml similarity index 92% rename from frameworks/Java/tapestry/hello/src/main/webapp/WEB-INF/resin-web.xml rename to frameworks/Java/tapestry/src/main/webapp/WEB-INF/resin-web.xml index 7a0463021fa..f5e812ac3f6 100644 --- a/frameworks/Java/tapestry/hello/src/main/webapp/WEB-INF/resin-web.xml +++ b/frameworks/Java/tapestry/src/main/webapp/WEB-INF/resin-web.xml @@ -3,7 +3,7 @@ com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource - jdbc:mysql://TFB-database:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false + jdbc:mysql://tfb-database:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false benchmarkdbuser benchmarkdbpass diff --git a/frameworks/Java/tapestry/hello/src/main/webapp/WEB-INF/web.xml b/frameworks/Java/tapestry/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from frameworks/Java/tapestry/hello/src/main/webapp/WEB-INF/web.xml rename to frameworks/Java/tapestry/src/main/webapp/WEB-INF/web.xml diff --git a/frameworks/Java/tapestry/tapestry.dockerfile b/frameworks/Java/tapestry/tapestry.dockerfile new file mode 100644 index 00000000000..0c5db95efdf --- /dev/null +++ b/frameworks/Java/tapestry/tapestry.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/maven-java8:0.1 as maven + +ADD ./ /tapestry +WORKDIR /tapestry +RUN mvn clean compile war:war + +FROM techempower/resin-java8:0.1 + +COPY --from=maven /tapestry/target/tapestry.war ${RESIN_HOME}/webapps/ROOT.war +CMD java -jar ${RESIN_HOME}/lib/resin.jar console diff --git a/frameworks/Java/undertow-jersey/benchmark_config.json b/frameworks/Java/undertow-jersey/benchmark_config.json index e9b1f2e440d..6cf85e35266 100644 --- a/frameworks/Java/undertow-jersey/benchmark_config.json +++ b/frameworks/Java/undertow-jersey/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "undertow-jersey", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db?single=true", "query_url": "/db?queries=", @@ -25,7 +24,6 @@ "versus": "servlet-raw" }, "hikaricp": { - "setup_file": "hikaricp", "db_url": "/db?single=true", "query_url": "/db?queries=", "fortune_url": "/fortunes", diff --git a/frameworks/Java/undertow-jersey/hikaricp.sh b/frameworks/Java/undertow-jersey/hikaricp.sh deleted file mode 100755 index c899ad5a7db..00000000000 --- a/frameworks/Java/undertow-jersey/hikaricp.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql java maven - -mvn clean package -P hikaricp - -java -jar target/undertow-jersey.jar -dbhost ${DBHOST} & diff --git a/frameworks/Java/undertow-jersey/setup.sh b/frameworks/Java/undertow-jersey/setup.sh deleted file mode 100755 index 31f543c7311..00000000000 --- a/frameworks/Java/undertow-jersey/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql java maven - -mvn clean package - -java -jar target/undertow-jersey.jar -dbhost ${DBHOST} & diff --git a/frameworks/Java/undertow-jersey/src/main/java/hello/JerseyWebServer.java b/frameworks/Java/undertow-jersey/src/main/java/hello/JerseyWebServer.java index b3641eb7b86..71abd94db3e 100644 --- a/frameworks/Java/undertow-jersey/src/main/java/hello/JerseyWebServer.java +++ b/frameworks/Java/undertow-jersey/src/main/java/hello/JerseyWebServer.java @@ -31,7 +31,7 @@ public static void main(final String[] args) throws Exception CommandLine cmd = parser.parse(options(), args); final int port = Integer.parseInt(cmd.getOptionValue("port", "8080")); - final String dbHost = cmd.getOptionValue("dbhost", "localhost"); + final String dbHost = cmd.getOptionValue("dbhost", "tfb-database"); final int dbPort = Integer.parseInt(cmd.getOptionValue("dbport", "3306")); ResourceConfig config = new ResourceConfig(DbResource.class, diff --git a/frameworks/Java/undertow-jersey/src/main/resources/hibernate.cfg.xml b/frameworks/Java/undertow-jersey/src/main/resources/hibernate.cfg.xml index 574a92971d1..d9b8c9780ee 100644 --- a/frameworks/Java/undertow-jersey/src/main/resources/hibernate.cfg.xml +++ b/frameworks/Java/undertow-jersey/src/main/resources/hibernate.cfg.xml @@ -2,7 +2,7 @@ com.mysql.jdbc.Driver - jdbc:mysql://TFB-database:3306/hello_world?useSSL=false&jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true + jdbc:mysql://tfb-database:3306/hello_world?useSSL=false&jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true benchmarkdbuser benchmarkdbpass org.hibernate.dialect.MySQLDialect diff --git a/frameworks/Java/undertow-jersey/src/main/resources/hikarycp/hibernate.cfg.xml b/frameworks/Java/undertow-jersey/src/main/resources/hikarycp/hibernate.cfg.xml index 2a3955b36f4..f81f26dbebb 100644 --- a/frameworks/Java/undertow-jersey/src/main/resources/hikarycp/hibernate.cfg.xml +++ b/frameworks/Java/undertow-jersey/src/main/resources/hikarycp/hibernate.cfg.xml @@ -9,7 +9,7 @@ 256 30000 com.mysql.jdbc.jdbc2.optional.MysqlDataSource - jdbc:mysql://TFB-database:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false + jdbc:mysql://tfb-database:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true&useSSL=false benchmarkdbuser benchmarkdbpass diff --git a/frameworks/Java/undertow-jersey/undertow-jersey-hikaricp.dockerfile b/frameworks/Java/undertow-jersey/undertow-jersey-hikaricp.dockerfile new file mode 100644 index 00000000000..25d5ce55e81 --- /dev/null +++ b/frameworks/Java/undertow-jersey/undertow-jersey-hikaricp.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/maven:0.1 + +ADD ./ /undertow-jersey +WORKDIR /undertow-jersey +RUN mvn clean package -P hikaricp +CMD java -jar target/undertow-jersey.jar diff --git a/frameworks/Java/undertow-jersey/undertow-jersey.dockerfile b/frameworks/Java/undertow-jersey/undertow-jersey.dockerfile new file mode 100644 index 00000000000..60a9b6c2b8e --- /dev/null +++ b/frameworks/Java/undertow-jersey/undertow-jersey.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/maven:0.1 + +ADD ./ /undertow-jersey +WORKDIR /undertow-jersey +RUN mvn clean package +CMD java -jar target/undertow-jersey.jar diff --git a/frameworks/Java/undertow/benchmark_config.json b/frameworks/Java/undertow/benchmark_config.json index bd07a2031ba..7128460000b 100644 --- a/frameworks/Java/undertow/benchmark_config.json +++ b/frameworks/Java/undertow/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "undertow", "tests": [{ "default": { - "setup_file": "setup_no_database", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -22,7 +21,6 @@ "versus": "" }, "mysql" : { - "setup_file": "setup_mysql", "db_url": "/db", "query_url": "/queries?queries=", "fortune_url": "/fortunes", @@ -44,7 +42,6 @@ "versus": "" }, "postgresql" : { - "setup_file": "setup_postgresql", "db_url": "/db", "query_url": "/queries?queries=", "fortune_url": "/fortunes", @@ -66,7 +63,6 @@ "versus": "" }, "mongodb" : { - "setup_file": "setup_mongodb", "db_url": "/db", "query_url": "/queries?queries=", "fortune_url": "/fortunes", @@ -88,7 +84,6 @@ "versus": "" }, "mongodb-async" : { - "setup_file": "setup_mongodb_async", "db_url": "/db", "query_url": "/queries?queries=", "fortune_url": "/fortunes", diff --git a/frameworks/Java/undertow/pom.xml b/frameworks/Java/undertow/pom.xml index a752f90d660..3a929aecf4f 100644 --- a/frameworks/Java/undertow/pom.xml +++ b/frameworks/Java/undertow/pom.xml @@ -13,14 +13,14 @@ 9 9 UTF-8 - 2.7.7 + 2.7.8 2.9.4 3.1.0 3.6.3 0.9.5 - 5.1.45 + 5.1.46 42.2.1 - 1.4.22.Final + 2.0.1.Final 2.4 diff --git a/frameworks/Java/undertow/setup.sh b/frameworks/Java/undertow/setup.sh deleted file mode 100644 index 12444e865bf..00000000000 --- a/frameworks/Java/undertow/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends java maven - -mvn clean package - -java -jar target/hello-undertow.jar $UNDERTOW_ARGS diff --git a/frameworks/Java/undertow/setup_mongodb.sh b/frameworks/Java/undertow/setup_mongodb.sh deleted file mode 100644 index dbd29ad022d..00000000000 --- a/frameworks/Java/undertow/setup_mongodb.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mongodb - -export UNDERTOW_ARGS="MONGODB" - -source ./setup.sh diff --git a/frameworks/Java/undertow/setup_mongodb_async.sh b/frameworks/Java/undertow/setup_mongodb_async.sh deleted file mode 100644 index c929e18bd0b..00000000000 --- a/frameworks/Java/undertow/setup_mongodb_async.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mongodb - -export UNDERTOW_ARGS="MONGODB_ASYNC" - -source ./setup.sh diff --git a/frameworks/Java/undertow/setup_mysql.sh b/frameworks/Java/undertow/setup_mysql.sh deleted file mode 100644 index f343eb74465..00000000000 --- a/frameworks/Java/undertow/setup_mysql.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql - -export UNDERTOW_ARGS="MYSQL" - -source ./setup.sh diff --git a/frameworks/Java/undertow/setup_no_database.sh b/frameworks/Java/undertow/setup_no_database.sh deleted file mode 100644 index 1a1dc38c016..00000000000 --- a/frameworks/Java/undertow/setup_no_database.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -export UNDERTOW_ARGS="NO_DATABASE" - -source ./setup.sh diff --git a/frameworks/Java/undertow/setup_postgresql.sh b/frameworks/Java/undertow/setup_postgresql.sh deleted file mode 100644 index c70a70f3403..00000000000 --- a/frameworks/Java/undertow/setup_postgresql.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql - -export UNDERTOW_ARGS="POSTGRESQL" - -source ./setup.sh diff --git a/frameworks/Java/undertow/source_code b/frameworks/Java/undertow/source_code deleted file mode 100644 index cb345d9cb2d..00000000000 --- a/frameworks/Java/undertow/source_code +++ /dev/null @@ -1,4 +0,0 @@ -./undertow/src/main/java/hello/ -./undertow/src/main/java/hello/HelloWebServer.java -./undertow/src/main/java/hello/World.java -./undertow/src/main/java/hello/Fortune.java diff --git a/frameworks/Java/undertow/src/main/resources/hello/server.properties b/frameworks/Java/undertow/src/main/resources/hello/server.properties index 204922eb9b0..8e158a07e89 100644 --- a/frameworks/Java/undertow/src/main/resources/hello/server.properties +++ b/frameworks/Java/undertow/src/main/resources/hello/server.properties @@ -1,16 +1,16 @@ undertow.port = 8080 undertow.host = 0.0.0.0 -mysql.jdbcUrl = jdbc:mysql://TFB-database:3306/hello_world?useSSL=false&useServerPrepStmts=true&cachePrepStmts=true +mysql.jdbcUrl = jdbc:mysql://tfb-database:3306/hello_world?useSSL=false&useServerPrepStmts=true&cachePrepStmts=true mysql.username = benchmarkdbuser mysql.password = benchmarkdbpass mysql.connections = 48 -postgresql.jdbcUrl = jdbc:postgresql://TFB-database:5432/hello_world +postgresql.jdbcUrl = jdbc:postgresql://tfb-database:5432/hello_world postgresql.username = benchmarkdbuser postgresql.password = benchmarkdbpass postgresql.connections = 48 -mongodb.host = TFB-database:27017 +mongodb.host = tfb-database:27017 mongodb.databaseName = hello_world mongodb.connections = 256 diff --git a/frameworks/Java/undertow/undertow-base.dockerfile b/frameworks/Java/undertow/undertow-base.dockerfile new file mode 100644 index 00000000000..44910415ef9 --- /dev/null +++ b/frameworks/Java/undertow/undertow-base.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/maven:0.1 + +ADD ./ /undertow +WORKDIR /undertow +RUN mvn clean package diff --git a/frameworks/Java/undertow/undertow-mongodb-async.dockerfile b/frameworks/Java/undertow/undertow-mongodb-async.dockerfile new file mode 100644 index 00000000000..5b8150c8544 --- /dev/null +++ b/frameworks/Java/undertow/undertow-mongodb-async.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/undertow-base:0.1 + +CMD java -jar target/hello-undertow.jar MONGODB_ASYNC diff --git a/frameworks/Java/undertow/undertow-mongodb.dockerfile b/frameworks/Java/undertow/undertow-mongodb.dockerfile new file mode 100644 index 00000000000..c4f5b0ae921 --- /dev/null +++ b/frameworks/Java/undertow/undertow-mongodb.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/undertow-base:0.1 + +CMD java -jar target/hello-undertow.jar MONGODB diff --git a/frameworks/Java/undertow/undertow-mysql.dockerfile b/frameworks/Java/undertow/undertow-mysql.dockerfile new file mode 100644 index 00000000000..eb5720a511f --- /dev/null +++ b/frameworks/Java/undertow/undertow-mysql.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/undertow-base:0.1 + +CMD java -jar target/hello-undertow.jar MYSQL diff --git a/frameworks/Java/undertow/undertow-postgresql.dockerfile b/frameworks/Java/undertow/undertow-postgresql.dockerfile new file mode 100644 index 00000000000..e1135705e88 --- /dev/null +++ b/frameworks/Java/undertow/undertow-postgresql.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/undertow-base:0.1 + +CMD java -jar target/hello-undertow.jar POSTGRESQL diff --git a/frameworks/Java/undertow/undertow.dockerfile b/frameworks/Java/undertow/undertow.dockerfile new file mode 100644 index 00000000000..72e6075a180 --- /dev/null +++ b/frameworks/Java/undertow/undertow.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/undertow-base:0.1 + +CMD java -jar target/hello-undertow.jar NO_DATABASE diff --git a/frameworks/Java/vertx-web/benchmark_config.json b/frameworks/Java/vertx-web/benchmark_config.json index 22a9f77080c..b487427681f 100644 --- a/frameworks/Java/vertx-web/benchmark_config.json +++ b/frameworks/Java/vertx-web/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "vertx-web", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -22,7 +21,6 @@ "versus": "vertx" }, "mongodb": { - "setup_file": "setup_mongodb", "db_url": "/mongo/db", "query_url": "/mongo/queries?queries=", "fortune_url": "/mongo/fortunes", @@ -44,7 +42,6 @@ "versus": "" }, "postgres": { - "setup_file": "setup_postgresql", "db_url": "/psql/db", "query_url": "/psql/queries?queries=", "fortune_url": "/psql/fortunes", @@ -66,7 +63,6 @@ "versus": "" }, "susom-postgres": { - "setup_file": "setup_postgresql", "db_url": "/dbpsql/db", "query_url": "/dbpsql/queries?queries=", "fortune_url": "/dbpsql/fortunes", diff --git a/frameworks/Java/vertx-web/run.sh b/frameworks/Java/vertx-web/run.sh new file mode 100644 index 00000000000..fd6b655ae85 --- /dev/null +++ b/frameworks/Java/vertx-web/run.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +java \ + -server \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -Dvertx.disableMetrics=true \ + -Dvertx.disableH2c=true \ + -Dvertx.disableWebsockets=true \ + -Dvertx.flashPolicyHandler=false \ + -Dvertx.threadChecks=false \ + -Dvertx.disableContextTimings=true \ + -Dvertx.disableTCCL=true \ + -jar \ + target/vertx-web-benchmark-3.5.0-fat.jar \ + --instances \ + `grep --count ^processor /proc/cpuinfo` \ + --conf \ + src/main/conf/config.json diff --git a/frameworks/Java/vertx-web/setup.sh b/frameworks/Java/vertx-web/setup.sh deleted file mode 100755 index 81e3ce3325d..00000000000 --- a/frameworks/Java/vertx-web/setup.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -fw_depends java maven - -mvn clean package - -java \ - -server \ - -XX:+UseNUMA \ - -XX:+UseParallelGC \ - -XX:+AggressiveOpts \ - -Dvertx.disableMetrics=true \ - -Dvertx.disableH2c=true \ - -Dvertx.disableWebsockets=true \ - -Dvertx.flashPolicyHandler=false \ - -Dvertx.threadChecks=false \ - -Dvertx.disableContextTimings=true \ - -Dvertx.disableTCCL=true \ - -jar \ - target/vertx-web-benchmark-3.5.0-fat.jar \ - --instances \ - `grep --count ^processor /proc/cpuinfo` \ - --conf \ - src/main/conf/config.json & diff --git a/frameworks/Java/vertx-web/setup_mongodb.sh b/frameworks/Java/vertx-web/setup_mongodb.sh deleted file mode 100644 index de2b3473763..00000000000 --- a/frameworks/Java/vertx-web/setup_mongodb.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends mongodb - -source ./setup.sh \ No newline at end of file diff --git a/frameworks/Java/vertx-web/setup_postgresql.sh b/frameworks/Java/vertx-web/setup_postgresql.sh deleted file mode 100644 index 4c1aa956d38..00000000000 --- a/frameworks/Java/vertx-web/setup_postgresql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends postgresql - -source ./setup.sh \ No newline at end of file diff --git a/frameworks/Java/vertx-web/src/main/conf/config.json b/frameworks/Java/vertx-web/src/main/conf/config.json index a6d5704a7a0..9067794a751 100644 --- a/frameworks/Java/vertx-web/src/main/conf/config.json +++ b/frameworks/Java/vertx-web/src/main/conf/config.json @@ -1,8 +1,7 @@ { - "connection_string": "mongodb://TFB-database:27017", + "connection_string": "mongodb://tfb-database:27017", "db_name": "hello_world", - - "host": "TFB-database", + "host": "tfb-database", "username": "benchmarkdbuser", "password": "benchmarkdbpass", "database": "hello_world", diff --git a/frameworks/Java/vertx-web/vertx-web-base.dockerfile b/frameworks/Java/vertx-web/vertx-web-base.dockerfile new file mode 100644 index 00000000000..ea9534c05ae --- /dev/null +++ b/frameworks/Java/vertx-web/vertx-web-base.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/maven:0.1 + +ADD ./ /vertx-web +WORKDIR /vertx-web +RUN mvn clean package diff --git a/frameworks/Java/vertx-web/vertx-web-mongodb.dockerfile b/frameworks/Java/vertx-web/vertx-web-mongodb.dockerfile new file mode 100644 index 00000000000..c6f5cacfd54 --- /dev/null +++ b/frameworks/Java/vertx-web/vertx-web-mongodb.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/vertx-web-base:0.1 + +CMD bash run.sh diff --git a/frameworks/Java/vertx-web/vertx-web-postgres.dockerfile b/frameworks/Java/vertx-web/vertx-web-postgres.dockerfile new file mode 100644 index 00000000000..c6f5cacfd54 --- /dev/null +++ b/frameworks/Java/vertx-web/vertx-web-postgres.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/vertx-web-base:0.1 + +CMD bash run.sh diff --git a/frameworks/Java/vertx-web/vertx-web-susom-postgres.dockerfile b/frameworks/Java/vertx-web/vertx-web-susom-postgres.dockerfile new file mode 100644 index 00000000000..c6f5cacfd54 --- /dev/null +++ b/frameworks/Java/vertx-web/vertx-web-susom-postgres.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/vertx-web-base:0.1 + +CMD bash run.sh diff --git a/frameworks/Java/vertx-web/vertx-web.dockerfile b/frameworks/Java/vertx-web/vertx-web.dockerfile new file mode 100644 index 00000000000..c6f5cacfd54 --- /dev/null +++ b/frameworks/Java/vertx-web/vertx-web.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/vertx-web-base:0.1 + +CMD bash run.sh diff --git a/frameworks/Java/vertx/benchmark_config.json b/frameworks/Java/vertx/benchmark_config.json index bc3f111ec56..e48e41a23c5 100755 --- a/frameworks/Java/vertx/benchmark_config.json +++ b/frameworks/Java/vertx/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "vertx", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -22,7 +21,6 @@ "versus": "" }, "postgres": { - "setup_file": "setup_postgresql", "db_url": "/db", "query_url": "/queries?queries=", "fortune_url": "/fortunes", diff --git a/frameworks/Java/vertx/run.sh b/frameworks/Java/vertx/run.sh new file mode 100644 index 00000000000..276f3da7b5c --- /dev/null +++ b/frameworks/Java/vertx/run.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +java \ + -Xms2G \ + -Xmx2G \ + -server \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -Dvertx.disableMetrics=true \ + -Dvertx.disableH2c=true \ + -Dvertx.disableWebsockets=true \ + -Dvertx.flashPolicyHandler=false \ + -Dvertx.threadChecks=false \ + -Dvertx.disableContextTimings=true \ + -Dvertx.disableTCCL=true \ + -jar target/vertx.benchmark-0.0.1-SNAPSHOT-fat.jar \ + src/main/conf/config.json diff --git a/frameworks/Java/vertx/setup.sh b/frameworks/Java/vertx/setup.sh deleted file mode 100755 index 247d246f532..00000000000 --- a/frameworks/Java/vertx/setup.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -sed -i 's|localhost|'"${DBHOST}"'|g' src/main/conf/config.json - -fw_depends java maven - -mvn clean package - -java -Xms2G -Xmx2G -server -XX:+UseNUMA -XX:+UseParallelGC -XX:+AggressiveOpts -Dvertx.disableMetrics=true -Dvertx.disableH2c=true -Dvertx.disableWebsockets=true -Dvertx.flashPolicyHandler=false -Dvertx.threadChecks=false -Dvertx.disableContextTimings=true -Dvertx.disableTCCL=true -jar target/vertx.benchmark-0.0.1-SNAPSHOT-fat.jar src/main/conf/config.json & diff --git a/frameworks/Java/vertx/setup_postgresql.sh b/frameworks/Java/vertx/setup_postgresql.sh deleted file mode 100644 index 4c1aa956d38..00000000000 --- a/frameworks/Java/vertx/setup_postgresql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends postgresql - -source ./setup.sh \ No newline at end of file diff --git a/frameworks/Java/vertx/src/main/conf/config.json b/frameworks/Java/vertx/src/main/conf/config.json index 6a217c8f906..9529bf9991a 100644 --- a/frameworks/Java/vertx/src/main/conf/config.json +++ b/frameworks/Java/vertx/src/main/conf/config.json @@ -1,7 +1,7 @@ { - "host": "TFB-database", + "host": "tfb-database", "username": "benchmarkdbuser", "password": "benchmarkdbpass", "database": "hello_world", "maxPoolSize": 64 -} +} \ No newline at end of file diff --git a/frameworks/Java/vertx/vertx-base.dockerfile b/frameworks/Java/vertx/vertx-base.dockerfile new file mode 100644 index 00000000000..98e9ae01564 --- /dev/null +++ b/frameworks/Java/vertx/vertx-base.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/maven:0.1 + +ADD ./ /vertx +WORKDIR /vertx +RUN mvn clean package diff --git a/frameworks/Java/vertx/vertx-postgres.dockerfile b/frameworks/Java/vertx/vertx-postgres.dockerfile new file mode 100644 index 00000000000..76ccc13ae02 --- /dev/null +++ b/frameworks/Java/vertx/vertx-postgres.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/vertx-base:0.1 + +CMD export DBIP=`getent hosts tfb-database | awk '{ print $1 }'` && \ + sed -i "s|tfb-database|$DBIP|g" /vertx/src/main/conf/config.json && \ + bash run.sh diff --git a/frameworks/Java/vertx/vertx.dockerfile b/frameworks/Java/vertx/vertx.dockerfile new file mode 100644 index 00000000000..2116ff33de4 --- /dev/null +++ b/frameworks/Java/vertx/vertx.dockerfile @@ -0,0 +1,2 @@ +FROM techempower/vertx-base:0.1 +CMD bash run.sh diff --git a/frameworks/Java/wicket/benchmark_config.json b/frameworks/Java/wicket/benchmark_config.json index be4b9ccb83f..02ca7af43ca 100644 --- a/frameworks/Java/wicket/benchmark_config.json +++ b/frameworks/Java/wicket/benchmark_config.json @@ -2,13 +2,12 @@ "framework": "wicket", "tests": [{ "default": { - "setup_file": "setup", - "json_url": "/wicket/json", - "db_url": "/wicket/db", - "query_url": "/wicket/db?queries=", - "fortune_url": "/wicket/fortunes", - "update_url": "/wicket/updates?queries=", - "plaintext_url": "/wicket/plaintext", + "json_url": "/json", + "db_url": "/db", + "query_url": "/db?queries=", + "fortune_url": "/fortunes", + "update_url": "/updates?queries=", + "plaintext_url": "/plaintext", "port": 8080, "approach": "Realistic", "classification": "Fullstack", diff --git a/frameworks/Java/wicket/setup.sh b/frameworks/Java/wicket/setup.sh deleted file mode 100755 index 55c9c013cd6..00000000000 --- a/frameworks/Java/wicket/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql java resin maven - -sed -i 's|localhost|'${DBHOST}'|g' src/main/java/hellowicket/WicketApplication.java - -mvn clean compile war:war -rm -rf $RESIN_HOME/webapps/* -cp target/hellowicket-*.war $RESIN_HOME/webapps/wicket.war -resinctl console diff --git a/frameworks/Java/wicket/src/main/java/hellowicket/WicketApplication.java b/frameworks/Java/wicket/src/main/java/hellowicket/WicketApplication.java index 4c2311ac6ac..444afbf843c 100644 --- a/frameworks/Java/wicket/src/main/java/hellowicket/WicketApplication.java +++ b/frameworks/Java/wicket/src/main/java/hellowicket/WicketApplication.java @@ -85,7 +85,7 @@ private DataSource newDataSource() HikariDataSource ds = new HikariDataSource(); // use faster DataSource impl - ds.setJdbcUrl("jdbc:mysql://localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts=true&cacheRSMetadata=true&useSSL=false"); + ds.setJdbcUrl("jdbc:mysql://tfb-database:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts=true&cacheRSMetadata=true&useSSL=false"); ds.setDriverClassName("com.mysql.jdbc.Driver"); ds.setUsername("benchmarkdbuser"); ds.setPassword("benchmarkdbpass"); diff --git a/frameworks/Java/wicket/wicket.dockerfile b/frameworks/Java/wicket/wicket.dockerfile new file mode 100644 index 00000000000..3fc3608b934 --- /dev/null +++ b/frameworks/Java/wicket/wicket.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/maven:0.1 as maven +ADD ./ /wicket +WORKDIR /wicket +RUN mvn clean compile war:war + +FROM techempower/resin:0.1 +COPY --from=maven /wicket/target/hellowicket-1.0.war ${RESIN_HOME}/webapps/ROOT.war +CMD java -jar ${RESIN_HOME}/lib/resin.jar console diff --git a/frameworks/Java/wildfly-ee7/benchmark_config.json b/frameworks/Java/wildfly-ee7/benchmark_config.json index 2e3fea8f2b8..6e3d6abac55 100644 --- a/frameworks/Java/wildfly-ee7/benchmark_config.json +++ b/frameworks/Java/wildfly-ee7/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "wildfly-ee7", "tests": [{ "default" : { - "setup_file": "setup", "json_url": "/wildfly-ee7/rest/json", "plaintext_url": "/wildfly-ee7/rest/plaintext", "db_url": "/wildfly-ee7/rest/db", diff --git a/frameworks/Java/wildfly-ee7/pom.xml b/frameworks/Java/wildfly-ee7/pom.xml index fa960f82816..8477a54d3db 100644 --- a/frameworks/Java/wildfly-ee7/pom.xml +++ b/frameworks/Java/wildfly-ee7/pom.xml @@ -8,7 +8,6 @@ war - localhost UTF-8 3.7.0 3.2.0 diff --git a/frameworks/Java/wildfly-ee7/server-resources/datasources/mysql-ds.xml b/frameworks/Java/wildfly-ee7/server-resources/datasources/mysql-ds.xml index 9574a635d32..ce4a4b757c1 100644 --- a/frameworks/Java/wildfly-ee7/server-resources/datasources/mysql-ds.xml +++ b/frameworks/Java/wildfly-ee7/server-resources/datasources/mysql-ds.xml @@ -2,7 +2,7 @@ - jdbc:mysql://${database.host}:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&traceProtocol=false&useServerPrepStmts=true&enableQueryTimeouts=false&useUnbufferedIO=false&useReadAheadInput=false&maintainTimeStats=false&cacheRSMetadata=true&useSSL=false + jdbc:mysql://tfb-database:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&traceProtocol=false&useServerPrepStmts=true&enableQueryTimeouts=false&useUnbufferedIO=false&useReadAheadInput=false&maintainTimeStats=false&cacheRSMetadata=true&useSSL=false mysql-connector-java-${version.mysql.connector}.jar_com.mysql.jdbc.Driver_5_1 true diff --git a/frameworks/Java/wildfly-ee7/setup.sh b/frameworks/Java/wildfly-ee7/setup.sh deleted file mode 100755 index 87242fa13c7..00000000000 --- a/frameworks/Java/wildfly-ee7/setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends mysql java maven - -export JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Xms2g -Xmx2g -XX:+UseG1GC -XX:MaxGCPauseMillis=50" - -mvn clean initialize package -Pbenchmark -Ddatabase.host=${DBHOST} -target/wildfly-12.0.0.Final/bin/standalone.sh -b 0.0.0.0 & diff --git a/frameworks/Java/wildfly-ee7/wildfly-ee7.dockerfile b/frameworks/Java/wildfly-ee7/wildfly-ee7.dockerfile new file mode 100644 index 00000000000..6adca076a20 --- /dev/null +++ b/frameworks/Java/wildfly-ee7/wildfly-ee7.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/maven:0.1 +ADD ./ /wildfly +WORKDIR /wildfly +RUN mvn clean initialize package -Pbenchmark +ENV JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Xms2g -Xmx2g -XX:+UseG1GC -XX:MaxGCPauseMillis=50" +CMD target/wildfly-12.0.0.Final/bin/standalone.sh -b 0.0.0.0 diff --git a/frameworks/JavaScript/express/.gitignore b/frameworks/JavaScript/express/.gitignore deleted file mode 100644 index 7a7b33aa1dc..00000000000 --- a/frameworks/JavaScript/express/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -package-lock.json -node_modules diff --git a/frameworks/JavaScript/express/benchmark_config.json b/frameworks/JavaScript/express/benchmark_config.json index 4fe495d1505..4b535a41bb7 100644 --- a/frameworks/JavaScript/express/benchmark_config.json +++ b/frameworks/JavaScript/express/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "express", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -22,7 +21,6 @@ "versus": "nodejs" }, "mongodb": { - "setup_file": "setup-mongodb", "db_url": "/mongoose", "query_url": "/mongoose?queries=", "update_url": "/mongoose-update?queries=", @@ -44,7 +42,6 @@ "versus": "nodejs" }, "mysql": { - "setup_file": "setup-mysql", "db_url": "/mysql-orm", "query_url": "/mysql-orm?queries=", "fortune_url": "/mysql-orm-fortune", diff --git a/frameworks/JavaScript/express/express-mongodb.dockerfile b/frameworks/JavaScript/express/express-mongodb.dockerfile new file mode 100644 index 00000000000..947beecfd16 --- /dev/null +++ b/frameworks/JavaScript/express/express-mongodb.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install + +ENV NODE_ENV production + +CMD ["node", "mongodb-app.js"] diff --git a/frameworks/JavaScript/express/express-mysql.dockerfile b/frameworks/JavaScript/express/express-mysql.dockerfile new file mode 100644 index 00000000000..64082d1dd1e --- /dev/null +++ b/frameworks/JavaScript/express/express-mysql.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install + +ENV NODE_ENV production + +CMD ["node", "mysql-app.js"] diff --git a/frameworks/JavaScript/express/express.dockerfile b/frameworks/JavaScript/express/express.dockerfile new file mode 100644 index 00000000000..7cd285ab115 --- /dev/null +++ b/frameworks/JavaScript/express/express.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install + +ENV NODE_ENV production + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/express/mongodb-app.js b/frameworks/JavaScript/express/mongodb-app.js index 5e7cc84675d..23e9b1051d9 100644 --- a/frameworks/JavaScript/express/mongodb-app.js +++ b/frameworks/JavaScript/express/mongodb-app.js @@ -7,9 +7,7 @@ const cluster = require('cluster'), numCPUs = require('os').cpus().length, express = require('express'), mongoose = require('mongoose'), - conn = mongoose.connect('mongodb://TFB-database/hello_world', { - useMongoClient: true - }); + conn = mongoose.connect('mongodb://tfb-database/hello_world'); // Middleware const bodyParser = require('body-parser'); @@ -18,20 +16,20 @@ const Schema = mongoose.Schema, ObjectId = Schema.ObjectId; const WorldSchema = new mongoose.Schema({ - id : Number, - randomNumber: Number - }, { + id: Number, + randomNumber: Number +}, { collection: 'world' }), - MWorld = conn.model('world', WorldSchema); + MWorld = mongoose.model('world', WorldSchema); const FortuneSchema = new mongoose.Schema({ - id : Number, - message : String - }, { + id: Number, + message: String +}, { collection: 'fortune' }), - MFortune = conn.model('fortune', FortuneSchema); + MFortune = mongoose.model('fortune', FortuneSchema); if (cluster.isMaster) { // Fork workers. @@ -62,7 +60,7 @@ if (cluster.isMaster) { results = []; for (let i = 1; i <= queries; i++) { - results.push(await MWorld.findOne({id: (Math.floor(Math.random() * 10000) + 1)})); + results.push(await MWorld.findOne({ id: (Math.floor(Math.random() * 10000) + 1) })); } res.send(queries > 1 ? results : results[0]); @@ -70,11 +68,11 @@ if (cluster.isMaster) { app.get('/mongoose-fortune', (req, res) => { MFortune.find({}, (err, fortunes) => { - const newFortune = {id: 0, message: "Additional fortune added at request time."}; + const newFortune = { id: 0, message: "Additional fortune added at request time." }; fortunes.push(newFortune); fortunes.sort((a, b) => (a.message < b.message) ? -1 : 1); - res.render('fortunes/index', {fortunes: fortunes}); + res.render('fortunes/index', { fortunes: fortunes }); }); }); @@ -82,14 +80,14 @@ if (cluster.isMaster) { const results = [], queries = Math.min(parseInt(req.query.queries) || 1, 500); - for (let i = 1; i <= queries; i++ ) { - const world = await MWorld.findOne({id: (Math.floor(Math.random() * 10000) + 1)}); + for (let i = 1; i <= queries; i++) { + const world = await MWorld.findOne({ id: (Math.floor(Math.random() * 10000) + 1) }); world.randomNumber = ~~(Math.random() * 10000) + 1; await MWorld.update({ id: world.id }, { - randomNumber: world.randomNumber - }); + randomNumber: world.randomNumber + }); results.push(world); } diff --git a/frameworks/JavaScript/express/mysql-app.js b/frameworks/JavaScript/express/mysql-app.js index 73c749d78bc..0207b79b6b9 100644 --- a/frameworks/JavaScript/express/mysql-app.js +++ b/frameworks/JavaScript/express/mysql-app.js @@ -12,7 +12,7 @@ const cluster = require('cluster'), const bodyParser = require('body-parser'); const sequelize = new Sequelize('hello_world', 'benchmarkdbuser', 'benchmarkdbpass', { - host: 'TFB-database', + host: 'tfb-database', dialect: 'mysql', logging: false }); @@ -26,9 +26,9 @@ const World = sequelize.define('world', { type: 'Sequelize.INTEGER' } }, { - timestamps: false, - freezeTableName: true -}); + timestamps: false, + freezeTableName: true + }); const Fortune = sequelize.define('Fortune', { id: { @@ -39,9 +39,9 @@ const Fortune = sequelize.define('Fortune', { type: 'Sequelize.STRING' } }, { - timestamps: false, - freezeTableName: true -}); + timestamps: false, + freezeTableName: true + }); if (cluster.isMaster) { // Fork workers. @@ -72,13 +72,14 @@ if (cluster.isMaster) { const results = [], queries = Math.min(parseInt(req.query.queries) || 1, 500); - for (let i = 1; i <= queries; i++ ) { - const world = await World.findOne({ - where: { - id: Math.floor(Math.random() * 10000) + 1} - } - ); - results.push(world); + for (let i = 1; i <= queries; i++) { + const world = await World.findOne({ + where: { + id: Math.floor(Math.random() * 10000) + 1 + } + } + ); + results.push(world); } res.setHeader("Content-Type", "application/json"); @@ -87,11 +88,11 @@ if (cluster.isMaster) { app.get('/mysql-orm-fortune', (req, res) => { Fortune.findAll().then((fortunes) => { - const newFortune = {id: 0, message: "Additional fortune added at request time."}; + const newFortune = { id: 0, message: "Additional fortune added at request time." }; fortunes.push(newFortune); fortunes.sort((a, b) => (a.message < b.message) ? -1 : 1); - res.render('fortunes/index', {fortunes: fortunes}); + res.render('fortunes/index', { fortunes: fortunes }); }); }); @@ -99,16 +100,16 @@ if (cluster.isMaster) { const results = [], queries = Math.min(parseInt(req.query.queries) || 1, 500); - for (let i = 1; i <= queries; i++ ) { - const world = await World.findOne({ - where: { - id: ~~(Math.random() * 10000) + 1 - } - } - ); - world.randomNumber = ~~(Math.random() * 10000) + 1; - await world.save(); - results.push(world); + for (let i = 1; i <= queries; i++) { + const world = await World.findOne({ + where: { + id: ~~(Math.random() * 10000) + 1 + } + } + ); + world.randomNumber = ~~(Math.random() * 10000) + 1; + await world.save(); + results.push(world); } res.send(results); diff --git a/frameworks/JavaScript/express/package.json b/frameworks/JavaScript/express/package.json index 31bcaa063db..635575668cb 100644 --- a/frameworks/JavaScript/express/package.json +++ b/frameworks/JavaScript/express/package.json @@ -5,9 +5,9 @@ "dependencies": { "express": "4.16.2", "body-parser": "1.18.2", - "pug": "2.0.0-rc.4", + "pug": "2.0.1", "sequelize": "3.30.0", "mysql": "2.15.0", - "mongoose": "4.12.4" + "mongoose": "5.0.6" } } diff --git a/frameworks/JavaScript/express/setup-mongodb.sh b/frameworks/JavaScript/express/setup-mongodb.sh deleted file mode 100644 index bc2b64e5039..00000000000 --- a/frameworks/JavaScript/express/setup-mongodb.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends nodejs mongodb - -# install dependencies -npm install --no-bin-links -# run app -NODE_ENV=production node mongodb-app & diff --git a/frameworks/JavaScript/express/setup-mysql.sh b/frameworks/JavaScript/express/setup-mysql.sh deleted file mode 100644 index 733a4b46305..00000000000 --- a/frameworks/JavaScript/express/setup-mysql.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends nodejs mysql - -# install dependencies -npm install --no-bin-links -# run app -NODE_ENV=production node mysql-app & diff --git a/frameworks/JavaScript/express/setup.sh b/frameworks/JavaScript/express/setup.sh deleted file mode 100755 index bf6d2bdaf88..00000000000 --- a/frameworks/JavaScript/express/setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends nodejs - -# install dependencies -npm install --no-bin-links -# run app -NODE_ENV=production node app & diff --git a/frameworks/JavaScript/hapi/benchmark_config.json b/frameworks/JavaScript/hapi/benchmark_config.json index 8bc0e4359e2..eb6672ccc4c 100644 --- a/frameworks/JavaScript/hapi/benchmark_config.json +++ b/frameworks/JavaScript/hapi/benchmark_config.json @@ -2,13 +2,12 @@ "framework": "hapi", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", - "db_url": "/mongoose/db", - "query_url": "/mongoose/queries?queries=", - "fortune_url": "/mongoose/fortunes", - "update_url": "/mongoose/updates?queries=", + "db_url": "/db", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "update_url": "/updates?queries=", "port": 8080, "approach": "Realistic", "classification": "Micro", @@ -26,11 +25,10 @@ "versus": "nodejs" }, "mysql": { - "setup_file": "setup", - "db_url": "/sequelize/db", - "query_url": "/sequelize/queries?queries=", - "fortune_url": "/sequelize/fortunes", - "update_url": "/sequelize/updates?queries=", + "db_url": "/db", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "update_url": "/updates?queries=", "port": 8080, "approach": "Realistic", "classification": "Micro", @@ -48,11 +46,10 @@ "versus": "nodejs" }, "postgres": { - "setup_file": "setup", - "db_url": "/sequelize-pg/db", - "query_url": "/sequelize-pg/queries?queries=", - "fortune_url": "/sequelize-pg/fortunes", - "update_url": "/sequelize-pg/updates?queries=", + "db_url": "/db", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "update_url": "/updates?queries=", "port": 8080, "approach": "Realistic", "classification": "Micro", diff --git a/frameworks/JavaScript/hapi/create-server.js b/frameworks/JavaScript/hapi/create-server.js index 4499c9e1076..57acf69ecb1 100644 --- a/frameworks/JavaScript/hapi/create-server.js +++ b/frameworks/JavaScript/hapi/create-server.js @@ -26,9 +26,7 @@ server.register(Vision, (err) => { }); }); -const MongooseHandler = require('./handlers/mongoose'); -const SequelizeHandler = require('./handlers/sequelize'); -const SequelizePgHandler = require('./handlers/sequelize-postgres'); +const Handler = require(`./handlers/${process.env.NODE_HANDLER}`); // Makes routing simpler as tfb routes are all GET's // We also don't use the nifty route features that Hapi has @@ -48,20 +46,10 @@ const Plaintext = (req, reply) => Route('/json', JsonSerialization); Route('/plaintext', Plaintext); -Route('/mongoose/db', MongooseHandler.SingleQuery); -Route('/mongoose/queries', MongooseHandler.MultipleQueries); -Route('/mongoose/fortunes', MongooseHandler.Fortunes); -Route('/mongoose/updates', MongooseHandler.Updates); - -Route('/sequelize/db', SequelizeHandler.SingleQuery); -Route('/sequelize/queries', SequelizeHandler.MultipleQueries); -Route('/sequelize/fortunes', SequelizeHandler.Fortunes); -Route('/sequelize/updates', SequelizeHandler.Updates); - -Route('/sequelize-pg/db', SequelizePgHandler.SingleQuery); -Route('/sequelize-pg/queries', SequelizePgHandler.MultipleQueries); -Route('/sequelize-pg/fortunes', SequelizePgHandler.Fortunes); -Route('/sequelize-pg/updates', SequelizePgHandler.Updates); +Route('/db', Handler.SingleQuery); +Route('/queries', Handler.MultipleQueries); +Route('/fortunes', Handler.Fortunes); +Route('/updates', Handler.Updates); server.start((err) => console.log('Hapi worker started and listening on ' + server.info.uri + " " diff --git a/frameworks/JavaScript/hapi/handlers/mongoose.js b/frameworks/JavaScript/hapi/handlers/mongoose.js index 4aeca3d3f65..f52428ac810 100644 --- a/frameworks/JavaScript/hapi/handlers/mongoose.js +++ b/frameworks/JavaScript/hapi/handlers/mongoose.js @@ -3,35 +3,33 @@ const h = require('../helper'); const Mongoose = require('mongoose'); -const connection = Mongoose.connect( - 'mongodb://TFB-database/hello_world', - { useMongoClient: true } -); +Mongoose.connect('mongodb://tfb-database/hello_world'); const WorldSchema = new Mongoose.Schema({ - id : Number, - randomNumber: Number - }, { + id: Number, + randomNumber: Number +}, { collection: 'world' }); + const FortuneSchema = new Mongoose.Schema({ - id: Number, - message: String - }, { + id: Number, + message: String +}, { collection: 'fortune' }); -const Worlds = connection.model('World', WorldSchema); -const Fortunes = connection.model('Fortune', FortuneSchema); +const Worlds = Mongoose.model('world', WorldSchema); +const Fortunes = Mongoose.model('fortune', FortuneSchema); const randomWorld = async () => await Worlds.findOne({ id: h.randomTfbNumber() }); const updateWorld = async (world) => await Worlds.update( - { id: world.randomNumber }, - { randomNumber: world.randomNumber } - ); + { id: world.randomNumber }, + { randomNumber: world.randomNumber } + ); module.exports = { @@ -47,7 +45,7 @@ module.exports = { }, Fortunes: async (req, reply) => { - const fortunes = await Fortunes.find({}); + const fortunes = await Fortunes.find(); fortunes.push(h.additionalFortune()); fortunes.sort((a, b) => a.message.localeCompare(b.message)); diff --git a/frameworks/JavaScript/hapi/handlers/sequelize-postgres.js b/frameworks/JavaScript/hapi/handlers/sequelize-postgres.js index 3763d135cbb..ad3b72aecbe 100644 --- a/frameworks/JavaScript/hapi/handlers/sequelize-postgres.js +++ b/frameworks/JavaScript/hapi/handlers/sequelize-postgres.js @@ -5,7 +5,7 @@ const h = require('../helper'); const Sequelize = require('sequelize'); const sequelize = new Sequelize('hello_world', 'benchmarkdbuser', 'benchmarkdbpass', { - host: 'TFB-database', + host: 'tfb-database', dialect: 'postgres', logging: false }); @@ -17,20 +17,20 @@ const Worlds = sequelize.define('World', { }, randomnumber: { type: 'Sequelize.INTEGER' } }, { - timestamps: false, - freezeTableName: true -}); + timestamps: false, + freezeTableName: true + }); -const Fortunes = sequelize.define('Fortune', { +const Fortunes = sequelize.define('fortune', { id: { type: 'Sequelize.INTEGER', primaryKey: true }, - message: { type: 'Sequelize.STRING' } + message: { type: 'Sequelize.STRING' } }, { - timestamps: false, - freezeTableName: true -}); + timestamps: false, + freezeTableName: true + }); const randomWorld = async () => await Worlds.findOne({ where: { id: h.randomTfbNumber() } }); diff --git a/frameworks/JavaScript/hapi/handlers/sequelize.js b/frameworks/JavaScript/hapi/handlers/sequelize.js index a8bee4ddc8f..273000e493e 100644 --- a/frameworks/JavaScript/hapi/handlers/sequelize.js +++ b/frameworks/JavaScript/hapi/handlers/sequelize.js @@ -5,7 +5,7 @@ const h = require('../helper'); const Sequelize = require('sequelize'); const sequelize = new Sequelize('hello_world', 'benchmarkdbuser', 'benchmarkdbpass', { - host: 'TFB-database', + host: 'tfb-database', dialect: 'mysql', logging: false }); @@ -17,20 +17,20 @@ const Worlds = sequelize.define('World', { }, randomNumber: { type: 'Sequelize.INTEGER' } }, { - timestamps: false, - freezeTableName: true -}); + timestamps: false, + freezeTableName: true + }); const Fortunes = sequelize.define('Fortune', { id: { type: 'Sequelize.INTEGER', primaryKey: true }, - message: { type: 'Sequelize.STRING' } + message: { type: 'Sequelize.STRING' } }, { - timestamps: false, - freezeTableName: true -}); + timestamps: false, + freezeTableName: true + }); const randomWorld = async () => await Worlds.findOne({ where: { id: h.randomTfbNumber() } }); diff --git a/frameworks/JavaScript/hapi/hapi-mysql.dockerfile b/frameworks/JavaScript/hapi/hapi-mysql.dockerfile new file mode 100644 index 00000000000..003cb218056 --- /dev/null +++ b/frameworks/JavaScript/hapi/hapi-mysql.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install + +ENV NODE_HANDLER sequelize + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/hapi/hapi-postgres.dockerfile b/frameworks/JavaScript/hapi/hapi-postgres.dockerfile new file mode 100644 index 00000000000..7a3f34355dd --- /dev/null +++ b/frameworks/JavaScript/hapi/hapi-postgres.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install + +ENV NODE_HANDLER sequelize-postgres + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/hapi/hapi.dockerfile b/frameworks/JavaScript/hapi/hapi.dockerfile new file mode 100644 index 00000000000..db6dbfbab13 --- /dev/null +++ b/frameworks/JavaScript/hapi/hapi.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install + +ENV NODE_HANDLER mongoose + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/hapi/package.json b/frameworks/JavaScript/hapi/package.json index 6c62628e68b..81bce7686de 100644 --- a/frameworks/JavaScript/hapi/package.json +++ b/frameworks/JavaScript/hapi/package.json @@ -8,7 +8,7 @@ "handlebars": "4.0.6", "hapi": "16.1.0", "vision": "4.1.0", - "mongoose": "4.12.4", + "mongoose": "5.0.6", "mysql": "2.13.0", "pg": "6.1.2", "pg-hstore": "2.3.2", diff --git a/frameworks/JavaScript/hapi/setup.sh b/frameworks/JavaScript/hapi/setup.sh deleted file mode 100755 index 442aa69564a..00000000000 --- a/frameworks/JavaScript/hapi/setup.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -fw_depends mongodb postgresql mysql nodejs - -npm install --no-bin-links -node app & diff --git a/frameworks/JavaScript/koa/.gitignore b/frameworks/JavaScript/koa/.gitignore new file mode 100644 index 00000000000..40b878db5b1 --- /dev/null +++ b/frameworks/JavaScript/koa/.gitignore @@ -0,0 +1 @@ +node_modules/ \ No newline at end of file diff --git a/frameworks/JavaScript/koa/app.js b/frameworks/JavaScript/koa/app.js index 54053cd46e9..6f363516b09 100755 --- a/frameworks/JavaScript/koa/app.js +++ b/frameworks/JavaScript/koa/app.js @@ -7,8 +7,8 @@ if (cluster.isMaster) { cluster.fork(); } - console.log('Master starting ' + new Date().toISOString(" ")); - cluster.on('exit', (worker, code, signal) => { + console.log('Master starting ' + new Date().toISOString()); + cluster.on('exit', () => { process.exit(1); }); } else { diff --git a/frameworks/JavaScript/koa/benchmark_config.json b/frameworks/JavaScript/koa/benchmark_config.json index d870b6c44ce..acdb332d677 100644 --- a/frameworks/JavaScript/koa/benchmark_config.json +++ b/frameworks/JavaScript/koa/benchmark_config.json @@ -1,73 +1,72 @@ { "framework": "koa", - "tests": [{ - "default": { - "setup_file": "setup", - "json_url": "/json", - "plaintext_url": "/plaintext", - "db_url": "/mongoose/db", - "query_url": "/mongoose/queries?queries=", - "fortune_url": "/mongoose/fortunes", - "update_url": "/mongoose/updates?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "MongoDB", - "framework": "koa", - "language": "JavaScript", - "flavor": "NodeJS", - "orm": "Raw", - "platform": "None", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "koa", - "notes": "", - "versus": "nodejs" - }, - "mysql": { - "setup_file": "setup", - "db_url": "/sequelize/db", - "query_url": "/sequelize/queries?queries=", - "fortune_url": "/sequelize/fortunes", - "update_url": "/sequelize/updates?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "MySQL", - "framework": "koa", - "language": "JavaScript", - "flavor": "NodeJS", - "orm": "Raw", - "platform": "None", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "koa", - "notes": "", - "versus": "nodejs" - }, - "postgres": { - "setup_file": "setup", - "db_url": "/sequelize-pg/db", - "query_url": "/sequelize-pg/queries?queries=", - "fortune_url": "/sequelize-pg/fortunes", - "update_url": "/sequelize-pg/updates?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "Postgres", - "framework": "koa", - "language": "JavaScript", - "flavor": "NodeJS", - "orm": "Raw", - "platform": "None", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "koa", - "notes": "", - "versus": "nodejs" + "tests": [ + { + "default": { + "json_url": "/json", + "plaintext_url": "/plaintext", + "db_url": "/db", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "update_url": "/updates?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "MongoDB", + "framework": "koa", + "language": "JavaScript", + "flavor": "NodeJS", + "orm": "Raw", + "platform": "None", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "koa", + "notes": "", + "versus": "nodejs" + }, + "mysql": { + "db_url": "/db", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "update_url": "/updates?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "MySQL", + "framework": "koa", + "language": "JavaScript", + "flavor": "NodeJS", + "orm": "Raw", + "platform": "None", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "koa", + "notes": "", + "versus": "nodejs" + }, + "postgres": { + "db_url": "/db", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "update_url": "/updates?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "Postgres", + "framework": "koa", + "language": "JavaScript", + "flavor": "NodeJS", + "orm": "Raw", + "platform": "None", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "koa", + "notes": "", + "versus": "nodejs" + } } - }] + ] } \ No newline at end of file diff --git a/frameworks/JavaScript/koa/create-server.js b/frameworks/JavaScript/koa/create-server.js index 46ab7bb71dd..71439f53176 100644 --- a/frameworks/JavaScript/koa/create-server.js +++ b/frameworks/JavaScript/koa/create-server.js @@ -3,54 +3,45 @@ const Router = require('koa-router'); const hbs = require('koa-hbs'); const bodyParser = require('koa-bodyparser'); const handlebars = require('handlebars'); - -const MongooseHandler = require('./handlers/mongoose'); -const SequelizeHandler = require('./handlers/sequelize'); -const SequelizePgHandler = require('./handlers/sequelize-postgres'); - +const handler = require('./handlers/handler'); const app = new Koa(); const router = new Router(); -app.use(bodyParser()); -app.use(hbs.middleware({ - handlebars: handlebars, - viewPath: __dirname + '/views' -})); - -function JsonSerialization(ctx, next) { - ctx.set('Server', 'Koa'); - ctx.type = 'application/json'; - ctx.body = { message: 'Hello, World!' }; - return next(); -} -function Plaintext(ctx, next) { - ctx.set('Server', 'Koa'); - ctx.type = 'text/plain'; - ctx.body = 'Hello, World!'; - return next(); +app + .use(async (ctx, next) => { + ctx.set('Server', 'Koa'); + await next(); + }); + +router + .get('/json', (ctx) => { + ctx.body = {message: 'Hello, World!'}; + }) + .get('/plaintext', (ctx) => { + ctx.body = 'Hello, World!'; + }); + +const handlerName = process.env.NODE_HANDLER; + +if (handlerName) { + const dbLayer = require(`./handlers/${handlerName}`); + + const routerHandler = handler(dbLayer); + + router + .use(bodyParser()) + .use(hbs.middleware({ + handlebars: handlebars, + viewPath: __dirname + '/views' + })) + .get('/db', routerHandler.SingleQuery) + .get('/queries', routerHandler.MultipleQueries) + .get('/fortunes', routerHandler.Fortunes) + .get('/updates', routerHandler.Updates); } -router.get('/json', JsonSerialization); -router.get('/plaintext', Plaintext); - - -router.get('/mongoose/db', MongooseHandler.SingleQuery); -router.get('/mongoose/queries', MongooseHandler.MultipleQueries); -router.get('/mongoose/fortunes', MongooseHandler.Fortunes); -router.get('/mongoose/updates', MongooseHandler.Updates); - -router.get('/sequelize/db', SequelizeHandler.SingleQuery); -router.get('/sequelize/queries', SequelizeHandler.MultipleQueries); -router.get('/sequelize/fortunes', SequelizeHandler.Fortunes); -router.get('/sequelize/updates', SequelizeHandler.Updates); - -router.get('/sequelize-pg/db', SequelizePgHandler.SingleQuery); -router.get('/sequelize-pg/queries', SequelizePgHandler.MultipleQueries); -router.get('/sequelize-pg/fortunes', SequelizePgHandler.Fortunes); -router.get('/sequelize-pg/updates', SequelizePgHandler.Updates); - app.use(router.routes()); -const server = app.listen(8080); -console.log('Worker started and listening on http://0.0.0.0:8080 ' - + new Date().toISOString(" ")); + +app.listen(8080); +console.log(`Worker started and listening on http://0.0.0.0:8080 ${new Date().toISOString()}`); diff --git a/frameworks/JavaScript/koa/handlers/handler.js b/frameworks/JavaScript/koa/handlers/handler.js new file mode 100644 index 00000000000..a6fbb8aa32c --- /dev/null +++ b/frameworks/JavaScript/koa/handlers/handler.js @@ -0,0 +1,49 @@ +const h = require('../helper'); +const Bluebird = require('bluebird'); + +/** + * @param databaseLayer + * @returns {{SingleQuery: function(*), MultipleQueries: function(*), Fortunes: function(*), Updates: function(*)}} + */ +module.exports = (databaseLayer) => ({ + SingleQuery: async (ctx) => { + ctx.body = await databaseLayer.getWorldLean(h.randomTfbNumber()); + }, + + MultipleQueries: async (ctx) => { + const queries = h.getQueries(ctx.request.query.queries); + const promisesArray = []; + for (let i = 0; i < queries; i++) { + promisesArray.push(databaseLayer.getWorldLean(h.randomTfbNumber())); + } + ctx.body = await Bluebird.all(promisesArray) + }, + + Fortunes: async (ctx) => { + const fortunes = await databaseLayer.allFortunes(); + fortunes.push(h.additionalFortune); + fortunes.sort((a, b) => a.message.localeCompare(b.message)); + + return ctx.render('fortunes', {fortunes}); + }, + + Updates: (ctx) => { + const queries = h.getQueries(ctx.request.query.queries); + const worldPromises = []; + + for (let i = 0; i < queries; i++) { + worldPromises.push(databaseLayer.getWorld(h.randomTfbNumber())); + } + + return Bluebird + .all(worldPromises) + .map(world => { + world.randomNumber = h.randomTfbNumber(); + return world + }) + .then(worlds => databaseLayer.saveWorlds(worlds)) + .then(worlds => { + ctx.body = worlds; + }); + } +}); \ No newline at end of file diff --git a/frameworks/JavaScript/koa/handlers/mongoose.js b/frameworks/JavaScript/koa/handlers/mongoose.js index 38c6697e737..80fae84c72d 100644 --- a/frameworks/JavaScript/koa/handlers/mongoose.js +++ b/frameworks/JavaScript/koa/handlers/mongoose.js @@ -1,110 +1,9 @@ -// Connects to MongoDB using the mongoose driver -// Handles related routes - -const Promise = require('bluebird'); -const h = require('../helper'); -// Can treat mongoose library as one that supports Promises -// these methods will then have "-Async" appended to them. -const Mongoose = Promise.promisifyAll(require('mongoose')); -const connection = Mongoose.connect( - 'mongodb://TFB-database/hello_world', - { useMongoClient: true } -); - -const WorldSchema = new Mongoose.Schema({ - id : Number, - randomNumber: Number - }, { - collection: 'world' - }); -const FortuneSchema = new Mongoose.Schema({ - id: Number, - message: String - }, { - collection: 'fortune' - }); - -const Worlds = connection.model('World', WorldSchema); -const Fortunes = connection.model('Fortune', FortuneSchema); - -const randomWorldPromise = () => - Worlds.findOneAsync({ id: h.randomTfbNumber() }) - .then((world) => world) - .catch((err) => process.exit(1)); - - -const promiseAllFortunes = () => - Fortunes.findAsync({}) - .then((fortunes) => fortunes) - .catch((err) => process.exit(1)); - -const updateWorld = (world) => - Worlds - .updateAsync( - { id: world.randomNumber }, - { randomNumber: world.randomNumber } - ) - .then((result) => world) - .catch((err) => process.exit(1)); +const {Worlds, Fortunes} = require('../models/mongoose'); +const Bluebird = require('bluebird'); module.exports = { - - SingleQuery: (ctx, next) => { - return randomWorldPromise() - .then((world) => { - ctx.set('Server', 'Koa'); - ctx.type = 'application/json'; - ctx.body = world; - return next(); - }); - }, - - MultipleQueries: (ctx, next) => { - const queries = h.getQueries(ctx); - const worldPromises = h.fillArray(randomWorldPromise(), queries); - - return Promise - .all(worldPromises) - .then((worlds) => { - ctx.set('Server', 'Koa'); - ctx.type = 'application/json'; - ctx.body = worlds; - return next() - }); - }, - - Fortunes: (ctx, next) => { - return promiseAllFortunes() - .then((fortunes) => { - fortunes.push(h.additionalFortune()); - fortunes.sort((a, b) => a.message.localeCompare(b.message)); - - ctx.type = 'text/html'; - ctx.set('Server', 'Koa'); - return ctx.render('fortunes', { fortunes: fortunes }); - }); - }, - - Updates: (ctx, next) => { - const queries = h.getQueries(ctx); - const worldPromises = []; - - for (let i = 0; i < queries; i++) { - worldPromises.push(randomWorldPromise()); - } - - return Promise - .all(worldPromises) - .map((world) => { - world.randomNumber = h.randomTfbNumber(); - return updateWorld(world); - }) - .then((worlds) => { - ctx.set('Server', 'Koa'); - ctx.type = 'application/json'; - ctx.body = worlds; - return next(); - }); - } - -}; + getWorld: _id => Worlds.findById(_id), + getWorldLean: _id => Worlds.findById(_id).lean(), + allFortunes: () => Fortunes.find({}), + saveWorlds: worlds => Bluebird.all(worlds.map(world => world.save())), +}; \ No newline at end of file diff --git a/frameworks/JavaScript/koa/handlers/sequelize-postgres.js b/frameworks/JavaScript/koa/handlers/sequelize-postgres.js index bc50974fcd4..308f4d1f2b6 100644 --- a/frameworks/JavaScript/koa/handlers/sequelize-postgres.js +++ b/frameworks/JavaScript/koa/handlers/sequelize-postgres.js @@ -1,109 +1,9 @@ -// Connects to Postgres using the sequelize driver -// Handles related routes -const Promise = require('bluebird'); -const h = require('../helper'); -const Sequelize = require('sequelize'); - -const sequelize = new Sequelize('hello_world', 'benchmarkdbuser', 'benchmarkdbpass', { - host: 'TFB-database', - dialect: 'postgres', - logging: false -}); - -const Worlds = sequelize.define('world', { - id: { - type: 'Sequelize.INTEGER', - primaryKey: true - }, - randomNumber: { type: 'Sequelize.INTEGER', field: 'randomnumber' } -}, { - timestamps: false, - freezeTableName: true -}); - -const Fortunes = sequelize.define('Fortune', { - id: { - type: 'Sequelize.INTEGER', - primaryKey: true - }, - message: { type: 'Sequelize.STRING' } -}, { - timestamps: false, - freezeTableName: true -}); - -const randomWorldPromise = () => - Worlds.findOne({ where: { id: h.randomTfbNumber() } }) - .then((results) => results) - .catch((err) => process.exit(1)); +const {Worlds, Fortunes} = require('../models/sequelize-postgres'); +const Bluebird = require('bluebird'); module.exports = { - - SingleQuery: (ctx, next) => - randomWorldPromise().then((world) => { - ctx.set('Server', 'Koa'); - ctx.type = 'application/json'; - ctx.body = world; - return next(); - }), - - MultipleQueries: (ctx, next) => { - const queries = h.getQueries(ctx), - worldPromises = []; - - for (let i = 0; i < queries; i++) { - worldPromises.push(randomWorldPromise()); - } - - return Promise.all(worldPromises) - .then((worlds) => { - ctx.set('Server', 'Koa'); - ctx.type = 'application/json'; - ctx.body = worlds; - return next(); - }); - }, - - Fortunes: (ctx, next) => { - return Fortunes.findAll().then((fortunes) => { - fortunes.push(h.additionalFortune()); - fortunes.sort((a, b) => a.message.localeCompare(b.message)); - - ctx.set('Server', 'Koa'); - ctx.type = 'text/html'; - return ctx.render('fortunes', { fortunes }); - }).catch((err) => process.exit(1)); - }, - - Updates: (ctx, next) => { - const queries = h.getQueries(ctx), - worldPromises = []; - - for (let i = 0; i < queries; i++) { - worldPromises.push(randomWorldPromise()); - } - - const worldUpdate = (world) => { - world.randomNumber = h.randomTfbNumber(); - - return Worlds.update( - {randomNumber: world.randomNumber}, - {where: {id: world.id}} - ) - .then((results) => world) - .catch((err) => process.exit(1)); - }; - - return Promise - .all(worldPromises) - .map((world) => worldUpdate(world)) - .then((updated) => { - ctx.set('Server', 'Koa'); - ctx.type = 'application/json'; - ctx.body = updated; - return next(); - }) - .catch((err) => process.exit(1)); - } - -}; + getWorld: id => Worlds.findOne({where: {id}}), + getWorldLean: id => Worlds.findOne({where: {id}, raw: true}), + allFortunes: () => Fortunes.findAll(), + saveWorlds: worlds => Bluebird.all(worlds.map(world => world.save())), +}; \ No newline at end of file diff --git a/frameworks/JavaScript/koa/handlers/sequelize.js b/frameworks/JavaScript/koa/handlers/sequelize.js index a45be6d7f8e..e7914a89c88 100644 --- a/frameworks/JavaScript/koa/handlers/sequelize.js +++ b/frameworks/JavaScript/koa/handlers/sequelize.js @@ -1,109 +1,9 @@ -// Connects to MySQL using the sequelize driver -// Handles related routes -const Promise = require('bluebird'); -const h = require('../helper'); - -const Sequelize = require('sequelize'); -const sequelize = new Sequelize('hello_world', 'benchmarkdbuser', 'benchmarkdbpass', { - host: 'TFB-database', - dialect: 'mysql', - logging: false -}); - -const Worlds = sequelize.define('world', { - id: { - type: 'Sequelize.INTEGER', - primaryKey: true - }, - randomNumber: { type: 'Sequelize.INTEGER' } -}, { - timestamps: false, - freezeTableName: true -}); - -const Fortunes = sequelize.define('Fortune', { - id: { - type: 'Sequelize.INTEGER', - primaryKey: true - }, - message: { type: 'Sequelize.STRING' } -}, { - timestamps: false, - freezeTableName: true -}); - -const randomWorldPromise = () => - Worlds.findOne({ where: { id: h.randomTfbNumber() } }) - .then((results) => results) - .catch((err) => process.exit(1)); - +const {Worlds, Fortunes} = require('../models/sequelize'); +const Bluebird = require('bluebird'); module.exports = { - - SingleQuery: (ctx, next) => { - return randomWorldPromise().then((world) => { - ctx.set('Server', 'Koa'); - ctx.type = 'application/json'; - ctx.body = world; - return next(); - }) - }, - - MultipleQueries: (ctx, next) => { - const queries = h.getQueries(ctx); - const worldPromises = []; - - for (let i = 0; i < queries; i++) { - worldPromises.push(randomWorldPromise()); - } - - return Promise.all(worldPromises).then((worlds) => { - ctx.set('Server', 'Koa'); - ctx.type = 'application/json'; - ctx.body = worlds; - return next(); - }); - }, - - Fortunes: (ctx, next) => { - return Fortunes.findAll().then((fortunes) => { - fortunes.push(h.additionalFortune()); - fortunes.sort((a, b) => a.message.localeCompare(b.message)); - - ctx.set('Server', 'Koa'); - ctx.type = 'text/html'; - return ctx.render('fortunes', { fortunes }); - }).catch((err) => process.exit(1)); - }, - - Updates: (ctx, next) => { - const queries = h.getQueries(ctx); - const worldPromises = []; - - for (let i = 0; i < queries; i++) { - worldPromises.push(randomWorldPromise()); - } - - const worldUpdate = (world) => { - world.randomNumber = h.randomTfbNumber(); - - return Worlds.update( - { randomNumber: world.randomNumber }, - { where: { id: world.id } } - ) - .then((results) => world) - .catch((err) => process.exit(1)); - }; - - return Promise - .all(worldPromises) - .map((world) => worldUpdate(world)) - .then((updated) => { - ctx.set('Server', 'Koa'); - ctx.type = 'application/json'; - ctx.body = updated; - return next(); - }) - .catch((e) => process.exit(1)); - } -}; + getWorld: id => Worlds.findOne({where: {id}}), + getWorldLean: id => Worlds.findOne({where: {id}, raw: true}), + allFortunes: () => Fortunes.findAll(), + saveWorlds: worlds => Bluebird.all(worlds.map(world => world.save())), +}; \ No newline at end of file diff --git a/frameworks/JavaScript/koa/helper.js b/frameworks/JavaScript/koa/helper.js index 83db8f4b17f..d909c3a97c8 100644 --- a/frameworks/JavaScript/koa/helper.js +++ b/frameworks/JavaScript/koa/helper.js @@ -1,29 +1,12 @@ -const Handlebars = require('handlebars'); - -const GREETING = "Hello, World"; -const HELLO_OBJ = { message: GREETING }; - module.exports = { randomTfbNumber: () => Math.floor(Math.random() * 10000) + 1, - fillArray: (value, len) => { - const filled = []; - - for (let i = 0; i < len; i++) { - filled.push(value); - } - return filled; + getQueries: (queries) => { + return Math.min(Math.max(parseInt(queries) || 1, 1), 500); }, - getQueries: (ctx) => { - let queries = ~~(ctx.query.queries) || 1; - queries = Math.min(Math.max(queries, 1), 500); - return queries; - }, - - additionalFortune: () => ({ + additionalFortune: { id: 0, message: 'Additional fortune added at request time.' - }) - + } }; diff --git a/frameworks/JavaScript/koa/koa-mysql.dockerfile b/frameworks/JavaScript/koa/koa-mysql.dockerfile new file mode 100644 index 00000000000..89c5d77361d --- /dev/null +++ b/frameworks/JavaScript/koa/koa-mysql.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install + +ENV NODE_ENV production +ENV NODE_HANDLER sequelize + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/koa/koa-postgres.dockerfile b/frameworks/JavaScript/koa/koa-postgres.dockerfile new file mode 100644 index 00000000000..ff087dc0371 --- /dev/null +++ b/frameworks/JavaScript/koa/koa-postgres.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install + +ENV NODE_ENV production +ENV NODE_HANDLER sequelize-postgres + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/koa/koa.dockerfile b/frameworks/JavaScript/koa/koa.dockerfile new file mode 100644 index 00000000000..2b2752f82b9 --- /dev/null +++ b/frameworks/JavaScript/koa/koa.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install + +ENV NODE_ENV production +ENV NODE_HANDLER mongoose + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/koa/models/mongoose.js b/frameworks/JavaScript/koa/models/mongoose.js new file mode 100644 index 00000000000..9d46941764f --- /dev/null +++ b/frameworks/JavaScript/koa/models/mongoose.js @@ -0,0 +1,31 @@ +const Bluebird = require('bluebird'); +const Mongoose = require('mongoose'); + +Mongoose.Promise = Bluebird; + +const { SchemaTypes } = Mongoose; + +Mongoose.connect('mongodb://tfb-database/hello_world') + .catch(error => { + console.error(error); + process.exit(1); + }); + +const WorldSchema = new Mongoose.Schema({ + _id: SchemaTypes.Number, + randomNumber: SchemaTypes.Number, +}, { + collection: 'world', + versionKey: false, + }); + +const FortuneSchema = new Mongoose.Schema({ + id: SchemaTypes.Number, + message: SchemaTypes.String, +}, { + collection: 'fortune', + versionKey: false, + }); + +module.exports.Worlds = Mongoose.model('World', WorldSchema, 'world'); +module.exports.Fortunes = Mongoose.model('Fortune', FortuneSchema, 'fortune'); \ No newline at end of file diff --git a/frameworks/JavaScript/koa/models/sequelize-postgres.js b/frameworks/JavaScript/koa/models/sequelize-postgres.js new file mode 100644 index 00000000000..5261448534a --- /dev/null +++ b/frameworks/JavaScript/koa/models/sequelize-postgres.js @@ -0,0 +1,37 @@ +const Sequelize = require('sequelize'); +const sequelize = new Sequelize('hello_world', 'benchmarkdbuser', 'benchmarkdbpass', { + host: 'tfb-database', + dialect: 'postgres', + logging: false +}); + +const { DataTypes } = Sequelize; +const Worlds = sequelize.define('World', { + id: { + type: DataTypes.INTEGER, + primaryKey: true + }, + randomNumber: { + type: DataTypes.INTEGER, + field: 'randomnumber' + }, +}, { + timestamps: false, + freezeTableName: true + }); + +const Fortunes = sequelize.define('Fortune', { + id: { + type: DataTypes.INTEGER, + primaryKey: true + }, + message: { type: DataTypes.STRING } +}, { + timestamps: false, + freezeTableName: true + }); + +module.exports = { + Worlds, + Fortunes, +}; diff --git a/frameworks/JavaScript/koa/models/sequelize.js b/frameworks/JavaScript/koa/models/sequelize.js new file mode 100644 index 00000000000..f4b2d0b63ed --- /dev/null +++ b/frameworks/JavaScript/koa/models/sequelize.js @@ -0,0 +1,34 @@ +const Sequelize = require('sequelize'); +const sequelize = new Sequelize('hello_world', 'benchmarkdbuser', 'benchmarkdbpass', { + host: 'tfb-database', + dialect: 'mysql', + logging: false +}); + +const { DataTypes } = Sequelize; +const Worlds = sequelize.define('World', { + id: { + type: DataTypes.INTEGER, + primaryKey: true + }, + randomNumber: { type: DataTypes.INTEGER } +}, { + timestamps: false, + freezeTableName: true + }); + +const Fortunes = sequelize.define('Fortune', { + id: { + type: DataTypes.INTEGER, + primaryKey: true + }, + message: { type: DataTypes.STRING } +}, { + timestamps: false, + freezeTableName: true + }); + +module.exports = { + Worlds, + Fortunes, +}; diff --git a/frameworks/JavaScript/koa/package.json b/frameworks/JavaScript/koa/package.json index 50cb6e9d16b..51381ad7401 100644 --- a/frameworks/JavaScript/koa/package.json +++ b/frameworks/JavaScript/koa/package.json @@ -1,20 +1,20 @@ { "name": "koa-tfb", - "version": "0.0.1", + "version": "0.0.2", "description": "Koa tests for TechEmpower Framework Benchmarks.", "main": "app.js", "private": true, "dependencies": { - "bluebird": "3.5.0", - "handlebars": "4.0.8", - "koa": "2.2.0", - "koa-bodyparser": "4.2.0", - "koa-hbs": "1.0.0-alpha.1", - "koa-router": "7.1.1", - "mongoose": "4.12.4", - "mysql": "2.13.0", - "pg": "6.2.2", - "pg-hstore": "2.3.2", - "sequelize": "3.30.4" + "bluebird": "~3.5.1", + "handlebars": "~4.0.11", + "koa": "~2.5.0", + "koa-bodyparser": "~4.2.0", + "koa-hbs": "~1.0.0", + "koa-router": "~7.4.0", + "mongoose": "~5.0.11", + "mysql2": "~1.5.3", + "pg": "~7.4.1", + "pg-hstore": "~2.3.2", + "sequelize": "~4.37.3" } } diff --git a/frameworks/JavaScript/koa/setup.sh b/frameworks/JavaScript/koa/setup.sh deleted file mode 100755 index 442aa69564a..00000000000 --- a/frameworks/JavaScript/koa/setup.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -fw_depends mongodb postgresql mysql nodejs - -npm install --no-bin-links -node app & diff --git a/frameworks/JavaScript/nodejs/benchmark_config.json b/frameworks/JavaScript/nodejs/benchmark_config.json index de03598d72d..1422aebc8ff 100644 --- a/frameworks/JavaScript/nodejs/benchmark_config.json +++ b/frameworks/JavaScript/nodejs/benchmark_config.json @@ -2,14 +2,13 @@ "framework": "nodejs", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", - "db_url": "/mysql/db", - "query_url": "/mysql/queries?queries=", - "cached_query_url": "/mysql/cached?queries=", - "update_url": "/mysql/updates?queries=", - "fortune_url": "/mysql/fortunes", + "db_url": "/db", + "query_url": "/queries?queries=", + "cached_query_url": "/cached?queries=", + "update_url": "/updates?queries=", + "fortune_url": "/fortunes", "port": 8080, "approach": "Realistic", "classification": "Platform", @@ -27,10 +26,9 @@ "versus": "nodejs" }, "mongodb": { - "setup_file": "setup", - "db_url": "/mongoose/db", - "query_url": "/mongoose/queries?queries=", - "update_url": "/mongoose/updates?queries=", + "db_url": "/db", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", "port": 8080, "approach": "Realistic", "classification": "Platform", @@ -48,11 +46,10 @@ "versus": "nodejs" }, "mongodb-raw": { - "setup_file": "setup", - "db_url": "/mongodb/db", - "query_url": "/mongodb/queries?queries=", - "update_url": "/mongodb/updates?queries=", - "fortune_url": "/mongodb/fortunes", + "db_url": "/db", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "fortune_url": "/fortunes", "port": 8080, "approach": "Realistic", "classification": "Platform", @@ -70,11 +67,10 @@ "versus": "nodejs" }, "mysql": { - "setup_file": "setup", - "db_url": "/sequelize/db", - "query_url": "/sequelize/queries?queries=", - "update_url": "/sequelize/updates?queries=", - "fortune_url": "/sequelize/fortunes", + "db_url": "/db", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "fortune_url": "/fortunes", "port": 8080, "approach": "Realistic", "classification": "Platform", @@ -92,11 +88,10 @@ "versus": "nodejs" }, "postgres": { - "setup_file": "setup", - "db_url": "/sequelize-pg/db", - "query_url": "/sequelize-pg/queries?queries=", - "update_url": "/sequelize-pg/updates?queries=", - "fortune_url": "/sequelize-pg/fortunes", + "db_url": "/db", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "fortune_url": "/fortunes", "port": 8080, "approach": "Realistic", "classification": "Platform", @@ -114,13 +109,12 @@ "versus": "nodejs" }, "default-mitol": { - "setup_file": "setup-mitol", "json_url": "/json", "plaintext_url": "/plaintext", - "db_url": "/mysql/db", - "query_url": "/mysql/queries?queries=", - "update_url": "/mysql/updates?queries=", - "fortune_url": "/mysql/fortunes", + "db_url": "/db", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "fortune_url": "/fortunes", "port": 8080, "approach": "Realistic", "classification": "Platform", @@ -138,10 +132,9 @@ "versus": "nodejs" }, "mongodb-mitol": { - "setup_file": "setup-mitol", - "db_url": "/mongoose/db", - "query_url": "/mongoose/queries?queries=", - "update_url": "/mongoose/updates?queries=", + "db_url": "/db", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", "port": 8080, "approach": "Realistic", "classification": "Platform", @@ -157,72 +150,6 @@ "display_name": "nodejs-mitol", "notes": "", "versus": "nodejs" - }, - "mongodb-raw-mitol": { - "setup_file": "setup-mitol", - "db_url": "/mongodb/db", - "query_url": "/mongodb/queries?queries=", - "update_url": "/mongodb/updates?queries=", - "fortune_url": "/mongodb/fortunes", - "port": 8080, - "approach": "Realistic", - "classification": "Platform", - "database": "MongoDB", - "framework": "None", - "language": "JavaScript", - "flavor": "NodeJS", - "orm": "Raw", - "platform": "nodejs", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "nodejs-mitol", - "notes": "", - "versus": "nodejs" - }, - "mysql-mitol": { - "setup_file": "setup-mitol", - "db_url": "/sequelize/db", - "query_url": "/sequelize/queries?queries=", - "update_url": "/sequelize/updates?queries=", - "fortune_url": "/sequelize/fortunes", - "port": 8080, - "approach": "Realistic", - "classification": "Platform", - "database": "MySQL", - "framework": "None", - "language": "JavaScript", - "flavor": "NodeJS", - "orm": "Full", - "platform": "nodejs", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "nodejs-mitol", - "notes": "", - "versus": "nodejs" - }, - "postgres-mitol": { - "setup_file": "setup-mitol", - "db_url": "/sequelize-pg/db", - "query_url": "/sequelize-pg/queries?queries=", - "update_url": "/sequelize-pg/updates?queries=", - "fortune_url": "/sequelize-pg/fortunes", - "port": 8080, - "approach": "Realistic", - "classification": "Platform", - "database": "Postgres", - "framework": "None", - "language": "JavaScript", - "flavor": "NodeJS", - "orm": "Full", - "platform": "nodejs", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "nodejs-mitol", - "notes": "", - "versus": "nodejs" - } + } }] } diff --git a/frameworks/JavaScript/nodejs/handlers/mongodb-raw.js b/frameworks/JavaScript/nodejs/handlers/mongodb-raw.js index e922c8824cc..f36af9cf15d 100644 --- a/frameworks/JavaScript/nodejs/handlers/mongodb-raw.js +++ b/frameworks/JavaScript/nodejs/handlers/mongodb-raw.js @@ -5,7 +5,7 @@ const collections = { World: null, Fortune: null }; -MongoClient.connect('mongodb://TFB-database/hello_world?maxPoolSize=5', (err, db) => { +MongoClient.connect('mongodb://tfb-database/hello_world?maxPoolSize=5', (err, db) => { // do nothing if there is err connecting to db collections.World = db.collection('world'); @@ -29,10 +29,10 @@ const mongodbGetAllFortunes = (callback) => { }; const mongodbDriverUpdateQuery = (callback) => { - collections.World.findOne({id: h.randomTfbNumber()}, (err, world) => { + collections.World.findOne({ id: h.randomTfbNumber() }, (err, world) => { world.randomNumber = h.randomTfbNumber(); - collections.World.update({id: world.id}, world, (err, updated) => { - callback(err, { id: world.id, randomNumber: world.randomNumber } ); + collections.World.update({ id: world.id }, world, (err, updated) => { + callback(err, { id: world.id, randomNumber: world.randomNumber }); }); }); }; diff --git a/frameworks/JavaScript/nodejs/handlers/mongoose.js b/frameworks/JavaScript/nodejs/handlers/mongoose.js index c0bd2a55192..a968e9d2ae0 100644 --- a/frameworks/JavaScript/nodejs/handlers/mongoose.js +++ b/frameworks/JavaScript/nodejs/handlers/mongoose.js @@ -2,21 +2,21 @@ const h = require('../helper'); const async = require('async'); const Mongoose = require('mongoose'); const connection = Mongoose.connect( - 'mongodb://TFB-database/hello_world', + 'mongodb://tfb-database/hello_world', { useMongoClient: true } ); // Mongoose Setup const WorldSchema = new Mongoose.Schema({ - id : Number, - randomNumber: Number - }, { + id: Number, + randomNumber: Number +}, { collection: 'world' }); const FortuneSchema = new Mongoose.Schema({ - id: Number, - message: String - }, { + id: Number, + message: String +}, { collection: 'fortune' }); @@ -86,8 +86,8 @@ module.exports = { Worlds.update({ id: worlds[i].id }, { - randomNumber: worlds[i].randomNumber - }, callback); + randomNumber: worlds[i].randomNumber + }, callback); }); })(i); } diff --git a/frameworks/JavaScript/nodejs/handlers/mysql-raw.js b/frameworks/JavaScript/nodejs/handlers/mysql-raw.js index 4435ba47263..5fa1ea3c625 100644 --- a/frameworks/JavaScript/nodejs/handlers/mysql-raw.js +++ b/frameworks/JavaScript/nodejs/handlers/mysql-raw.js @@ -2,13 +2,13 @@ const h = require('../helper'); const async = require('async'); const mysql = require('mysql'); const connection = mysql.createConnection({ - host : 'TFB-database', - user : 'benchmarkdbuser', - password : 'benchmarkdbpass', - database : 'hello_world' + host: 'tfb-database', + user: 'benchmarkdbuser', + password: 'benchmarkdbpass', + database: 'hello_world' }); -const NodeCache = require( "node-cache" ); -const myCache = new NodeCache( { stdTTL: 0, checkperiod: 0 } ); +const NodeCache = require("node-cache"); +const myCache = new NodeCache({ stdTTL: 0, checkperiod: 0 }); let cachePopulated = false; diff --git a/frameworks/JavaScript/nodejs/handlers/sequelize-postgres.js b/frameworks/JavaScript/nodejs/handlers/sequelize-postgres.js index c644d00a702..a65372dde3a 100644 --- a/frameworks/JavaScript/nodejs/handlers/sequelize-postgres.js +++ b/frameworks/JavaScript/nodejs/handlers/sequelize-postgres.js @@ -2,7 +2,7 @@ const h = require('../helper'); const Sequelize = require('sequelize'); const sequelize = new Sequelize('hello_world', 'benchmarkdbuser', 'benchmarkdbpass', { - host: 'TFB-database', + host: 'tfb-database', dialect: 'postgres', logging: false }); @@ -14,20 +14,20 @@ const Worlds = sequelize.define('world', { }, randomnumber: { type: 'Sequelize.INTEGER' } }, { - timestamps: false, - freezeTableName: true -}); + timestamps: false, + freezeTableName: true + }); -const Fortunes = sequelize.define('Fortune', { +const Fortunes = sequelize.define('fortune', { id: { type: 'Sequelize.INTEGER', primaryKey: true }, message: { type: 'Sequelize.STRING' } }, { - timestamps: false, - freezeTableName: true -}); + timestamps: false, + freezeTableName: true + }); const randomWorldPromise = () => { return Worlds.findOne({ @@ -82,16 +82,14 @@ module.exports = { const worldUpdate = (world) => { world.randomnumber = h.randomTfbNumber(); - console.log('RANDOM NUMBER: ', world.randomnumber); - return Worlds.update({ - randomnumber: world.randomnumber - }, + randomnumber: world.randomnumber + }, { where: { id: world.id } }).then((results) => { - return world; - }).catch((err) => process.exit(1)); + return world; + }).catch((err) => process.exit(1)); }; Promise.all(worldPromises).then((worlds) => { diff --git a/frameworks/JavaScript/nodejs/handlers/sequelize.js b/frameworks/JavaScript/nodejs/handlers/sequelize.js index 543cf90b576..6b4c215f9dc 100644 --- a/frameworks/JavaScript/nodejs/handlers/sequelize.js +++ b/frameworks/JavaScript/nodejs/handlers/sequelize.js @@ -2,7 +2,7 @@ const h = require('../helper'); const Sequelize = require('sequelize'); const sequelize = new Sequelize('hello_world', 'benchmarkdbuser', 'benchmarkdbpass', { - host: 'TFB-database', + host: 'tfb-database', dialect: 'mysql', logging: false }); @@ -14,9 +14,9 @@ const Worlds = sequelize.define('World', { }, randomNumber: { type: 'Sequelize.INTEGER' } }, { - timestamps: false, - freezeTableName: true -}); + timestamps: false, + freezeTableName: true + }); const Fortunes = sequelize.define('Fortune', { id: { @@ -25,9 +25,9 @@ const Fortunes = sequelize.define('Fortune', { }, message: { type: 'Sequelize.STRING' } }, { - timestamps: false, - freezeTableName: true -}); + timestamps: false, + freezeTableName: true + }); const randomWorldPromise = () => { return Worlds.findOne({ @@ -53,7 +53,7 @@ module.exports = { for (let i = 0; i < queries; i++) { worldPromises.push(randomWorldPromise()); - } + } Promise.all(worldPromises).then((worlds) => { h.addTfbHeaders(res, 'json'); @@ -91,13 +91,13 @@ module.exports = { return Worlds.update({ randomNumber: world.randomNumber }, - { - where: { id: world.id } - }).then((results) => { - return world; - }).catch((err) => { - process.exit(1); - }); + { + where: { id: world.id } + }).then((results) => { + return world; + }).catch((err) => { + process.exit(1); + }); }; Promise.all(worldPromises).then((worlds) => { diff --git a/frameworks/JavaScript/nodejs/mitol.dockerfile b/frameworks/JavaScript/nodejs/mitol.dockerfile new file mode 100644 index 00000000000..16a2cb90c8e --- /dev/null +++ b/frameworks/JavaScript/nodejs/mitol.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN apt install -y wget +RUN npm install +RUN mkdir -p node_modules/mns & mkdir -p tmp +RUN wget -q https://github.com/Helidium/Mitol/archive/v0.0.1.tar.gz -P tmp +RUN tar -xzvf tmp/v0.0.1.tar.gz -C tmp +RUN make -C tmp/Mitol-0.0.1/node +RUN cp tmp/Mitol-0.0.1/node/dist/* node_modules/mns diff --git a/frameworks/JavaScript/nodejs/nodejs-default-mitol.dockerfile b/frameworks/JavaScript/nodejs/nodejs-default-mitol.dockerfile new file mode 100644 index 00000000000..dc459fd4e13 --- /dev/null +++ b/frameworks/JavaScript/nodejs/nodejs-default-mitol.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/mitol:0.1 + +ENV NODE_HANDLER mysql-raw + +CMD ["node", "app-mitol.js"] diff --git a/frameworks/JavaScript/nodejs/nodejs-mongodb-mitol.dockerfile b/frameworks/JavaScript/nodejs/nodejs-mongodb-mitol.dockerfile new file mode 100644 index 00000000000..d0fdbac001d --- /dev/null +++ b/frameworks/JavaScript/nodejs/nodejs-mongodb-mitol.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/mitol:0.1 + +ENV NODE_HANDLER mongoose + +CMD ["node", "app-mitol.js"] \ No newline at end of file diff --git a/frameworks/JavaScript/nodejs/nodejs-mongodb-raw.dockerfile b/frameworks/JavaScript/nodejs/nodejs-mongodb-raw.dockerfile new file mode 100644 index 00000000000..827d3653e53 --- /dev/null +++ b/frameworks/JavaScript/nodejs/nodejs-mongodb-raw.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install + +ENV NODE_HANDLER mongodb-raw + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/nodejs/nodejs-mongodb.dockerfile b/frameworks/JavaScript/nodejs/nodejs-mongodb.dockerfile new file mode 100644 index 00000000000..db6dbfbab13 --- /dev/null +++ b/frameworks/JavaScript/nodejs/nodejs-mongodb.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install + +ENV NODE_HANDLER mongoose + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/nodejs/nodejs-mysql.dockerfile b/frameworks/JavaScript/nodejs/nodejs-mysql.dockerfile new file mode 100644 index 00000000000..4dfca8dfbce --- /dev/null +++ b/frameworks/JavaScript/nodejs/nodejs-mysql.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install + +ENV NODE_HANDLER mysql-raw + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/nodejs/nodejs-postgres.dockerfile b/frameworks/JavaScript/nodejs/nodejs-postgres.dockerfile new file mode 100644 index 00000000000..7a3f34355dd --- /dev/null +++ b/frameworks/JavaScript/nodejs/nodejs-postgres.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install + +ENV NODE_HANDLER sequelize-postgres + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/nodejs/nodejs.dockerfile b/frameworks/JavaScript/nodejs/nodejs.dockerfile new file mode 100644 index 00000000000..4dfca8dfbce --- /dev/null +++ b/frameworks/JavaScript/nodejs/nodejs.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install + +ENV NODE_HANDLER mysql-raw + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/nodejs/routing.js b/frameworks/JavaScript/nodejs/routing.js index a5b4414879f..ac0896ce23c 100644 --- a/frameworks/JavaScript/nodejs/routing.js +++ b/frameworks/JavaScript/nodejs/routing.js @@ -1,12 +1,8 @@ // Intialized database connections, one for each db config // * Mongoose is a popular Node/MongoDB driver // * Sequelize is a popular Node/SQL driver -const MongodbRawHandler = require('./handlers/mongodb-raw'); -const MySQLRawHandler = require('./handlers/mysql-raw'); -const MongooseHandler = require('./handlers/mongoose'); -const SequelizeHandler = require('./handlers/sequelize'); -const SequelizePgHandler = require('./handlers/sequelize-postgres'); +const Handler = require(`./handlers/${process.env.NODE_HANDLER}`); const h = require('./helper'); module.exports.BasicHandler = ((() => { @@ -15,21 +11,8 @@ module.exports.BasicHandler = ((() => { self.routes = { '/json': h.responses.jsonSerialization, '/plaintext': h.responses.plaintext, - - '/mongoose/db': MongooseHandler.SingleQuery, - '/mongoose/fortunes': MongooseHandler.Fortunes, - - '/mongodb/db': MongodbRawHandler.SingleQuery, - '/mongodb/fortunes': MongodbRawHandler.Fortunes, - - '/sequelize/db': SequelizeHandler.SingleQuery, - '/sequelize/fortunes': SequelizeHandler.Fortunes, - - '/mysql/db': MySQLRawHandler.SingleQuery, - '/mysql/fortunes': MySQLRawHandler.Fortunes, - - '/sequelize-pg/db': SequelizePgHandler.SingleQuery, - '/sequelize-pg/fortunes': SequelizePgHandler.Fortunes + '/db': Handler.SingleQuery, + '/fortunes': Handler.Fortunes, }; self.has = (path) => self.routes[path]; @@ -43,21 +26,9 @@ module.exports.QueryHandler = ((() => { const self = {}; self.routes = { - '/mongoose/queries': MongooseHandler.MultipleQueries, - '/mongoose/updates': MongooseHandler.Updates, - - '/mongodb/queries': MongodbRawHandler.MultipleQueries, - '/mongodb/updates': MongodbRawHandler.Updates, - - '/sequelize/queries': SequelizeHandler.MultipleQueries, - '/sequelize/updates': SequelizeHandler.Updates, - - '/mysql/queries': MySQLRawHandler.MultipleQueries, - '/mysql/updates': MySQLRawHandler.Updates, - '/mysql/cached' : MySQLRawHandler.CachedQueries, - - '/sequelize-pg/queries': SequelizePgHandler.MultipleQueries, - '/sequelize-pg/updates': SequelizePgHandler.Updates + '/queries': Handler.MultipleQueries, + '/updates': Handler.Updates, + '/cached' : Handler.CachedQueries, }; self.has = (path) => self.routes[path]; diff --git a/frameworks/JavaScript/nodejs/setup-mitol.sh b/frameworks/JavaScript/nodejs/setup-mitol.sh deleted file mode 100755 index cb48f3ceebe..00000000000 --- a/frameworks/JavaScript/nodejs/setup-mitol.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -fw_depends mongodb mysql postgresql nodejs - -npm install --no-bin-links - -# Mitol installation -mkdir -p node_modules/mns & mkdir -p tmp -wget https://github.com/Helidium/Mitol/archive/v0.0.1.tar.gz -P tmp -tar -xzvf tmp/v0.0.1.tar.gz -C tmp -make -C tmp/Mitol-0.0.1/node -cp tmp/Mitol-0.0.1/node/dist/* node_modules/mns -rm -R tmp - -node app-mitol.js & diff --git a/frameworks/JavaScript/nodejs/setup.sh b/frameworks/JavaScript/nodejs/setup.sh deleted file mode 100755 index 0a8b0ddf70a..00000000000 --- a/frameworks/JavaScript/nodejs/setup.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -fw_depends mongodb mysql postgresql nodejs - -npm install --no-bin-links -node app.js & diff --git a/frameworks/JavaScript/ringojs/app/models.js b/frameworks/JavaScript/ringojs/app/models.js index a7a2474e8f0..e759f635741 100644 --- a/frameworks/JavaScript/ringojs/app/models.js +++ b/frameworks/JavaScript/ringojs/app/models.js @@ -2,40 +2,40 @@ const { Store, Cache } = require('ringo-sqlstore'); // create and configure store const connectionPool = module.singleton("connectionPool", function () { - const mysqlConnectionProperties = "?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useServerPrepStmts&enableQueryTimeouts=false&useUnbufferedIO=false&useReadAheadInput=false&maintainTimeStats=false&cacheRSMetadata=true&useSSL=false"; - return Store.initConnectionPool({ - "url": "jdbc:mysql://TFB-database/hello_world" + mysqlConnectionProperties, - "driver": "com.mysql.jdbc.Driver", - "username": "benchmarkdbuser", - "password": "benchmarkdbpass", - "minimumIdle": 10, - "maximumPoolSize": 30 - }); + const mysqlConnectionProperties = "?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useServerPrepStmts&enableQueryTimeouts=false&useUnbufferedIO=false&useReadAheadInput=false&maintainTimeStats=false&cacheRSMetadata=true&useSSL=false"; + return Store.initConnectionPool({ + "url": "jdbc:mysql://tfb-database/hello_world" + mysqlConnectionProperties, + "driver": "com.mysql.jdbc.Driver", + "username": "benchmarkdbuser", + "password": "benchmarkdbpass", + "minimumIdle": 10, + "maximumPoolSize": 30 + }); }); const store = exports.store = new Store(connectionPool); -const queryCache = module.singleton("queryCache", function() { +const queryCache = module.singleton("queryCache", function () { return new Cache(10000); }); store.setQueryCache(queryCache); // define entities in DB exports.World = store.defineEntity('World', { - table: 'World', + table: 'World', id: { column: 'id' }, - properties: { - randomNumber: 'integer' - } + properties: { + randomNumber: 'integer' + } }); const Fortune = exports.Fortune = store.defineEntity('Fortune', { - table: 'Fortune', - properties: { - message: 'string' - } + table: 'Fortune', + properties: { + message: 'string' + } }); -Fortune.sort = function(a, b) { +Fortune.sort = function (a, b) { return (a.message < b.message) ? -1 : (a.message > b.message) ? 1 : 0; }; diff --git a/frameworks/JavaScript/ringojs/benchmark_config.json b/frameworks/JavaScript/ringojs/benchmark_config.json index 3cc233acb84..5826d7b8c65 100644 --- a/frameworks/JavaScript/ringojs/benchmark_config.json +++ b/frameworks/JavaScript/ringojs/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "ringojs", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/db?queries=", @@ -25,7 +24,6 @@ "versus": "" }, "convenient": { - "setup_file": "setup-convenient", "json_url": "/json", "db_url": "/db", "query_url": "/db/", diff --git a/frameworks/JavaScript/ringojs/ringo-base.dockerfile b/frameworks/JavaScript/ringojs/ringo-base.dockerfile new file mode 100644 index 00000000000..1f9121d8047 --- /dev/null +++ b/frameworks/JavaScript/ringojs/ringo-base.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/java8:0.1 + +COPY ./ ./ + +ENV RINGOJS_VERSION="1.1.0" +ENV RINGOJS_HOME=/ringojs-$RINGOJS_VERSION + +RUN wget -q https://github.com/ringo/ringojs/releases/download/v$RINGOJS_VERSION/ringojs-$RINGOJS_VERSION.tar.gz && \ + tar xf ringojs-$RINGOJS_VERSION.tar.gz + +ENV PATH=${RINGOJS_HOME}/bin:${PATH} diff --git a/frameworks/JavaScript/ringojs/ringo-main.js b/frameworks/JavaScript/ringojs/ringo-main.js index d6ef1755689..5d229eb135a 100644 --- a/frameworks/JavaScript/ringojs/ringo-main.js +++ b/frameworks/JavaScript/ringojs/ringo-main.js @@ -1,104 +1,104 @@ const sql = require('sql-ringojs-client'); const fs = require('fs'); -exports.app = function(req) { - const path = req.pathInfo; - let connection, body; +exports.app = function (req) { + const path = req.pathInfo; + let connection, body; - if (path === '/json') { - const helloObject = { message: "Hello, World!" }; - // JSON Response Test - return { - status: 200, - headers: { "Content-Type": "application/json" }, - body: [JSON.stringify(helloObject)] - } - } + if (path === '/json') { + const helloObject = { message: "Hello, World!" }; + // JSON Response Test + return { + status: 200, + headers: { "Content-Type": "application/json" }, + body: [JSON.stringify(helloObject)] + } + } - if (path === '/db') { - let queryCount = req.env.servletRequest.getParameter('queries'); - try { - connection = datasource.getConnection(); - let randId, world; - if (!queryCount || isNaN(queryCount) || queryCount < 1) { - randId = ((Math.random() * 10000) | 0) + 1; - world = sql.query(connection, 'select * from World where World.id = ' + randId)[0]; - return { - status: 200, - headers: { "Content-Type": "application/json" }, - body: [JSON.stringify(world)] - } - } else { - queryCount = parseInt(queryCount, 10); - body = []; - for (let i = 0; i < queryCount; i++) { - randId = ((Math.random() * 10000) | 0) + 1; - world = sql.query(connection, 'select * from World where World.id = ' + randId)[0]; - body.push(world); - } - return { - status: 200, - headers: {"Content-Type": "application/json"}, - body: [JSON.stringify(body)] - } - } - } catch (e) { - connection.close(); - connection = null; - } finally { - if (connection !== null) { - connection.close(); - } - } - } + if (path === '/db') { + let queryCount = req.env.servletRequest.getParameter('queries'); + try { + connection = datasource.getConnection(); + let randId, world; + if (!queryCount || isNaN(queryCount) || queryCount < 1) { + randId = ((Math.random() * 10000) | 0) + 1; + world = sql.query(connection, 'select * from World where World.id = ' + randId)[0]; + return { + status: 200, + headers: { "Content-Type": "application/json" }, + body: [JSON.stringify(world)] + } + } else { + queryCount = parseInt(queryCount, 10); + body = []; + for (let i = 0; i < queryCount; i++) { + randId = ((Math.random() * 10000) | 0) + 1; + world = sql.query(connection, 'select * from World where World.id = ' + randId)[0]; + body.push(world); + } + return { + status: 200, + headers: { "Content-Type": "application/json" }, + body: [JSON.stringify(body)] + } + } + } catch (e) { + connection.close(); + connection = null; + } finally { + if (connection !== null) { + connection.close(); + } + } + } - if (path === '/plaintext') { - return { - status: 200, - headers: {"Content-Type": 'text/plain'}, - body: ['Hello, World!'] - }; - } + if (path === '/plaintext') { + return { + status: 200, + headers: { "Content-Type": 'text/plain' }, + body: ['Hello, World!'] + }; + } - if (path === '/updates') { - let queryCount = parseInt(req.env.servletRequest.getParameter('queries'), 10); - if (isNaN(queryCount) || queryCount < 1) { - queryCount = 1; - } else if (queryCount > 500) { - queryCount = 500; - } - try { - connection = datasource.getConnection(); - body = []; - for (let i = 0; i < queryCount; i++) { - let randId = ((Math.random() * 10000) | 0) + 1; - world = sql.query(connection, 'select * from World where World.id = ' + randId)[0]; - world.randomNumber = ((Math.random() * 10000) | 0) + 1; - sql.execute(connection, 'UPDATE World SET randomNumber = ' + world.randomNumber + ' WHERE id = ' + world.id); - body.push(world); - } - } catch (e) { - connection.close(); - connection = null; - } finally { - if (connection !== null) { - connection.close(); - } + if (path === '/updates') { + let queryCount = parseInt(req.env.servletRequest.getParameter('queries'), 10); + if (isNaN(queryCount) || queryCount < 1) { + queryCount = 1; + } else if (queryCount > 500) { + queryCount = 500; + } + try { + connection = datasource.getConnection(); + body = []; + for (let i = 0; i < queryCount; i++) { + let randId = ((Math.random() * 10000) | 0) + 1; + world = sql.query(connection, 'select * from World where World.id = ' + randId)[0]; + world.randomNumber = ((Math.random() * 10000) | 0) + 1; + sql.execute(connection, 'UPDATE World SET randomNumber = ' + world.randomNumber + ' WHERE id = ' + world.id); + body.push(world); } - return { - status: 200, - headers: {"Content-Type": "application/json; charset=UTF-8"}, - body: [JSON.stringify(body)] + } catch (e) { + connection.close(); + connection = null; + } finally { + if (connection !== null) { + connection.close(); } - } + } + return { + status: 200, + headers: { "Content-Type": "application/json; charset=UTF-8" }, + body: [JSON.stringify(body)] + } + } }; -const datasource = module.singleton('pooling-datasource', function() { +const datasource = module.singleton('pooling-datasource', function () { const mysqlConnectionProperties = "?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useServerPrepStmts&enableQueryTimeouts=false&useUnbufferedIO=false&useReadAheadInput=false&maintainTimeStats=false&cacheRSMetadata=true&useSSL=false"; - return sql.connect("jdbc:mysql://TFB-database/hello_world" + mysqlConnectionProperties, 'benchmarkdbuser', 'benchmarkdbpass'); + return sql.connect("jdbc:mysql://tfb-database/hello_world" + mysqlConnectionProperties, 'benchmarkdbuser', 'benchmarkdbpass'); }); if (require.main == module) { - require("ringo/httpserver").main(module.id); + require("ringo/httpserver").main(module.id); } diff --git a/frameworks/JavaScript/ringojs/ringojs-convenient.dockerfile b/frameworks/JavaScript/ringojs/ringojs-convenient.dockerfile new file mode 100644 index 00000000000..944f0fe912f --- /dev/null +++ b/frameworks/JavaScript/ringojs/ringojs-convenient.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/ringo-base:0.1 + +RUN ringo-admin install grob/ringo-sqlstore && \ + ringo-admin install ringo/stick && \ + ringo-admin install orfon/reinhardt && \ + (cd $RINGOJS_HOME/packages/ringo-sqlstore/jars && curl -s -O https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.39/mysql-connector-java-5.1.39.jar) + +CMD ["ringo", "--production", "-J-server", "-J-Xmx1g", "-J-Xms1g", "ringo-convenient-main.js", "--host", "0.0.0.0"] diff --git a/frameworks/JavaScript/ringojs/ringojs.dockerfile b/frameworks/JavaScript/ringojs/ringojs.dockerfile new file mode 100644 index 00000000000..ee159b7ce5e --- /dev/null +++ b/frameworks/JavaScript/ringojs/ringojs.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/ringo-base:0.1 + +RUN ringo-admin install oberhamsi/sql-ringojs-client && \ + ringo-admin install orfon/reinhardt && \ + (cd $RINGOJS_HOME/packages/sql-ringojs-client/jars && curl -s -o mysql.jar https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.39/mysql-connector-java-5.1.39.jar) + +CMD ["ringo", "--production", "-J-server", "-J-Xmx1g", "-J-Xms1g", "ringo-main.js", "--host", "0.0.0.0"] diff --git a/frameworks/JavaScript/ringojs/setup-convenient.sh b/frameworks/JavaScript/ringojs/setup-convenient.sh deleted file mode 100755 index 59077b63a08..00000000000 --- a/frameworks/JavaScript/ringojs/setup-convenient.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends mysql java8 ringojs - -rm -rf $RINGOJS_HOME/packages/* -ringo-admin install grob/ringo-sqlstore -ringo-admin install ringo/stick -ringo-admin install orfon/reinhardt - -(cd $RINGOJS_HOME/packages/ringo-sqlstore/jars && curl -s -O https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.39/mysql-connector-java-5.1.39.jar) - -ringo --production -J-server -J-Xmx1g -J-Xms1g ringo-convenient-main.js --host 0.0.0.0 diff --git a/frameworks/JavaScript/ringojs/setup.sh b/frameworks/JavaScript/ringojs/setup.sh deleted file mode 100755 index ab3e6e276a9..00000000000 --- a/frameworks/JavaScript/ringojs/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql java8 ringojs - -rm -rf $RINGOJS_HOME/packages/* -ringo-admin install oberhamsi/sql-ringojs-client -ringo-admin install orfon/reinhardt -(cd $RINGOJS_HOME/packages/sql-ringojs-client/jars && curl -s -o mysql.jar https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.39/mysql-connector-java-5.1.39.jar) - -ringo --production -J-server -J-Xmx1g -J-Xms1g ringo-main.js --host 0.0.0.0 diff --git a/frameworks/JavaScript/sailsjs/.gitignore b/frameworks/JavaScript/sailsjs/.gitignore deleted file mode 100644 index b8075effefb..00000000000 --- a/frameworks/JavaScript/sailsjs/.gitignore +++ /dev/null @@ -1,118 +0,0 @@ -################################################ -############### .gitignore ################## -################################################ -# -# This file is only relevant if you are using git. -# -# Files which match the splat patterns below will -# be ignored by git. This keeps random crap and -# and sensitive credentials from being uploaded to -# your repository. It allows you to configure your -# app for your machine without accidentally -# committing settings which will smash the local -# settings of other developers on your team. -# -# Some reasonable defaults are included below, -# but, of course, you should modify/extend/prune -# to fit your needs! -################################################ - - - - -################################################ -# Local Configuration -# -# Explicitly ignore files which contain: -# -# 1. Sensitive information you'd rather not push to -# your git repository. -# e.g., your personal API keys or passwords. -# -# 2. Environment-specific configuration -# Basically, anything that would be annoying -# to have to change every time you do a -# `git pull` -# e.g., your local development database, or -# the S3 bucket you're using for file uploads -# development. -# -################################################ - -config/local.js - - - - - -################################################ -# Dependencies -# -# When releasing a production app, you may -# consider including your node_modules and -# bower_components directory in your git repo, -# but during development, its best to exclude it, -# since different developers may be working on -# different kernels, where dependencies would -# need to be recompiled anyway. -# -# More on that here about node_modules dir: -# http://www.futurealoof.com/posts/nodemodules-in-git.html -# (credit Mikeal Rogers, @mikeal) -# -# About bower_components dir, you can see this: -# http://addyosmani.com/blog/checking-in-front-end-dependencies/ -# (credit Addy Osmani, @addyosmani) -# -################################################ - -node_modules -bower_components - - - - -################################################ -# Sails.js / Waterline / Grunt -# -# Files generated by Sails and Grunt, or related -# tasks and adapters. -################################################ -.tmp -dump.rdb - - - - - -################################################ -# Node.js / NPM -# -# Common files generated by Node, NPM, and the -# related ecosystem. -################################################ -lib-cov -*.seed -*.log -*.out -*.pid -npm-debug.log - - - - - -################################################ -# Miscellaneous -# -# Common files generated by text editors, -# operating systems, file systems, etc. -################################################ - -*~ -*# -.DS_STORE -.netbeans -nbproject -.idea -.node_history diff --git a/frameworks/JavaScript/sailsjs/api/controllers/.gitkeep b/frameworks/JavaScript/sailsjs/api/controllers/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/JavaScript/sailsjs/api/controllers/RedisController.js b/frameworks/JavaScript/sailsjs/api/controllers/RedisController.js deleted file mode 100644 index 92dff33bf79..00000000000 --- a/frameworks/JavaScript/sailsjs/api/controllers/RedisController.js +++ /dev/null @@ -1,136 +0,0 @@ -/** - * RedisController - * - * @description :: Connects to Redis using the node_redis and hiredis drivers - * Handles redis routes - * "If hiredis [pure C library] is installed, node_redis will use it by default. - * Otherwise, a pure JavaScript parser will be used." - * >> hiredis is installed for these tests - */ - -var h = require('../services/helper') -var Promise = require('bluebird') -// Can treat redis library as one that supports Promises -// these methods will then have "-Async" appended to them. -var redis = Promise.promisifyAll(require('redis')) -var client = redis.createClient(6379, '127.0.0.1', {}) - -client.on('error', function (err) { - console.log('Redis Error: ' + err) - // Do nothing further if Redis errors/is unavailable -}); - -function redisWorldId(id) { - return 'world:' + id -} - -function randomWorldPromise() { - var id = h.randomTfbNumber() - var redisId = redisWorldId(id) - - var promise = client.getAsync(redisId) - .then(function (worldValue) { - return { - id: id, - randomNumber: worldValue - } - }) - .catch(function (err) { - console.log(err.stack) - }) - return promise -} - -function redisSetWorld(world) { - var redisId = redisWorldId(world.id) - var promise = client - .setAsync(redisId, world.randomNumber) - .then(function (result) { - return world - }) - .catch(function (err) { - console.log(err.stack) - }) - return promise -} - -function redisGetAllFortunes() { - var promise = client - .lrangeAsync('fortunes', 0, -1) - .then(function (fortuneMessages) { - var fortunes = fortuneMessages.map(function (e, i) { - return { id: i + 1, message: e } - }) - return fortunes; - }) - .catch(function (err) { - console.log(err.stack) - }) - return promise -} - - -module.exports = { - - Single: function(req, res) { - randomWorldPromise() - .then(function (world) { - res.json(world) - }) - .catch(function (err) { - console.log(err.stack) - }) - }, - - Multiple: function(req, res) { - var queries = h.getQueries(req) - var worldPromises = [] - - for (var i = 0; i < queries; i++) { - worldPromises.push(randomWorldPromise()) - } - - Promise - .all(worldPromises) - .then(function (worlds) { - res.json(worlds) - }); - }, - - Fortunes: function(req, res) { - redisGetAllFortunes() - .then(function (fortunes) { - fortunes.push(h.additionalFortune()) - fortunes.sort(function (a, b) { - return a.message.localeCompare(b.message) - }) - res.render('fortunes', { fortunes: fortunes }) - }) - .catch(function (err) { - console.log(err.stack) - }) - }, - - Updates: function(req, res) { - var queries = h.getQueries(req) - var worldPromises = [] - - for (var i = 0; i < queries; i++) { - worldPromises.push(randomWorldPromise()) - } - - Promise - .all(worldPromises) - .map(function (world) { - world.randomNumber = h.randomTfbNumber() - return redisSetWorld(world) - }) - .then(function (updated) { - res.json(updated) - }) - .catch(function (err) { - console.log(err.stack) - }) - } - -}; \ No newline at end of file diff --git a/frameworks/JavaScript/sailsjs/api/controllers/SequelizeMySQLController.js b/frameworks/JavaScript/sailsjs/api/controllers/SequelizeMySQLController.js index edd875035d2..59b952ad423 100644 --- a/frameworks/JavaScript/sailsjs/api/controllers/SequelizeMySQLController.js +++ b/frameworks/JavaScript/sailsjs/api/controllers/SequelizeMySQLController.js @@ -11,7 +11,7 @@ var Sequelize = require('sequelize') var sequelize = new Sequelize( 'hello_world', 'benchmarkdbuser', 'benchmarkdbpass', { - host: '127.0.0.1', + host: 'tfb-database', dialect: 'mysql', pool: { max: 5000, @@ -25,33 +25,33 @@ var sequelize = new Sequelize( var Worlds = sequelize.define('world', { id: { - type: Sequelize.INTEGER, - primaryKey: true + type: Sequelize.INTEGER, + primaryKey: true }, randomNumber: Sequelize.INTEGER }, -{ - // prevents sequelize from assuming the table is called 'Worlds' - freezeTableName: true, - timestamps: false -}) + { + // prevents sequelize from assuming the table is called 'Worlds' + freezeTableName: true, + timestamps: false + }) var Fortunes = sequelize.define('Fortune', { id: { - type: Sequelize.INTEGER, - primaryKey: true + type: Sequelize.INTEGER, + primaryKey: true }, message: Sequelize.STRING }, -{ - // prevents sequelize from assuming the table is called 'Fortunes' - freezeTableName: true, - timestamps: false -}) + { + // prevents sequelize from assuming the table is called 'Fortunes' + freezeTableName: true, + timestamps: false + }) -var randomWorldPromise = function() { +var randomWorldPromise = function () { var promise = Worlds .findOne({ where: { id: h.randomTfbNumber() } @@ -65,7 +65,7 @@ var randomWorldPromise = function() { return promise } -var updateWorld = function(world) { +var updateWorld = function (world) { world.randomNumber = h.randomTfbNumber() var promise = Worlds .update( @@ -87,7 +87,7 @@ module.exports = { /** * Test 2: Single Database Query */ - Single: function(req, res) { + Single: function (req, res) { randomWorldPromise() .then(function (world) { res.json(world) @@ -98,7 +98,7 @@ module.exports = { /** * Test 3: Multiple Database Query */ - Multiple: function(req, res) { + Multiple: function (req, res) { var queries = h.getQueries(req) var toRun = [] @@ -117,7 +117,7 @@ module.exports = { /** * Test 4: Fortunes */ - Fortunes: function(req, res) { + Fortunes: function (req, res) { Fortunes .findAll() .then(function (fortunes) { @@ -136,7 +136,7 @@ module.exports = { /** * Test 5: Database Updates */ - Updates: function(req, res) { + Updates: function (req, res) { var queries = h.getQueries(req); var worldPromises = []; diff --git a/frameworks/JavaScript/sailsjs/api/controllers/SequelizePostgresController.js b/frameworks/JavaScript/sailsjs/api/controllers/SequelizePostgresController.js index 3efb0a9be52..418e6e41868 100644 --- a/frameworks/JavaScript/sailsjs/api/controllers/SequelizePostgresController.js +++ b/frameworks/JavaScript/sailsjs/api/controllers/SequelizePostgresController.js @@ -11,7 +11,7 @@ var Sequelize = require('sequelize') var sequelize = new Sequelize( 'hello_world', 'benchmarkdbuser', 'benchmarkdbpass', { - host: '127.0.0.1', + host: 'tfb-database', dialect: 'postgres', pool: { max: 5000, @@ -25,36 +25,36 @@ var sequelize = new Sequelize( var Worlds = sequelize.define('world', { id: { - type: Sequelize.INTEGER, - primaryKey: true + type: Sequelize.INTEGER, + primaryKey: true }, randomNumber: { - type: Sequelize.INTEGER, - field: 'randomnumber' + type: Sequelize.INTEGER, + field: 'randomnumber' } }, -{ - // prevents sequelize from assuming the table is called 'Worlds' - freezeTableName: true, - timestamps: false -}) + { + // prevents sequelize from assuming the table is called 'Worlds' + freezeTableName: true, + timestamps: false + }) -var Fortunes = sequelize.define('Fortune', { +var Fortunes = sequelize.define('fortune', { id: { - type: Sequelize.INTEGER, - primaryKey: true + type: Sequelize.INTEGER, + primaryKey: true }, message: Sequelize.STRING }, -{ - // prevents sequelize from assuming the table is called 'Fortunes' - freezeTableName: true, - timestamps: false -}) + { + // prevents sequelize from assuming the table is called 'Fortunes' + freezeTableName: true, + timestamps: false + }) -var randomWorldPromise = function() { +var randomWorldPromise = function () { var promise = Worlds .findOne({ where: { id: h.randomTfbNumber() } @@ -68,7 +68,7 @@ var randomWorldPromise = function() { return promise } -var updateWorld = function(world) { +var updateWorld = function (world) { world.randomNumber = h.randomTfbNumber() var promise = Worlds .update( @@ -91,7 +91,7 @@ module.exports = { /** * Test 2: Single Database Query */ - Single: function(req, res) { + Single: function (req, res) { randomWorldPromise() .then(function (world) { res.json(world) @@ -102,7 +102,7 @@ module.exports = { /** * Test 3: Multiple Database Query */ - Multiple: function(req, res) { + Multiple: function (req, res) { var queries = h.getQueries(req) var toRun = [] @@ -121,7 +121,7 @@ module.exports = { /** * Test 4: Fortunes */ - Fortunes: function(req, res) { + Fortunes: function (req, res) { Fortunes .findAll() .then(function (fortunes) { @@ -140,7 +140,7 @@ module.exports = { /** * Test 5: Database Updates */ - Updates: function(req, res) { + Updates: function (req, res) { var queries = h.getQueries(req) var worldPromises = [] diff --git a/frameworks/JavaScript/sailsjs/api/services/.gitkeep b/frameworks/JavaScript/sailsjs/api/services/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/JavaScript/sailsjs/benchmark_config.json b/frameworks/JavaScript/sailsjs/benchmark_config.json index 990881e7ddd..b7a39eb05b0 100644 --- a/frameworks/JavaScript/sailsjs/benchmark_config.json +++ b/frameworks/JavaScript/sailsjs/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "sailsjs", "tests": [{ "default": { - "setup_file": "setup-mysql", "json_url": "/json", "db_url": "/mysql/db", "query_url": "/mysql/queries?queries=", @@ -26,7 +25,6 @@ "versus": "nodejs" }, "postgres": { - "setup_file": "setup-postgresql", "db_url": "/postgres/db", "query_url": "/postgres/queries?queries=", "update_url": "/postgres/updates?queries=", diff --git a/frameworks/JavaScript/sailsjs/package.json b/frameworks/JavaScript/sailsjs/package.json index b941efa0882..429d92ef4d2 100644 --- a/frameworks/JavaScript/sailsjs/package.json +++ b/frameworks/JavaScript/sailsjs/package.json @@ -9,12 +9,10 @@ "bluebird": "3.4.1", "ejs": "2.5.7", "handlebars": "4.0.5", - "hiredis": "0.5.0", "mysql": "2.11.0", "pg": "6.0.2", "pg-hstore": "2.3.2", "rc": "1.1.6", - "redis": "2.6.2", "sails": "0.12.3", "sails-disk": "0.10.10", "sequelize": "3.23.4" diff --git a/frameworks/JavaScript/sailsjs/sailsjs-postgres.dockerfile b/frameworks/JavaScript/sailsjs/sailsjs-postgres.dockerfile new file mode 100644 index 00000000000..3542bac5ef8 --- /dev/null +++ b/frameworks/JavaScript/sailsjs/sailsjs-postgres.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install -g sails +RUN npm install + +CMD ["sails", "lift", "--port", "8080"] diff --git a/frameworks/JavaScript/sailsjs/sailsjs.dockerfile b/frameworks/JavaScript/sailsjs/sailsjs.dockerfile new file mode 100644 index 00000000000..3542bac5ef8 --- /dev/null +++ b/frameworks/JavaScript/sailsjs/sailsjs.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/nodejs8:0.1 + +COPY ./ ./ + +RUN npm install -g sails +RUN npm install + +CMD ["sails", "lift", "--port", "8080"] diff --git a/frameworks/JavaScript/sailsjs/setup-mysql.sh b/frameworks/JavaScript/sailsjs/setup-mysql.sh deleted file mode 100644 index 49fe2646c7e..00000000000 --- a/frameworks/JavaScript/sailsjs/setup-mysql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends mysql - -source ./setup.sh diff --git a/frameworks/JavaScript/sailsjs/setup-postgresql.sh b/frameworks/JavaScript/sailsjs/setup-postgresql.sh deleted file mode 100644 index af9ca304e8a..00000000000 --- a/frameworks/JavaScript/sailsjs/setup-postgresql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends postgresql - -source ./setup.sh diff --git a/frameworks/JavaScript/sailsjs/setup.sh b/frameworks/JavaScript/sailsjs/setup.sh deleted file mode 100644 index 281308e4e7e..00000000000 --- a/frameworks/JavaScript/sailsjs/setup.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -fw_depends nodejs - -sed -i 's|127.0.0.1|'"${DBHOST}"'|g' api/controllers/RedisController.js -sed -i 's|127.0.0.1|'"${DBHOST}"'|g' api/controllers/SequelizeMySQLController.js -sed -i 's|127.0.0.1|'"${DBHOST}"'|g' api/controllers/SequelizePostgresController.js - -# let us run sails directly -npm install -g sails - -# reset cache & run app -npm install -sails lift --port 8080 & diff --git a/frameworks/Kotlin/hexagon/benchmark_config.json b/frameworks/Kotlin/hexagon/benchmark_config.json index 0bdf178f7ca..7de924ebdac 100644 --- a/frameworks/Kotlin/hexagon/benchmark_config.json +++ b/frameworks/Kotlin/hexagon/benchmark_config.json @@ -22,10 +22,9 @@ "database_os": "Linux", "display_name": "Hexagon Jetty MongoDB", "notes": "http://hexagonkt.com", - "setup_file": "setup_jetty_mongodb", "versus": "servlet" }, - "undertow_mongodb": { + "undertow-mongodb": { "json_url": "/json", "db_url": "/db", "query_url": "/query?queries=", @@ -45,10 +44,9 @@ "database_os": "Linux", "display_name": "Hexagon Undertow MongoDB", "notes": "http://hexagonkt.com", - "setup_file": "setup_undertow_mongodb", "versus": "servlet" }, - "jetty_postgresql": { + "jetty-postgresql": { "json_url": "/json", "db_url": "/db", "query_url": "/query?queries=", @@ -68,10 +66,9 @@ "database_os": "Linux", "display_name": "Hexagon Jetty PostgreSQL", "notes": "http://hexagonkt.com", - "setup_file": "setup_jetty_postgresql", "versus": "servlet" }, - "undertow_postgresql": { + "undertow-postgresql": { "json_url": "/json", "db_url": "/db", "query_url": "/query?queries=", @@ -91,7 +88,6 @@ "database_os": "Linux", "display_name": "Hexagon Undertow PostgreSQL", "notes": "http://hexagonkt.com", - "setup_file": "setup_undertow_postgresql", "versus": "servlet" } } diff --git a/frameworks/Kotlin/hexagon/build.gradle b/frameworks/Kotlin/hexagon/build.gradle index 41ad129bd44..2a7a020419b 100644 --- a/frameworks/Kotlin/hexagon/build.gradle +++ b/frameworks/Kotlin/hexagon/build.gradle @@ -1,6 +1,6 @@ plugins { - id 'org.jetbrains.kotlin.jvm' version '1.2.0' + id 'org.jetbrains.kotlin.jvm' version '1.2.31' } apply from: "$gradleScripts/kotlin.gradle" diff --git a/frameworks/Kotlin/hexagon/gradle.properties b/frameworks/Kotlin/hexagon/gradle.properties index 74d0e33f778..d618c895acc 100644 --- a/frameworks/Kotlin/hexagon/gradle.properties +++ b/frameworks/Kotlin/hexagon/gradle.properties @@ -1,12 +1,12 @@ activationVersion=1.2.0 -ahcVersion=2.0.37 +ahcVersion=2.4.4 description=Hexagon web framework's benchmark gradleScripts=https\://raw.githubusercontent.com/hexagonkt/hexagon/0.20.0/gradle hexagonVersion=0.20.0 -hikariVersion=2.7.4 -jettyVersion=9.4.8.v20171121 -kotlinVersion=1.2.0 +hikariVersion=2.7.8 +jettyVersion=9.4.9.v20180320 +kotlinVersion=1.2.31 logbackVersion=1.2.3 -mongodbVersion=3.5.0 -postgresqlVersion=42.1.4 -testngVersion=6.13.1 +mongodbVersion=3.6.3 +postgresqlVersion=42.2.2 +testngVersion=6.14.3 diff --git a/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.jar b/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 7a3265ee94c..00000000000 Binary files a/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties b/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 0e680f3759f..00000000000 --- a/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-bin.zip diff --git a/frameworks/Kotlin/hexagon/gradlew b/frameworks/Kotlin/hexagon/gradlew deleted file mode 100755 index cccdd3d517f..00000000000 --- a/frameworks/Kotlin/hexagon/gradlew +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env sh - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/frameworks/Kotlin/hexagon/gradlew.bat b/frameworks/Kotlin/hexagon/gradlew.bat deleted file mode 100644 index f9553162f12..00000000000 --- a/frameworks/Kotlin/hexagon/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/frameworks/Kotlin/hexagon/hexagon-jetty-postgresql.dockerfile b/frameworks/Kotlin/hexagon/hexagon-jetty-postgresql.dockerfile new file mode 100644 index 00000000000..273f6ecedf8 --- /dev/null +++ b/frameworks/Kotlin/hexagon/hexagon-jetty-postgresql.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/java:0.1 +FROM techempower/gradle:0.1 + +ADD ./ /hexagon +WORKDIR /hexagon +RUN gradle -x test +ENV DBSTORE postgresql +ENV WEBENGINE jetty +CMD build/install/hexagon/bin/hexagon diff --git a/frameworks/Kotlin/hexagon/hexagon-undertow-mongodb.dockerfile b/frameworks/Kotlin/hexagon/hexagon-undertow-mongodb.dockerfile new file mode 100644 index 00000000000..0ea18b5b184 --- /dev/null +++ b/frameworks/Kotlin/hexagon/hexagon-undertow-mongodb.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/java:0.1 +FROM techempower/gradle:0.1 + +ADD ./ /hexagon +WORKDIR /hexagon +RUN gradle -x test +ENV DBSTORE mongodb +ENV WEBENGINE undertow +CMD build/install/hexagon/bin/hexagon diff --git a/frameworks/Kotlin/hexagon/hexagon-undertow-postgresql.dockerfile b/frameworks/Kotlin/hexagon/hexagon-undertow-postgresql.dockerfile new file mode 100644 index 00000000000..50822e0c3ab --- /dev/null +++ b/frameworks/Kotlin/hexagon/hexagon-undertow-postgresql.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/java:0.1 +FROM techempower/gradle:0.1 + +ADD ./ /hexagon +WORKDIR /hexagon +RUN gradle -x test +ENV DBSTORE postgresql +ENV WEBENGINE undertow +CMD build/install/hexagon/bin/hexagon diff --git a/frameworks/Kotlin/hexagon/hexagon.dockerfile b/frameworks/Kotlin/hexagon/hexagon.dockerfile new file mode 100644 index 00000000000..96712eb41db --- /dev/null +++ b/frameworks/Kotlin/hexagon/hexagon.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/java:0.1 +FROM techempower/gradle:0.1 + +ADD ./ /hexagon +WORKDIR /hexagon +RUN gradle -x test +ENV DBSTORE mongodb +ENV WEBENGINE jetty +CMD build/install/hexagon/bin/hexagon diff --git a/frameworks/Kotlin/hexagon/setup_jetty_mongodb.sh b/frameworks/Kotlin/hexagon/setup_jetty_mongodb.sh deleted file mode 100644 index dbe0a50cf43..00000000000 --- a/frameworks/Kotlin/hexagon/setup_jetty_mongodb.sh +++ /dev/null @@ -1,9 +0,0 @@ - -#!/bin/bash - -fw_depends java mongodb - -./gradlew -x test -export DBSTORE='mongodb' -export WEBENGINE='jetty' -nohup build/install/hexagon/bin/hexagon & diff --git a/frameworks/Kotlin/hexagon/setup_jetty_postgresql.sh b/frameworks/Kotlin/hexagon/setup_jetty_postgresql.sh deleted file mode 100644 index bf3aa53ee7f..00000000000 --- a/frameworks/Kotlin/hexagon/setup_jetty_postgresql.sh +++ /dev/null @@ -1,9 +0,0 @@ - -#!/bin/bash - -fw_depends java postgresql - -./gradlew -x test -export DBSTORE='postgresql' -export WEBENGINE='jetty' -nohup build/install/hexagon/bin/hexagon & diff --git a/frameworks/Kotlin/hexagon/setup_resin_mongodb.sh b/frameworks/Kotlin/hexagon/setup_resin_mongodb.sh deleted file mode 100644 index e9a7b7d4847..00000000000 --- a/frameworks/Kotlin/hexagon/setup_resin_mongodb.sh +++ /dev/null @@ -1,13 +0,0 @@ - -#!/bin/bash - -fw_depends java mongodb - -./gradlew -x test -export DBSTORE='mongodb' -export WEBENGINE='resin' - -rm -rf $RESIN_HOME/webapps/* -cp build/libs/ROOT.war $RESIN_HOME/webapps -resinctl console - diff --git a/frameworks/Kotlin/hexagon/setup_resin_postgresql.sh b/frameworks/Kotlin/hexagon/setup_resin_postgresql.sh deleted file mode 100644 index 3f601cdd87a..00000000000 --- a/frameworks/Kotlin/hexagon/setup_resin_postgresql.sh +++ /dev/null @@ -1,13 +0,0 @@ - -#!/bin/bash - -fw_depends java postgresql - -./gradlew -x test -export DBSTORE='postgresql' -export WEBENGINE='resin' - -rm -rf $RESIN_HOME/webapps/* -cp build/libs/ROOT.war $RESIN_HOME/webapps -resinctl console - diff --git a/frameworks/Kotlin/hexagon/setup_undertow_mongodb.sh b/frameworks/Kotlin/hexagon/setup_undertow_mongodb.sh deleted file mode 100644 index 627ab516ce0..00000000000 --- a/frameworks/Kotlin/hexagon/setup_undertow_mongodb.sh +++ /dev/null @@ -1,9 +0,0 @@ - -#!/bin/bash - -fw_depends java mongodb - -./gradlew -x test -export DBSTORE='mongodb' -export WEBENGINE='undertow' -nohup build/install/hexagon/bin/hexagon & diff --git a/frameworks/Kotlin/hexagon/setup_undertow_postgresql.sh b/frameworks/Kotlin/hexagon/setup_undertow_postgresql.sh deleted file mode 100644 index a67d4c86199..00000000000 --- a/frameworks/Kotlin/hexagon/setup_undertow_postgresql.sh +++ /dev/null @@ -1,9 +0,0 @@ - -#!/bin/bash - -fw_depends java postgresql - -./gradlew -x test -export DBSTORE='postgresql' -export WEBENGINE='undertow' -nohup build/install/hexagon/bin/hexagon & diff --git a/frameworks/Kotlin/http4k/README.md b/frameworks/Kotlin/http4k/README.md index b15fdd1a8be..495b12ef932 100644 --- a/frameworks/Kotlin/http4k/README.md +++ b/frameworks/Kotlin/http4k/README.md @@ -16,7 +16,6 @@ The tests were run with: ## How to run ```bash -./gradlew clean build jetty -java -jar build/libs/http4k-standalone.jar & +gradle clean build jetty +java -jar build/libs/http4k-standalone.jar ``` - diff --git a/frameworks/Kotlin/http4k/benchmark_config.json b/frameworks/Kotlin/http4k/benchmark_config.json index 14cba021dde..a34ad140078 100755 --- a/frameworks/Kotlin/http4k/benchmark_config.json +++ b/frameworks/Kotlin/http4k/benchmark_config.json @@ -3,7 +3,6 @@ "tests": [ { "default": { - "setup_file": "setup_jetty", "orm": "Raw", "database_os": "Linux", "db_url": "/db", @@ -21,12 +20,10 @@ "platform": "servlet", "webserver": "None", "os": "Linux", - "display_name": "http4k-jetty", "notes": "", "versus": "servlet" }, "undertow": { - "setup_file": "setup_undertow", "orm": "Raw", "database_os": "Linux", "db_url": "/db", @@ -44,12 +41,10 @@ "platform": "undertow", "webserver": "None", "os": "Linux", - "display_name": "http4k-undertow", "notes": "", "versus": "undertow" }, "netty": { - "setup_file": "setup_netty", "orm": "Raw", "database_os": "Linux", "db_url": "/db", @@ -67,12 +62,10 @@ "platform": "netty", "webserver": "None", "os": "Linux", - "display_name": "http4k-netty", "notes": "", "versus": "netty" }, - "apache-httpcore": { - "setup_file": "setup_apache", + "apache": { "orm": "Raw", "database_os": "Linux", "db_url": "/db", @@ -90,12 +83,10 @@ "platform": "apache-httpcore", "webserver": "None", "os": "Linux", - "display_name": "http4k-apache-httpcore", "notes": "", "versus": "servlet" }, "sunhttp": { - "setup_file": "setup_sunhttp", "orm": "Raw", "database_os": "Linux", "db_url": "/db", @@ -113,7 +104,6 @@ "platform": "sun-http", "webserver": "None", "os": "Linux", - "display_name": "http4k-sunhttp", "notes": "", "versus": "servlet" } diff --git a/frameworks/Kotlin/http4k/build.gradle b/frameworks/Kotlin/http4k/build.gradle index d545038c0a9..fc78081817b 100644 --- a/frameworks/Kotlin/http4k/build.gradle +++ b/frameworks/Kotlin/http4k/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = "1.2.20" + ext.kotlin_version = "1.2.31" ext.http4k_version = "3.17.0" repositories { diff --git a/frameworks/Kotlin/http4k/core/src/main/kotlin/Http4kBenchmarkServer.kt b/frameworks/Kotlin/http4k/core/src/main/kotlin/Http4kBenchmarkServer.kt index 19c38a558cf..c66247624a0 100644 --- a/frameworks/Kotlin/http4k/core/src/main/kotlin/Http4kBenchmarkServer.kt +++ b/frameworks/Kotlin/http4k/core/src/main/kotlin/Http4kBenchmarkServer.kt @@ -20,7 +20,7 @@ object Http4kBenchmarkServer { } } - private val database = Database("TFB-database") + private val database = Database("tfb-database") fun start(config: ServerConfig) = headers.then( routes( diff --git a/frameworks/Kotlin/http4k/gradle/wrapper/gradle-wrapper.jar b/frameworks/Kotlin/http4k/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index acd871a404f..00000000000 Binary files a/frameworks/Kotlin/http4k/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/frameworks/Kotlin/http4k/gradle/wrapper/gradle-wrapper.properties b/frameworks/Kotlin/http4k/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 62ec7159cc9..00000000000 --- a/frameworks/Kotlin/http4k/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Thu Nov 30 09:10:45 PST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-all.zip diff --git a/frameworks/Kotlin/http4k/gradlew b/frameworks/Kotlin/http4k/gradlew deleted file mode 100755 index 4453ccea33d..00000000000 --- a/frameworks/Kotlin/http4k/gradlew +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env sh - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save ( ) { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/frameworks/Kotlin/http4k/gradlew.bat b/frameworks/Kotlin/http4k/gradlew.bat deleted file mode 100644 index f9553162f12..00000000000 --- a/frameworks/Kotlin/http4k/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/frameworks/Kotlin/http4k/http4k-apache.dockerfile b/frameworks/Kotlin/http4k/http4k-apache.dockerfile new file mode 100644 index 00000000000..371a3ae9462 --- /dev/null +++ b/frameworks/Kotlin/http4k/http4k-apache.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/java:0.1 +FROM techempower/gradle:0.1 + +ADD ./ /http4k +WORKDIR /http4k +RUN gradle clean build apache:uber +CMD java \ + -server \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -XX:+AlwaysPreTouch \ + -jar apache/build/libs/http4k-apache-benchmark.jar diff --git a/frameworks/Kotlin/http4k/http4k-netty.dockerfile b/frameworks/Kotlin/http4k/http4k-netty.dockerfile new file mode 100644 index 00000000000..1297d32484d --- /dev/null +++ b/frameworks/Kotlin/http4k/http4k-netty.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/java:0.1 +FROM techempower/gradle:0.1 + +ADD ./ /http4k +WORKDIR /http4k +RUN gradle clean build netty:uber +CMD java \ + -server \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -XX:+AlwaysPreTouch \ + -jar netty/build/libs/http4k-netty-benchmark.jar diff --git a/frameworks/Kotlin/http4k/http4k-sunhttp.dockerfile b/frameworks/Kotlin/http4k/http4k-sunhttp.dockerfile new file mode 100644 index 00000000000..dd5ebf6292f --- /dev/null +++ b/frameworks/Kotlin/http4k/http4k-sunhttp.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/java:0.1 +FROM techempower/gradle:0.1 + +ADD ./ /http4k +WORKDIR /http4k +RUN gradle clean build sunhttp:uber +CMD java \ + -server \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -XX:+AlwaysPreTouch \ + -jar sunhttp/build/libs/http4k-sunhttp-benchmark.jar diff --git a/frameworks/Kotlin/http4k/http4k-undertow.dockerfile b/frameworks/Kotlin/http4k/http4k-undertow.dockerfile new file mode 100644 index 00000000000..fa72c23e626 --- /dev/null +++ b/frameworks/Kotlin/http4k/http4k-undertow.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/java:0.1 +FROM techempower/gradle:0.1 + +ADD ./ /http4k +WORKDIR /http4k +RUN gradle clean build undertow:uber +CMD java \ + -server \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -XX:+AlwaysPreTouch \ + -jar undertow/build/libs/http4k-undertow-benchmark.jar diff --git a/frameworks/Kotlin/http4k/http4k.dockerfile b/frameworks/Kotlin/http4k/http4k.dockerfile new file mode 100644 index 00000000000..182d0d08bca --- /dev/null +++ b/frameworks/Kotlin/http4k/http4k.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/java:0.1 +FROM techempower/gradle:0.1 + +ADD ./ /http4k +WORKDIR /http4k +RUN gradle clean build jetty:uber +CMD java \ + -server \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -XX:+AlwaysPreTouch \ + -jar jetty/build/libs/http4k-jetty-benchmark.jar diff --git a/frameworks/Kotlin/http4k/setup_apache.sh b/frameworks/Kotlin/http4k/setup_apache.sh deleted file mode 100755 index e78f95ac5cc..00000000000 --- a/frameworks/Kotlin/http4k/setup_apache.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql java - -./gradlew clean build apache:uber - -java -server -XX:+UseNUMA -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+AlwaysPreTouch -jar apache/build/libs/http4k-apache-benchmark.jar & diff --git a/frameworks/Kotlin/http4k/setup_jetty.sh b/frameworks/Kotlin/http4k/setup_jetty.sh deleted file mode 100755 index 77eaed985ac..00000000000 --- a/frameworks/Kotlin/http4k/setup_jetty.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql java - -./gradlew clean build jetty:uber - -java -server -XX:+UseNUMA -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+AlwaysPreTouch -jar jetty/build/libs/http4k-jetty-benchmark.jar & diff --git a/frameworks/Kotlin/http4k/setup_netty.sh b/frameworks/Kotlin/http4k/setup_netty.sh deleted file mode 100755 index 1d98ed360bd..00000000000 --- a/frameworks/Kotlin/http4k/setup_netty.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql java - -./gradlew clean build netty:uber - -java -server -XX:+UseNUMA -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+AlwaysPreTouch -jar netty/build/libs/http4k-netty-benchmark.jar & diff --git a/frameworks/Kotlin/http4k/setup_sunhttp.sh b/frameworks/Kotlin/http4k/setup_sunhttp.sh deleted file mode 100755 index 171d771b1a6..00000000000 --- a/frameworks/Kotlin/http4k/setup_sunhttp.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql java - -./gradlew clean build sunhttp:uber - -java -server -XX:+UseNUMA -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+AlwaysPreTouch -jar sunhttp/build/libs/http4k-sunhttp-benchmark.jar & diff --git a/frameworks/Kotlin/http4k/setup_undertow.sh b/frameworks/Kotlin/http4k/setup_undertow.sh deleted file mode 100755 index 21c882c0d01..00000000000 --- a/frameworks/Kotlin/http4k/setup_undertow.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql java - -./gradlew clean build undertow:uber - -java -server -XX:+UseNUMA -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+AlwaysPreTouch -jar undertow/build/libs/http4k-undertow-benchmark.jar & diff --git a/frameworks/Kotlin/ktor/.mvn/wrapper/maven-wrapper.jar b/frameworks/Kotlin/ktor/.mvn/wrapper/maven-wrapper.jar deleted file mode 100644 index c6feb8bb6f7..00000000000 Binary files a/frameworks/Kotlin/ktor/.mvn/wrapper/maven-wrapper.jar and /dev/null differ diff --git a/frameworks/Kotlin/ktor/.mvn/wrapper/maven-wrapper.properties b/frameworks/Kotlin/ktor/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index c3150437037..00000000000 --- a/frameworks/Kotlin/ktor/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1 +0,0 @@ -distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip diff --git a/frameworks/Kotlin/ktor/benchmark_config.json b/frameworks/Kotlin/ktor/benchmark_config.json index 127672ac008..75691a1c57f 100644 --- a/frameworks/Kotlin/ktor/benchmark_config.json +++ b/frameworks/Kotlin/ktor/benchmark_config.json @@ -11,7 +11,6 @@ "fortune_url": "/fortunes", "port": 9090, - "setup_file": "setup-netty", "approach": "Realistic", "classification": "Micro", "database": "MySQL", @@ -35,7 +34,6 @@ "fortune_url": "/fortunes", "port": 9090, - "setup_file": "setup-jetty", "approach": "Realistic", "classification": "Micro", "database": "MySQL", @@ -59,7 +57,6 @@ "fortune_url": "/fortunes", "port": 9090, - "setup_file": "setup-cio", "approach": "Realistic", "classification": "Micro", "database": "MySQL", diff --git a/frameworks/Kotlin/ktor/ktor-base.dockerfile b/frameworks/Kotlin/ktor/ktor-base.dockerfile new file mode 100644 index 00000000000..5eb6c5b3a88 --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor-base.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/maven:0.1 + +ADD ./ /ktor +WORKDIR /ktor +RUN mvn clean package diff --git a/frameworks/Kotlin/ktor/ktor-cio.dockerfile b/frameworks/Kotlin/ktor/ktor-cio.dockerfile new file mode 100644 index 00000000000..582df9450be --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor-cio.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/ktor-base:0.1 + +CMD java -jar target/tech-empower-framework-benchmark-1.0-SNAPSHOT-cio-bundle.jar diff --git a/frameworks/Kotlin/ktor/ktor-jetty.dockerfile b/frameworks/Kotlin/ktor/ktor-jetty.dockerfile new file mode 100644 index 00000000000..5b542cb42e1 --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor-jetty.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/ktor-base:0.1 + +CMD java -jar target/tech-empower-framework-benchmark-1.0-SNAPSHOT-jetty-bundle.jar diff --git a/frameworks/Kotlin/ktor/ktor.dockerfile b/frameworks/Kotlin/ktor/ktor.dockerfile new file mode 100644 index 00000000000..b1a94da4edb --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/ktor-base:0.1 + +CMD java -jar target/tech-empower-framework-benchmark-1.0-SNAPSHOT-netty-bundle.jar diff --git a/frameworks/Kotlin/ktor/mvnw b/frameworks/Kotlin/ktor/mvnw deleted file mode 100755 index fc7efd17d01..00000000000 --- a/frameworks/Kotlin/ktor/mvnw +++ /dev/null @@ -1,234 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Maven2 Start Up Batch script -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir -# -# Optional ENV vars -# ----------------- -# M2_HOME - location of maven2's installed home dir -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files -# ---------------------------------------------------------------------------- - -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi - -fi - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false -case "`uname`" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # - # Look for the Apple JDKs first to preserve the existing behaviour, and then look - # for the new JDKs provided by Oracle. - # - if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then - # - # Apple JDKs - # - export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home - fi - - if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then - # - # Apple JDKs - # - export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home - fi - - if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then - # - # Oracle JDKs - # - export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home - fi - - if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then - # - # Apple JDKs - # - export JAVA_HOME=`/usr/libexec/java_home` - fi - ;; -esac - -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=`java-config --jre-home` - fi -fi - -if [ -z "$M2_HOME" ] ; then - ## resolve links - $0 may be a link to maven's home - PRG="$0" - - # need this for relative symlinks - while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG="`dirname "$PRG"`/$link" - fi - done - - saveddir=`pwd` - - M2_HOME=`dirname "$PRG"`/.. - - # make it fully qualified - M2_HOME=`cd "$M2_HOME" && pwd` - - cd "$saveddir" - # echo Using m2 at $M2_HOME -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --unix "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` -fi - -# For Migwn, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$M2_HOME" ] && - M2_HOME="`(cd "$M2_HOME"; pwd)`" - [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" - # TODO classpath? -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="`which javac`" - if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=`which readlink` - if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then - if $darwin ; then - javaHome="`dirname \"$javaExecutable\"`" - javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" - else - javaExecutable="`readlink -f \"$javaExecutable\"`" - fi - javaHome="`dirname \"$javaExecutable\"`" - javaHome=`expr "$javaHome" : '\(.*\)/bin'` - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="`which java`" - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --path --windows "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` -fi - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - local basedir=$(pwd) - local wdir=$(pwd) - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - wdir=$(cd "$wdir/.."; pwd) - done - echo "${basedir}" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - echo "$(tr -s '\n' ' ' < "$1")" - fi -} - -export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)} -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -exec "$JAVACMD" \ - $MAVEN_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CMD_LINE_ARGS - diff --git a/frameworks/Kotlin/ktor/pom.xml b/frameworks/Kotlin/ktor/pom.xml index 0eb11bc04bd..7da28fe368a 100644 --- a/frameworks/Kotlin/ktor/pom.xml +++ b/frameworks/Kotlin/ktor/pom.xml @@ -14,11 +14,11 @@ UTF-8 2.8.2 - 2.7.4 - 1.2.21 - 0.9.2-alpha-1 + 2.7.8 + 1.2.31 + 0.9.2-alpha-5 1.2.3 - 5.1.44 + 5.1.46 diff --git a/frameworks/Kotlin/ktor/setup-cio.sh b/frameworks/Kotlin/ktor/setup-cio.sh deleted file mode 100755 index 7de7a85c2df..00000000000 --- a/frameworks/Kotlin/ktor/setup-cio.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql java maven - -./mvnw clean package -nohup java -jar target/tech-empower-framework-benchmark-1.0-SNAPSHOT-cio-bundle.jar & - diff --git a/frameworks/Kotlin/ktor/setup-jetty.sh b/frameworks/Kotlin/ktor/setup-jetty.sh deleted file mode 100755 index 11a11671277..00000000000 --- a/frameworks/Kotlin/ktor/setup-jetty.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql java maven - -./mvnw clean package -nohup java -jar target/tech-empower-framework-benchmark-1.0-SNAPSHOT-jetty-bundle.jar & - diff --git a/frameworks/Kotlin/ktor/setup-netty.sh b/frameworks/Kotlin/ktor/setup-netty.sh deleted file mode 100755 index 18d1f0303e9..00000000000 --- a/frameworks/Kotlin/ktor/setup-netty.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql java maven - -./mvnw clean package -nohup java -jar target/tech-empower-framework-benchmark-1.0-SNAPSHOT-netty-bundle.jar & - diff --git a/frameworks/Kotlin/ktor/src/main/kotlin/org/jetbrains/ktor/benchmarks/Hello.kt b/frameworks/Kotlin/ktor/src/main/kotlin/org/jetbrains/ktor/benchmarks/Hello.kt index 15b9c3f0453..a83dd1d4cd7 100644 --- a/frameworks/Kotlin/ktor/src/main/kotlin/org/jetbrains/ktor/benchmarks/Hello.kt +++ b/frameworks/Kotlin/ktor/src/main/kotlin/org/jetbrains/ktor/benchmarks/Hello.kt @@ -161,7 +161,7 @@ fun ApplicationCall.queries() = try { private fun hikari(): DataSource { val config = HikariConfig() - config.jdbcUrl = "jdbc:mysql://TFB-database:3306/hello_world?useSSL=false" + config.jdbcUrl = "jdbc:mysql://tfb-database:3306/hello_world?useSSL=false" config.username = "benchmarkdbuser" config.password = "benchmarkdbpass" config.addDataSourceProperty("cachePrepStmts", "true") diff --git a/frameworks/Kotlin/ktor/src/main/resources/logback.xml b/frameworks/Kotlin/ktor/src/main/resources/logback.xml index aa8536464e2..9fd0f518971 100644 --- a/frameworks/Kotlin/ktor/src/main/resources/logback.xml +++ b/frameworks/Kotlin/ktor/src/main/resources/logback.xml @@ -5,11 +5,17 @@ + + true + + + + - + - \ No newline at end of file + diff --git a/frameworks/Kotlin/pronghorn/benchmark_config.json b/frameworks/Kotlin/pronghorn/benchmark_config.json index e723ccc4a5e..08304aed01f 100644 --- a/frameworks/Kotlin/pronghorn/benchmark_config.json +++ b/frameworks/Kotlin/pronghorn/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "pronghorn", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "db_url": "/db", diff --git a/frameworks/Kotlin/pronghorn/build.gradle b/frameworks/Kotlin/pronghorn/build.gradle index 73b35ff97b7..2f99c271b12 100644 --- a/frameworks/Kotlin/pronghorn/build.gradle +++ b/frameworks/Kotlin/pronghorn/build.gradle @@ -4,7 +4,7 @@ version '0.1.0' buildscript { ext { pronghornVersion = '0.1.3' - kotlinVersion = '1.2.0' + kotlinVersion = '1.2.31' } repositories { diff --git a/frameworks/Kotlin/pronghorn/gradle/wrapper/gradle-wrapper.jar b/frameworks/Kotlin/pronghorn/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 7a3265ee94c..00000000000 Binary files a/frameworks/Kotlin/pronghorn/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/frameworks/Kotlin/pronghorn/gradle/wrapper/gradle-wrapper.properties b/frameworks/Kotlin/pronghorn/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index fc77f6f62ce..00000000000 --- a/frameworks/Kotlin/pronghorn/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Thu Nov 30 08:22:29 PST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-all.zip diff --git a/frameworks/Kotlin/pronghorn/gradlew b/frameworks/Kotlin/pronghorn/gradlew deleted file mode 100755 index cccdd3d517f..00000000000 --- a/frameworks/Kotlin/pronghorn/gradlew +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env sh - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/frameworks/Kotlin/pronghorn/gradlew.bat b/frameworks/Kotlin/pronghorn/gradlew.bat deleted file mode 100755 index f9553162f12..00000000000 --- a/frameworks/Kotlin/pronghorn/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/frameworks/Kotlin/pronghorn/pronghorn.dockerfile b/frameworks/Kotlin/pronghorn/pronghorn.dockerfile new file mode 100644 index 00000000000..a2f408fb517 --- /dev/null +++ b/frameworks/Kotlin/pronghorn/pronghorn.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/java:0.1 +FROM techempower/gradle:0.1 + +ADD ./ /pronghorn +WORKDIR /pronghorn +CMD gradle --no-daemon clean run diff --git a/frameworks/Kotlin/pronghorn/setup.sh b/frameworks/Kotlin/pronghorn/setup.sh deleted file mode 100755 index b07f2734212..00000000000 --- a/frameworks/Kotlin/pronghorn/setup.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends java mongodb - -./gradlew --no-daemon clean run diff --git a/frameworks/Kotlin/pronghorn/src/main/kotlin/pronghorn/utils/TestConfig.kt b/frameworks/Kotlin/pronghorn/src/main/kotlin/pronghorn/utils/TestConfig.kt index 58382403f9e..09ef4fdeefd 100644 --- a/frameworks/Kotlin/pronghorn/src/main/kotlin/pronghorn/utils/TestConfig.kt +++ b/frameworks/Kotlin/pronghorn/src/main/kotlin/pronghorn/utils/TestConfig.kt @@ -7,7 +7,7 @@ object TestConfig { private val properties = parsePropertiesConfig() val listenHost = properties.getProperty("listenHost", "0.0.0.0") val listenPort = getIntProperty("listenPort", 8080) - val dbHost = properties.getProperty("dbHost", "TFB-database") + val dbHost = properties.getProperty("dbHost", "tfb-database") val dbPort = getIntProperty("dbPort", 27017) val dbName = properties.getProperty("dbName", "hello_world") val fortunesCollectionName = properties.getProperty("fortunesCollectionName", "fortune") diff --git a/frameworks/Kotlin/pronghorn/src/main/resources/benchmark.properties b/frameworks/Kotlin/pronghorn/src/main/resources/benchmark.properties index 3446e43d4c8..0e62ae9b53c 100644 --- a/frameworks/Kotlin/pronghorn/src/main/resources/benchmark.properties +++ b/frameworks/Kotlin/pronghorn/src/main/resources/benchmark.properties @@ -1,6 +1,6 @@ listenHost=0.0.0.0 listenPort=8080 -dbHost=TFB-database +dbHost=tfb-database dbPort=27017 dbName=hello_world fortunesCollectionName=fortune diff --git a/frameworks/Lua/lapis/.gitignore b/frameworks/Lua/lapis/.gitignore deleted file mode 100755 index db6f312da9e..00000000000 --- a/frameworks/Lua/lapis/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -logs -nginx.conf.compiled \ No newline at end of file diff --git a/frameworks/Lua/lapis/benchmark_config.json b/frameworks/Lua/lapis/benchmark_config.json index f697c5a04fc..19b0e556944 100644 --- a/frameworks/Lua/lapis/benchmark_config.json +++ b/frameworks/Lua/lapis/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "lapis", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Lua/lapis/config.lua b/frameworks/Lua/lapis/config.lua index f1631d55a7b..57bbfe31643 100644 --- a/frameworks/Lua/lapis/config.lua +++ b/frameworks/Lua/lapis/config.lua @@ -14,6 +14,6 @@ return config({ database("hello_world") user("benchmarkdbuser") password("benchmarkdbpass") - return host(os.getenv("DBHOST")) + return host("DBHOSTNAME") end) end) diff --git a/frameworks/Lua/lapis/config.moon b/frameworks/Lua/lapis/config.moon index 660a4c9a3bb..7a1815f535a 100644 --- a/frameworks/Lua/lapis/config.moon +++ b/frameworks/Lua/lapis/config.moon @@ -12,4 +12,4 @@ config {"production", "development"}, -> database "hello_world" user "benchmarkdbuser" password "benchmarkdbpass" - host os.getenv("DBHOST") + host DBHOSTNAME diff --git a/frameworks/Lua/lapis/lapis.dockerfile b/frameworks/Lua/lapis/lapis.dockerfile new file mode 100644 index 00000000000..bd05e16e824 --- /dev/null +++ b/frameworks/Lua/lapis/lapis.dockerfile @@ -0,0 +1,14 @@ +FROM techempower/openresty-server:0.1 + +COPY ./ ./ + +RUN luarocks install lua-resty-template +RUN luarocks install lapis + +# RUN DBHOST=`getent hosts tfb-database | awk '{ print $1 }'` sed -i 's|DBHOSTNAME|$DBHOST|g' nginx.conf + +CMD export DBIP=`getent hosts tfb-database | awk '{ print $1 }'` && \ + sed -i "s|DBHOSTNAME|$DBIP|g" nginx.conf && \ + sed -i "s|DBHOSTNAME|$DBIP|g" config.moon && \ + sed -i "s|DBHOSTNAME|$DBIP|g" config.lua && \ + lapis server production diff --git a/frameworks/Lua/lapis/nginx.conf b/frameworks/Lua/lapis/nginx.conf index 1a10e181a1a..4e8bcea6218 100644 --- a/frameworks/Lua/lapis/nginx.conf +++ b/frameworks/Lua/lapis/nginx.conf @@ -17,7 +17,7 @@ lua_package_path 'CWD/?.lua;;'; upstream database { - postgres_server TFB-database dbname=hello_world user=benchmarkdbuser password=benchmarkdbpass; + postgres_server DBHOSTNAME dbname=hello_world user=benchmarkdbuser password=benchmarkdbpass; } init_by_lua 'require "resty.core"; lapis = require "lapis.init"'; server { diff --git a/frameworks/Lua/lapis/setup.sh b/frameworks/Lua/lapis/setup.sh deleted file mode 100755 index 091f1e11384..00000000000 --- a/frameworks/Lua/lapis/setup.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -fw_depends postgresql lua luarocks openresty - -luarocks install lapis -lapis server production & diff --git a/frameworks/Lua/octopus/.gitignore b/frameworks/Lua/octopus/.gitignore deleted file mode 100644 index ff4a68bb115..00000000000 --- a/frameworks/Lua/octopus/.gitignore +++ /dev/null @@ -1 +0,0 @@ -octopus \ No newline at end of file diff --git a/frameworks/Lua/octopus/benchmark_config.json b/frameworks/Lua/octopus/benchmark_config.json index b4904de3ebf..56962d6aab3 100644 --- a/frameworks/Lua/octopus/benchmark_config.json +++ b/frameworks/Lua/octopus/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "octopus", "tests": [{ "default": { - "setup_file": "setup", "plaintext_url": "/plaintext", "json_url": "/json", "db_url": "/db", diff --git a/frameworks/Lua/octopus/config.lua b/frameworks/Lua/octopus/config.lua index 0a836fa6d92..80276c4b277 100644 --- a/frameworks/Lua/octopus/config.lua +++ b/frameworks/Lua/octopus/config.lua @@ -11,7 +11,7 @@ return { port = 8080, securePort = 38080, luaCodeCache = "on", - serverName = "localhost", + serverName = "tfb-server", errorLog = "error_log logs/error.log;", accessLog = "access_log logs/access.log;", includeDrop = [[#include drop.conf;]], diff --git a/frameworks/Lua/octopus/octopus.dockerfile b/frameworks/Lua/octopus/octopus.dockerfile new file mode 100644 index 00000000000..913c6fa685a --- /dev/null +++ b/frameworks/Lua/octopus/octopus.dockerfile @@ -0,0 +1,30 @@ +FROM techempower/lua:0.1 + +WORKDIR /octo + +RUN git clone https://github.com/cyberz-eu/octopus.git + +WORKDIR /octo/octopus +# Dec 8th, 2017 +RUN git checkout 44c7e7ecdfd9e95703e73df85815c0cca4b441e8 + +WORKDIR /octo + +ADD ./ /octo + +RUN cp -avr app octopus/extensions +RUN cp -vf config.lua octopus/extensions + +WORKDIR /octo/octopus/bin/unix + +RUN chmod +x *.sh + +RUN sed -i 's|wget|wget -q|g' server.sh +RUN sed -i 's|-c nginx.conf|-c nginx.conf -g "daemon off;"|g' server.sh + +RUN ./server.sh install +RUN ./server.sh build + +CMD export DBIP=`getent hosts tfb-database | awk '{ print $1 }'` && \ + sed -i "s|DBHOSTNAME|$DBIP|g" /octo/octopus/extensions/build/src/types.lua && \ + ./server.sh start diff --git a/frameworks/Lua/octopus/setup.sh b/frameworks/Lua/octopus/setup.sh deleted file mode 100644 index 0f546b221dd..00000000000 --- a/frameworks/Lua/octopus/setup.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -fw_depends mysql lua - -rm -rf octopus -git clone https://github.com/cyberz-eu/octopus.git -cd octopus -# January 4th, 2017 -git checkout 0c4fc42198fed3a299c78d4b910188113d478bc5 -cd .. - -# The following line is a hacky way to get this framework working. -# zlib fix needs to happen within the framework owner's repo -sed -i 's|zlib_url=http://zlib.net/zlib-$zlib_version.tar.gz|zlib_url=https://github.com/madler/zlib/archive/v$zlib_version.tar.gz|g' octopus/bin/unix/server.sh - -cp -avr app octopus/extensions -cp -vf config.lua octopus/extensions - -sed -i 's|DBHOSTNAME|'"${DBHOST}"'|g' octopus/extensions/config.lua - -cd octopus/bin/unix -. ./server.sh install -. ./server.sh build -. ./server.sh start diff --git a/frameworks/Lua/openresty/app.lua b/frameworks/Lua/openresty/app.lua index 1113c61d7a3..2283d89488f 100644 --- a/frameworks/Lua/openresty/app.lua +++ b/frameworks/Lua/openresty/app.lua @@ -13,7 +13,7 @@ template.caching(false) local view = template.compile([[Fortunes{% for _,f in ipairs(fortunes) do %}{% end %}
idmessage
{{ f.id }}{{ f.message }}
]], nil, true) local mysqlconn = { - host = os.getenv("DBHOST"), + host = os.getenv("DBIP"), port = 3306, database = "hello_world", user = "benchmarkdbuser", diff --git a/frameworks/Lua/openresty/benchmark_config.json b/frameworks/Lua/openresty/benchmark_config.json index 931c8088fb2..6b32f71f3de 100644 --- a/frameworks/Lua/openresty/benchmark_config.json +++ b/frameworks/Lua/openresty/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "openresty", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Lua/openresty/nginx.conf b/frameworks/Lua/openresty/nginx.conf index 1cf3c2c20e4..33c16396bf1 100644 --- a/frameworks/Lua/openresty/nginx.conf +++ b/frameworks/Lua/openresty/nginx.conf @@ -1,5 +1,6 @@ pid /tmp/nginx.pid; error_log stderr error; +daemon off; events { worker_connections 16384; @@ -8,7 +9,7 @@ events { http { resolver 127.0.0.1; access_log off; - lua_package_path 'CWD/?.lua;;'; + lua_package_path '/openresty/?.lua;;'; init_by_lua_block { jit.opt.start("minstitch=10") require "resty.core" diff --git a/frameworks/Lua/openresty/openresty.dockerfile b/frameworks/Lua/openresty/openresty.dockerfile new file mode 100644 index 00000000000..e8e64186d4c --- /dev/null +++ b/frameworks/Lua/openresty/openresty.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/openresty-server:0.1 + +ADD ./nginx.conf /openresty/ +ADD ./app.lua /openresty/ + +WORKDIR /openresty + +RUN luarocks install lua-resty-template + +CMD export DBIP=`getent hosts tfb-database | awk '{ print $1 }'` && \ + nginx -c /openresty/nginx.conf -g "worker_processes '"$(nproc)"';" diff --git a/frameworks/Lua/openresty/setup.sh b/frameworks/Lua/openresty/setup.sh deleted file mode 100755 index cc35e74ec47..00000000000 --- a/frameworks/Lua/openresty/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -sed -i 's|CWD|'"${TROOT}"'|g' nginx.conf -sed -i 's|DBHOSTNAME|'"${DBHOST}"'|g' app.lua - -fw_depends mysql lua luarocks openresty - -luarocks install lua-resty-template - -nginx -c $TROOT/nginx.conf -g "worker_processes '"${CPU_COUNT}"';" & diff --git a/frameworks/Nim/jester/.gitignore b/frameworks/Nim/jester/.gitignore deleted file mode 100644 index e92569d0101..00000000000 --- a/frameworks/Nim/jester/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/hello diff --git a/frameworks/Nim/jester/benchmark_config.json b/frameworks/Nim/jester/benchmark_config.json index 671670467f8..a5a6af2b05c 100644 --- a/frameworks/Nim/jester/benchmark_config.json +++ b/frameworks/Nim/jester/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "jester", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "port": 8080, "approach": "Realistic", diff --git a/frameworks/Nim/jester/jester.dockerfile b/frameworks/Nim/jester/jester.dockerfile new file mode 100644 index 00000000000..34d4fa36e1f --- /dev/null +++ b/frameworks/Nim/jester/jester.dockerfile @@ -0,0 +1,16 @@ +FROM techempower/nimble:0.1 + +# 2015-06-25 +RUN git clone https://github.com/dom96/jester.git && \ + cd jester && \ + git checkout 71b8cc069a0d271d619c2dc41bc6479047885587 && \ + nimble update && \ + echo 'y' | nimble install + +ENV JESTER_HOME=/jester + +COPY ./ ./ + +RUN chmod a+wrx start-servers.sh + +CMD ./start-servers.sh diff --git a/frameworks/Nim/jester/public/.gitkeep b/frameworks/Nim/jester/public/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/Nim/jester/setup.sh b/frameworks/Nim/jester/setup.sh deleted file mode 100755 index 64a9b35bfa1..00000000000 --- a/frameworks/Nim/jester/setup.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -fw_depends mysql nim jester nginx - -nim c -d:release hello.nim -nginx -c $TROOT/config/nginx.conf - -current=9000 -end=9008 -while [ $current -lt $end ]; do - ./hello $current & - let current=current+1 -done diff --git a/frameworks/Nim/jester/start-servers.sh b/frameworks/Nim/jester/start-servers.sh new file mode 100644 index 00000000000..e1452f01976 --- /dev/null +++ b/frameworks/Nim/jester/start-servers.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +nim c -d:release hello.nim +nginx -c /config/nginx.conf + +current=9000 +end=9008 +while [ $current -lt $end ]; do + ./hello $current & + let current=current+1 +done + +wait diff --git a/frameworks/PHP/cakephp/.gitignore b/frameworks/PHP/cakephp/.gitignore deleted file mode 100644 index a47bcf46083..00000000000 --- a/frameworks/PHP/cakephp/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -app/tmp -/plugins -/build -/dist -.DS_Store -/tags -app/Vendor -deploy/php-fpm.pid diff --git a/frameworks/PHP/cakephp/README-cake.md b/frameworks/PHP/cakephp/README-cake.md deleted file mode 100755 index 611729f0874..00000000000 --- a/frameworks/PHP/cakephp/README-cake.md +++ /dev/null @@ -1,39 +0,0 @@ -CakePHP -======= - -[![CakePHP](http://cakephp.org/img/cake-logo.png)](http://www.cakephp.org) - -CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC. -Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. - -Some Handy Links ----------------- - -[CakePHP](http://www.cakephp.org) - The rapid development PHP framework - -[Cookbook](http://book.cakephp.org) - THE Cake user documentation; start learning here! - -[Plugins](http://plugins.cakephp.org/) - A repository of extensions to the framework - -[The Bakery](http://bakery.cakephp.org) - Tips, tutorials and articles - -[API](http://api.cakephp.org) - A reference to Cake's classes - -[CakePHP TV](http://tv.cakephp.org) - Screen casts from events and video tutorials - -[The Cake Software Foundation](http://cakefoundation.org/) - promoting development related to CakePHP - -Get Support! ------------- - -[Our Google Group](http://groups.google.com/group/cake-php) - community mailing list and forum - -[#cakephp](http://webchat.freenode.net/?channels=#cakephp) on irc.freenode.net - Come chat with us, we have cake. - -[Q & A](http://ask.cakephp.org/) - Ask questions here, all questions welcome - -[Lighthouse](http://cakephp.lighthouseapp.com/) - Got issues? Please tell us! - -[![Bake Status](https://secure.travis-ci.org/cakephp/cakephp.png?branch=master)](http://travis-ci.org/cakephp/cakephp) - -![Cake Power](https://raw.github.com/cakephp/cakephp/master/lib/Cake/Console/Templates/skel/webroot/img/cake.power.gif) diff --git a/frameworks/PHP/cakephp/README.md b/frameworks/PHP/cakephp/README.md index 04d015fe790..35579be0d62 100644 --- a/frameworks/PHP/cakephp/README.md +++ b/frameworks/PHP/cakephp/README.md @@ -46,3 +46,43 @@ http://localhost/index.php/queries?queries=2 ### Variable Update Test http://localhost/index.php/updates?queries=2 + +CakePHP +======= + +[![CakePHP](http://cakephp.org/img/cake-logo.png)](http://www.cakephp.org) + +CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC. +Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. + +Some Handy Links +---------------- + +[CakePHP](http://www.cakephp.org) - The rapid development PHP framework + +[Cookbook](http://book.cakephp.org) - THE Cake user documentation; start learning here! + +[Plugins](http://plugins.cakephp.org/) - A repository of extensions to the framework + +[The Bakery](http://bakery.cakephp.org) - Tips, tutorials and articles + +[API](http://api.cakephp.org) - A reference to Cake's classes + +[CakePHP TV](http://tv.cakephp.org) - Screen casts from events and video tutorials + +[The Cake Software Foundation](http://cakefoundation.org/) - promoting development related to CakePHP + +Get Support! +------------ + +[Our Google Group](http://groups.google.com/group/cake-php) - community mailing list and forum + +[#cakephp](http://webchat.freenode.net/?channels=#cakephp) on irc.freenode.net - Come chat with us, we have cake. + +[Q & A](http://ask.cakephp.org/) - Ask questions here, all questions welcome + +[Lighthouse](http://cakephp.lighthouseapp.com/) - Got issues? Please tell us! + +[![Bake Status](https://secure.travis-ci.org/cakephp/cakephp.png?branch=master)](http://travis-ci.org/cakephp/cakephp) + +![Cake Power](https://raw.github.com/cakephp/cakephp/master/lib/Cake/Console/Templates/skel/webroot/img/cake.power.gif) diff --git a/frameworks/PHP/cakephp/app/Config/database.php b/frameworks/PHP/cakephp/app/Config/database.php index 1f80b08229a..9192324b0d6 100755 --- a/frameworks/PHP/cakephp/app/Config/database.php +++ b/frameworks/PHP/cakephp/app/Config/database.php @@ -62,7 +62,7 @@ class DATABASE_CONFIG { public $default = array( 'datasource' => 'Database/Mysql', 'persistent' => false, - 'host' => 'localhost', + 'host' => 'tfb-database', 'login' => 'benchmarkdbuser', 'password' => 'benchmarkdbpass', 'database' => 'hello_world', @@ -73,7 +73,7 @@ class DATABASE_CONFIG { public $test = array( 'datasource' => 'Database/Mysql', 'persistent' => false, - 'host' => 'localhost', + 'host' => 'tfb-database', 'login' => 'benchmarkdbuser', 'password' => 'benchmarkdbpass', 'database' => 'hello_world', diff --git a/frameworks/PHP/cakephp/app/tmp/cache/models/.gitkeep b/frameworks/PHP/cakephp/app/tmp/cache/models/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/PHP/cakephp/app/tmp/cache/persistent/.gitkeep b/frameworks/PHP/cakephp/app/tmp/cache/persistent/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/PHP/cakephp/benchmark_config.json b/frameworks/PHP/cakephp/benchmark_config.json index d08d340be2e..5d7e85240b5 100644 --- a/frameworks/PHP/cakephp/benchmark_config.json +++ b/frameworks/PHP/cakephp/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "cakephp", "tests": [{ "default": { - "setup_file": "setup_php5", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -26,4 +25,4 @@ "versus": "php-php5" } }] -} \ No newline at end of file +} diff --git a/frameworks/PHP/cakephp/cakephp.dockerfile b/frameworks/PHP/cakephp/cakephp.dockerfile new file mode 100644 index 00000000000..20f8bfc2453 --- /dev/null +++ b/frameworks/PHP/cakephp/cakephp.dockerfile @@ -0,0 +1,14 @@ +FROM techempower/php5:0.1 + +ADD ./ /cakephp +WORKDIR /cakephp + +RUN mkdir -p app/tmp/cache/models +RUN mkdir -p app/tmp/cache/persistent +RUN mkdir -p app/tmp/logs +RUN chmod -R 777 app/tmp + +RUN composer.phar install --no-progress + +CMD service php5.6-fpm start && \ + nginx -c /cakephp/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/cakephp/deploy/nginx.conf b/frameworks/PHP/cakephp/deploy/nginx.conf index 12386800d9c..0e6cc792d86 100644 --- a/frameworks/PHP/cakephp/deploy/nginx.conf +++ b/frameworks/PHP/cakephp/deploy/nginx.conf @@ -1,3 +1,4 @@ +user root; worker_processes auto; events { @@ -7,7 +8,7 @@ events { } http { - include /home/vagrant/FrameworkBenchmarks/installs/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; access_log off; server_tokens off; @@ -35,7 +36,7 @@ http { upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/var/run/php/php5.6-fpm.sock; keepalive 50; } @@ -43,22 +44,20 @@ http { listen 8080; server_name localhost; - root /home/vagrant/FrameworkBenchmarks/frameworks/PHP/cakephp/app/webroot/; + root /cakephp/app/webroot/; index index.php; location / { try_files $uri $uri/ /index.php?$uri&$args; } - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # location ~ \.php$ { try_files $uri =404; fastcgi_pass fastcgi_backend; fastcgi_keep_conn on; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /home/vagrant/FrameworkBenchmarks/installs/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } } } diff --git a/frameworks/PHP/cakephp/setup.sh b/frameworks/PHP/cakephp/setup.sh deleted file mode 100755 index 9880a9434e7..00000000000 --- a/frameworks/PHP/cakephp/setup.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 composer nginx - -sed -i "s|'host' => '.*'|'host' => '${DBHOST}'|g" app/Config/database.php -sed -i 's|REDISSERVER|'${DBHOST}'|g' app/Config/core.php -sed -i 's|root .*/FrameworkBenchmarks/frameworks/PHP/cakephp|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/home/vagrant/FrameworkBenchmarks/installs/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid - -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/cakephp/setup_php5.sh b/frameworks/PHP/cakephp/setup_php5.sh deleted file mode 100755 index 7d0edff5850..00000000000 --- a/frameworks/PHP/cakephp/setup_php5.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends mysql php5 composer nginx - -sed -i "s|'host' => '.*'|'host' => '${DBHOST}'|g" app/Config/database.php -sed -i 's|REDISSERVER|'${DBHOST}'|g' app/Config/core.php -sed -i 's|root .*/FrameworkBenchmarks/frameworks/PHP/cakephp|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/home/vagrant/FrameworkBenchmarks/installs/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid - -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/clancats/app/config/database.config.php b/frameworks/PHP/clancats/app/config/database.config.php index 057cc1cfb88..d9c7c687f8d 100755 --- a/frameworks/PHP/clancats/app/config/database.config.php +++ b/frameworks/PHP/clancats/app/config/database.config.php @@ -16,7 +16,7 @@ 'driver' => 'mysql', // auth - 'host' => 'localhost', + 'host' => 'tfb-database', 'user' => 'benchmarkdbuser', 'pass' => 'benchmarkdbpass', 'charset' => 'utf8' diff --git a/frameworks/PHP/clancats/benchmark_config.json b/frameworks/PHP/clancats/benchmark_config.json index 1406fa4e5d3..0693adbcb9d 100644 --- a/frameworks/PHP/clancats/benchmark_config.json +++ b/frameworks/PHP/clancats/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "clancats", "tests": [{ "default": { - "setup_file": "setup", "plaintext_url": "/plaintext", "json_url": "/json", "db_url": "/db", diff --git a/frameworks/PHP/clancats/clancats.dockerfile b/frameworks/PHP/clancats/clancats.dockerfile new file mode 100644 index 00000000000..8ba241bd793 --- /dev/null +++ b/frameworks/PHP/clancats/clancats.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/php5:0.1 + +ADD ./ /clancats +WORKDIR /clancats + +RUN composer.phar install --no-progress + +RUN git clone --branch v2.0.6 https://github.com/ClanCats/Framework.git clancatsapp +RUN cp -r app/ clancatsapp/CCF/ +RUN cp -r vendor/ clancatsapp/CCF/ + +CMD service php5.6-fpm start && \ + nginx -c /clancats/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/clancats/deploy/nginx.conf b/frameworks/PHP/clancats/deploy/nginx.conf index cf56e37ac0a..f92130a2f65 100644 --- a/frameworks/PHP/clancats/deploy/nginx.conf +++ b/frameworks/PHP/clancats/deploy/nginx.conf @@ -1,5 +1,5 @@ +user root; worker_processes auto; - error_log stderr error; events { @@ -7,7 +7,7 @@ events { } http { - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; access_log off; @@ -17,7 +17,7 @@ http { keepalive_timeout 65; upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/var/run/php/php5.6-fpm.sock; keepalive 50; } @@ -25,7 +25,7 @@ http { listen 8080; server_name localhost; - root /home/ubuntu/FrameworkBenchmarks/; + root /clancats/; index index.php; location / { @@ -38,7 +38,7 @@ http { fastcgi_keep_conn on; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } } } diff --git a/frameworks/PHP/clancats/setup.sh b/frameworks/PHP/clancats/setup.sh deleted file mode 100644 index 46f89474948..00000000000 --- a/frameworks/PHP/clancats/setup.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -sed -i 's|localhost|'"${DBHOST}"'|g' app/config/database.config.php -sed -i 's|root /home/ubuntu/FrameworkBenchmarks|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -fw_depends mysql php5 nginx composer - -rm -fr clancatsapp -rm -fr CCF -git clone --branch v2.0.6 https://github.com/ClanCats/Framework.git clancatsapp - -cp -r app/ clancatsapp/CCF/ - -cp -r vendor/ clancatsapp/CCF/ - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/codeigniter/.gitignore b/frameworks/PHP/codeigniter/.gitignore deleted file mode 100644 index 7d5877f5f8e..00000000000 --- a/frameworks/PHP/codeigniter/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -/app/cache -/app/logs -/bin -/vendors -/build -/dist -.DS_Store -/tags -.idea -vendor -deploy/php-fpm.pid diff --git a/frameworks/PHP/codeigniter/application/config/database.php b/frameworks/PHP/codeigniter/application/config/database.php index dd0393c957b..5d23f10f1d2 100644 --- a/frameworks/PHP/codeigniter/application/config/database.php +++ b/frameworks/PHP/codeigniter/application/config/database.php @@ -48,7 +48,7 @@ $active_group = 'default'; $query_builder = TRUE; -$db['default']['hostname'] = 'TFB-database'; +$db['default']['hostname'] = 'tfb-database'; $db['default']['username'] = 'benchmarkdbuser'; $db['default']['password'] = 'benchmarkdbpass'; $db['default']['database'] = 'hello_world'; diff --git a/frameworks/PHP/codeigniter/application/views/errors/error_404.php b/frameworks/PHP/codeigniter/application/views/errors/html/error_404.php similarity index 100% rename from frameworks/PHP/codeigniter/application/views/errors/error_404.php rename to frameworks/PHP/codeigniter/application/views/errors/html/error_404.php diff --git a/frameworks/PHP/codeigniter/application/views/errors/error_db.php b/frameworks/PHP/codeigniter/application/views/errors/html/error_db.php similarity index 100% rename from frameworks/PHP/codeigniter/application/views/errors/error_db.php rename to frameworks/PHP/codeigniter/application/views/errors/html/error_db.php diff --git a/frameworks/PHP/codeigniter/application/views/errors/error_general.php b/frameworks/PHP/codeigniter/application/views/errors/html/error_general.php similarity index 100% rename from frameworks/PHP/codeigniter/application/views/errors/error_general.php rename to frameworks/PHP/codeigniter/application/views/errors/html/error_general.php diff --git a/frameworks/PHP/codeigniter/application/views/errors/error_php.php b/frameworks/PHP/codeigniter/application/views/errors/html/error_php.php similarity index 100% rename from frameworks/PHP/codeigniter/application/views/errors/error_php.php rename to frameworks/PHP/codeigniter/application/views/errors/html/error_php.php diff --git a/frameworks/PHP/codeigniter/application/views/errors/index.html b/frameworks/PHP/codeigniter/application/views/errors/html/index.html similarity index 100% rename from frameworks/PHP/codeigniter/application/views/errors/index.html rename to frameworks/PHP/codeigniter/application/views/errors/html/index.html diff --git a/frameworks/PHP/codeigniter/benchmark_config.json b/frameworks/PHP/codeigniter/benchmark_config.json index 1d2bff396bb..ba0f98787ab 100644 --- a/frameworks/PHP/codeigniter/benchmark_config.json +++ b/frameworks/PHP/codeigniter/benchmark_config.json @@ -2,45 +2,7 @@ "framework": "codeigniter", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/index.php/bench/json", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "None", - "framework": "codeigniter", - "language": "PHP", - "flavor": "PHP5", - "orm": "Raw", - "platform": "None", - "webserver": "nginx", - "os": "Linux", - "database_os": "Linux", - "display_name": "codeigniter", - "notes": "", - "versus": "php-php5" - }, - "hhvm": { - "setup_file": "setup_hhvm", - "json_url": "/index.php/bench/json", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "None", - "framework": "codeigniter", - "language": "PHP", - "flavor": "HHVM", - "orm": "Raw", - "platform": "None", - "webserver": "nginx", - "os": "Linux", - "database_os": "Linux", - "display_name": "codeigniter_hhvm", - "notes": "", - "versus": "php-php5" - }, - "raw": { - "setup_file": "setup", "db_url": "/index.php/bench/db", "query_url": "/index.php/bench/db/", "fortune_url": "/index.php/bench/fortunes", @@ -58,10 +20,10 @@ "database_os": "Linux", "display_name": "codeigniter", "notes": "", - "versus": "php-php5" + "versus": "php" }, - "raw_hhvm": { - "setup_file": "setup_hhvm", + "hhvm": { + "json_url": "/index.php/bench/json", "db_url": "/index.php/bench/db", "query_url": "/index.php/bench/db/", "fortune_url": "/index.php/bench/fortunes", @@ -79,7 +41,7 @@ "database_os": "Linux", "display_name": "codeigniter_hhvm", "notes": "", - "versus": "php-php5" + "versus": "php" } }] } diff --git a/frameworks/PHP/codeigniter/codeigniter-hhvm.dockerfile b/frameworks/PHP/codeigniter/codeigniter-hhvm.dockerfile new file mode 100644 index 00000000000..90adcfd4c08 --- /dev/null +++ b/frameworks/PHP/codeigniter/codeigniter-hhvm.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/hhvm-php7:0.1 + +ADD ./ /codeigniter +WORKDIR /codeigniter + +RUN composer.phar install --no-progress + +CMD hhvm -m daemon --config /codeigniter/deploy/config.hdf && \ + nginx -c /codeigniter/deploy/nginx-hhvm.conf -g "daemon off;" diff --git a/frameworks/PHP/codeigniter/codeigniter.dockerfile b/frameworks/PHP/codeigniter/codeigniter.dockerfile new file mode 100644 index 00000000000..5f0a83d3c15 --- /dev/null +++ b/frameworks/PHP/codeigniter/codeigniter.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/php7:0.1 + +ADD ./ /codeigniter +WORKDIR /codeigniter + +RUN composer.phar install --no-progress + +CMD service php7.2-fpm start && \ + nginx -c /codeigniter/deploy/nginx-fpm.conf -g "daemon off;" diff --git a/frameworks/PHP/codeigniter/deploy/config.hdf b/frameworks/PHP/codeigniter/deploy/config.hdf index 6230b3dff01..03097e5d6ae 100755 --- a/frameworks/PHP/codeigniter/deploy/config.hdf +++ b/frameworks/PHP/codeigniter/deploy/config.hdf @@ -1,16 +1,17 @@ # main configuration file # Application PID File -PidFile = /home/vagrant/FrameworkBenchmarks/frameworks/PHP/codeigniter/hhvm.pid +PidFile = /codeigniter/hhvm.pid # Server settings Server { - Port = 9001 + FileSocket = /codeigniter/hhvm.sock Type = fastcgi - SourceRoot = /home/vagrant/FrameworkBenchmarks/frameworks/PHP/codeigniter + SourceRoot = /codeigniter DefaultDocument = index.php GzipCompressionLevel = 0 EnableKeepAlive = true + AllowRunAsRoot = 1 } # Disable logging completely @@ -18,7 +19,7 @@ Log { UseLogFile = false UseSyslog = false Level = Error - #File = /home/vagrant/FrameworkBenchmarks/frameworks/PHP/codeigniter/error.log + #File = /codeigniter/error.log } # Enable jit for production mode @@ -30,7 +31,7 @@ Eval { # Repo file Repo { Central { - Path = /home/vagrant/FrameworkBenchmarks/frameworks/PHP/codeigniter/.hhvm.bbhc + Path = /codeigniter/.hhvm.bbhc } } diff --git a/frameworks/PHP/codeigniter/deploy/nginx-fpm.conf b/frameworks/PHP/codeigniter/deploy/nginx-fpm.conf new file mode 100644 index 00000000000..7c2f32c830d --- /dev/null +++ b/frameworks/PHP/codeigniter/deploy/nginx-fpm.conf @@ -0,0 +1,42 @@ +user root; +worker_processes auto; +error_log stderr error; + +events { + worker_connections 16384; +} + +http { + include /nginx/conf/mime.types; + default_type application/octet-stream; + access_log off; + server_tokens off; + sendfile on; + keepalive_timeout 65; + + upstream fastcgi_backend { + server unix:/var/run/php/php7.2-fpm.sock; + keepalive 50; + } + + server { + listen 8080; + server_name localhost; + + root /codeigniter/; + index index.php; + + location / { + try_files $uri $uri/ /index.php?$uri&$args; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass fastcgi_backend; + fastcgi_keep_conn on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include /nginx/conf/fastcgi_params; + } + } +} diff --git a/frameworks/PHP/codeigniter/deploy/nginx-hhvm.conf b/frameworks/PHP/codeigniter/deploy/nginx-hhvm.conf new file mode 100644 index 00000000000..a05587c9021 --- /dev/null +++ b/frameworks/PHP/codeigniter/deploy/nginx-hhvm.conf @@ -0,0 +1,42 @@ +user root; +worker_processes auto; +error_log stderr error; + +events { + worker_connections 16384; +} + +http { + include /nginx/conf/mime.types; + default_type application/octet-stream; + access_log off; + server_tokens off; + sendfile on; + keepalive_timeout 65; + + upstream fastcgi_backend { + server unix:/codeigniter/hhvm.sock; + keepalive 50; + } + + server { + listen 8080; + server_name localhost; + + root /codeigniter/; + index index.php; + + location / { + try_files $uri $uri/ /index.php?$uri&$args; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass fastcgi_backend; + fastcgi_keep_conn on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include /nginx/conf/fastcgi_params; + } + } +} diff --git a/frameworks/PHP/codeigniter/deploy/nginx.conf b/frameworks/PHP/codeigniter/deploy/nginx.conf deleted file mode 100644 index f26d0a518d5..00000000000 --- a/frameworks/PHP/codeigniter/deploy/nginx.conf +++ /dev/null @@ -1,134 +0,0 @@ -#user nobody; -worker_processes auto; - -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - -events { - worker_connections 16384; -} - - -http { - include /usr/local/nginx/conf/mime.types; - default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; - access_log off; - server_tokens off; - - sendfile on; - #tcp_nopush on; - - #keepalive_timeout 0; - keepalive_timeout 65; - - #gzip on; - - upstream fastcgi_backend { - server 127.0.0.1:9001; - keepalive 50; - } - - server { - listen 8080; - server_name localhost; - - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - root /home/pfalls/FrameworkBenchmarks/php-codeigniter/; - index index.php; - - location / { - try_files $uri $uri/ /index.php?$uri&$args; - } - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # - location ~ \.php$ { - try_files $uri =404; - fastcgi_pass fastcgi_backend; - fastcgi_keep_conn on; - fastcgi_index index.php; - # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; - } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} - } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - -} diff --git a/frameworks/PHP/codeigniter/deploy/php-codeigniter b/frameworks/PHP/codeigniter/deploy/php-codeigniter deleted file mode 100644 index 4857e33a893..00000000000 --- a/frameworks/PHP/codeigniter/deploy/php-codeigniter +++ /dev/null @@ -1,9 +0,0 @@ - - Alias /php-codeigniter/ "/home/ubuntu/FrameworkBenchmarks/php-codeigniter/" - - Options Indexes FollowSymLinks MultiViews - #AllowOverride None - Order allow,deny - allow from all - - diff --git a/frameworks/PHP/codeigniter/setup.sh b/frameworks/PHP/codeigniter/setup.sh deleted file mode 100644 index 0259bc9e92d..00000000000 --- a/frameworks/PHP/codeigniter/setup.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer - -sed -i 's|root .*/FrameworkBenchmarks/php-codeigniter|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/codeigniter/setup_hhvm.sh b/frameworks/PHP/codeigniter/setup_hhvm.sh deleted file mode 100644 index b8e3ca45374..00000000000 --- a/frameworks/PHP/codeigniter/setup_hhvm.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer hhvm - -sed -i 's|SourceRoot = .*/FrameworkBenchmarks/codeigniter|SourceRoot = '"${TROOT}"'|g' deploy/config.hdf -sed -i 's|Path = .*/.hhvm.hhbc|Path = '"${TROOT}"'/.hhvm.bbhc|g' deploy/config.hdf -sed -i 's|PidFile = .*/hhvm.pid|PidFile = '"${TROOT}"'/hhvm.pid|g' deploy/config.hdf -sed -i 's|File = .*/error.log|File = '"${TROOT}"'/error.log|g' deploy/config.hdf -sed -i 's|root .*/FrameworkBenchmarks/php-codeigniter|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -hhvm -m daemon --config $TROOT/deploy/config.hdf --user $(whoami) -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/cygnite/apps/configs/database.php b/frameworks/PHP/cygnite/apps/configs/database.php index 0f22f9c60f9..c2ce5f5c606 100644 --- a/frameworks/PHP/cygnite/apps/configs/database.php +++ b/frameworks/PHP/cygnite/apps/configs/database.php @@ -31,7 +31,7 @@ function ($config) { array( 'db' => array( 'driver' => 'mysql', - 'host' => '127.0.0.1', + 'host' => 'tfb-database', 'port' => '', 'database' => 'hello_world', 'username' => 'benchmarkdbuser', diff --git a/frameworks/PHP/cygnite/benchmark_config.json b/frameworks/PHP/cygnite/benchmark_config.json index 5b4bbbdb81d..a707ea856e5 100644 --- a/frameworks/PHP/cygnite/benchmark_config.json +++ b/frameworks/PHP/cygnite/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "cygnite", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/index.php/json", "plaintext_url": "/index.php/plaintext", "port": 8080, @@ -22,7 +21,6 @@ "versus": "php-php5" }, "raw": { - "setup_file": "setup-mysql", "db_url": "/index.php/bench/db", "query_url": "/index.php/bench/queries/", "fortune_url": "/index.php/bench/fortunes", diff --git a/frameworks/PHP/cygnite/cygnite-base.dockerfile b/frameworks/PHP/cygnite/cygnite-base.dockerfile new file mode 100644 index 00000000000..3146fab6ffb --- /dev/null +++ b/frameworks/PHP/cygnite/cygnite-base.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/php5:0.1 + +ADD ./ /cygnite +WORKDIR /cygnite + +RUN composer.phar install --no-progress diff --git a/frameworks/PHP/cygnite/cygnite-raw.dockerfile b/frameworks/PHP/cygnite/cygnite-raw.dockerfile new file mode 100644 index 00000000000..af8f4f3d91a --- /dev/null +++ b/frameworks/PHP/cygnite/cygnite-raw.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/cygnite-base:0.1 + +CMD service php5.6-fpm start && \ + nginx -c /cygnite/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/cygnite/cygnite.dockerfile b/frameworks/PHP/cygnite/cygnite.dockerfile new file mode 100644 index 00000000000..af8f4f3d91a --- /dev/null +++ b/frameworks/PHP/cygnite/cygnite.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/cygnite-base:0.1 + +CMD service php5.6-fpm start && \ + nginx -c /cygnite/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/cygnite/deploy/nginx.conf b/frameworks/PHP/cygnite/deploy/nginx.conf index 96d0002391c..1bc6ddba40f 100644 --- a/frameworks/PHP/cygnite/deploy/nginx.conf +++ b/frameworks/PHP/cygnite/deploy/nginx.conf @@ -1,41 +1,42 @@ -#user nobody; +user root; worker_processes auto; -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - events { - worker_connections 16384; + worker_connections 16384; + multi_accept on; + use epoll; } - http { - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; access_log off; server_tokens off; - sendfile on; - #tcp_nopush on; + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; - #keepalive_timeout 0; - keepalive_timeout 65; + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; - #gzip on; upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/var/run/php/php5.6-fpm.sock; keepalive 50; } @@ -43,92 +44,20 @@ http { listen 8080; server_name localhost; - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - root /home/ubuntu/FrameworkBenchmarks/cygnite/; + root /cygnite/; index index.php; location / { try_files $uri $uri/ /index.php?$uri&$args; } - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # location ~ \.php$ { try_files $uri =404; fastcgi_pass fastcgi_backend; fastcgi_keep_conn on; fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - } diff --git a/frameworks/PHP/cygnite/setup-mysql.sh b/frameworks/PHP/cygnite/setup-mysql.sh deleted file mode 100644 index 49fe2646c7e..00000000000 --- a/frameworks/PHP/cygnite/setup-mysql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends mysql - -source ./setup.sh diff --git a/frameworks/PHP/cygnite/setup.sh b/frameworks/PHP/cygnite/setup.sh deleted file mode 100644 index 94de860f976..00000000000 --- a/frameworks/PHP/cygnite/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends php5 nginx composer - -sed -i 's|127.0.0.1|'"${DBHOST}"'|g' apps/configs/database.php -sed -i 's|root .*/FrameworkBenchmarks/cygnite|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c ${TROOT}/deploy/nginx.conf diff --git a/frameworks/PHP/fat-free/.gitignore b/frameworks/PHP/fat-free/.gitignore deleted file mode 100644 index d9cd41f98f0..00000000000 --- a/frameworks/PHP/fat-free/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/deploy/php-fpm.pid diff --git a/frameworks/PHP/fat-free/benchmark_config.json b/frameworks/PHP/fat-free/benchmark_config.json index c282a453cc1..b3ff228a4a4 100644 --- a/frameworks/PHP/fat-free/benchmark_config.json +++ b/frameworks/PHP/fat-free/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "fat-free", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "db_url": "/db-orm", @@ -25,7 +24,6 @@ "versus": "php7" }, "raw": { - "setup_file": "setup", "db_url": "/db", "query_url": "/db-multiple/", "fortune_url": "/fortune", diff --git a/frameworks/PHP/fat-free/deploy/nginx.conf b/frameworks/PHP/fat-free/deploy/nginx.conf index e13275f7995..2a58ef1e5db 100644 --- a/frameworks/PHP/fat-free/deploy/nginx.conf +++ b/frameworks/PHP/fat-free/deploy/nginx.conf @@ -1,134 +1,63 @@ -#user nobody; +user root; worker_processes auto; -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - events { - worker_connections 16384; + worker_connections 16384; + multi_accept on; + use epoll; } - http { - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; access_log off; server_tokens off; - sendfile on; - #tcp_nopush on; + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; - #keepalive_timeout 0; - keepalive_timeout 65; + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; - #gzip on; upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/var/run/php/php7.2-fpm.sock; keepalive 50; } server { listen 8080; - server_name localhost; - - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} + server_name tfb-server; - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - root /home/ubuntu/FrameworkBenchmarks/fat-free/; + root /fat-free/; index index.php; location / { try_files $uri $uri/ /index.php?$uri&$args; } - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # location ~ \.php$ { try_files $uri =404; fastcgi_pass fastcgi_backend; fastcgi_keep_conn on; fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - } diff --git a/frameworks/PHP/fat-free/fat-free-base.dockerfile b/frameworks/PHP/fat-free/fat-free-base.dockerfile new file mode 100644 index 00000000000..e4de538d8ac --- /dev/null +++ b/frameworks/PHP/fat-free/fat-free-base.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/php7:0.1 + +ADD ./ /fat-free +WORKDIR /fat-free + +ENV F3DIR="/fat-free/src" + +RUN git clone "https://github.com/bcosca/fatfree-core.git" src +RUN cd src && git checkout -q "069ccd84afd2461c7ebb67f660c142f97577e661" # v3.5.2-dev + +RUN chmod -R 777 /fat-free diff --git a/frameworks/PHP/fat-free/fat-free-raw.dockerfile b/frameworks/PHP/fat-free/fat-free-raw.dockerfile new file mode 100644 index 00000000000..bddf0c4fbb8 --- /dev/null +++ b/frameworks/PHP/fat-free/fat-free-raw.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/fat-free-base:0.1 + +CMD service php7.2-fpm start && \ + nginx -c /fat-free/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/fat-free/fat-free.dockerfile b/frameworks/PHP/fat-free/fat-free.dockerfile new file mode 100644 index 00000000000..bddf0c4fbb8 --- /dev/null +++ b/frameworks/PHP/fat-free/fat-free.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/fat-free-base:0.1 + +CMD service php7.2-fpm start && \ + nginx -c /fat-free/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/fat-free/index.php b/frameworks/PHP/fat-free/index.php index 399ad58b952..76fe165e7fa 100644 --- a/frameworks/PHP/fat-free/index.php +++ b/frameworks/PHP/fat-free/index.php @@ -18,7 +18,7 @@ echo $f3->get('ERROR.code').': '.$f3->get('ERROR.text')."\n".$f3->get('ERROR.trace'); }); -$f3->set('DBS',array('mysql:host=localhost;port=3306;dbname=hello_world','benchmarkdbuser','benchmarkdbpass')); +$f3->set('DBS',array('mysql:host=tfb-database;port=3306;dbname=hello_world','benchmarkdbuser','benchmarkdbpass')); // http: //www.techempower.com/benchmarks/#section=code // JSON test diff --git a/frameworks/PHP/fat-free/setup.sh b/frameworks/PHP/fat-free/setup.sh deleted file mode 100644 index 09861acfe34..00000000000 --- a/frameworks/PHP/fat-free/setup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx - -sed -i 's|localhost|'"${DBHOST}"'|g' index.php -sed -i 's|root .*/FrameworkBenchmarks/fat-free|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - - -F3DIR="$TROOT/src" - -[[ ! -e "$F3DIR" ]] || rm -rf "$F3DIR" - -git clone "https://github.com/bcosca/fatfree-core.git" "$F3DIR" -pushd "$F3DIR" > /dev/null -git checkout -q "069ccd84afd2461c7ebb67f660c142f97577e661" # v3.5.2-dev -popd > /dev/null - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf \ No newline at end of file diff --git a/frameworks/PHP/fuel/.gitignore b/frameworks/PHP/fuel/.gitignore deleted file mode 100644 index be2296c9871..00000000000 --- a/frameworks/PHP/fuel/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -/app/cache -/app/logs -/bin -/vendors -/build -/dist -.DS_Store -/tags -.idea -docs -vendor -fuel/core -fuel/vendor -fuel/packages -deploy/php-fpm.pid diff --git a/frameworks/PHP/fuel/benchmark_config.json b/frameworks/PHP/fuel/benchmark_config.json index 298bd49d101..df977f97b45 100644 --- a/frameworks/PHP/fuel/benchmark_config.json +++ b/frameworks/PHP/fuel/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "fuel", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/db?queries=", diff --git a/frameworks/PHP/fuel/deploy/nginx.conf b/frameworks/PHP/fuel/deploy/nginx.conf index bb0a4fd92fb..3d8bb9484bb 100644 --- a/frameworks/PHP/fuel/deploy/nginx.conf +++ b/frameworks/PHP/fuel/deploy/nginx.conf @@ -1,41 +1,42 @@ -#user nobody; +user root; worker_processes auto; -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - events { - worker_connections 16384; + worker_connections 16384; + multi_accept on; + use epoll; } - http { - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; access_log off; server_tokens off; - sendfile on; - #tcp_nopush on; + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; - #keepalive_timeout 0; - keepalive_timeout 65; + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; - #gzip on; upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/var/run/php/php5.6-fpm.sock; keepalive 50; } @@ -43,92 +44,20 @@ http { listen 8080; server_name localhost; - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - root /home/ubuntu/FrameworkBenchmarks/php-fuel/public/; + root /fuel/public/; index index.php; location / { try_files $uri $uri/ /index.php?$uri&$args; } - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # location ~ \.php$ { try_files $uri =404; fastcgi_pass fastcgi_backend; fastcgi_keep_conn on; fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - } diff --git a/frameworks/PHP/fuel/deploy/php-fuel b/frameworks/PHP/fuel/deploy/php-fuel index da1f8fb2df3..38a9c72fc3d 100644 --- a/frameworks/PHP/fuel/deploy/php-fuel +++ b/frameworks/PHP/fuel/deploy/php-fuel @@ -1,6 +1,5 @@ - Alias /php-fuel/ "/home/ubuntu/FrameworkBenchmarks/php-fuel/public/" - + Options Indexes FollowSymLinks MultiViews #AllowOverride None Order allow,deny diff --git a/frameworks/PHP/fuel/fuel.dockerfile b/frameworks/PHP/fuel/fuel.dockerfile new file mode 100644 index 00000000000..ca73afbada0 --- /dev/null +++ b/frameworks/PHP/fuel/fuel.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/php5:0.1 + +ADD ./ /fuel +WORKDIR /fuel + +RUN composer.phar install --no-progress + +CMD service php5.6-fpm start && \ + nginx -c /fuel/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/fuel/fuel/app/config/development/db.php b/frameworks/PHP/fuel/fuel/app/config/development/db.php deleted file mode 100644 index 2aebd195d03..00000000000 --- a/frameworks/PHP/fuel/fuel/app/config/development/db.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - 'connection' => array( - 'dsn' => 'mysql:host=192.168.100.102;dbname=hello_world', - 'username' => 'benchmarkdbuser', - 'password' => 'benchmarkdbpass', - ), - ), -); diff --git a/frameworks/PHP/fuel/fuel/app/config/production/db.php b/frameworks/PHP/fuel/fuel/app/config/production/db.php index 14a12e5c10e..e9384070ee8 100644 --- a/frameworks/PHP/fuel/fuel/app/config/production/db.php +++ b/frameworks/PHP/fuel/fuel/app/config/production/db.php @@ -6,7 +6,7 @@ return array( 'default' => array( 'connection' => array( - 'dsn' => 'mysql:host=localhost;dbname=hello_world', + 'dsn' => 'mysql:host=tfb-database;dbname=hello_world', 'username' => 'benchmarkdbuser', 'password' => 'benchmarkdbpass', ), diff --git a/frameworks/PHP/fuel/fuel/app/config/staging/db.php b/frameworks/PHP/fuel/fuel/app/config/staging/db.php deleted file mode 100644 index 5a18ec382a8..00000000000 --- a/frameworks/PHP/fuel/fuel/app/config/staging/db.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - 'connection' => array( - 'dsn' => 'mysql:host=localhost;dbname=fuel_staging', - 'username' => 'fuel_app', - 'password' => 'super_secret_password', - ), - ), -); diff --git a/frameworks/PHP/fuel/fuel/app/config/test/db.php b/frameworks/PHP/fuel/fuel/app/config/test/db.php deleted file mode 100644 index 1136b666a76..00000000000 --- a/frameworks/PHP/fuel/fuel/app/config/test/db.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - 'connection' => array( - 'dsn' => 'mysql:host=localhost;dbname=fuel_test', - 'username' => 'fuel_app', - 'password' => 'super_secret_password', - ), - ), -); diff --git a/frameworks/PHP/fuel/fuel/app/lang/en/.gitkeep b/frameworks/PHP/fuel/fuel/app/lang/en/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/PHP/fuel/fuel/app/migrations/.gitkeep b/frameworks/PHP/fuel/fuel/app/migrations/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/PHP/fuel/fuel/app/modules/.gitkeep b/frameworks/PHP/fuel/fuel/app/modules/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/PHP/fuel/fuel/app/tasks/robots.php b/frameworks/PHP/fuel/fuel/app/tasks/robots.php deleted file mode 100644 index 61a07da3600..00000000000 --- a/frameworks/PHP/fuel/fuel/app/tasks/robots.php +++ /dev/null @@ -1,113 +0,0 @@ - //\\\\ - \\||/ |\\//// \\\\\\\\/| \\||/ - | | | | - |---| |---| - |---| |---| - | | | | - |___| |___| - / \\ / \\ - |_____| |_____| - |HHHHH| |HHHHH|", 'blue'); - } - - /** - * An example method that is here just to show the various uses of tasks. - * - * Usage (from command line): - * - * php oil r robots:protect - * - * @return string - */ - public static function protect() - { - $eye = \Cli::color("*", 'green'); - - return \Cli::color(" - \"PROTECT ALL HUMANS\" - _____ / - /_____\\", 'blue')."\n" -.\Cli::color(" ____[\\", 'blue').$eye.\Cli::color('---', 'blue').$eye.\Cli::color('/]____', 'blue')."\n" -.\Cli::color(" /\\ #\\ \\_____/ /# /\\ - / \\# \\_.---._/ #/ \\ - / /|\\ | | /|\\ \\ - /___/ | | | | | | \\___\\ - | | | | |---| | | | | - |__| \\_| |_#_| |_/ |__| - //\\\\ <\\ _//^\\\\_ /> //\\\\ - \\||/ |\\//// \\\\\\\\/| \\||/ - | | | | - |---| |---| - |---| |---| - | | | | - |___| |___| - / \\ / \\ - |_____| |_____| - |HHHHH| |HHHHH|", 'blue'); - - } -} - -/* End of file tasks/robots.php */ diff --git a/frameworks/PHP/fuel/fuel/app/tests/controller/.gitkeep b/frameworks/PHP/fuel/fuel/app/tests/controller/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/PHP/fuel/fuel/app/tests/model/.gitkeep b/frameworks/PHP/fuel/fuel/app/tests/model/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/PHP/fuel/fuel/app/tests/view/.gitkeep b/frameworks/PHP/fuel/fuel/app/tests/view/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/PHP/fuel/fuel/app/tmp/.gitkeep b/frameworks/PHP/fuel/fuel/app/tmp/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/PHP/fuel/fuel/app/vendor/.gitkeep b/frameworks/PHP/fuel/fuel/app/vendor/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/PHP/fuel/fuel/packages/.gitkeep b/frameworks/PHP/fuel/fuel/packages/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/PHP/fuel/setup.sh b/frameworks/PHP/fuel/setup.sh deleted file mode 100644 index 2ef2fc0ff9a..00000000000 --- a/frameworks/PHP/fuel/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql php5 nginx composer - -sed -i 's|localhost|'"${DBHOST}"'|g' fuel/app/config/production/db.php -sed -i 's|root .*/FrameworkBenchmarks/php-fuel|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/hhvm/.gitignore b/frameworks/PHP/hhvm/.gitignore deleted file mode 100644 index 48b988525b8..00000000000 --- a/frameworks/PHP/hhvm/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/.hhvm.bbhc -/hhvm.pid diff --git a/frameworks/PHP/hhvm/benchmark_config.json b/frameworks/PHP/hhvm/benchmark_config.json index 290ee9a4db2..ae66eba0c10 100644 --- a/frameworks/PHP/hhvm/benchmark_config.json +++ b/frameworks/PHP/hhvm/benchmark_config.json @@ -3,7 +3,6 @@ "tests": [{ "default": { - "setup_file" : "setup_hhvm", "json_url" : "/json.php", "db_url" : "/db.php", "query_url" : "/queries.php?queries=", diff --git a/frameworks/PHP/hhvm/deploy/config-debug.hdf b/frameworks/PHP/hhvm/deploy/config-debug.hdf index 4904dfbe4ba..793b1f9071d 100644 --- a/frameworks/PHP/hhvm/deploy/config-debug.hdf +++ b/frameworks/PHP/hhvm/deploy/config-debug.hdf @@ -1,16 +1,17 @@ # Debugging configuration file # Application PID File -PidFile = /tmp/FrameworkBenchmarks/hhvm/hhvm.pid +PidFile = /hhvm_app/hhvm.pid # Server settings Server { - Port = 9001 + FileSocket = /hhvm_app/hhvm.sock Type = fastcgi - SourceRoot = /tmp/FrameworkBenchmarks/hhvm + SourceRoot = /hhvm_app DefaultDocument = index.php GzipCompressionLevel = 0 EnableKeepAlive = true + AllowRunAsRoot = 1 } # Enable debug logging @@ -18,7 +19,7 @@ Log { UseLogFile = true UseSyslog = false Level = Verbose - File = /tmp/FrameworkBenchmarks/hhvm/error.log + File = /hhvm_app/error.log } # Enable jit for production mode @@ -30,7 +31,7 @@ Eval { # Repo file Repo { Central { - Path = /tmp/FrameworkBenchmarks/hhvm/.hhvm.hhbc + Path = /hhvm_app/.hhvm.hhbc } } diff --git a/frameworks/PHP/hhvm/deploy/config.hdf b/frameworks/PHP/hhvm/deploy/config.hdf index 78a169c11a9..87516873e17 100755 --- a/frameworks/PHP/hhvm/deploy/config.hdf +++ b/frameworks/PHP/hhvm/deploy/config.hdf @@ -1,16 +1,17 @@ # main configuration file # Application PID File -PidFile = /tmp/FrameworkBenchmarks/hhvm/hhvm.pid +PidFile = /hhvm_app/hhvm.pid # Server settings Server { - Port = 9001 + FileSocket = /hhvm_app/hhvm.sock Type = fastcgi - SourceRoot = /tmp/FrameworkBenchmarks/hhvm + SourceRoot = /hhvm_app DefaultDocument = index.php GzipCompressionLevel = 0 EnableKeepAlive = true + AllowRunAsRoot = 1 } # Disable logging completely @@ -18,7 +19,7 @@ Log { UseLogFile = false UseSyslog = false Level = Error - #File = /tmp/FrameworkBenchmarks/hhvm/error.log + #File = /hhvm_app/error.log } # Enable jit for production mode @@ -30,7 +31,7 @@ Eval { # Repo file Repo { Central { - Path = /tmp/FrameworkBenchmarks/hhvm/.hhvm.hhbc + Path = /hhvm_app/.hhvm.hhbc } } diff --git a/frameworks/PHP/hhvm/deploy/nginx.conf b/frameworks/PHP/hhvm/deploy/nginx.conf index 8c669c36e8b..2f72c27776f 100755 --- a/frameworks/PHP/hhvm/deploy/nginx.conf +++ b/frameworks/PHP/hhvm/deploy/nginx.conf @@ -1,3 +1,4 @@ +user root; worker_processes auto; error_log stderr error; @@ -6,30 +7,29 @@ events { } http { - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; access_log off; server_tokens off; sendfile on; keepalive_timeout 65; + upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/hhvm_app/hhvm.sock; keepalive 50; } server { listen 8080; server_name localhost; - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9001 location ~ \.(hh|php)$ { - root TEST_ROOT; + root /hhvm_app; fastcgi_keep_conn on; fastcgi_pass fastcgi_backend; - #fastcgi_pass 127.0.0.1:9001; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } } } diff --git a/frameworks/PHP/hhvm/hhvm.dockerfile b/frameworks/PHP/hhvm/hhvm.dockerfile new file mode 100644 index 00000000000..6b551b75396 --- /dev/null +++ b/frameworks/PHP/hhvm/hhvm.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/hhvm-php7:0.1 + +ADD ./ /hhvm_app +WORKDIR /hhvm_app + +CMD hhvm -m daemon --config /hhvm_app/deploy/config.hdf && \ + nginx -c /hhvm_app/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/hhvm/once.php.inc b/frameworks/PHP/hhvm/once.php.inc index 7ab6668a7ec..53cbd3aca9a 100644 --- a/frameworks/PHP/hhvm/once.php.inc +++ b/frameworks/PHP/hhvm/once.php.inc @@ -6,7 +6,7 @@ class Benchmark { public function setup_db() { $this->pdo = new PDO( - 'mysql:host=TFB-database;dbname=hello_world;charset=utf8', + 'mysql:host=tfb-database;dbname=hello_world;charset=utf8', 'benchmarkdbuser', 'benchmarkdbpass', array(PDO::ATTR_PERSISTENT => false)); diff --git a/frameworks/PHP/hhvm/setup_hhvm.sh b/frameworks/PHP/hhvm/setup_hhvm.sh deleted file mode 100755 index 00088b865a7..00000000000 --- a/frameworks/PHP/hhvm/setup_hhvm.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -fw_depends mysql nginx php7 hhvm - -sed -i 's|SourceRoot = .*/FrameworkBenchmarks/hhvm|SourceRoot = '"${TROOT}"'|g' deploy/config.hdf -sed -i 's|Path = .*/.hhvm.hhbc|Path = '"${TROOT}"'/.hhvm.bbhc|g' deploy/config.hdf -sed -i 's|PidFile = .*/hhvm.pid|PidFile = '"${TROOT}"'/hhvm.pid|g' deploy/config.hdf -sed -i 's|File = .*/error.log|File = '"${TROOT}"'/error.log|g' deploy/config.hdf -sed -i "s|/usr/local/nginx/|${IROOT}/nginx/|g" deploy/nginx.conf -sed -i "s|TEST_ROOT|${TROOT}|g" deploy/nginx.conf - -hhvm -m daemon --config $TROOT/deploy/config.hdf --user $(whoami) -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/kohana/.gitignore b/frameworks/PHP/kohana/.gitignore deleted file mode 100644 index da9bb0c8908..00000000000 --- a/frameworks/PHP/kohana/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -/app/cache -/app/logs -/bin -/vendors -/build -/dist -.DS_Store -/tags -.idea -vendor -modules -deploy/php-fpm.pid diff --git a/frameworks/PHP/kohana/application/config/database.php b/frameworks/PHP/kohana/application/config/database.php index 5fae1448fb1..492791163ca 100644 --- a/frameworks/PHP/kohana/application/config/database.php +++ b/frameworks/PHP/kohana/application/config/database.php @@ -14,7 +14,7 @@ * string password database password * boolean persistent use persistent connections? */ - 'dsn' => 'mysql:host=localhost;dbname=hello_world', + 'dsn' => 'mysql:host=tfb-database;dbname=hello_world', 'username' => 'benchmarkdbuser', 'password' => 'benchmarkdbpass', 'persistent' => FALSE, diff --git a/frameworks/PHP/kohana/benchmark_config.json b/frameworks/PHP/kohana/benchmark_config.json index 32667a6a71b..bd4d1d474b2 100644 --- a/frameworks/PHP/kohana/benchmark_config.json +++ b/frameworks/PHP/kohana/benchmark_config.json @@ -1,27 +1,8 @@ { - "framework": "php-kohana", + "framework": "kohana", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/bench/json", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "None", - "framework": "kohana", - "language": "PHP", - "flavor": "PHP7", - "orm": "Raw", - "platform": "None", - "webserver": "nginx", - "os": "Linux", - "database_os": "Linux", - "display_name": "kohana", - "notes": "", - "versus": "php7" - }, - "raw": { - "setup_file": "setup-mysql", "db_url": "/bench/db", "query_url": "/bench/queries/", "fortune_url": "/bench/fortunes", diff --git a/frameworks/PHP/kohana/deploy/nginx.conf b/frameworks/PHP/kohana/deploy/nginx.conf index 3c4585042fd..f2f5ac647fe 100644 --- a/frameworks/PHP/kohana/deploy/nginx.conf +++ b/frameworks/PHP/kohana/deploy/nginx.conf @@ -1,41 +1,42 @@ -#user nobody; +user root; worker_processes auto; -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - events { - worker_connections 16384; + worker_connections 16384; + multi_accept on; + use epoll; } - http { - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; access_log off; server_tokens off; - sendfile on; - #tcp_nopush on; + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; - #keepalive_timeout 0; - keepalive_timeout 65; + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; - #gzip on; upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/var/run/php/php7.2-fpm.sock; keepalive 50; } @@ -43,92 +44,20 @@ http { listen 8080; server_name localhost; - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - root /home/ubuntu/FrameworkBenchmarks/php-kohana/; + root /kohana/; index index.php; location / { try_files $uri $uri/ /index.php?$uri&$args; } - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # location ~ \.php$ { try_files $uri =404; fastcgi_pass fastcgi_backend; fastcgi_keep_conn on; fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - -} \ No newline at end of file +} diff --git a/frameworks/PHP/kohana/deploy/php-kohana b/frameworks/PHP/kohana/deploy/php-kohana index a6119546d3b..72b175d4cf1 100644 --- a/frameworks/PHP/kohana/deploy/php-kohana +++ b/frameworks/PHP/kohana/deploy/php-kohana @@ -1,6 +1,5 @@ - Alias /php-kohana/ "/home/ubuntu/FrameworkBenchmarks/php-kohana/" - + Options Indexes FollowSymLinks MultiViews #AllowOverride None Order allow,deny diff --git a/frameworks/PHP/kohana/kohana.dockerfile b/frameworks/PHP/kohana/kohana.dockerfile new file mode 100644 index 00000000000..dd9a4778157 --- /dev/null +++ b/frameworks/PHP/kohana/kohana.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/php7:0.1 + +ADD ./ /kohana +WORKDIR /kohana + +RUN composer.phar install --no-progress + +RUN chmod -R 777 /kohana + +CMD service php7.2-fpm start && \ + nginx -c /kohana/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/kohana/setup-mysql.sh b/frameworks/PHP/kohana/setup-mysql.sh deleted file mode 100644 index 49fe2646c7e..00000000000 --- a/frameworks/PHP/kohana/setup-mysql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends mysql - -source ./setup.sh diff --git a/frameworks/PHP/kohana/setup.sh b/frameworks/PHP/kohana/setup.sh deleted file mode 100644 index 68dd1aeebf4..00000000000 --- a/frameworks/PHP/kohana/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends php7 nginx composer - -sed -i 's|localhost|'"${DBHOST}"'|g' application/config/database.php -sed -i 's|root .*/FrameworkBenchmarks/php-kohana|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/kumbiaphp/.gitignore b/frameworks/PHP/kumbiaphp/.gitignore deleted file mode 100644 index fede1601aa5..00000000000 --- a/frameworks/PHP/kumbiaphp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -vendor -bench/public/info.php diff --git a/frameworks/PHP/kumbiaphp/bench/app/config/databases.php b/frameworks/PHP/kumbiaphp/bench/app/config/databases.php index 5fb8eac8537..49006d82966 100644 --- a/frameworks/PHP/kumbiaphp/bench/app/config/databases.php +++ b/frameworks/PHP/kumbiaphp/bench/app/config/databases.php @@ -1,7 +1,7 @@ [ - 'dsn' => 'mysql:host=TFB-database;dbname=hello_world', + 'dsn' => 'mysql:host=tfb-database;dbname=hello_world', 'username' => 'benchmarkdbuser', 'password' => 'benchmarkdbpass', 'params' => [ diff --git a/frameworks/PHP/kumbiaphp/bench/app/controllers/raw_controller.php b/frameworks/PHP/kumbiaphp/bench/app/controllers/raw_controller.php index 114d10299f1..a63b9bb112e 100644 --- a/frameworks/PHP/kumbiaphp/bench/app/controllers/raw_controller.php +++ b/frameworks/PHP/kumbiaphp/bench/app/controllers/raw_controller.php @@ -9,7 +9,7 @@ protected function before_filter() View::select(null, null); header('Content-type: application/json'); - $this->pdo = new PDO('mysql:host=TFB-database;dbname=hello_world', 'benchmarkdbuser', 'benchmarkdbpass', array( + $this->pdo = new PDO('mysql:host=tfb-database;dbname=hello_world', 'benchmarkdbuser', 'benchmarkdbpass', array( PDO::ATTR_PERSISTENT => true )); } diff --git a/frameworks/PHP/kumbiaphp/bench/app/controllers/raw_fortune_controller.php b/frameworks/PHP/kumbiaphp/bench/app/controllers/raw_fortune_controller.php index 4e7a2757781..1529d0df186 100644 --- a/frameworks/PHP/kumbiaphp/bench/app/controllers/raw_fortune_controller.php +++ b/frameworks/PHP/kumbiaphp/bench/app/controllers/raw_fortune_controller.php @@ -5,7 +5,7 @@ class RawFortuneController extends AppController public function index() { View::select(null,'raw'); - $pdo = new PDO('mysql:host=TFB-database;dbname=hello_world', 'benchmarkdbuser', 'benchmarkdbpass', array( + $pdo = new PDO('mysql:host=tfb-database;dbname=hello_world', 'benchmarkdbuser', 'benchmarkdbpass', array( PDO::ATTR_PERSISTENT => true )); $res = $pdo->query('SELECT id, message FROM Fortune', PDO::FETCH_ASSOC); diff --git a/frameworks/PHP/kumbiaphp/bench/public/index.php b/frameworks/PHP/kumbiaphp/bench/public/index.php index 0fd23db8cfc..bd22ecda43e 100644 --- a/frameworks/PHP/kumbiaphp/bench/public/index.php +++ b/frameworks/PHP/kumbiaphp/bench/public/index.php @@ -54,7 +54,7 @@ * - En producción, es recomendable ponerla manual */ //define('APP_PATH', dirname(__DIR__).'/app/'); -const APP_PATH = 'APP_ROOT'; +const APP_PATH = '/kumbiaphp/bench/app/'; /** * Define el CORE_PATH. * @@ -62,7 +62,7 @@ * - Ruta al directorio que contiene el núcleo de Kumbia (por defecto la ruta al directorio core) */ //define('CORE_PATH', dirname(dirname(APP_PATH)).'/vendor/Kumbia/core/'); -const CORE_PATH = 'CORE_ROOT'; +const CORE_PATH = '/kumbiaphp/vendor/Kumbia/core/'; /** * Define el PUBLIC_PATH. * diff --git a/frameworks/PHP/kumbiaphp/benchmark_config.json b/frameworks/PHP/kumbiaphp/benchmark_config.json index 16a8b8dffd3..2f52c918230 100644 --- a/frameworks/PHP/kumbiaphp/benchmark_config.json +++ b/frameworks/PHP/kumbiaphp/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "kumbiaphp", "tests": [{ "default": { - "setup_file": "setup", "plaintext_url": "/", "json_url": "/json", "db_url": "/db", @@ -26,7 +25,6 @@ "versus": "php7" }, "raw": { - "setup_file": "setup", "db_url": "/raw", "query_url": "/raw/queries/", "fortune_url": "/raw-fortune", diff --git a/frameworks/PHP/kumbiaphp/deploy/nginx.conf b/frameworks/PHP/kumbiaphp/deploy/nginx.conf index 49bd83335d0..cf416307048 100644 --- a/frameworks/PHP/kumbiaphp/deploy/nginx.conf +++ b/frameworks/PHP/kumbiaphp/deploy/nginx.conf @@ -1,65 +1,63 @@ -#user nobody; +user root; worker_processes auto; -error_log stderr error; -#pid logs/nginx.pid; - events { - worker_connections 16384; + worker_connections 16384; + multi_accept on; + use epoll; } http { - include INSTALL_ROOT/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; - - #access_log logs/access.log main; access_log off; server_tokens off; - sendfile on; - #tcp_nopush on; + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; - keepalive_timeout 65; - #gzip on; upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/var/run/php/php7.2-fpm.sock; keepalive 50; } + server { listen 8080; server_name localhost; - #location / { - # root html; - # index index.html index.htm; - #} - - - root TEST_ROOT; + root /kumbiaphp/bench/public/; index index.php; location / { - try_files $uri /index.php?_url=$uri&$args; + try_files $uri $uri/ /index.php?_url=$uri&$args; } - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9001 - # location ~ \.php$ { try_files $uri =404; fastcgi_pass fastcgi_backend; fastcgi_keep_conn on; fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include INSTALL_ROOT/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } } diff --git a/frameworks/PHP/kumbiaphp/deploy/php b/frameworks/PHP/kumbiaphp/deploy/php index e6ed79dc743..2ad3b3f9628 100755 --- a/frameworks/PHP/kumbiaphp/deploy/php +++ b/frameworks/PHP/kumbiaphp/deploy/php @@ -1,6 +1,6 @@ - Alias /php/ "TEST_ROOT" - + Alias /php/ "/kumbiaphp/bench/public" + Options Indexes FollowSymLinks MultiViews #AllowOverride None Order allow,deny diff --git a/frameworks/PHP/kumbiaphp/kumbiaphp-base.dockerfile b/frameworks/PHP/kumbiaphp/kumbiaphp-base.dockerfile new file mode 100644 index 00000000000..97b4c872683 --- /dev/null +++ b/frameworks/PHP/kumbiaphp/kumbiaphp-base.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/php7:0.1 + +ADD ./ /kumbiaphp +WORKDIR /kumbiaphp + +RUN git clone -b v1.0.0-rc.2 --single-branch --depth 1 https://github.com/KumbiaPHP/KumbiaPHP.git vendor/Kumbia +RUN git clone -b v0.4.0 --single-branch --depth 1 https://github.com/KumbiaPHP/ActiveRecord.git vendor/Kumbia/ActiveRecord diff --git a/frameworks/PHP/kumbiaphp/kumbiaphp-raw.dockerfile b/frameworks/PHP/kumbiaphp/kumbiaphp-raw.dockerfile new file mode 100644 index 00000000000..76890a907a3 --- /dev/null +++ b/frameworks/PHP/kumbiaphp/kumbiaphp-raw.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/kumbiaphp-base:0.1 + +CMD service php7.2-fpm start && \ + nginx -c /kumbiaphp/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/kumbiaphp/kumbiaphp.dockerfile b/frameworks/PHP/kumbiaphp/kumbiaphp.dockerfile new file mode 100644 index 00000000000..76890a907a3 --- /dev/null +++ b/frameworks/PHP/kumbiaphp/kumbiaphp.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/kumbiaphp-base:0.1 + +CMD service php7.2-fpm start && \ + nginx -c /kumbiaphp/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/kumbiaphp/setup.sh b/frameworks/PHP/kumbiaphp/setup.sh deleted file mode 100644 index b7de8f54bff..00000000000 --- a/frameworks/PHP/kumbiaphp/setup.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx - -sed -i "s|APP_ROOT|${TROOT}/bench/app/|g" bench/public/index.php -sed -i "s|CORE_ROOT|${TROOT}/vendor/Kumbia/core/|g" bench/public/index.php -sed -i "s|TEST_ROOT|${TROOT}/bench/public/|g" deploy/php -sed -i "s|TEST_ROOT|${TROOT}/bench/public/|g" deploy/nginx.conf -sed -i "s|INSTALL_ROOT|${IROOT}|g" deploy/nginx.conf - - -[[ ! -e vendor/Kumbia ]] || rm -rf vendor/Kumbia - -git clone -b v1.0.0-rc.2 --single-branch --depth 1 https://github.com/KumbiaPHP/KumbiaPHP.git vendor/Kumbia -git clone -b v0.4.0 --single-branch --depth 1 https://github.com/KumbiaPHP/ActiveRecord.git vendor/Kumbia/ActiveRecord - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g /tmp/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/laravel/.env b/frameworks/PHP/laravel/.env index 198703d3631..c1df7b09e0c 100644 --- a/frameworks/PHP/laravel/.env +++ b/frameworks/PHP/laravel/.env @@ -7,7 +7,7 @@ APP_URL=http://localhost LOG_CHANNEL=stack DB_CONNECTION=mysql -DB_HOST=__DBHOST__ +DB_HOST=tfb-database DB_PORT=3306 DB_DATABASE=hello_world DB_USERNAME=benchmarkdbuser diff --git a/frameworks/PHP/laravel/.env.example b/frameworks/PHP/laravel/.env.example deleted file mode 100644 index ec44a1259f0..00000000000 --- a/frameworks/PHP/laravel/.env.example +++ /dev/null @@ -1,39 +0,0 @@ -APP_NAME=Laravel -APP_ENV=local -APP_KEY= -APP_DEBUG=true -APP_URL=http://localhost - -LOG_CHANNEL=stack - -DB_CONNECTION=mysql -DB_HOST=127.0.0.1 -DB_PORT=3306 -DB_DATABASE=homestead -DB_USERNAME=homestead -DB_PASSWORD=secret - -BROADCAST_DRIVER=log -CACHE_DRIVER=file -SESSION_DRIVER=file -SESSION_LIFETIME=120 -QUEUE_DRIVER=sync - -REDIS_HOST=127.0.0.1 -REDIS_PASSWORD=null -REDIS_PORT=6379 - -MAIL_DRIVER=smtp -MAIL_HOST=smtp.mailtrap.io -MAIL_PORT=2525 -MAIL_USERNAME=null -MAIL_PASSWORD=null -MAIL_ENCRYPTION=null - -PUSHER_APP_ID= -PUSHER_APP_KEY= -PUSHER_APP_SECRET= -PUSHER_APP_CLUSTER=mt1 - -MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" -MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/frameworks/PHP/laravel/.gitattributes b/frameworks/PHP/laravel/.gitattributes deleted file mode 100644 index 967315dd3d1..00000000000 --- a/frameworks/PHP/laravel/.gitattributes +++ /dev/null @@ -1,5 +0,0 @@ -* text=auto -*.css linguist-vendored -*.scss linguist-vendored -*.js linguist-vendored -CHANGELOG.md export-ignore diff --git a/frameworks/PHP/laravel/.gitignore b/frameworks/PHP/laravel/.gitignore deleted file mode 100644 index bdd43339a3f..00000000000 --- a/frameworks/PHP/laravel/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -/node_modules -/public/hot -/public/storage -/storage/*.key -/vendor -/.idea -/.vscode -/.vagrant -Homestead.json -Homestead.yaml -npm-debug.log -yarn-error.log -deploy/php-fpm.pid \ No newline at end of file diff --git a/frameworks/PHP/laravel/benchmark_config.json b/frameworks/PHP/laravel/benchmark_config.json index 69779740c06..43fa5c9c414 100644 --- a/frameworks/PHP/laravel/benchmark_config.json +++ b/frameworks/PHP/laravel/benchmark_config.json @@ -3,7 +3,6 @@ "tests": [ { "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries/", diff --git a/frameworks/PHP/laravel/composer.lock b/frameworks/PHP/laravel/composer.lock deleted file mode 100644 index 5440d7e3eb0..00000000000 --- a/frameworks/PHP/laravel/composer.lock +++ /dev/null @@ -1,4020 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "content-hash": "a529934503639f8c6783b21b7efe77f1", - "packages": [ - { - "name": "dnoegel/php-xdg-base-dir", - "version": "0.1", - "source": { - "type": "git", - "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a", - "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "@stable" - }, - "type": "project", - "autoload": { - "psr-4": { - "XdgBaseDir\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "implementation of xdg base directory specification for php", - "time": "2014-10-24T07:27:01+00:00" - }, - { - "name": "doctrine/inflector", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "5527a48b7313d15261292c149e55e26eae771b0a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", - "reference": "5527a48b7313d15261292c149e55e26eae771b0a", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^6.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "inflection", - "pluralize", - "singularize", - "string" - ], - "time": "2018-01-09T20:05:19+00:00" - }, - { - "name": "doctrine/lexer", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ], - "time": "2014-09-09T13:34:57+00:00" - }, - { - "name": "dragonmantank/cron-expression", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "8a84aee649c3a3ba03a721c1fb080e08dfbcd68b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/8a84aee649c3a3ba03a721c1fb080e08dfbcd68b", - "reference": "8a84aee649c3a3ba03a721c1fb080e08dfbcd68b", - "shasum": "" - }, - "require": { - "php": ">=7.0.0" - }, - "require-dev": { - "phpunit/phpunit": "~5.7" - }, - "type": "library", - "autoload": { - "psr-4": { - "Cron\\": "src/Cron/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Chris Tankersley", - "email": "chris@ctankersley.com", - "homepage": "https://github.com/dragonmantank" - } - ], - "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", - "keywords": [ - "cron", - "schedule" - ], - "time": "2017-10-12T15:59:13+00:00" - }, - { - "name": "egulias/email-validator", - "version": "2.1.3", - "source": { - "type": "git", - "url": "https://github.com/egulias/EmailValidator.git", - "reference": "1bec00a10039b823cc94eef4eddd47dcd3b2ca04" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/1bec00a10039b823cc94eef4eddd47dcd3b2ca04", - "reference": "1bec00a10039b823cc94eef4eddd47dcd3b2ca04", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^1.0.1", - "php": ">= 5.5" - }, - "require-dev": { - "dominicsayers/isemail": "dev-master", - "phpunit/phpunit": "^4.8.35", - "satooshi/php-coveralls": "^1.0.1" - }, - "suggest": { - "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Egulias\\EmailValidator\\": "EmailValidator" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eduardo Gulias Davis" - } - ], - "description": "A library for validating emails against several RFCs", - "homepage": "https://github.com/egulias/EmailValidator", - "keywords": [ - "email", - "emailvalidation", - "emailvalidator", - "validation", - "validator" - ], - "time": "2017-11-15T23:40:40+00:00" - }, - { - "name": "erusev/parsedown", - "version": "1.7.1", - "source": { - "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", - "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35" - }, - "type": "library", - "autoload": { - "psr-0": { - "Parsedown": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org", - "keywords": [ - "markdown", - "parser" - ], - "time": "2018-03-08T01:11:30+00:00" - }, - { - "name": "fideloper/proxy", - "version": "4.0.0", - "source": { - "type": "git", - "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "cf8a0ca4b85659b9557e206c90110a6a4dba980a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/cf8a0ca4b85659b9557e206c90110a6a4dba980a", - "reference": "cf8a0ca4b85659b9557e206c90110a6a4dba980a", - "shasum": "" - }, - "require": { - "illuminate/contracts": "~5.0", - "php": ">=5.4.0" - }, - "require-dev": { - "illuminate/http": "~5.6", - "mockery/mockery": "~1.0", - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Fideloper\\Proxy\\TrustedProxyServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Fideloper\\Proxy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Fidao", - "email": "fideloper@gmail.com" - } - ], - "description": "Set trusted proxies for Laravel", - "keywords": [ - "load balancing", - "proxy", - "trusted proxy" - ], - "time": "2018-02-07T20:20:57+00:00" - }, - { - "name": "jakub-onderka/php-console-color", - "version": "0.1", - "source": { - "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", - "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1", - "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "jakub-onderka/php-code-style": "1.0", - "jakub-onderka/php-parallel-lint": "0.*", - "jakub-onderka/php-var-dump-check": "0.*", - "phpunit/phpunit": "3.7.*", - "squizlabs/php_codesniffer": "1.*" - }, - "type": "library", - "autoload": { - "psr-0": { - "JakubOnderka\\PhpConsoleColor": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "jakub.onderka@gmail.com", - "homepage": "http://www.acci.cz" - } - ], - "time": "2014-04-08T15:00:19+00:00" - }, - { - "name": "jakub-onderka/php-console-highlighter", - "version": "v0.3.2", - "source": { - "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", - "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/7daa75df45242c8d5b75a22c00a201e7954e4fb5", - "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5", - "shasum": "" - }, - "require": { - "jakub-onderka/php-console-color": "~0.1", - "php": ">=5.3.0" - }, - "require-dev": { - "jakub-onderka/php-code-style": "~1.0", - "jakub-onderka/php-parallel-lint": "~0.5", - "jakub-onderka/php-var-dump-check": "~0.1", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.5" - }, - "type": "library", - "autoload": { - "psr-0": { - "JakubOnderka\\PhpConsoleHighlighter": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "acci@acci.cz", - "homepage": "http://www.acci.cz/" - } - ], - "time": "2015-04-20T18:58:01+00:00" - }, - { - "name": "laravel/framework", - "version": "v5.6.9", - "source": { - "type": "git", - "url": "https://github.com/laravel/framework.git", - "reference": "98fdbb098cf52a74441fe949be121c18e3dbbe6a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/98fdbb098cf52a74441fe949be121c18e3dbbe6a", - "reference": "98fdbb098cf52a74441fe949be121c18e3dbbe6a", - "shasum": "" - }, - "require": { - "doctrine/inflector": "~1.1", - "dragonmantank/cron-expression": "~2.0", - "erusev/parsedown": "~1.7", - "ext-mbstring": "*", - "ext-openssl": "*", - "league/flysystem": "~1.0", - "monolog/monolog": "~1.12", - "nesbot/carbon": "^1.22.1", - "php": "^7.1.3", - "psr/container": "~1.0", - "psr/simple-cache": "^1.0", - "ramsey/uuid": "^3.7", - "swiftmailer/swiftmailer": "~6.0", - "symfony/console": "~4.0", - "symfony/debug": "~4.0", - "symfony/finder": "~4.0", - "symfony/http-foundation": "~4.0", - "symfony/http-kernel": "~4.0", - "symfony/process": "~4.0", - "symfony/routing": "~4.0", - "symfony/var-dumper": "~4.0", - "tijsverkoyen/css-to-inline-styles": "^2.2.1", - "vlucas/phpdotenv": "~2.2" - }, - "conflict": { - "tightenco/collect": "<5.5.33" - }, - "replace": { - "illuminate/auth": "self.version", - "illuminate/broadcasting": "self.version", - "illuminate/bus": "self.version", - "illuminate/cache": "self.version", - "illuminate/config": "self.version", - "illuminate/console": "self.version", - "illuminate/container": "self.version", - "illuminate/contracts": "self.version", - "illuminate/cookie": "self.version", - "illuminate/database": "self.version", - "illuminate/encryption": "self.version", - "illuminate/events": "self.version", - "illuminate/filesystem": "self.version", - "illuminate/hashing": "self.version", - "illuminate/http": "self.version", - "illuminate/log": "self.version", - "illuminate/mail": "self.version", - "illuminate/notifications": "self.version", - "illuminate/pagination": "self.version", - "illuminate/pipeline": "self.version", - "illuminate/queue": "self.version", - "illuminate/redis": "self.version", - "illuminate/routing": "self.version", - "illuminate/session": "self.version", - "illuminate/support": "self.version", - "illuminate/translation": "self.version", - "illuminate/validation": "self.version", - "illuminate/view": "self.version" - }, - "require-dev": { - "aws/aws-sdk-php": "~3.0", - "doctrine/dbal": "~2.6", - "filp/whoops": "^2.1.4", - "mockery/mockery": "~1.0", - "moontoast/math": "^1.1", - "orchestra/testbench-core": "3.6.*", - "pda/pheanstalk": "~3.0", - "phpunit/phpunit": "~7.0", - "predis/predis": "^1.1.1", - "symfony/css-selector": "~4.0", - "symfony/dom-crawler": "~4.0" - }, - "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.6).", - "ext-pcntl": "Required to use all features of the queue worker.", - "ext-posix": "Required to use all features of the queue worker.", - "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", - "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~6.0).", - "laravel/tinker": "Required to use the tinker console command (~1.0).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", - "league/flysystem-cached-adapter": "Required to use Flysystem caching (~1.0).", - "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", - "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (~1.0).", - "nexmo/client": "Required to use the Nexmo transport (~1.0).", - "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", - "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~3.0).", - "symfony/css-selector": "Required to use some of the crawler integration testing tools (~4.0).", - "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~4.0).", - "symfony/psr-http-message-bridge": "Required to psr7 bridging features (~1.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "files": [ - "src/Illuminate/Foundation/helpers.php", - "src/Illuminate/Support/helpers.php" - ], - "psr-4": { - "Illuminate\\": "src/Illuminate/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Laravel Framework.", - "homepage": "https://laravel.com", - "keywords": [ - "framework", - "laravel" - ], - "time": "2018-03-07T14:04:49+00:00" - }, - { - "name": "laravel/tinker", - "version": "v1.0.5", - "source": { - "type": "git", - "url": "https://github.com/laravel/tinker.git", - "reference": "94f6daf2131508cebd11cd6f8632ba586d7ecc41" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/94f6daf2131508cebd11cd6f8632ba586d7ecc41", - "reference": "94f6daf2131508cebd11cd6f8632ba586d7ecc41", - "shasum": "" - }, - "require": { - "illuminate/console": "~5.1", - "illuminate/contracts": "~5.1", - "illuminate/support": "~5.1", - "php": ">=5.5.9", - "psy/psysh": "0.7.*|0.8.*", - "symfony/var-dumper": "~3.0|~4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" - }, - "suggest": { - "illuminate/database": "The Illuminate Database package (~5.1)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, - "laravel": { - "providers": [ - "Laravel\\Tinker\\TinkerServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Laravel\\Tinker\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "Powerful REPL for the Laravel framework.", - "keywords": [ - "REPL", - "Tinker", - "laravel", - "psysh" - ], - "time": "2018-03-06T17:34:36+00:00" - }, - { - "name": "league/flysystem", - "version": "1.0.43", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "1ce7cc142d906ba58dc54c82915d355a9191c8a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/1ce7cc142d906ba58dc54c82915d355a9191c8a8", - "reference": "1ce7cc142d906ba58dc54c82915d355a9191c8a8", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "conflict": { - "league/flysystem-sftp": "<1.0.6" - }, - "require-dev": { - "ext-fileinfo": "*", - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7" - }, - "suggest": { - "ext-fileinfo": "Required for MimeType", - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Flysystem\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frenky.net" - } - ], - "description": "Filesystem abstraction: Many filesystems, one API.", - "keywords": [ - "Cloud Files", - "WebDAV", - "abstraction", - "aws", - "cloud", - "copy.com", - "dropbox", - "file systems", - "files", - "filesystem", - "filesystems", - "ftp", - "rackspace", - "remote", - "s3", - "sftp", - "storage" - ], - "time": "2018-03-01T10:27:04+00:00" - }, - { - "name": "monolog/monolog", - "version": "1.23.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4", - "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "1.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "jakub-onderka/php-parallel-lint": "0.9", - "php-amqplib/php-amqplib": "~2.4", - "php-console/php-console": "^3.1.3", - "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "2.3.0", - "ruflin/elastica": ">=0.90 <3.0", - "sentry/sentry": "^0.13", - "swiftmailer/swiftmailer": "^5.3|^6.0" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "sentry/sentry": "Allow sending log messages to a Sentry server" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "time": "2017-06-19T01:22:40+00:00" - }, - { - "name": "nesbot/carbon", - "version": "1.23.0", - "source": { - "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "4a874a39b2b00d7e0146cd46fab6f47c41ce9e65" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4a874a39b2b00d7e0146cd46fab6f47c41ce9e65", - "reference": "4a874a39b2b00d7e0146cd46fab6f47c41ce9e65", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "symfony/translation": "~2.6 || ~3.0 || ~4.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2", - "phpunit/phpunit": "^4.8.35 || ^5.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.23-dev" - } - }, - "autoload": { - "psr-4": { - "Carbon\\": "src/Carbon/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" - } - ], - "description": "A simple API extension for DateTime.", - "homepage": "http://carbon.nesbot.com", - "keywords": [ - "date", - "datetime", - "time" - ], - "time": "2018-02-28T09:22:05+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v3.1.5", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bb87e28e7d7b8d9a7fda231d37457c9210faf6ce", - "reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "time": "2018-02-28T20:30:58+00:00" - }, - { - "name": "paragonie/random_compat", - "version": "v2.0.11", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8", - "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "pseudorandom", - "random" - ], - "time": "2017-09-27T21:40:39+00:00" - }, - { - "name": "psr/container", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "time": "2017-02-14T16:28:37+00:00" - }, - { - "name": "psr/log", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2016-10-10T12:19:37+00:00" - }, - { - "name": "psr/simple-cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "time": "2017-10-23T01:57:42+00:00" - }, - { - "name": "psy/psysh", - "version": "v0.8.17", - "source": { - "type": "git", - "url": "https://github.com/bobthecow/psysh.git", - "reference": "5069b70e8c4ea492c2b5939b6eddc78bfe41cfec" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/5069b70e8c4ea492c2b5939b6eddc78bfe41cfec", - "reference": "5069b70e8c4ea492c2b5939b6eddc78bfe41cfec", - "shasum": "" - }, - "require": { - "dnoegel/php-xdg-base-dir": "0.1", - "jakub-onderka/php-console-highlighter": "0.3.*", - "nikic/php-parser": "~1.3|~2.0|~3.0", - "php": ">=5.3.9", - "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0", - "symfony/var-dumper": "~2.7|~3.0|~4.0" - }, - "require-dev": { - "hoa/console": "~3.16|~1.14", - "phpunit/phpunit": "^4.8.35|^5.4.3", - "symfony/finder": "~2.1|~3.0|~4.0" - }, - "suggest": { - "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", - "ext-pdo-sqlite": "The doc command requires SQLite to work.", - "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", - "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", - "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." - }, - "bin": [ - "bin/psysh" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-develop": "0.8.x-dev" - } - }, - "autoload": { - "files": [ - "src/Psy/functions.php" - ], - "psr-4": { - "Psy\\": "src/Psy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Justin Hileman", - "email": "justin@justinhileman.info", - "homepage": "http://justinhileman.com" - } - ], - "description": "An interactive shell for modern PHP.", - "homepage": "http://psysh.org", - "keywords": [ - "REPL", - "console", - "interactive", - "shell" - ], - "time": "2017-12-28T16:14:16+00:00" - }, - { - "name": "ramsey/uuid", - "version": "3.7.3", - "source": { - "type": "git", - "url": "https://github.com/ramsey/uuid.git", - "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/44abcdad877d9a46685a3a4d221e3b2c4b87cb76", - "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76", - "shasum": "" - }, - "require": { - "paragonie/random_compat": "^1.0|^2.0", - "php": "^5.4 || ^7.0" - }, - "replace": { - "rhumsaa/uuid": "self.version" - }, - "require-dev": { - "codeception/aspect-mock": "^1.0 | ~2.0.0", - "doctrine/annotations": "~1.2.0", - "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ^2.1", - "ircmaxell/random-lib": "^1.1", - "jakub-onderka/php-parallel-lint": "^0.9.0", - "mockery/mockery": "^0.9.9", - "moontoast/math": "^1.1", - "php-mock/php-mock-phpunit": "^0.3|^1.1", - "phpunit/phpunit": "^4.7|^5.0", - "squizlabs/php_codesniffer": "^2.3" - }, - "suggest": { - "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", - "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", - "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", - "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", - "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", - "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Ramsey\\Uuid\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marijn Huizendveld", - "email": "marijn.huizendveld@gmail.com" - }, - { - "name": "Thibaud Fabre", - "email": "thibaud@aztech.io" - }, - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - } - ], - "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", - "homepage": "https://github.com/ramsey/uuid", - "keywords": [ - "guid", - "identifier", - "uuid" - ], - "time": "2018-01-20T00:28:24+00:00" - }, - { - "name": "swiftmailer/swiftmailer", - "version": "v6.0.2", - "source": { - "type": "git", - "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "412333372fb6c8ffb65496a2bbd7321af75733fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/412333372fb6c8ffb65496a2bbd7321af75733fc", - "reference": "412333372fb6c8ffb65496a2bbd7321af75733fc", - "shasum": "" - }, - "require": { - "egulias/email-validator": "~2.0", - "php": ">=7.0.0" - }, - "require-dev": { - "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "~3.3@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.0-dev" - } - }, - "autoload": { - "files": [ - "lib/swift_required.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Corbyn" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "http://swiftmailer.symfony.com", - "keywords": [ - "email", - "mail", - "mailer" - ], - "time": "2017-09-30T22:39:41+00:00" - }, - { - "name": "symfony/console", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "555c8dbe0ae9e561740451eabdbed2cc554b6a51" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/555c8dbe0ae9e561740451eabdbed2cc554b6a51", - "reference": "555c8dbe0ae9e561740451eabdbed2cc554b6a51", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/process": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2018-02-26T15:55:47+00:00" - }, - { - "name": "symfony/css-selector", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/css-selector.git", - "reference": "c69f1e93aa898fd9fec627ebef467188151c8dc2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/c69f1e93aa898fd9fec627ebef467188151c8dc2", - "reference": "c69f1e93aa898fd9fec627ebef467188151c8dc2", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\CssSelector\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jean-François Simon", - "email": "jeanfrancois.simon@sensiolabs.com" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony CssSelector Component", - "homepage": "https://symfony.com", - "time": "2018-02-03T14:58:37+00:00" - }, - { - "name": "symfony/debug", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "1721e4e7effb23480966690cdcdc7d2a4152d489" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/1721e4e7effb23480966690cdcdc7d2a4152d489", - "reference": "1721e4e7effb23480966690cdcdc7d2a4152d489", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": "<3.4" - }, - "require-dev": { - "symfony/http-kernel": "~3.4|~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com", - "time": "2018-02-28T21:50:02+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "85eaf6a8ec915487abac52e133efc4a268204428" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/85eaf6a8ec915487abac52e133efc4a268204428", - "reference": "85eaf6a8ec915487abac52e133efc4a268204428", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "conflict": { - "symfony/dependency-injection": "<3.4" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/stopwatch": "~3.4|~4.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2018-02-14T14:11:10+00:00" - }, - { - "name": "symfony/finder", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "44a796d2ecc2a16a5fc8f2956a34ee617934d55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/44a796d2ecc2a16a5fc8f2956a34ee617934d55f", - "reference": "44a796d2ecc2a16a5fc8f2956a34ee617934d55f", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com", - "time": "2018-03-05T18:28:26+00:00" - }, - { - "name": "symfony/http-foundation", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "6c181e81a3a9a7996c62ebd7803592536e729c5a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6c181e81a3a9a7996c62ebd7803592536e729c5a", - "reference": "6c181e81a3a9a7996c62ebd7803592536e729c5a", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.1" - }, - "require-dev": { - "symfony/expression-language": "~3.4|~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpFoundation Component", - "homepage": "https://symfony.com", - "time": "2018-03-05T16:01:10+00:00" - }, - { - "name": "symfony/http-kernel", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "2a1ebfe8c37240500befcb17bceb3893adacffa3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/2a1ebfe8c37240500befcb17bceb3893adacffa3", - "reference": "2a1ebfe8c37240500befcb17bceb3893adacffa3", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "psr/log": "~1.0", - "symfony/debug": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/http-foundation": "~3.4.4|~4.0.4" - }, - "conflict": { - "symfony/config": "<3.4", - "symfony/dependency-injection": "<3.4.5|<4.0.5,>=4", - "symfony/var-dumper": "<3.4", - "twig/twig": "<1.34|<2.4,>=2" - }, - "provide": { - "psr/log-implementation": "1.0" - }, - "require-dev": { - "psr/cache": "~1.0", - "symfony/browser-kit": "~3.4|~4.0", - "symfony/config": "~3.4|~4.0", - "symfony/console": "~3.4|~4.0", - "symfony/css-selector": "~3.4|~4.0", - "symfony/dependency-injection": "^3.4.5|^4.0.5", - "symfony/dom-crawler": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/finder": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0", - "symfony/routing": "~3.4|~4.0", - "symfony/stopwatch": "~3.4|~4.0", - "symfony/templating": "~3.4|~4.0", - "symfony/translation": "~3.4|~4.0", - "symfony/var-dumper": "~3.4|~4.0" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/var-dumper": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpKernel\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpKernel Component", - "homepage": "https://symfony.com", - "time": "2018-03-05T22:27:01+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2018-01-30T19:27:44+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "8eca20c8a369e069d4f4c2ac9895144112867422" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/8eca20c8a369e069d4f4c2ac9895144112867422", - "reference": "8eca20c8a369e069d4f4c2ac9895144112867422", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2018-01-31T17:43:24+00:00" - }, - { - "name": "symfony/process", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "6ed08502a7c9559da8e60ea343bdbd19c3350b3e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/6ed08502a7c9559da8e60ea343bdbd19c3350b3e", - "reference": "6ed08502a7c9559da8e60ea343bdbd19c3350b3e", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com", - "time": "2018-02-19T12:18:43+00:00" - }, - { - "name": "symfony/routing", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/routing.git", - "reference": "9c6268c1970c7e507bedc8946bece32a7db23515" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/9c6268c1970c7e507bedc8946bece32a7db23515", - "reference": "9c6268c1970c7e507bedc8946bece32a7db23515", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "conflict": { - "symfony/config": "<3.4", - "symfony/dependency-injection": "<3.4", - "symfony/yaml": "<3.4" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "doctrine/common": "~2.2", - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/http-foundation": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "doctrine/annotations": "For using the annotation loader", - "symfony/config": "For using the all-in-one router or any loader", - "symfony/dependency-injection": "For loading routes from a service", - "symfony/expression-language": "For using expression matching", - "symfony/http-foundation": "For using a Symfony Request object", - "symfony/yaml": "For using the YAML loader" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Routing\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Routing Component", - "homepage": "https://symfony.com", - "keywords": [ - "router", - "routing", - "uri", - "url" - ], - "time": "2018-02-28T21:50:02+00:00" - }, - { - "name": "symfony/translation", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/e20a9b7f9f62cb33a11638b345c248e7d510c938", - "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/config": "<3.4", - "symfony/dependency-injection": "<3.4", - "symfony/yaml": "<3.4" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/finder": "~2.8|~3.0|~4.0", - "symfony/intl": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "psr/log": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Translation Component", - "homepage": "https://symfony.com", - "time": "2018-02-22T10:50:29+00:00" - }, - { - "name": "symfony/var-dumper", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "c7d89044ed6ed3b7d8b558d509cca0666b947e58" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c7d89044ed6ed3b7d8b558d509cca0666b947e58", - "reference": "c7d89044ed6ed3b7d8b558d509cca0666b947e58", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php72": "~1.5" - }, - "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" - }, - "require-dev": { - "ext-iconv": "*", - "twig/twig": "~1.34|~2.4" - }, - "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "files": [ - "Resources/functions/dump.php" - ], - "psr-4": { - "Symfony\\Component\\VarDumper\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony mechanism for exploring and dumping PHP variables", - "homepage": "https://symfony.com", - "keywords": [ - "debug", - "dump" - ], - "time": "2018-02-26T15:55:47+00:00" - }, - { - "name": "tijsverkoyen/css-to-inline-styles", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757", - "reference": "0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "symfony/css-selector": "^2.7 || ^3.0 || ^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "TijsVerkoyen\\CssToInlineStyles\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Tijs Verkoyen", - "email": "css_to_inline_styles@verkoyen.eu", - "role": "Developer" - } - ], - "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", - "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", - "time": "2017-11-27T11:13:29+00:00" - }, - { - "name": "vlucas/phpdotenv", - "version": "v2.4.0", - "source": { - "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", - "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-4": { - "Dotenv\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause-Attribution" - ], - "authors": [ - { - "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "http://www.vancelucas.com" - } - ], - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", - "keywords": [ - "dotenv", - "env", - "environment" - ], - "time": "2016-09-01T10:05:43+00:00" - } - ], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "^6.2.3", - "squizlabs/php_codesniffer": "^3.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2017-07-22T11:58:36+00:00" - }, - { - "name": "filp/whoops", - "version": "2.1.14", - "source": { - "type": "git", - "url": "https://github.com/filp/whoops.git", - "reference": "c6081b8838686aa04f1e83ba7e91f78b7b2a23e6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/c6081b8838686aa04f1e83ba7e91f78b7b2a23e6", - "reference": "c6081b8838686aa04f1e83ba7e91f78b7b2a23e6", - "shasum": "" - }, - "require": { - "php": "^5.5.9 || ^7.0", - "psr/log": "^1.0.1" - }, - "require-dev": { - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "^4.8.35 || ^5.7", - "symfony/var-dumper": "^2.6 || ^3.0" - }, - "suggest": { - "symfony/var-dumper": "Pretty print complex values better with var-dumper available", - "whoops/soap": "Formats errors as SOAP responses" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Whoops\\": "src/Whoops/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Filipe Dobreira", - "homepage": "https://github.com/filp", - "role": "Developer" - } - ], - "description": "php error handling for cool kids", - "homepage": "https://filp.github.io/whoops/", - "keywords": [ - "error", - "exception", - "handling", - "library", - "throwable", - "whoops" - ], - "time": "2017-11-23T18:22:44+00:00" - }, - { - "name": "fzaninotto/faker", - "version": "v1.7.1", - "source": { - "type": "git", - "url": "https://github.com/fzaninotto/Faker.git", - "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", - "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "ext-intl": "*", - "phpunit/phpunit": "^4.0 || ^5.0", - "squizlabs/php_codesniffer": "^1.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Faker\\": "src/Faker/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "François Zaninotto" - } - ], - "description": "Faker is a PHP library that generates fake data for you.", - "keywords": [ - "data", - "faker", - "fixtures" - ], - "time": "2017-08-15T16:48:10+00:00" - }, - { - "name": "hamcrest/hamcrest-php", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad", - "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad", - "shasum": "" - }, - "require": { - "php": "^5.3|^7.0" - }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" - }, - "require-dev": { - "phpunit/php-file-iterator": "1.3.3", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "hamcrest" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD" - ], - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": [ - "test" - ], - "time": "2016-01-20T08:20:44+00:00" - }, - { - "name": "mockery/mockery", - "version": "1.0", - "source": { - "type": "git", - "url": "https://github.com/mockery/mockery.git", - "reference": "1bac8c362b12f522fdd1f1fa3556284c91affa38" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/1bac8c362b12f522fdd1f1fa3556284c91affa38", - "reference": "1bac8c362b12f522fdd1f1fa3556284c91affa38", - "shasum": "" - }, - "require": { - "hamcrest/hamcrest-php": "~2.0", - "lib-pcre": ">=7.0", - "php": ">=5.6.0" - }, - "require-dev": { - "phpunit/phpunit": "~5.7|~6.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Mockery": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" - }, - { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" - } - ], - "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", - "homepage": "http://github.com/mockery/mockery", - "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ], - "time": "2017-10-06T16:20:43+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.7.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^4.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2017-10-19T19:58:43+00:00" - }, - { - "name": "nunomaduro/collision", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/nunomaduro/collision.git", - "reference": "4e310ef9384f53ee8dda8736afb3cbaf320753a0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/4e310ef9384f53ee8dda8736afb3cbaf320753a0", - "reference": "4e310ef9384f53ee8dda8736afb3cbaf320753a0", - "shasum": "" - }, - "require": { - "filp/whoops": "^2.1.4", - "jakub-onderka/php-console-highlighter": "0.3.*", - "php": "^7.1", - "symfony/console": "~2.8|~3.3|~4.0" - }, - "require-dev": { - "laravel/framework": "5.6.*", - "phpunit/phpunit": "~7.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "NunoMaduro\\Collision\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" - } - ], - "description": "Cli error handling for console/command-line PHP applications.", - "keywords": [ - "artisan", - "cli", - "command-line", - "console", - "error", - "handling", - "laravel", - "laravel-zero", - "php", - "symfony" - ], - "time": "2018-02-18T12:29:27+00:00" - }, - { - "name": "phar-io/manifest", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "phar-io/version": "^1.0.1", - "php": "^5.6 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2017-03-05T18:14:27+00:00" - }, - { - "name": "phar-io/version", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "time": "2017-03-05T17:38:23+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2017-09-11T18:02:19+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "4.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08", - "shasum": "" - }, - "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "doctrine/instantiator": "~1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-30T07:14:17+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "time": "2017-07-14T14:27:02+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "1.7.5", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2018-02-19T10:16:54+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "6.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f8ca4b604baf23dab89d87773c28cc07405189ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f8ca4b604baf23dab89d87773c28cc07405189ba", - "reference": "f8ca4b604baf23dab89d87773c28cc07405189ba", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^1.4.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.0", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "suggest": { - "ext-xdebug": "^2.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2018-02-02T07:01:41+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2017-11-27T13:52:08+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", - "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2018-02-01T13:07:23+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", - "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2018-02-01T13:16:43+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "7.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e2f8aa21bc54b6ba218bdd4f9e0dac1e9bc3b4e9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e2f8aa21bc54b6ba218bdd4f9e0dac1e9bc3b4e9", - "reference": "e2f8aa21bc54b6ba218bdd4f9e0dac1e9bc3b4e9", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "myclabs/deep-copy": "^1.6.1", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0", - "phpunit/php-file-iterator": "^1.4.3", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.0", - "phpunit/phpunit-mock-objects": "^6.0", - "sebastian/comparator": "^2.1", - "sebastian/diff": "^3.0", - "sebastian/environment": "^3.1", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", - "sebastian/version": "^2.0.1" - }, - "require-dev": { - "ext-pdo": "*" - }, - "suggest": { - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2018-02-26T07:03:12+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "6.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "e3249dedc2d99259ccae6affbc2684eac37c2e53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/e3249dedc2d99259ccae6affbc2684eac37c2e53", - "reference": "e3249dedc2d99259ccae6affbc2684eac37c2e53", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.5", - "php": "^7.1", - "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2018-02-15T05:27:38+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" - }, - { - "name": "sebastian/comparator", - "version": "2.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2018-02-01T13:46:46+00:00" - }, - { - "name": "sebastian/diff", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e09160918c66281713f1c324c1f4c4c3037ba1e8", - "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0", - "symfony/process": "^2 || ^3.3 || ^4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "time": "2018-02-01T13:45:15+00:00" - }, - { - "name": "sebastian/environment", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2017-07-01T08:51:00+00:00" - }, - { - "name": "sebastian/exporter", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2017-04-03T13:19:02+00:00" - }, - { - "name": "sebastian/global-state", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2017-04-27T15:39:26+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" - }, - { - "name": "sebastian/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" - }, - { - "name": "symfony/thanks", - "version": "v1.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/thanks.git", - "reference": "9474ce305253c2f0bc20322ff8e9973cf25c9a94" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/thanks/zipball/9474ce305253c2f0bc20322ff8e9973cf25c9a94", - "reference": "9474ce305253c2f0bc20322ff8e9973cf25c9a94", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0", - "php": "^5.5.9|^7.0.0" - }, - "type": "composer-plugin", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, - "class": "Symfony\\Thanks\\Thanks" - }, - "autoload": { - "psr-4": { - "Symfony\\Thanks\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - } - ], - "description": "Give thanks (in the form of a GitHub ⭐) to your fellow PHP package maintainers (not limited to Symfony components)!", - "time": "2018-02-02T13:47:40+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2017-04-07T12:08:54+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2018-01-29T19:49:41+00:00" - } - ], - "aliases": [], - "minimum-stability": "dev", - "stability-flags": [], - "prefer-stable": true, - "prefer-lowest": false, - "platform": { - "php": ">=7.1.3" - }, - "platform-dev": [] -} diff --git a/frameworks/PHP/laravel/deploy/nginx.conf b/frameworks/PHP/laravel/deploy/nginx.conf index 8cb23b7defe..632d3bf906e 100755 --- a/frameworks/PHP/laravel/deploy/nginx.conf +++ b/frameworks/PHP/laravel/deploy/nginx.conf @@ -1,41 +1,63 @@ - -worker_processes auto; -error_log stderr error; +user root; +worker_processes auto; events { - worker_connections 16384; + worker_connections 16384; + multi_accept on; + use epoll; } http { - include __IROOT__/nginx/conf/mime.types; - default_type application/octet-stream; - access_log off; - server_tokens off; - sendfile on; - keepalive_timeout 65; + include /nginx/conf/mime.types; + default_type application/octet-stream; + access_log off; + server_tokens off; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; + upstream fastcgi_backend { - server 127.0.0.1:9001; - keepalive 50; + server unix:/var/run/php/php7.2-fpm.sock; + keepalive 50; } server { - listen 8080; - server_name localhost; - root __TROOT__/public; - index index.php; + listen 8080; + server_name localhost; + + root /laravel/public/; + index index.php; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { - try_files $uri =404; - fastcgi_pass fastcgi_backend; - fastcgi_keep_conn on; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include __IROOT__/nginx/conf/fastcgi_params; + try_files $uri =404; + fastcgi_pass fastcgi_backend; + fastcgi_keep_conn on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include /nginx/conf/fastcgi_params; } } } diff --git a/frameworks/PHP/laravel/laravel.dockerfile b/frameworks/PHP/laravel/laravel.dockerfile new file mode 100644 index 00000000000..6760cc59dda --- /dev/null +++ b/frameworks/PHP/laravel/laravel.dockerfile @@ -0,0 +1,14 @@ +FROM techempower/php7:0.1 + +ADD ./ /laravel +WORKDIR /laravel + +RUN composer.phar install --no-progress + +RUN php artisan config:cache +RUN php artisan route:cache + +RUN chmod -R 777 /laravel + +CMD service php7.2-fpm start && \ + nginx -c /laravel/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/laravel/public/css/app.css b/frameworks/PHP/laravel/public/css/app.css deleted file mode 100644 index 8b4dc7e9e91..00000000000 --- a/frameworks/PHP/laravel/public/css/app.css +++ /dev/null @@ -1,6 +0,0 @@ -@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);/*! - * Bootstrap v4.0.0 (https://getbootstrap.com) - * Copyright 2011-2018 The Bootstrap Authors - * Copyright 2011-2018 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:"Raleway",sans-serif;--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:Raleway,sans-serif;font-size:.9rem;font-weight:400;line-height:1.6;color:#212529;text-align:left;background-color:#f5f8fa}[tabindex="-1"]:focus{outline:0!important}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{font-style:normal;line-height:inherit}address,dl,ol,ul{margin-bottom:1rem}dl,ol,ul{margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]),a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-family:inherit;font-weight:500;line-height:1.2;color:inherit}.h1,h1{font-size:2.25rem}.h2,h2{font-size:1.8rem}.h3,h3{font-size:1.575rem}.h4,h4{font-size:1.35rem}.h5,h5{font-size:1.125rem}.h6,h6{font-size:.9rem}.lead{font-size:1.125rem;font-weight:300}.display-1{font-size:6rem}.display-1,.display-2{font-weight:300;line-height:1.2}.display-2{font-size:5.5rem}.display-3{font-size:4.5rem}.display-3,.display-4{font-weight:300;line-height:1.2}.display-4{font-size:3.5rem}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.125rem}.blockquote-footer{display:block;font-size:80%;color:#6c757d}.blockquote-footer:before{content:"\2014 \A0"}.img-fluid,.img-thumbnail{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#f5f8fa;border:1px solid #dee2e6;border-radius:.25rem}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}code{font-size:87.5%;color:#e83e8c;word-break:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container{max-width:540px}}@media (min-width:768px){.container{max-width:720px}}@media (min-width:992px){.container{max-width:960px}}@media (min-width:1200px){.container{max-width:1140px}}.container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col,.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12,.col-auto,.col-lg,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-auto,.col-md,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-md-auto,.col-sm,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-auto{position:relative;width:100%;min-height:1px;padding-right:15px;padding-left:15px}.col{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-1,.col-auto{-webkit-box-flex:0}.col-1{-ms-flex:0 0 8.33333333%;flex:0 0 8.33333333%;max-width:8.33333333%}.col-2{-ms-flex:0 0 16.66666667%;flex:0 0 16.66666667%;max-width:16.66666667%}.col-2,.col-3{-webkit-box-flex:0}.col-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-4{-ms-flex:0 0 33.33333333%;flex:0 0 33.33333333%;max-width:33.33333333%}.col-4,.col-5{-webkit-box-flex:0}.col-5{-ms-flex:0 0 41.66666667%;flex:0 0 41.66666667%;max-width:41.66666667%}.col-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-6,.col-7{-webkit-box-flex:0}.col-7{-ms-flex:0 0 58.33333333%;flex:0 0 58.33333333%;max-width:58.33333333%}.col-8{-ms-flex:0 0 66.66666667%;flex:0 0 66.66666667%;max-width:66.66666667%}.col-8,.col-9{-webkit-box-flex:0}.col-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-10{-ms-flex:0 0 83.33333333%;flex:0 0 83.33333333%;max-width:83.33333333%}.col-10,.col-11{-webkit-box-flex:0}.col-11{-ms-flex:0 0 91.66666667%;flex:0 0 91.66666667%;max-width:91.66666667%}.col-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.order-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.order-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.order-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.order-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.order-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.order-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.order-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.order-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.order-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.order-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.order-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.order-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.order-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.order-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}@media (min-width:576px){.col-sm{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-sm-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-sm-1{-webkit-box-flex:0;-ms-flex:0 0 8.33333333%;flex:0 0 8.33333333%;max-width:8.33333333%}.col-sm-2{-webkit-box-flex:0;-ms-flex:0 0 16.66666667%;flex:0 0 16.66666667%;max-width:16.66666667%}.col-sm-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-sm-4{-webkit-box-flex:0;-ms-flex:0 0 33.33333333%;flex:0 0 33.33333333%;max-width:33.33333333%}.col-sm-5{-webkit-box-flex:0;-ms-flex:0 0 41.66666667%;flex:0 0 41.66666667%;max-width:41.66666667%}.col-sm-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-sm-7{-webkit-box-flex:0;-ms-flex:0 0 58.33333333%;flex:0 0 58.33333333%;max-width:58.33333333%}.col-sm-8{-webkit-box-flex:0;-ms-flex:0 0 66.66666667%;flex:0 0 66.66666667%;max-width:66.66666667%}.col-sm-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-sm-10{-webkit-box-flex:0;-ms-flex:0 0 83.33333333%;flex:0 0 83.33333333%;max-width:83.33333333%}.col-sm-11{-webkit-box-flex:0;-ms-flex:0 0 91.66666667%;flex:0 0 91.66666667%;max-width:91.66666667%}.col-sm-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-sm-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.order-sm-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.order-sm-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.order-sm-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.order-sm-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.order-sm-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.order-sm-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.order-sm-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.order-sm-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.order-sm-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.order-sm-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.order-sm-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.order-sm-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.order-sm-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.order-sm-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}}@media (min-width:768px){.col-md{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-md-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-md-1{-webkit-box-flex:0;-ms-flex:0 0 8.33333333%;flex:0 0 8.33333333%;max-width:8.33333333%}.col-md-2{-webkit-box-flex:0;-ms-flex:0 0 16.66666667%;flex:0 0 16.66666667%;max-width:16.66666667%}.col-md-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-md-4{-webkit-box-flex:0;-ms-flex:0 0 33.33333333%;flex:0 0 33.33333333%;max-width:33.33333333%}.col-md-5{-webkit-box-flex:0;-ms-flex:0 0 41.66666667%;flex:0 0 41.66666667%;max-width:41.66666667%}.col-md-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-md-7{-webkit-box-flex:0;-ms-flex:0 0 58.33333333%;flex:0 0 58.33333333%;max-width:58.33333333%}.col-md-8{-webkit-box-flex:0;-ms-flex:0 0 66.66666667%;flex:0 0 66.66666667%;max-width:66.66666667%}.col-md-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-md-10{-webkit-box-flex:0;-ms-flex:0 0 83.33333333%;flex:0 0 83.33333333%;max-width:83.33333333%}.col-md-11{-webkit-box-flex:0;-ms-flex:0 0 91.66666667%;flex:0 0 91.66666667%;max-width:91.66666667%}.col-md-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-md-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.order-md-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.order-md-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.order-md-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.order-md-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.order-md-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.order-md-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.order-md-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.order-md-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.order-md-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.order-md-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.order-md-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.order-md-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.order-md-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.order-md-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}}@media (min-width:992px){.col-lg{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-lg-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-lg-1{-webkit-box-flex:0;-ms-flex:0 0 8.33333333%;flex:0 0 8.33333333%;max-width:8.33333333%}.col-lg-2{-webkit-box-flex:0;-ms-flex:0 0 16.66666667%;flex:0 0 16.66666667%;max-width:16.66666667%}.col-lg-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-lg-4{-webkit-box-flex:0;-ms-flex:0 0 33.33333333%;flex:0 0 33.33333333%;max-width:33.33333333%}.col-lg-5{-webkit-box-flex:0;-ms-flex:0 0 41.66666667%;flex:0 0 41.66666667%;max-width:41.66666667%}.col-lg-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-lg-7{-webkit-box-flex:0;-ms-flex:0 0 58.33333333%;flex:0 0 58.33333333%;max-width:58.33333333%}.col-lg-8{-webkit-box-flex:0;-ms-flex:0 0 66.66666667%;flex:0 0 66.66666667%;max-width:66.66666667%}.col-lg-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-lg-10{-webkit-box-flex:0;-ms-flex:0 0 83.33333333%;flex:0 0 83.33333333%;max-width:83.33333333%}.col-lg-11{-webkit-box-flex:0;-ms-flex:0 0 91.66666667%;flex:0 0 91.66666667%;max-width:91.66666667%}.col-lg-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-lg-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.order-lg-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.order-lg-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.order-lg-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.order-lg-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.order-lg-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.order-lg-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.order-lg-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.order-lg-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.order-lg-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.order-lg-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.order-lg-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.order-lg-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.order-lg-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.order-lg-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}}@media (min-width:1200px){.col-xl{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-xl-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-xl-1{-webkit-box-flex:0;-ms-flex:0 0 8.33333333%;flex:0 0 8.33333333%;max-width:8.33333333%}.col-xl-2{-webkit-box-flex:0;-ms-flex:0 0 16.66666667%;flex:0 0 16.66666667%;max-width:16.66666667%}.col-xl-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-xl-4{-webkit-box-flex:0;-ms-flex:0 0 33.33333333%;flex:0 0 33.33333333%;max-width:33.33333333%}.col-xl-5{-webkit-box-flex:0;-ms-flex:0 0 41.66666667%;flex:0 0 41.66666667%;max-width:41.66666667%}.col-xl-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-xl-7{-webkit-box-flex:0;-ms-flex:0 0 58.33333333%;flex:0 0 58.33333333%;max-width:58.33333333%}.col-xl-8{-webkit-box-flex:0;-ms-flex:0 0 66.66666667%;flex:0 0 66.66666667%;max-width:66.66666667%}.col-xl-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-xl-10{-webkit-box-flex:0;-ms-flex:0 0 83.33333333%;flex:0 0 83.33333333%;max-width:83.33333333%}.col-xl-11{-webkit-box-flex:0;-ms-flex:0 0 91.66666667%;flex:0 0 91.66666667%;max-width:91.66666667%}.col-xl-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-xl-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.order-xl-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.order-xl-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.order-xl-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.order-xl-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.order-xl-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.order-xl-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.order-xl-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.order-xl-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.order-xl-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.order-xl-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.order-xl-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.order-xl-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.order-xl-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.order-xl-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}}.table{width:100%;max-width:100%;margin-bottom:1rem;background-color:transparent}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table .table{background-color:#f5f8fa}.table-sm td,.table-sm th{padding:.3rem}.table-bordered,.table-bordered td,.table-bordered th{border:1px solid #dee2e6}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#b8daff}.table-hover .table-primary:hover,.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#9fcdff}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#d6d8db}.table-hover .table-secondary:hover,.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#c8cbcf}.table-success,.table-success>td,.table-success>th{background-color:#c3e6cb}.table-hover .table-success:hover,.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#b1dfbb}.table-info,.table-info>td,.table-info>th{background-color:#bee5eb}.table-hover .table-info:hover,.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#abdde5}.table-warning,.table-warning>td,.table-warning>th{background-color:#ffeeba}.table-hover .table-warning:hover,.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe8a1}.table-danger,.table-danger>td,.table-danger>th{background-color:#f5c6cb}.table-hover .table-danger:hover,.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f1b0b7}.table-light,.table-light>td,.table-light>th{background-color:#fdfdfe}.table-hover .table-light:hover,.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>td,.table-dark>th{background-color:#c6c8ca}.table-hover .table-dark:hover,.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#b9bbbe}.table-active,.table-active>td,.table-active>th,.table-hover .table-active:hover,.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#f5f8fa;background-color:#212529;border-color:#32383e}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#f5f8fa;background-color:#212529}.table-dark td,.table-dark th,.table-dark thead th{border-color:#32383e}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:hsla(0,0%,100%,.05)}.table-dark.table-hover tbody tr:hover{background-color:hsla(0,0%,100%,.075)}@media (max-width:575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-sm>.table-bordered{border:0}}@media (max-width:767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-md>.table-bordered{border:0}}@media (max-width:991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-lg>.table-bordered{border:0}}@media (max-width:1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive>.table-bordered{border:0}.form-control{display:block;width:100%;padding:.375rem .75rem;font-size:.9rem;line-height:1.6;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0;-webkit-box-shadow:0 0 0 .2rem rgba(0,123,255,.25);box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.form-control::-webkit-input-placeholder{color:#6c757d;opacity:1}.form-control:-ms-input-placeholder,.form-control::-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}select.form-control:not([size]):not([multiple]){height:calc(2.19rem + 2px)}select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.6}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.125rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.7875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding-top:.375rem;padding-bottom:.375rem;margin-bottom:0;line-height:1.6;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm,.input-group-lg>.form-control-plaintext.form-control,.input-group-lg>.input-group-append>.form-control-plaintext.btn,.input-group-lg>.input-group-append>.form-control-plaintext.input-group-text,.input-group-lg>.input-group-prepend>.form-control-plaintext.btn,.input-group-lg>.input-group-prepend>.form-control-plaintext.input-group-text,.input-group-sm>.form-control-plaintext.form-control,.input-group-sm>.input-group-append>.form-control-plaintext.btn,.input-group-sm>.input-group-append>.form-control-plaintext.input-group-text,.input-group-sm>.input-group-prepend>.form-control-plaintext.btn,.input-group-sm>.input-group-prepend>.form-control-plaintext.input-group-text{padding-right:0;padding-left:0}.form-control-sm,.input-group-sm>.form-control,.input-group-sm>.input-group-append>.btn,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.7875rem;line-height:1.5;border-radius:.2rem}.input-group-sm>.input-group-append>select.btn:not([size]):not([multiple]),.input-group-sm>.input-group-append>select.input-group-text:not([size]):not([multiple]),.input-group-sm>.input-group-prepend>select.btn:not([size]):not([multiple]),.input-group-sm>.input-group-prepend>select.input-group-text:not([size]):not([multiple]),.input-group-sm>select.form-control:not([size]):not([multiple]),select.form-control-sm:not([size]):not([multiple]){height:calc(1.68125rem + 2px)}.form-control-lg,.input-group-lg>.form-control,.input-group-lg>.input-group-append>.btn,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.125rem;line-height:1.5;border-radius:.3rem}.input-group-lg>.input-group-append>select.btn:not([size]):not([multiple]),.input-group-lg>.input-group-append>select.input-group-text:not([size]):not([multiple]),.input-group-lg>.input-group-prepend>select.btn:not([size]):not([multiple]),.input-group-lg>.input-group-prepend>select.input-group-text:not([size]):not([multiple]),.input-group-lg>select.form-control:not([size]):not([multiple]),select.form-control-lg:not([size]):not([multiple]){height:calc(2.6875rem + 2px)}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#28a745}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.5rem;margin-top:.1rem;font-size:.875rem;line-height:1;color:#fff;background-color:rgba(40,167,69,.8);border-radius:.2rem}.custom-select.is-valid,.form-control.is-valid,.was-validated .custom-select:valid,.was-validated .form-control:valid{border-color:#28a745}.custom-select.is-valid:focus,.form-control.is-valid:focus,.was-validated .custom-select:valid:focus,.was-validated .form-control:valid:focus{border-color:#28a745;-webkit-box-shadow:0 0 0 .2rem rgba(40,167,69,.25);box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.custom-select.is-valid~.valid-feedback,.custom-select.is-valid~.valid-tooltip,.form-control.is-valid~.valid-feedback,.form-control.is-valid~.valid-tooltip,.was-validated .custom-select:valid~.valid-feedback,.was-validated .custom-select:valid~.valid-tooltip,.was-validated .form-control:valid~.valid-feedback,.was-validated .form-control:valid~.valid-tooltip{display:block}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#28a745}.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip,.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:#28a745}.custom-control-input.is-valid~.custom-control-label:before,.was-validated .custom-control-input:valid~.custom-control-label:before{background-color:#71dd8a}.custom-control-input.is-valid~.valid-feedback,.custom-control-input.is-valid~.valid-tooltip,.was-validated .custom-control-input:valid~.valid-feedback,.was-validated .custom-control-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid:checked~.custom-control-label:before,.was-validated .custom-control-input:valid:checked~.custom-control-label:before{background-color:#34ce57}.custom-control-input.is-valid:focus~.custom-control-label:before,.was-validated .custom-control-input:valid:focus~.custom-control-label:before{-webkit-box-shadow:0 0 0 1px #f5f8fa,0 0 0 .2rem rgba(40,167,69,.25);box-shadow:0 0 0 1px #f5f8fa,0 0 0 .2rem rgba(40,167,69,.25)}.custom-file-input.is-valid~.custom-file-label,.was-validated .custom-file-input:valid~.custom-file-label{border-color:#28a745}.custom-file-input.is-valid~.custom-file-label:before,.was-validated .custom-file-input:valid~.custom-file-label:before{border-color:inherit}.custom-file-input.is-valid~.valid-feedback,.custom-file-input.is-valid~.valid-tooltip,.was-validated .custom-file-input:valid~.valid-feedback,.was-validated .custom-file-input:valid~.valid-tooltip{display:block}.custom-file-input.is-valid:focus~.custom-file-label,.was-validated .custom-file-input:valid:focus~.custom-file-label{-webkit-box-shadow:0 0 0 .2rem rgba(40,167,69,.25);box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.5rem;margin-top:.1rem;font-size:.875rem;line-height:1;color:#fff;background-color:rgba(220,53,69,.8);border-radius:.2rem}.custom-select.is-invalid,.form-control.is-invalid,.was-validated .custom-select:invalid,.was-validated .form-control:invalid{border-color:#dc3545}.custom-select.is-invalid:focus,.form-control.is-invalid:focus,.was-validated .custom-select:invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;-webkit-box-shadow:0 0 0 .2rem rgba(220,53,69,.25);box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.custom-select.is-invalid~.invalid-feedback,.custom-select.is-invalid~.invalid-tooltip,.form-control.is-invalid~.invalid-feedback,.form-control.is-invalid~.invalid-tooltip,.was-validated .custom-select:invalid~.invalid-feedback,.was-validated .custom-select:invalid~.invalid-tooltip,.was-validated .form-control:invalid~.invalid-feedback,.was-validated .form-control:invalid~.invalid-tooltip{display:block}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip,.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid~.custom-control-label,.was-validated .custom-control-input:invalid~.custom-control-label{color:#dc3545}.custom-control-input.is-invalid~.custom-control-label:before,.was-validated .custom-control-input:invalid~.custom-control-label:before{background-color:#efa2a9}.custom-control-input.is-invalid~.invalid-feedback,.custom-control-input.is-invalid~.invalid-tooltip,.was-validated .custom-control-input:invalid~.invalid-feedback,.was-validated .custom-control-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid:checked~.custom-control-label:before,.was-validated .custom-control-input:invalid:checked~.custom-control-label:before{background-color:#e4606d}.custom-control-input.is-invalid:focus~.custom-control-label:before,.was-validated .custom-control-input:invalid:focus~.custom-control-label:before{-webkit-box-shadow:0 0 0 1px #f5f8fa,0 0 0 .2rem rgba(220,53,69,.25);box-shadow:0 0 0 1px #f5f8fa,0 0 0 .2rem rgba(220,53,69,.25)}.custom-file-input.is-invalid~.custom-file-label,.was-validated .custom-file-input:invalid~.custom-file-label{border-color:#dc3545}.custom-file-input.is-invalid~.custom-file-label:before,.was-validated .custom-file-input:invalid~.custom-file-label:before{border-color:inherit}.custom-file-input.is-invalid~.invalid-feedback,.custom-file-input.is-invalid~.invalid-tooltip,.was-validated .custom-file-input:invalid~.invalid-feedback,.was-validated .custom-file-input:invalid~.invalid-tooltip{display:block}.custom-file-input.is-invalid:focus~.custom-file-label,.was-validated .custom-file-input:invalid:focus~.custom-file-label{-webkit-box-shadow:0 0 0 .2rem rgba(220,53,69,.25);box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-inline{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.form-inline .form-check{width:100%}@media (min-width:576px){.form-inline label{-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.form-inline .form-group,.form-inline label{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;align-items:center;margin-bottom:0}.form-inline .form-group{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .input-group{width:auto}.form-inline .form-check{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.375rem .75rem;font-size:.9rem;line-height:1.6;border-radius:.25rem;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out}.btn:focus,.btn:hover{text-decoration:none}.btn.focus,.btn:focus{outline:0;-webkit-box-shadow:0 0 0 .2rem rgba(0,123,255,.25);box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.btn.disabled,.btn:disabled{opacity:.65}.btn:not(:disabled):not(.disabled){cursor:pointer}.btn:not(:disabled):not(.disabled).active,.btn:not(:disabled):not(.disabled):active{background-image:none}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:hover{color:#fff;background-color:#0069d9;border-color:#0062cc}.btn-primary.focus,.btn-primary:focus{-webkit-box-shadow:0 0 0 .2rem rgba(0,123,255,.5);box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:not(:disabled):not(.disabled).active,.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0062cc;border-color:#005cbf}.btn-primary:not(:disabled):not(.disabled).active:focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(0,123,255,.5);box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5a6268;border-color:#545b62}.btn-secondary.focus,.btn-secondary:focus{-webkit-box-shadow:0 0 0 .2rem hsla(208,7%,46%,.5);box-shadow:0 0 0 .2rem hsla(208,7%,46%,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:not(:disabled):not(.disabled).active,.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#545b62;border-color:#4e555b}.btn-secondary:not(:disabled):not(.disabled).active:focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem hsla(208,7%,46%,.5);box-shadow:0 0 0 .2rem hsla(208,7%,46%,.5)}.btn-success{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:hover{color:#fff;background-color:#218838;border-color:#1e7e34}.btn-success.focus,.btn-success:focus{-webkit-box-shadow:0 0 0 .2rem rgba(40,167,69,.5);box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:not(:disabled):not(.disabled).active,.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#1e7e34;border-color:#1c7430}.btn-success:not(:disabled):not(.disabled).active:focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(40,167,69,.5);box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-info{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:hover{color:#fff;background-color:#138496;border-color:#117a8b}.btn-info.focus,.btn-info:focus{-webkit-box-shadow:0 0 0 .2rem rgba(23,162,184,.5);box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:not(:disabled):not(.disabled).active,.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#117a8b;border-color:#10707f}.btn-info:not(:disabled):not(.disabled).active:focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(23,162,184,.5);box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-warning{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#212529;background-color:#e0a800;border-color:#d39e00}.btn-warning.focus,.btn-warning:focus{-webkit-box-shadow:0 0 0 .2rem rgba(255,193,7,.5);box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:not(:disabled):not(.disabled).active,.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#d39e00;border-color:#c69500}.btn-warning:not(:disabled):not(.disabled).active:focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(255,193,7,.5);box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#c82333;border-color:#bd2130}.btn-danger.focus,.btn-danger:focus{-webkit-box-shadow:0 0 0 .2rem rgba(220,53,69,.5);box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:not(:disabled):not(.disabled).active,.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#bd2130;border-color:#b21f2d}.btn-danger:not(:disabled):not(.disabled).active:focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(220,53,69,.5);box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light.focus,.btn-light:focus{-webkit-box-shadow:0 0 0 .2rem rgba(248,249,250,.5);box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled).active,.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled).active:focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(248,249,250,.5);box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-dark{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:hover{color:#fff;background-color:#23272b;border-color:#1d2124}.btn-dark.focus,.btn-dark:focus{-webkit-box-shadow:0 0 0 .2rem rgba(52,58,64,.5);box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:not(:disabled):not(.disabled).active,.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1d2124;border-color:#171a1d}.btn-dark:not(:disabled):not(.disabled).active:focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(52,58,64,.5);box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-outline-primary{color:#007bff;background-color:transparent;background-image:none;border-color:#007bff}.btn-outline-primary:hover{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary.focus,.btn-outline-primary:focus{-webkit-box-shadow:0 0 0 .2rem rgba(0,123,255,.5);box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#007bff;background-color:transparent}.btn-outline-primary:not(:disabled):not(.disabled).active,.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(0,123,255,.5);box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-secondary{color:#6c757d;background-color:transparent;background-image:none;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary.focus,.btn-outline-secondary:focus{-webkit-box-shadow:0 0 0 .2rem hsla(208,7%,46%,.5);box-shadow:0 0 0 .2rem hsla(208,7%,46%,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-secondary:not(:disabled):not(.disabled).active,.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem hsla(208,7%,46%,.5);box-shadow:0 0 0 .2rem hsla(208,7%,46%,.5)}.btn-outline-success{color:#28a745;background-color:transparent;background-image:none;border-color:#28a745}.btn-outline-success:hover{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success.focus,.btn-outline-success:focus{-webkit-box-shadow:0 0 0 .2rem rgba(40,167,69,.5);box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#28a745;background-color:transparent}.btn-outline-success:not(:disabled):not(.disabled).active,.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success:not(:disabled):not(.disabled).active:focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(40,167,69,.5);box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-info{color:#17a2b8;background-color:transparent;background-image:none;border-color:#17a2b8}.btn-outline-info:hover{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info.focus,.btn-outline-info:focus{-webkit-box-shadow:0 0 0 .2rem rgba(23,162,184,.5);box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#17a2b8;background-color:transparent}.btn-outline-info:not(:disabled):not(.disabled).active,.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info:not(:disabled):not(.disabled).active:focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(23,162,184,.5);box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-warning{color:#ffc107;background-color:transparent;background-image:none;border-color:#ffc107}.btn-outline-warning:hover{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning.focus,.btn-outline-warning:focus{-webkit-box-shadow:0 0 0 .2rem rgba(255,193,7,.5);box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-warning:not(:disabled):not(.disabled).active,.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(255,193,7,.5);box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-danger{color:#dc3545;background-color:transparent;background-image:none;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger.focus,.btn-outline-danger:focus{-webkit-box-shadow:0 0 0 .2rem rgba(220,53,69,.5);box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-danger:not(:disabled):not(.disabled).active,.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(220,53,69,.5);box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-light{color:#f8f9fa;background-color:transparent;background-image:none;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light.focus,.btn-outline-light:focus{-webkit-box-shadow:0 0 0 .2rem rgba(248,249,250,.5);box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-light:not(:disabled):not(.disabled).active,.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled).active:focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(248,249,250,.5);box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-dark{color:#343a40;background-color:transparent;background-image:none;border-color:#343a40}.btn-outline-dark:hover{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark.focus,.btn-outline-dark:focus{-webkit-box-shadow:0 0 0 .2rem rgba(52,58,64,.5);box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#343a40;background-color:transparent}.btn-outline-dark:not(:disabled):not(.disabled).active,.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(52,58,64,.5);box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-link{font-weight:400;color:#007bff;background-color:transparent}.btn-link:hover{color:#0056b3;background-color:transparent}.btn-link.focus,.btn-link:focus,.btn-link:hover{text-decoration:underline;border-color:transparent}.btn-link.focus,.btn-link:focus{-webkit-box-shadow:none;box-shadow:none}.btn-link.disabled,.btn-link:disabled{color:#6c757d}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.125rem;line-height:1.5;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.7875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.show{opacity:1}.collapse{display:none}.collapse.show{display:block}tr.collapse.show{display:table-row}tbody.collapse.show{display:table-row-group}.collapsing{height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}.collapsing,.dropdown,.dropup{position:relative}.dropdown-toggle:after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty:after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:.9rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropup .dropdown-menu{margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle:after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty:after{margin-left:0}.dropright .dropdown-menu{margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle:after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty:after{margin-left:0}.dropright .dropdown-toggle:after{vertical-align:0}.dropleft .dropdown-menu{margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle:after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:"";display:none}.dropleft .dropdown-toggle:before{display:inline-block;width:0;height:0;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty:after{margin-left:0}.dropleft .dropdown-toggle:before{vertical-align:0}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}.dropdown-item.disabled,.dropdown-item:disabled{color:#6c757d;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.7875rem;color:#6c757d;white-space:nowrap}.btn-group,.btn-group-vertical{position:relative;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-group-vertical .btn+.btn,.btn-group-vertical .btn+.btn-group,.btn-group-vertical .btn-group+.btn,.btn-group-vertical .btn-group+.btn-group,.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split:after{margin-left:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.btn-group-vertical .btn,.btn-group-vertical .btn-group{width:100%}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn-group>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio],.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;width:100%}.input-group>.custom-file,.input-group>.custom-select,.input-group>.form-control{position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;margin-bottom:0}.input-group>.custom-file:focus,.input-group>.custom-select:focus,.input-group>.form-control:focus{z-index:3}.input-group>.custom-file+.custom-file,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.form-control,.input-group>.custom-select+.custom-file,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.form-control,.input-group>.form-control+.custom-file,.input-group>.form-control+.custom-select,.input-group>.form-control+.form-control{margin-left:-1px}.input-group>.custom-select:not(:last-child),.input-group>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-select:not(:first-child),.input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label:before{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label,.input-group>.custom-file:not(:first-child) .custom-file-label:before{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-append,.input-group-prepend{display:-webkit-box;display:-ms-flexbox;display:flex}.input-group-append .btn,.input-group-prepend .btn{position:relative;z-index:2}.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.btn,.input-group-append .input-group-text+.input-group-text,.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:.9rem;font-weight:400;line-height:1.6;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type=checkbox],.input-group-text input[type=radio]{margin-top:0}.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),.input-group>.input-group-append:not(:last-child)>.btn,.input-group>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;display:block;min-height:1.6rem;padding-left:1.5rem}.custom-control-inline{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;z-index:-1;opacity:0}.custom-control-input:checked~.custom-control-label:before{color:#fff;background-color:#007bff}.custom-control-input:focus~.custom-control-label:before{-webkit-box-shadow:0 0 0 1px #f5f8fa,0 0 0 .2rem rgba(0,123,255,.25);box-shadow:0 0 0 1px #f5f8fa,0 0 0 .2rem rgba(0,123,255,.25)}.custom-control-input:active~.custom-control-label:before{color:#fff;background-color:#b3d7ff}.custom-control-input:disabled~.custom-control-label{color:#6c757d}.custom-control-input:disabled~.custom-control-label:before{background-color:#e9ecef}.custom-control-label{margin-bottom:0}.custom-control-label:before{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#dee2e6}.custom-control-label:after,.custom-control-label:before{position:absolute;top:.3rem;left:0;display:block;width:1rem;height:1rem;content:""}.custom-control-label:after{background-repeat:no-repeat;background-position:50%;background-size:50% 50%}.custom-checkbox .custom-control-label:before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-label:before{background-color:#007bff}.custom-checkbox .custom-control-input:checked~.custom-control-label:after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label:before{background-color:#007bff}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label:after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='%23fff' d='M0 2h4'/%3E%3C/svg%3E")}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label:before{background-color:rgba(0,123,255,.5)}.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label:before{background-color:rgba(0,123,255,.5)}.custom-radio .custom-control-label:before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label:before{background-color:#007bff}.custom-radio .custom-control-input:checked~.custom-control-label:after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E")}.custom-radio .custom-control-input:disabled:checked~.custom-control-label:before{background-color:rgba(0,123,255,.5)}.custom-select{display:inline-block;width:100%;height:calc(2.19rem + 2px);padding:.375rem 1.75rem .375rem .75rem;line-height:1.6;color:#495057;vertical-align:middle;background:#fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right .75rem center;background-size:8px 10px;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.075),0 0 5px rgba(128,189,255,.5);box-shadow:inset 0 1px 2px rgba(0,0,0,.075),0 0 5px rgba(128,189,255,.5)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{opacity:0}.custom-select-sm{height:calc(1.68125rem + 2px);font-size:75%}.custom-select-lg,.custom-select-sm{padding-top:.375rem;padding-bottom:.375rem}.custom-select-lg{height:calc(2.6875rem + 2px);font-size:125%}.custom-file{display:inline-block;margin-bottom:0}.custom-file,.custom-file-input{position:relative;width:100%;height:calc(2.19rem + 2px)}.custom-file-input{z-index:2;margin:0;opacity:0}.custom-file-input:focus~.custom-file-control{border-color:#80bdff;-webkit-box-shadow:0 0 0 .2rem rgba(0,123,255,.25);box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-file-input:focus~.custom-file-control:before{border-color:#80bdff}.custom-file-input:lang(en)~.custom-file-label:after{content:"Browse"}.custom-file-label{left:0;z-index:1;height:calc(2.19rem + 2px);background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label,.custom-file-label:after{position:absolute;top:0;right:0;padding:.375rem .75rem;line-height:1.6;color:#495057}.custom-file-label:after{bottom:0;z-index:3;display:block;height:calc((2.19rem + 2px) - 1px * 2);content:"Browse";background-color:#e9ecef;border-left:1px solid #ced4da;border-radius:0 .25rem .25rem 0}.nav{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#6c757d}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-item{margin-bottom:-1px}.nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#f5f8fa;border-color:#dee2e6 #dee2e6 #f5f8fa}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#007bff}.nav-fill .nav-item{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;text-align:center}.nav-justified .nav-item{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;padding:.5rem 1rem}.navbar,.navbar>.container,.navbar>.container-fluid{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.32rem;padding-bottom:.32rem;margin-right:1rem;font-size:1.125rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{-ms-flex-preferred-size:100%;flex-basis:100%;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.125rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler:not(:disabled):not(.disabled){cursor:pointer}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:no-repeat 50%;background-size:100% 100%}@media (max-width:575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:576px){.navbar-expand-sm{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-sm,.navbar-expand-sm .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal}.navbar-expand-sm .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .dropdown-menu-right{right:0;left:auto}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-sm .navbar-collapse{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .dropup .dropdown-menu{top:auto;bottom:100%}}@media (max-width:767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:768px){.navbar-expand-md{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-md,.navbar-expand-md .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal}.navbar-expand-md .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .dropdown-menu-right{right:0;left:auto}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-md .navbar-collapse{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .dropup .dropdown-menu{top:auto;bottom:100%}}@media (max-width:991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:992px){.navbar-expand-lg{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-lg,.navbar-expand-lg .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal}.navbar-expand-lg .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .dropdown-menu-right{right:0;left:auto}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-lg .navbar-collapse{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .dropup .dropdown-menu{top:auto;bottom:100%}}@media (max-width:1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:1200px){.navbar-expand-xl{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-xl,.navbar-expand-xl .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal}.navbar-expand-xl .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .dropdown-menu-right{right:0;left:auto}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-xl .navbar-collapse{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}.navbar-expand-xl .dropup .dropdown-menu{top:auto;bottom:100%}}.navbar-expand{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .dropdown-menu-right{right:0;left:auto}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand .navbar-collapse{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .dropup .dropdown-menu{top:auto;bottom:100%}.navbar-light .navbar-brand,.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a,.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand,.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:hsla(0,0%,100%,.5)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:hsla(0,0%,100%,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:hsla(0,0%,100%,.25)}.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:hsla(0,0%,100%,.5);border-color:hsla(0,0%,100%,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")}.navbar-dark .navbar-text{color:hsla(0,0%,100%,.5)}.navbar-dark .navbar-text a,.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group:first-child .list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.card>.list-group:last-child .list-group-item:last-child{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.card-body{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem}.card-subtitle,.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-header+.list-group .list-group-item:first-child{border-top:0}.card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-bottom:-.75rem;border-bottom:0}.card-header-pills,.card-header-tabs{margin-right:-.625rem;margin-left:-.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem}.card-img{width:100%;border-radius:calc(.25rem - 1px)}.card-img-top{width:100%;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img-bottom{width:100%;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-deck{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.card-deck .card{margin-bottom:15px}@media (min-width:576px){.card-deck{-webkit-box-orient:horizontal;-ms-flex-flow:row wrap;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck,.card-deck .card{-webkit-box-direction:normal}.card-deck .card{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1 0 0%;flex:1 0 0%;-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.card-group>.card{margin-bottom:15px}@media (min-width:576px){.card-group{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap}.card-group>.card{-webkit-box-flex:1;-ms-flex:1 0 0%;flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:first-child .card-header,.card-group>.card:first-child .card-img-top{border-top-right-radius:0}.card-group>.card:first-child .card-footer,.card-group>.card:first-child .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:last-child .card-header,.card-group>.card:last-child .card-img-top{border-top-left-radius:0}.card-group>.card:last-child .card-footer,.card-group>.card:last-child .card-img-bottom{border-bottom-left-radius:0}.card-group>.card:only-child{border-radius:.25rem}.card-group>.card:only-child .card-header,.card-group>.card:only-child .card-img-top{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.card-group>.card:only-child .card-footer,.card-group>.card:only-child .card-img-bottom{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.card-group>.card:not(:first-child):not(:last-child):not(:only-child),.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-footer,.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-header,.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-img-bottom,.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-img-top{border-radius:0}}.card-columns .card{margin-bottom:.75rem}@media (min-width:576px){.card-columns{-webkit-column-count:3;column-count:3;-webkit-column-gap:1.25rem;column-gap:1.25rem}.card-columns .card{display:inline-block;width:100%}}.breadcrumb{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb-item+.breadcrumb-item:before{display:inline-block;padding-right:.5rem;padding-left:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover:before{text-decoration:underline;text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination{display:-webkit-box;display:-ms-flexbox;display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#007bff;background-color:#fff;border:1px solid #dee2e6}.page-link:hover{color:#0056b3;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:2;outline:0;-webkit-box-shadow:0 0 0 .2rem rgba(0,123,255,.25);box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.page-link:not(:disabled):not(.disabled){cursor:pointer}.page-item:first-child .page-link{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link{z-index:1;color:#fff;background-color:#007bff;border-color:#007bff}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.125rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.7875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#007bff}.badge-primary[href]:focus,.badge-primary[href]:hover{color:#fff;text-decoration:none;background-color:#0062cc}.badge-secondary{color:#fff;background-color:#6c757d}.badge-secondary[href]:focus,.badge-secondary[href]:hover{color:#fff;text-decoration:none;background-color:#545b62}.badge-success{color:#fff;background-color:#28a745}.badge-success[href]:focus,.badge-success[href]:hover{color:#fff;text-decoration:none;background-color:#1e7e34}.badge-info{color:#fff;background-color:#17a2b8}.badge-info[href]:focus,.badge-info[href]:hover{color:#fff;text-decoration:none;background-color:#117a8b}.badge-warning{color:#212529;background-color:#ffc107}.badge-warning[href]:focus,.badge-warning[href]:hover{color:#212529;text-decoration:none;background-color:#d39e00}.badge-danger{color:#fff;background-color:#dc3545}.badge-danger[href]:focus,.badge-danger[href]:hover{color:#fff;text-decoration:none;background-color:#bd2130}.badge-light{color:#212529;background-color:#f8f9fa}.badge-light[href]:focus,.badge-light[href]:hover{color:#212529;text-decoration:none;background-color:#dae0e5}.badge-dark{color:#fff;background-color:#343a40}.badge-dark[href]:focus,.badge-dark[href]:hover{color:#fff;text-decoration:none;background-color:#1d2124}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media (min-width:576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:3.85rem}.alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}.alert-primary hr{border-top-color:#9fcdff}.alert-primary .alert-link{color:#002752}.alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}.alert-secondary hr{border-top-color:#c8cbcf}.alert-secondary .alert-link{color:#202326}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert-success hr{border-top-color:#b1dfbb}.alert-success .alert-link{color:#0b2e13}.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-info hr{border-top-color:#abdde5}.alert-info .alert-link{color:#062c33}.alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.alert-warning hr{border-top-color:#ffe8a1}.alert-warning .alert-link{color:#533f03}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-danger hr{border-top-color:#f1b0b7}.alert-danger .alert-link{color:#491217}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}.alert-dark hr{border-top-color:#b9bbbe}.alert-dark .alert-link{color:#040505}@-webkit-keyframes progress-bar-stripes{0%{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:1rem 0}to{background-position:0 0}}.progress{height:1rem;overflow:hidden;font-size:.675rem;background-color:#e9ecef;border-radius:.25rem}.progress,.progress-bar{display:-webkit-box;display:-ms-flexbox;display:flex}.progress-bar{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:#fff;text-align:center;background-color:#007bff;-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped{background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:progress-bar-stripes 1s linear infinite;animation:progress-bar-stripes 1s linear infinite}.media{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.media-body{-webkit-box-flex:1;-ms-flex:1;flex:1}.list-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;margin-bottom:-1px;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.list-group-item:focus,.list-group-item:hover{z-index:1;text-decoration:none}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#007bff;border-color:#007bff}.list-group-flush .list-group-item{border-right:0;border-left:0;border-radius:0}.list-group-flush:first-child .list-group-item:first-child{border-top:0}.list-group-flush:last-child .list-group-item:last-child{border-bottom:0}.list-group-item-primary{color:#004085;background-color:#b8daff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#004085;background-color:#9fcdff}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#004085;border-color:#004085}.list-group-item-secondary{color:#383d41;background-color:#d6d8db}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#383d41;background-color:#c8cbcf}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#383d41;border-color:#383d41}.list-group-item-success{color:#155724;background-color:#c3e6cb}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#155724;background-color:#b1dfbb}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#155724;border-color:#155724}.list-group-item-info{color:#0c5460;background-color:#bee5eb}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#0c5460;background-color:#abdde5}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#0c5460;border-color:#0c5460}.list-group-item-warning{color:#856404;background-color:#ffeeba}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#856404;background-color:#ffe8a1}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856404;border-color:#856404}.list-group-item-danger{color:#721c24;background-color:#f5c6cb}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#721c24;background-color:#f1b0b7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#721c24;border-color:#721c24}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#1b1e21;background-color:#c6c8ca}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#1b1e21;background-color:#b9bbbe}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#1b1e21;border-color:#1b1e21}.close{float:right;font-size:1.35rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:focus,.close:hover{color:#000;text-decoration:none;opacity:.75}.close:not(:disabled):not(.disabled){cursor:pointer}button.close{padding:0;background-color:transparent;border:0;-webkit-appearance:none}.modal,.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;outline:0}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out;-webkit-transform:translateY(-25%);transform:translateY(-25%)}.modal.show .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-dialog-centered{-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:calc(100% - 1rem)}.modal-content,.modal-dialog-centered{display:-webkit-box;display:-ms-flexbox;display:flex}.modal-content{position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:1rem;border-bottom:1px solid #e9ecef;border-top-left-radius:.3rem;border-top-right-radius:.3rem}.modal-header .close{padding:1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.6}.modal-body{position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.modal-footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;padding:1rem;border-top:1px solid #e9ecef}.modal-footer>:not(:first-child){margin-left:.25rem}.modal-footer>:not(:last-child){margin-right:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg{max-width:800px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:Raleway,sans-serif;font-style:normal;font-weight:400;line-height:1.6;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.7875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow:before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[x-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[x-placement^=top] .arrow,.bs-tooltip-top .arrow{bottom:0}.bs-tooltip-auto[x-placement^=top] .arrow:before,.bs-tooltip-top .arrow:before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[x-placement^=right],.bs-tooltip-right{padding:0 .4rem}.bs-tooltip-auto[x-placement^=right] .arrow,.bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=right] .arrow:before,.bs-tooltip-right .arrow:before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[x-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[x-placement^=bottom] .arrow,.bs-tooltip-bottom .arrow{top:0}.bs-tooltip-auto[x-placement^=bottom] .arrow:before,.bs-tooltip-bottom .arrow:before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[x-placement^=left],.bs-tooltip-left{padding:0 .4rem}.bs-tooltip-auto[x-placement^=left] .arrow,.bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=left] .arrow:before,.bs-tooltip-left .arrow:before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{top:0;left:0;z-index:1060;max-width:276px;font-family:Raleway,sans-serif;font-style:normal;font-weight:400;line-height:1.6;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.7875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover,.popover .arrow{position:absolute;display:block}.popover .arrow{width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow:after,.popover .arrow:before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[x-placement^=top],.bs-popover-top{margin-bottom:.5rem}.bs-popover-auto[x-placement^=top] .arrow,.bs-popover-top .arrow{bottom:calc((.5rem + 1px) * -1)}.bs-popover-auto[x-placement^=top] .arrow:after,.bs-popover-auto[x-placement^=top] .arrow:before,.bs-popover-top .arrow:after,.bs-popover-top .arrow:before{border-width:.5rem .5rem 0}.bs-popover-auto[x-placement^=top] .arrow:before,.bs-popover-top .arrow:before{bottom:0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=top] .arrow:after,.bs-popover-top .arrow:after{bottom:1px;border-top-color:#fff}.bs-popover-auto[x-placement^=right],.bs-popover-right{margin-left:.5rem}.bs-popover-auto[x-placement^=right] .arrow,.bs-popover-right .arrow{left:calc((.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=right] .arrow:after,.bs-popover-auto[x-placement^=right] .arrow:before,.bs-popover-right .arrow:after,.bs-popover-right .arrow:before{border-width:.5rem .5rem .5rem 0}.bs-popover-auto[x-placement^=right] .arrow:before,.bs-popover-right .arrow:before{left:0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=right] .arrow:after,.bs-popover-right .arrow:after{left:1px;border-right-color:#fff}.bs-popover-auto[x-placement^=bottom],.bs-popover-bottom{margin-top:.5rem}.bs-popover-auto[x-placement^=bottom] .arrow,.bs-popover-bottom .arrow{top:calc((.5rem + 1px) * -1)}.bs-popover-auto[x-placement^=bottom] .arrow:after,.bs-popover-auto[x-placement^=bottom] .arrow:before,.bs-popover-bottom .arrow:after,.bs-popover-bottom .arrow:before{border-width:0 .5rem .5rem}.bs-popover-auto[x-placement^=bottom] .arrow:before,.bs-popover-bottom .arrow:before{top:0;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=bottom] .arrow:after,.bs-popover-bottom .arrow:after{top:1px;border-bottom-color:#fff}.bs-popover-auto[x-placement^=bottom] .popover-header:before,.bs-popover-bottom .popover-header:before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-auto[x-placement^=left],.bs-popover-left{margin-right:.5rem}.bs-popover-auto[x-placement^=left] .arrow,.bs-popover-left .arrow{right:calc((.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=left] .arrow:after,.bs-popover-auto[x-placement^=left] .arrow:before,.bs-popover-left .arrow:after,.bs-popover-left .arrow:before{border-width:.5rem 0 .5rem .5rem}.bs-popover-auto[x-placement^=left] .arrow:before,.bs-popover-left .arrow:before{right:0;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=left] .arrow:after,.bs-popover-left .arrow:after{right:1px;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:.9rem;color:inherit;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-item{position:relative;display:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;-webkit-transition:-webkit-transform .6s ease;transition:-webkit-transform .6s ease;transition:transform .6s ease;transition:transform .6s ease,-webkit-transform .6s ease;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.carousel-item-next,.carousel-item-prev{position:absolute;top:0}.carousel-item-next.carousel-item-left,.carousel-item-prev.carousel-item-right{-webkit-transform:translateX(0);transform:translateX(0)}@supports ((-webkit-transform-style:preserve-3d) or (transform-style:preserve-3d)){.carousel-item-next.carousel-item-left,.carousel-item-prev.carousel-item-right{-webkit-transform:translateZ(0);transform:translateZ(0)}}.active.carousel-item-right,.carousel-item-next{-webkit-transform:translateX(100%);transform:translateX(100%)}@supports ((-webkit-transform-style:preserve-3d) or (transform-style:preserve-3d)){.active.carousel-item-right,.carousel-item-next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.active.carousel-item-left,.carousel-item-prev{-webkit-transform:translateX(-100%);transform:translateX(-100%)}@supports ((-webkit-transform-style:preserve-3d) or (transform-style:preserve-3d)){.active.carousel-item-left,.carousel-item-prev{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:transparent no-repeat 50%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E")}.carousel-control-next-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E")}.carousel-indicators{position:absolute;right:0;bottom:10px;left:0;z-index:15;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{position:relative;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;background-color:hsla(0,0%,100%,.5)}.carousel-indicators li:before{top:-10px}.carousel-indicators li:after,.carousel-indicators li:before{position:absolute;left:0;display:inline-block;width:100%;height:10px;content:""}.carousel-indicators li:after{bottom:-10px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-primary{background-color:#007bff!important}a.bg-primary:focus,a.bg-primary:hover,button.bg-primary:focus,button.bg-primary:hover{background-color:#0062cc!important}.bg-secondary{background-color:#6c757d!important}a.bg-secondary:focus,a.bg-secondary:hover,button.bg-secondary:focus,button.bg-secondary:hover{background-color:#545b62!important}.bg-success{background-color:#28a745!important}a.bg-success:focus,a.bg-success:hover,button.bg-success:focus,button.bg-success:hover{background-color:#1e7e34!important}.bg-info{background-color:#17a2b8!important}a.bg-info:focus,a.bg-info:hover,button.bg-info:focus,button.bg-info:hover{background-color:#117a8b!important}.bg-warning{background-color:#ffc107!important}a.bg-warning:focus,a.bg-warning:hover,button.bg-warning:focus,button.bg-warning:hover{background-color:#d39e00!important}.bg-danger{background-color:#dc3545!important}a.bg-danger:focus,a.bg-danger:hover,button.bg-danger:focus,button.bg-danger:hover{background-color:#bd2130!important}.bg-light{background-color:#f8f9fa!important}a.bg-light:focus,a.bg-light:hover,button.bg-light:focus,button.bg-light:hover{background-color:#dae0e5!important}.bg-dark{background-color:#343a40!important}a.bg-dark:focus,a.bg-dark:hover,button.bg-dark:focus,button.bg-dark:hover{background-color:#1d2124!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:transparent!important}.border{border:1px solid #dee2e6!important}.border-top{border-top:1px solid #dee2e6!important}.border-right{border-right:1px solid #dee2e6!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-left{border-left:1px solid #dee2e6!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.border-primary{border-color:#007bff!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#28a745!important}.border-info{border-color:#17a2b8!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#343a40!important}.border-white{border-color:#fff!important}.rounded{border-radius:.25rem!important}.rounded-top{border-top-left-radius:.25rem!important}.rounded-right,.rounded-top{border-top-right-radius:.25rem!important}.rounded-bottom,.rounded-right{border-bottom-right-radius:.25rem!important}.rounded-bottom,.rounded-left{border-bottom-left-radius:.25rem!important}.rounded-left{border-top-left-radius:.25rem!important}.rounded-circle{border-radius:50%!important}.rounded-0{border-radius:0!important}.clearfix:after{display:block;clear:both;content:""}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.d-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}@media (min-width:576px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.d-sm-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:768px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.d-md-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:992px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.d-lg-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.d-xl-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media print{.d-print-none{display:none!important}.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.d-print-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive:before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9:before{padding-top:42.85714286%}.embed-responsive-16by9:before{padding-top:56.25%}.embed-responsive-4by3:before{padding-top:75%}.embed-responsive-1by1:before{padding-top:100%}.flex-row{-webkit-box-orient:horizontal!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-column,.flex-row{-webkit-box-direction:normal!important}.flex-column{-webkit-box-orient:vertical!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-row-reverse{-webkit-box-orient:horizontal!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-column-reverse,.flex-row-reverse{-webkit-box-direction:reverse!important}.flex-column-reverse{-webkit-box-orient:vertical!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}@media (min-width:576px){.flex-sm-row{-webkit-box-orient:horizontal!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-sm-column,.flex-sm-row{-webkit-box-direction:normal!important}.flex-sm-column{-webkit-box-orient:vertical!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-sm-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-sm-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-sm-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-sm-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-sm-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-sm-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-sm-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-sm-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-sm-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-sm-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-sm-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-sm-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-sm-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-sm-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-sm-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-sm-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-sm-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-sm-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-sm-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-sm-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-sm-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-sm-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-sm-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-sm-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-sm-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-sm-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-sm-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:768px){.flex-md-row{-webkit-box-orient:horizontal!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-md-column,.flex-md-row{-webkit-box-direction:normal!important}.flex-md-column{-webkit-box-orient:vertical!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-md-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-md-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-md-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-md-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-md-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-md-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-md-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-md-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-md-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-md-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-md-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-md-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-md-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-md-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-md-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-md-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-md-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-md-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-md-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-md-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-md-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-md-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-md-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-md-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-md-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-md-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-md-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:992px){.flex-lg-row{-webkit-box-orient:horizontal!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-lg-column,.flex-lg-row{-webkit-box-direction:normal!important}.flex-lg-column{-webkit-box-orient:vertical!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-lg-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-lg-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-lg-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-lg-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-lg-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-lg-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-lg-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-lg-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-lg-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-lg-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-lg-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-lg-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-lg-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-lg-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-lg-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-lg-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-lg-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-lg-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-lg-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-lg-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-lg-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-lg-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-lg-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-lg-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-lg-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-lg-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-lg-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:1200px){.flex-xl-row{-webkit-box-orient:horizontal!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-xl-column,.flex-xl-row{-webkit-box-direction:normal!important}.flex-xl-column{-webkit-box-orient:vertical!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-xl-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-xl-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-xl-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-xl-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-xl-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-xl-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-xl-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-xl-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-xl-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-xl-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-xl-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-xl-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-xl-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-xl-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-xl-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-xl-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-xl-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-xl-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-xl-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-xl-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-xl-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-xl-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-xl-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-xl-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-xl-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-xl-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-xl-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media (min-width:576px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media (min-width:768px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media (min-width:992px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media (min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.fixed-top{top:0}.fixed-bottom,.fixed-top{position:fixed;right:0;left:0;z-index:1030}.fixed-bottom{bottom:0}@supports ((position:-webkit-sticky) or (position:sticky)){.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;-webkit-clip-path:inset(50%);clip-path:inset(50%);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal;-webkit-clip-path:none;clip-path:none}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.mr-2,.mx-2{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3{margin-right:1rem!important}.mb-3,.my-3{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.mt-4,.my-4{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.mb-4,.my-4{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:3rem!important}.mt-5,.my-5{margin-top:3rem!important}.mr-5,.mx-5{margin-right:3rem!important}.mb-5,.my-5{margin-bottom:3rem!important}.ml-5,.mx-5{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.pb-1,.py-1{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2{padding:.5rem!important}.pt-2,.py-2{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2{padding-bottom:.5rem!important}.pl-2,.px-2{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:3rem!important}.pt-5,.py-5{padding-top:3rem!important}.pr-5,.px-5{padding-right:3rem!important}.pb-5,.py-5{padding-bottom:3rem!important}.pl-5,.px-5{padding-left:3rem!important}.m-auto{margin:auto!important}.mt-auto,.my-auto{margin-top:auto!important}.mr-auto,.mx-auto{margin-right:auto!important}.mb-auto,.my-auto{margin-bottom:auto!important}.ml-auto,.mx-auto{margin-left:auto!important}@media (min-width:576px){.m-sm-0{margin:0!important}.mt-sm-0,.my-sm-0{margin-top:0!important}.mr-sm-0,.mx-sm-0{margin-right:0!important}.mb-sm-0,.my-sm-0{margin-bottom:0!important}.ml-sm-0,.mx-sm-0{margin-left:0!important}.m-sm-1{margin:.25rem!important}.mt-sm-1,.my-sm-1{margin-top:.25rem!important}.mr-sm-1,.mx-sm-1{margin-right:.25rem!important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem!important}.ml-sm-1,.mx-sm-1{margin-left:.25rem!important}.m-sm-2{margin:.5rem!important}.mt-sm-2,.my-sm-2{margin-top:.5rem!important}.mr-sm-2,.mx-sm-2{margin-right:.5rem!important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem!important}.ml-sm-2,.mx-sm-2{margin-left:.5rem!important}.m-sm-3{margin:1rem!important}.mt-sm-3,.my-sm-3{margin-top:1rem!important}.mr-sm-3,.mx-sm-3{margin-right:1rem!important}.mb-sm-3,.my-sm-3{margin-bottom:1rem!important}.ml-sm-3,.mx-sm-3{margin-left:1rem!important}.m-sm-4{margin:1.5rem!important}.mt-sm-4,.my-sm-4{margin-top:1.5rem!important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem!important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem!important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem!important}.m-sm-5{margin:3rem!important}.mt-sm-5,.my-sm-5{margin-top:3rem!important}.mr-sm-5,.mx-sm-5{margin-right:3rem!important}.mb-sm-5,.my-sm-5{margin-bottom:3rem!important}.ml-sm-5,.mx-sm-5{margin-left:3rem!important}.p-sm-0{padding:0!important}.pt-sm-0,.py-sm-0{padding-top:0!important}.pr-sm-0,.px-sm-0{padding-right:0!important}.pb-sm-0,.py-sm-0{padding-bottom:0!important}.pl-sm-0,.px-sm-0{padding-left:0!important}.p-sm-1{padding:.25rem!important}.pt-sm-1,.py-sm-1{padding-top:.25rem!important}.pr-sm-1,.px-sm-1{padding-right:.25rem!important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem!important}.pl-sm-1,.px-sm-1{padding-left:.25rem!important}.p-sm-2{padding:.5rem!important}.pt-sm-2,.py-sm-2{padding-top:.5rem!important}.pr-sm-2,.px-sm-2{padding-right:.5rem!important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem!important}.pl-sm-2,.px-sm-2{padding-left:.5rem!important}.p-sm-3{padding:1rem!important}.pt-sm-3,.py-sm-3{padding-top:1rem!important}.pr-sm-3,.px-sm-3{padding-right:1rem!important}.pb-sm-3,.py-sm-3{padding-bottom:1rem!important}.pl-sm-3,.px-sm-3{padding-left:1rem!important}.p-sm-4{padding:1.5rem!important}.pt-sm-4,.py-sm-4{padding-top:1.5rem!important}.pr-sm-4,.px-sm-4{padding-right:1.5rem!important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem!important}.pl-sm-4,.px-sm-4{padding-left:1.5rem!important}.p-sm-5{padding:3rem!important}.pt-sm-5,.py-sm-5{padding-top:3rem!important}.pr-sm-5,.px-sm-5{padding-right:3rem!important}.pb-sm-5,.py-sm-5{padding-bottom:3rem!important}.pl-sm-5,.px-sm-5{padding-left:3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto,.my-sm-auto{margin-top:auto!important}.mr-sm-auto,.mx-sm-auto{margin-right:auto!important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto!important}.ml-sm-auto,.mx-sm-auto{margin-left:auto!important}}@media (min-width:768px){.m-md-0{margin:0!important}.mt-md-0,.my-md-0{margin-top:0!important}.mr-md-0,.mx-md-0{margin-right:0!important}.mb-md-0,.my-md-0{margin-bottom:0!important}.ml-md-0,.mx-md-0{margin-left:0!important}.m-md-1{margin:.25rem!important}.mt-md-1,.my-md-1{margin-top:.25rem!important}.mr-md-1,.mx-md-1{margin-right:.25rem!important}.mb-md-1,.my-md-1{margin-bottom:.25rem!important}.ml-md-1,.mx-md-1{margin-left:.25rem!important}.m-md-2{margin:.5rem!important}.mt-md-2,.my-md-2{margin-top:.5rem!important}.mr-md-2,.mx-md-2{margin-right:.5rem!important}.mb-md-2,.my-md-2{margin-bottom:.5rem!important}.ml-md-2,.mx-md-2{margin-left:.5rem!important}.m-md-3{margin:1rem!important}.mt-md-3,.my-md-3{margin-top:1rem!important}.mr-md-3,.mx-md-3{margin-right:1rem!important}.mb-md-3,.my-md-3{margin-bottom:1rem!important}.ml-md-3,.mx-md-3{margin-left:1rem!important}.m-md-4{margin:1.5rem!important}.mt-md-4,.my-md-4{margin-top:1.5rem!important}.mr-md-4,.mx-md-4{margin-right:1.5rem!important}.mb-md-4,.my-md-4{margin-bottom:1.5rem!important}.ml-md-4,.mx-md-4{margin-left:1.5rem!important}.m-md-5{margin:3rem!important}.mt-md-5,.my-md-5{margin-top:3rem!important}.mr-md-5,.mx-md-5{margin-right:3rem!important}.mb-md-5,.my-md-5{margin-bottom:3rem!important}.ml-md-5,.mx-md-5{margin-left:3rem!important}.p-md-0{padding:0!important}.pt-md-0,.py-md-0{padding-top:0!important}.pr-md-0,.px-md-0{padding-right:0!important}.pb-md-0,.py-md-0{padding-bottom:0!important}.pl-md-0,.px-md-0{padding-left:0!important}.p-md-1{padding:.25rem!important}.pt-md-1,.py-md-1{padding-top:.25rem!important}.pr-md-1,.px-md-1{padding-right:.25rem!important}.pb-md-1,.py-md-1{padding-bottom:.25rem!important}.pl-md-1,.px-md-1{padding-left:.25rem!important}.p-md-2{padding:.5rem!important}.pt-md-2,.py-md-2{padding-top:.5rem!important}.pr-md-2,.px-md-2{padding-right:.5rem!important}.pb-md-2,.py-md-2{padding-bottom:.5rem!important}.pl-md-2,.px-md-2{padding-left:.5rem!important}.p-md-3{padding:1rem!important}.pt-md-3,.py-md-3{padding-top:1rem!important}.pr-md-3,.px-md-3{padding-right:1rem!important}.pb-md-3,.py-md-3{padding-bottom:1rem!important}.pl-md-3,.px-md-3{padding-left:1rem!important}.p-md-4{padding:1.5rem!important}.pt-md-4,.py-md-4{padding-top:1.5rem!important}.pr-md-4,.px-md-4{padding-right:1.5rem!important}.pb-md-4,.py-md-4{padding-bottom:1.5rem!important}.pl-md-4,.px-md-4{padding-left:1.5rem!important}.p-md-5{padding:3rem!important}.pt-md-5,.py-md-5{padding-top:3rem!important}.pr-md-5,.px-md-5{padding-right:3rem!important}.pb-md-5,.py-md-5{padding-bottom:3rem!important}.pl-md-5,.px-md-5{padding-left:3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto,.my-md-auto{margin-top:auto!important}.mr-md-auto,.mx-md-auto{margin-right:auto!important}.mb-md-auto,.my-md-auto{margin-bottom:auto!important}.ml-md-auto,.mx-md-auto{margin-left:auto!important}}@media (min-width:992px){.m-lg-0{margin:0!important}.mt-lg-0,.my-lg-0{margin-top:0!important}.mr-lg-0,.mx-lg-0{margin-right:0!important}.mb-lg-0,.my-lg-0{margin-bottom:0!important}.ml-lg-0,.mx-lg-0{margin-left:0!important}.m-lg-1{margin:.25rem!important}.mt-lg-1,.my-lg-1{margin-top:.25rem!important}.mr-lg-1,.mx-lg-1{margin-right:.25rem!important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem!important}.ml-lg-1,.mx-lg-1{margin-left:.25rem!important}.m-lg-2{margin:.5rem!important}.mt-lg-2,.my-lg-2{margin-top:.5rem!important}.mr-lg-2,.mx-lg-2{margin-right:.5rem!important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem!important}.ml-lg-2,.mx-lg-2{margin-left:.5rem!important}.m-lg-3{margin:1rem!important}.mt-lg-3,.my-lg-3{margin-top:1rem!important}.mr-lg-3,.mx-lg-3{margin-right:1rem!important}.mb-lg-3,.my-lg-3{margin-bottom:1rem!important}.ml-lg-3,.mx-lg-3{margin-left:1rem!important}.m-lg-4{margin:1.5rem!important}.mt-lg-4,.my-lg-4{margin-top:1.5rem!important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem!important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem!important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem!important}.m-lg-5{margin:3rem!important}.mt-lg-5,.my-lg-5{margin-top:3rem!important}.mr-lg-5,.mx-lg-5{margin-right:3rem!important}.mb-lg-5,.my-lg-5{margin-bottom:3rem!important}.ml-lg-5,.mx-lg-5{margin-left:3rem!important}.p-lg-0{padding:0!important}.pt-lg-0,.py-lg-0{padding-top:0!important}.pr-lg-0,.px-lg-0{padding-right:0!important}.pb-lg-0,.py-lg-0{padding-bottom:0!important}.pl-lg-0,.px-lg-0{padding-left:0!important}.p-lg-1{padding:.25rem!important}.pt-lg-1,.py-lg-1{padding-top:.25rem!important}.pr-lg-1,.px-lg-1{padding-right:.25rem!important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem!important}.pl-lg-1,.px-lg-1{padding-left:.25rem!important}.p-lg-2{padding:.5rem!important}.pt-lg-2,.py-lg-2{padding-top:.5rem!important}.pr-lg-2,.px-lg-2{padding-right:.5rem!important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem!important}.pl-lg-2,.px-lg-2{padding-left:.5rem!important}.p-lg-3{padding:1rem!important}.pt-lg-3,.py-lg-3{padding-top:1rem!important}.pr-lg-3,.px-lg-3{padding-right:1rem!important}.pb-lg-3,.py-lg-3{padding-bottom:1rem!important}.pl-lg-3,.px-lg-3{padding-left:1rem!important}.p-lg-4{padding:1.5rem!important}.pt-lg-4,.py-lg-4{padding-top:1.5rem!important}.pr-lg-4,.px-lg-4{padding-right:1.5rem!important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem!important}.pl-lg-4,.px-lg-4{padding-left:1.5rem!important}.p-lg-5{padding:3rem!important}.pt-lg-5,.py-lg-5{padding-top:3rem!important}.pr-lg-5,.px-lg-5{padding-right:3rem!important}.pb-lg-5,.py-lg-5{padding-bottom:3rem!important}.pl-lg-5,.px-lg-5{padding-left:3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto,.my-lg-auto{margin-top:auto!important}.mr-lg-auto,.mx-lg-auto{margin-right:auto!important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto!important}.ml-lg-auto,.mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){.m-xl-0{margin:0!important}.mt-xl-0,.my-xl-0{margin-top:0!important}.mr-xl-0,.mx-xl-0{margin-right:0!important}.mb-xl-0,.my-xl-0{margin-bottom:0!important}.ml-xl-0,.mx-xl-0{margin-left:0!important}.m-xl-1{margin:.25rem!important}.mt-xl-1,.my-xl-1{margin-top:.25rem!important}.mr-xl-1,.mx-xl-1{margin-right:.25rem!important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem!important}.ml-xl-1,.mx-xl-1{margin-left:.25rem!important}.m-xl-2{margin:.5rem!important}.mt-xl-2,.my-xl-2{margin-top:.5rem!important}.mr-xl-2,.mx-xl-2{margin-right:.5rem!important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem!important}.ml-xl-2,.mx-xl-2{margin-left:.5rem!important}.m-xl-3{margin:1rem!important}.mt-xl-3,.my-xl-3{margin-top:1rem!important}.mr-xl-3,.mx-xl-3{margin-right:1rem!important}.mb-xl-3,.my-xl-3{margin-bottom:1rem!important}.ml-xl-3,.mx-xl-3{margin-left:1rem!important}.m-xl-4{margin:1.5rem!important}.mt-xl-4,.my-xl-4{margin-top:1.5rem!important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem!important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem!important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem!important}.m-xl-5{margin:3rem!important}.mt-xl-5,.my-xl-5{margin-top:3rem!important}.mr-xl-5,.mx-xl-5{margin-right:3rem!important}.mb-xl-5,.my-xl-5{margin-bottom:3rem!important}.ml-xl-5,.mx-xl-5{margin-left:3rem!important}.p-xl-0{padding:0!important}.pt-xl-0,.py-xl-0{padding-top:0!important}.pr-xl-0,.px-xl-0{padding-right:0!important}.pb-xl-0,.py-xl-0{padding-bottom:0!important}.pl-xl-0,.px-xl-0{padding-left:0!important}.p-xl-1{padding:.25rem!important}.pt-xl-1,.py-xl-1{padding-top:.25rem!important}.pr-xl-1,.px-xl-1{padding-right:.25rem!important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem!important}.pl-xl-1,.px-xl-1{padding-left:.25rem!important}.p-xl-2{padding:.5rem!important}.pt-xl-2,.py-xl-2{padding-top:.5rem!important}.pr-xl-2,.px-xl-2{padding-right:.5rem!important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem!important}.pl-xl-2,.px-xl-2{padding-left:.5rem!important}.p-xl-3{padding:1rem!important}.pt-xl-3,.py-xl-3{padding-top:1rem!important}.pr-xl-3,.px-xl-3{padding-right:1rem!important}.pb-xl-3,.py-xl-3{padding-bottom:1rem!important}.pl-xl-3,.px-xl-3{padding-left:1rem!important}.p-xl-4{padding:1.5rem!important}.pt-xl-4,.py-xl-4{padding-top:1.5rem!important}.pr-xl-4,.px-xl-4{padding-right:1.5rem!important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem!important}.pl-xl-4,.px-xl-4{padding-left:1.5rem!important}.p-xl-5{padding:3rem!important}.pt-xl-5,.py-xl-5{padding-top:3rem!important}.pr-xl-5,.px-xl-5{padding-right:3rem!important}.pb-xl-5,.py-xl-5{padding-bottom:3rem!important}.pl-xl-5,.px-xl-5{padding-left:3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto,.my-xl-auto{margin-top:auto!important}.mr-xl-auto,.mx-xl-auto{margin-right:auto!important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto!important}.ml-xl-auto,.mx-xl-auto{margin-left:auto!important}}.text-justify{text-align:justify!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media (min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-light{font-weight:300!important}.font-weight-normal{font-weight:400!important}.font-weight-bold{font-weight:700!important}.font-italic{font-style:italic!important}.text-white{color:#fff!important}.text-primary{color:#007bff!important}a.text-primary:focus,a.text-primary:hover{color:#0062cc!important}.text-secondary{color:#6c757d!important}a.text-secondary:focus,a.text-secondary:hover{color:#545b62!important}.text-success{color:#28a745!important}a.text-success:focus,a.text-success:hover{color:#1e7e34!important}.text-info{color:#17a2b8!important}a.text-info:focus,a.text-info:hover{color:#117a8b!important}.text-warning{color:#ffc107!important}a.text-warning:focus,a.text-warning:hover{color:#d39e00!important}.text-danger{color:#dc3545!important}a.text-danger:focus,a.text-danger:hover{color:#bd2130!important}.text-light{color:#f8f9fa!important}a.text-light:focus,a.text-light:hover{color:#dae0e5!important}.text-dark{color:#343a40!important}a.text-dark:focus,a.text-dark:hover{color:#1d2124!important}.text-muted{color:#6c757d!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media print{*,:after,:before{text-shadow:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]:after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}.container,body{min-width:992px!important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}.navbar-laravel{background-color:#fff;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.04);box-shadow:0 2px 4px rgba(0,0,0,.04)} \ No newline at end of file diff --git a/frameworks/PHP/laravel/public/favicon.ico b/frameworks/PHP/laravel/public/favicon.ico deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/PHP/laravel/public/js/app.js b/frameworks/PHP/laravel/public/js/app.js deleted file mode 100644 index c5d3189712e..00000000000 --- a/frameworks/PHP/laravel/public/js/app.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([function(t,e,n){"use strict";var r=n(5),i=n(19),o=Object.prototype.toString;function a(t){return"[object Array]"===o.call(t)}function s(t){return null!==t&&"object"==typeof t}function u(t){return"[object Function]"===o.call(t)}function c(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),a(t))for(var n=0,r=t.length;n=200&&t<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(t){u.headers[t]={}}),r.forEach(["post","put","patch"],function(t){u.headers[t]=r.merge(o)}),t.exports=u}).call(e,n(6))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var n="undefined"!=typeof window&&"undefined"!=typeof document,r=["Edge","Trident","Firefox"],i=0,o=0;o=0){i=1;break}var a=n&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},i))}};function s(t){return t&&"[object Function]"==={}.toString.call(t)}function u(t,e){if(1!==t.nodeType)return[];var n=getComputedStyle(t,null);return e?n[e]:n}function c(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function l(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=u(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/(auto|scroll)/.test(n+i+r)?t:l(c(t))}function f(t){var e=t&&t.offsetParent,n=e&&e.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TD","TABLE"].indexOf(e.nodeName)&&"static"===u(e,"position")?f(e):e:t?t.ownerDocument.documentElement:document.documentElement}function p(t){return null!==t.parentNode?p(t.parentNode):t}function d(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?t:e,i=n?e:t,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a,s,u=o.commonAncestorContainer;if(t!==u&&e!==u||r.contains(i))return"BODY"===(s=(a=u).nodeName)||"HTML"!==s&&f(a.firstElementChild)!==a?f(u):u;var c=p(t);return c.host?d(c.host,e):d(t,p(e).host)}function h(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var r=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||r)[e]}return t[e]}function v(t,e){var n="x"===e?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+r+"Width"],10)}var g=void 0,m=function(){return void 0===g&&(g=-1!==navigator.appVersion.indexOf("MSIE 10")),g};function y(t,e,n,r){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],m()?n["offset"+t]+r["margin"+("Height"===t?"Top":"Left")]+r["margin"+("Height"===t?"Bottom":"Right")]:0)}function _(){var t=document.body,e=document.documentElement,n=m()&&getComputedStyle(e);return{height:y("Height",t,e,n),width:y("Width",t,e,n)}}var b=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},w=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=h(e,"top"),i=h(e,"left"),o=n?-1:1;return t.top+=r*o,t.bottom+=r*o,t.left+=i*o,t.right+=i*o,t}(p,e)),p}function S(t,e,n,r){var i,o,a,s,f,p,v,g={top:0,left:0},m=d(t,e);if("viewport"===r)o=(i=m).ownerDocument.documentElement,a=A(i,o),s=Math.max(o.clientWidth,window.innerWidth||0),f=Math.max(o.clientHeight,window.innerHeight||0),p=h(o),v=h(o,"left"),g=T({top:p-a.top+a.marginTop,left:v-a.left+a.marginLeft,width:s,height:f});else{var y=void 0;"scrollParent"===r?"BODY"===(y=l(c(e))).nodeName&&(y=t.ownerDocument.documentElement):y="window"===r?t.ownerDocument.documentElement:r;var b=A(y,m);if("HTML"!==y.nodeName||function t(e){var n=e.nodeName;return"BODY"!==n&&"HTML"!==n&&("fixed"===u(e,"position")||t(c(e)))}(m))g=b;else{var w=_(),x=w.height,C=w.width;g.top+=b.top-b.marginTop,g.bottom=x+b.top,g.left+=b.left-b.marginLeft,g.right=C+b.left}}return g.left+=n,g.top+=n,g.right-=n,g.bottom-=n,g}function k(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=S(n,r,o,i),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},u=Object.keys(s).map(function(t){return C({key:t},s[t],{area:(e=s[t],e.width*e.height)});var e}).sort(function(t,e){return e.area-t.area}),c=u.filter(function(t){var e=t.width,r=t.height;return e>=n.clientWidth&&r>=n.clientHeight}),l=c.length>0?c[0].key:u[0].key,f=t.split("-")[1];return l+(f?"-"+f:"")}function O(t,e,n){return A(n,d(e,n))}function D(t){var e=getComputedStyle(t),n=parseFloat(e.marginTop)+parseFloat(e.marginBottom),r=parseFloat(e.marginLeft)+parseFloat(e.marginRight);return{width:t.offsetWidth+r,height:t.offsetHeight+n}}function I(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function N(t,e,n){n=n.split("-")[0];var r=D(t),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",u=o?"height":"width",c=o?"width":"height";return i[a]=e[a]+e[u]/2-r[u]/2,i[s]=n===s?e[s]-r[c]:e[I(s)],i}function j(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function L(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===n});var r=j(t,function(t){return t[e]===n});return t.indexOf(r)}(t,"name",n))).forEach(function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&s(n)&&(e.offsets.popper=T(e.offsets.popper),e.offsets.reference=T(e.offsets.reference),e=n(e,t))}),e}function $(t,e){return t.some(function(t){var n=t.name;return t.enabled&&n===e})}function R(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=U.indexOf(t),r=U.slice(n+1).concat(U.slice(0,n));return e?r.reverse():r}var V={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function K(t,e,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=t.split(/(\+|\-)/).map(function(t){return t.trim()}),s=a.indexOf(j(a,function(t){return-1!==t.search(/,|\s/)}));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(u)[0]]),[a[s].split(u)[1]].concat(a.slice(s+1))]:[a];return(c=c.map(function(t,r){var i=(1===r?!o:o)?"height":"width",a=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)},[]).map(function(t){return function(t,e,n,r){var i=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return T(s)[e]/100*o}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(t,i,e,n)})})).forEach(function(t,e){t.forEach(function(n,r){H(n)&&(i[e]+=n*("-"===t[r-1]?-1:1))})}),i}var Q={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],r=e.split("-")[1];if(r){var i=t.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),u=s?"left":"top",c=s?"width":"height",l={start:x({},u,o[u]),end:x({},u,o[u]+o[c]-a[c])};t.offsets.popper=C({},a,l[r])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,r=t.placement,i=t.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],u=void 0;return u=H(+n)?[+n,0]:K(n,o,a,s),"left"===s?(o.top+=u[0],o.left-=u[1]):"right"===s?(o.top+=u[0],o.left+=u[1]):"top"===s?(o.left+=u[0],o.top-=u[1]):"bottom"===s&&(o.left+=u[0],o.top+=u[1]),t.popper=o,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||f(t.instance.popper);t.instance.reference===n&&(n=f(n));var r=S(t.instance.popper,t.instance.reference,e.padding,n);e.boundaries=r;var i=e.priority,o=t.offsets.popper,a={primary:function(t){var n=o[t];return o[t]r[t]&&!e.escapeWithReference&&(i=Math.min(o[n],r[t]-("right"===t?o.width:o.height))),x({},n,i)}};return i.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";o=C({},o,a[e](t))}),t.offsets.popper=o,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,r=e.reference,i=t.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",u=a?"left":"top",c=a?"width":"height";return n[s]o(r[s])&&(t.offsets.popper[u]=o(r[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!W(t.instance.modifiers,"arrow","keepTogether"))return t;var r=e.element;if("string"==typeof r){if(!(r=t.instance.popper.querySelector(r)))return t}else if(!t.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var i=t.placement.split("-")[0],o=t.offsets,a=o.popper,s=o.reference,c=-1!==["left","right"].indexOf(i),l=c?"height":"width",f=c?"Top":"Left",p=f.toLowerCase(),d=c?"left":"top",h=c?"bottom":"right",v=D(r)[l];s[h]-va[h]&&(t.offsets.popper[p]+=s[p]+v-a[h]),t.offsets.popper=T(t.offsets.popper);var g=s[p]+s[l]/2-v/2,m=u(t.instance.popper),y=parseFloat(m["margin"+f],10),_=parseFloat(m["border"+f+"Width"],10),b=g-t.offsets.popper[p]-y-_;return b=Math.max(Math.min(a[l]-v,b),0),t.arrowElement=r,t.offsets.arrow=(x(n={},p,Math.round(b)),x(n,d,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if($(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=S(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement),r=t.placement.split("-")[0],i=I(r),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case V.FLIP:a=[r,i];break;case V.CLOCKWISE:a=z(r);break;case V.COUNTERCLOCKWISE:a=z(r,!0);break;default:a=e.behavior}return a.forEach(function(s,u){if(r!==s||a.length===u+1)return t;r=t.placement.split("-")[0],i=I(r);var c,l=t.offsets.popper,f=t.offsets.reference,p=Math.floor,d="left"===r&&p(l.right)>p(f.left)||"right"===r&&p(l.left)p(f.top)||"bottom"===r&&p(l.top)p(n.right),g=p(l.top)p(n.bottom),y="left"===r&&h||"right"===r&&v||"top"===r&&g||"bottom"===r&&m,_=-1!==["top","bottom"].indexOf(r),b=!!e.flipVariations&&(_&&"start"===o&&h||_&&"end"===o&&v||!_&&"start"===o&&g||!_&&"end"===o&&m);(d||y||b)&&(t.flipped=!0,(d||y)&&(r=a[u+1]),b&&(o="end"===(c=o)?"start":"start"===c?"end":c),t.placement=r+(o?"-"+o:""),t.offsets.popper=C({},t.offsets.popper,N(t.instance.popper,t.offsets.reference,t.placement)),t=L(t.instance.modifiers,t,"flip"))}),t},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],r=t.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),t.placement=I(e),t.offsets.popper=T(i),t}},hide:{order:800,enabled:!0,fn:function(t){if(!W(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=j(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottomn.right||e.top>n.bottom||e.right2&&void 0!==arguments[2]?arguments[2]:{};b(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=a(this.update.bind(this)),this.options=C({},t.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(C({},t.Defaults.modifiers,i.modifiers)).forEach(function(e){r.options.modifiers[e]=C({},t.Defaults.modifiers[e]||{},i.modifiers?i.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return C({name:t},r.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&s(t.onLoad)&&t.onLoad(r.reference,r.popper,r.options,t,r.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return w(t,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=O(this.state,this.popper,this.reference),t.placement=k(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.offsets.popper=N(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position="absolute",t=L(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,$(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[R("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=M(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return F.call(this)}}]),t}();G.Utils=("undefined"!=typeof window?window:t).PopperUtils,G.placements=q,G.Defaults=Q,e.default=G}.call(e,n(1))},function(t,e,n){var r;!function(e,n){"use strict";"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,function(n,i){"use strict";var o=[],a=n.document,s=Object.getPrototypeOf,u=o.slice,c=o.concat,l=o.push,f=o.indexOf,p={},d=p.toString,h=p.hasOwnProperty,v=h.toString,g=v.call(Object),m={};function y(t,e){var n=(e=e||a).createElement("script");n.text=t,e.head.appendChild(n).parentNode.removeChild(n)}var _=function(t,e){return new _.fn.init(t,e)},b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^-ms-/,x=/-([a-z])/g,C=function(t,e){return e.toUpperCase()};function T(t){var e=!!t&&"length"in t&&t.length,n=_.type(t);return"function"!==n&&!_.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}_.fn=_.prototype={jquery:"3.2.1",constructor:_,length:0,toArray:function(){return u.call(this)},get:function(t){return null==t?u.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=_.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return _.each(this,t)},map:function(t){return this.pushStack(_.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n+~]|"+R+")"+R+"*"),U=new RegExp("="+R+"*([^\\]'\"]*?)"+R+"*\\]","g"),z=new RegExp(F),V=new RegExp("^"+P+"$"),K={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+$+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+R+"?|("+R+")|.)","ig"),tt=function(t,e,n){var r="0x"+e-65536;return r!=r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},et=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,nt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},rt=function(){p()},it=yt(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{N.apply(O=j.call(w.childNodes),w.childNodes),O[w.childNodes.length].nodeType}catch(t){N={apply:O.length?function(t,e){I.apply(t,j.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function ot(t,e,r,i){var o,s,c,l,f,h,m,y=e&&e.ownerDocument,x=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==x&&9!==x&&11!==x)return r;if(!i&&((e?e.ownerDocument||e:w)!==d&&p(e),e=e||d,v)){if(11!==x&&(f=X.exec(t)))if(o=f[1]){if(9===x){if(!(c=e.getElementById(o)))return r;if(c.id===o)return r.push(c),r}else if(y&&(c=y.getElementById(o))&&_(e,c)&&c.id===o)return r.push(c),r}else{if(f[2])return N.apply(r,e.getElementsByTagName(t)),r;if((o=f[3])&&n.getElementsByClassName&&e.getElementsByClassName)return N.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!A[t+" "]&&(!g||!g.test(t))){if(1!==x)y=e,m=t;else if("object"!==e.nodeName.toLowerCase()){for((l=e.getAttribute("id"))?l=l.replace(et,nt):e.setAttribute("id",l=b),s=(h=a(t)).length;s--;)h[s]="#"+l+" "+mt(h[s]);m=h.join(","),y=J.test(t)&&vt(e.parentNode)||e}if(m)try{return N.apply(r,y.querySelectorAll(m)),r}catch(t){}finally{l===b&&e.removeAttribute("id")}}}return u(t.replace(B,"$1"),e,r,i)}function at(){var t=[];return function e(n,i){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function st(t){return t[b]=!0,t}function ut(t){var e=d.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ct(t,e){for(var n=t.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=e}function lt(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ft(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function pt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function dt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&it(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ht(t){return st(function(e){return e=+e,st(function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function vt(t){return t&&void 0!==t.getElementsByTagName&&t}n=ot.support={},o=ot.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},p=ot.setDocument=function(t){var e,i,a=t?t.ownerDocument||t:w;return a!==d&&9===a.nodeType&&a.documentElement?(h=(d=a).documentElement,v=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",rt,!1):i.attachEvent&&i.attachEvent("onunload",rt)),n.attributes=ut(function(t){return t.className="i",!t.getAttribute("className")}),n.getElementsByTagName=ut(function(t){return t.appendChild(d.createComment("")),!t.getElementsByTagName("*").length}),n.getElementsByClassName=Y.test(d.getElementsByClassName),n.getById=ut(function(t){return h.appendChild(t).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(t){var e=t.replace(Z,tt);return function(t){return t.getAttribute("id")===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&v){var n=e.getElementById(t);return n?[n]:[]}}):(r.filter.ID=function(t){var e=t.replace(Z,tt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&v){var n,r,i,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(i=e.getElementsByName(t),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&v)return e.getElementsByClassName(t)},m=[],g=[],(n.qsa=Y.test(d.querySelectorAll))&&(ut(function(t){h.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+R+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\["+R+"*(?:value|"+$+")"),t.querySelectorAll("[id~="+b+"-]").length||g.push("~="),t.querySelectorAll(":checked").length||g.push(":checked"),t.querySelectorAll("a#"+b+"+*").length||g.push(".#.+[+~]")}),ut(function(t){t.innerHTML="";var e=d.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&g.push("name"+R+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),h.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")})),(n.matchesSelector=Y.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ut(function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),m.push("!=",F)}),g=g.length&&new RegExp(g.join("|")),m=m.length&&new RegExp(m.join("|")),e=Y.test(h.compareDocumentPosition),_=e||Y.test(h.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},S=e?function(t,e){if(t===e)return f=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===r?t===d||t.ownerDocument===w&&_(w,t)?-1:e===d||e.ownerDocument===w&&_(w,e)?1:l?L(l,t)-L(l,e):0:4&r?-1:1)}:function(t,e){if(t===e)return f=!0,0;var n,r=0,i=t.parentNode,o=e.parentNode,a=[t],s=[e];if(!i||!o)return t===d?-1:e===d?1:i?-1:o?1:l?L(l,t)-L(l,e):0;if(i===o)return lt(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?lt(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},ot.matches=function(t,e){return ot(t,null,null,e)},ot.matchesSelector=function(t,e){if((t.ownerDocument||t)!==d&&p(t),e=e.replace(U,"='$1']"),n.matchesSelector&&v&&!A[e+" "]&&(!m||!m.test(e))&&(!g||!g.test(e)))try{var r=y.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){}return ot(e,d,null,[t]).length>0},ot.contains=function(t,e){return(t.ownerDocument||t)!==d&&p(t),_(t,e)},ot.attr=function(t,e){(t.ownerDocument||t)!==d&&p(t);var i=r.attrHandle[e.toLowerCase()],o=i&&k.call(r.attrHandle,e.toLowerCase())?i(t,e,!v):void 0;return void 0!==o?o:n.attributes||!v?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},ot.escape=function(t){return(t+"").replace(et,nt)},ot.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},ot.uniqueSort=function(t){var e,r=[],i=0,o=0;if(f=!n.detectDuplicates,l=!n.sortStable&&t.slice(0),t.sort(S),f){for(;e=t[o++];)e===t[o]&&(i=r.push(o));for(;i--;)t.splice(r[i],1)}return l=null,t},i=ot.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=i(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=i(e);return n},(r=ot.selectors={cacheLength:50,createPseudo:st,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Z,tt),t[3]=(t[3]||t[4]||t[5]||"").replace(Z,tt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||ot.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&ot.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return K.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&z.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(Z,tt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=T[t+" "];return e||(e=new RegExp("(^|"+R+")"+t+"("+R+"|$)"))&&T(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(r){var i=ot.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(H," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var c,l,f,p,d,h,v=o!==a?"nextSibling":"previousSibling",g=e.parentNode,m=s&&e.nodeName.toLowerCase(),y=!u&&!s,_=!1;if(g){if(o){for(;v;){for(p=e;p=p[v];)if(s?p.nodeName.toLowerCase()===m:1===p.nodeType)return!1;h=v="only"===t&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&y){for(_=(d=(c=(l=(f=(p=g)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[t]||[])[0]===x&&c[1])&&c[2],p=d&&g.childNodes[d];p=++d&&p&&p[v]||(_=d=0)||h.pop();)if(1===p.nodeType&&++_&&p===e){l[t]=[x,d,_];break}}else if(y&&(_=d=(c=(l=(f=(p=e)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[t]||[])[0]===x&&c[1]),!1===_)for(;(p=++d&&p&&p[v]||(_=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==m:1!==p.nodeType)||!++_||(y&&((l=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[t]=[x,_]),p!==e)););return(_-=i)===r||_%r==0&&_/r>=0}}},PSEUDO:function(t,e){var n,i=r.pseudos[t]||r.setFilters[t.toLowerCase()]||ot.error("unsupported pseudo: "+t);return i[b]?i(e):i.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?st(function(t,n){for(var r,o=i(t,e),a=o.length;a--;)t[r=L(t,o[a])]=!(n[r]=o[a])}):function(t){return i(t,0,n)}):i}},pseudos:{not:st(function(t){var e=[],n=[],r=s(t.replace(B,"$1"));return r[b]?st(function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}}),has:st(function(t){return function(e){return ot(t,e).length>0}}),contains:st(function(t){return t=t.replace(Z,tt),function(e){return(e.textContent||e.innerText||i(e)).indexOf(t)>-1}}),lang:st(function(t){return V.test(t||"")||ot.error("unsupported lang: "+t),t=t.replace(Z,tt).toLowerCase(),function(e){var n;do{if(n=v?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===h},focus:function(t){return t===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:dt(!1),disabled:dt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return G.test(t.nodeName)},input:function(t){return Q.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:ht(function(){return[0]}),last:ht(function(t,e){return[e-1]}),eq:ht(function(t,e,n){return[n<0?n+e:n]}),even:ht(function(t,e){for(var n=0;n=0;)t.push(r);return t}),gt:ht(function(t,e,n){for(var r=n<0?n+e:n;++r1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function bt(t,e,n,r,i){for(var o,a=[],s=0,u=t.length,c=null!=e;s-1&&(o[c]=!(a[c]=f))}}else m=bt(m===a?m.splice(h,m.length):m),i?i(null,a,m,u):N.apply(a,m)})}function xt(t){for(var e,n,i,o=t.length,a=r.relative[t[0].type],s=a||r.relative[" "],u=a?1:0,l=yt(function(t){return t===e},s,!0),f=yt(function(t){return L(e,t)>-1},s,!0),p=[function(t,n,r){var i=!a&&(r||n!==c)||((e=n).nodeType?l(t,n,r):f(t,n,r));return e=null,i}];u1&&_t(p),u>1&&mt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(B,"$1"),n,u0,u=i.length>0,l=function(t,e,n,a,l){var f,h,g,m=0,y="0",_=t&&[],b=[],w=c,C=t||u&&r.find.TAG("*",l),T=x+=null==w?1:Math.random()||.1,E=C.length;for(l&&(c=e===d||e||l);y!==E&&null!=(f=C[y]);y++){if(u&&f){for(h=0,e||f.ownerDocument===d||(p(f),n=!v);g=i[h++];)if(g(f,e||d,n)){a.push(f);break}l&&(x=T)}s&&((f=!g&&f)&&m--,t&&_.push(f))}if(m+=y,s&&y!==m){for(h=0;g=o[h++];)g(_,b,e,n);if(t){if(m>0)for(;y--;)_[y]||b[y]||(b[y]=D.call(a));b=bt(b)}N.apply(a,b),l&&!t&&b.length>0&&m+o.length>1&&ot.uniqueSort(a)}return l&&(x=T,c=w),_},s?st(l):l))).selector=t}return g},u=ot.select=function(t,e,n,i){var o,u,c,l,f,p="function"==typeof t&&t,d=!i&&a(t=p.selector||t);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(c=u[0]).type&&9===e.nodeType&&v&&r.relative[u[1].type]){if(!(e=(r.find.ID(c.matches[0].replace(Z,tt),e)||[])[0]))return n;p&&(e=e.parentNode),t=t.slice(u.shift().value.length)}for(o=K.needsContext.test(t)?0:u.length;o--&&(c=u[o],!r.relative[l=c.type]);)if((f=r.find[l])&&(i=f(c.matches[0].replace(Z,tt),J.test(u[0].type)&&vt(e.parentNode)||e))){if(u.splice(o,1),!(t=i.length&&mt(u)))return N.apply(n,i),n;break}}return(p||s(t,d))(i,e,!v,n,!e||J.test(t)&&vt(e.parentNode)||e),n},n.sortStable=b.split("").sort(S).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ut(function(t){return 1&t.compareDocumentPosition(d.createElement("fieldset"))}),ut(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||ct("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),n.attributes&&ut(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ct("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),ut(function(t){return null==t.getAttribute("disabled")})||ct($,function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null}),ot}(n);_.find=E,_.expr=E.selectors,_.expr[":"]=_.expr.pseudos,_.uniqueSort=_.unique=E.uniqueSort,_.text=E.getText,_.isXMLDoc=E.isXML,_.contains=E.contains,_.escapeSelector=E.escape;var A=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&_(t).is(n))break;r.push(t)}return r},S=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},k=_.expr.match.needsContext;function O(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,I=/^.[^:#\[\.,]*$/;function N(t,e,n){return _.isFunction(e)?_.grep(t,function(t,r){return!!e.call(t,r,t)!==n}):e.nodeType?_.grep(t,function(t){return t===e!==n}):"string"!=typeof e?_.grep(t,function(t){return f.call(e,t)>-1!==n}):I.test(e)?_.filter(e,t,n):(e=_.filter(e,t),_.grep(t,function(t){return f.call(e,t)>-1!==n&&1===t.nodeType}))}_.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?_.find.matchesSelector(r,t)?[r]:[]:_.find.matches(t,_.grep(e,function(t){return 1===t.nodeType}))},_.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(_(t).filter(function(){for(e=0;e1?_.uniqueSort(n):n},filter:function(t){return this.pushStack(N(this,t||[],!1))},not:function(t){return this.pushStack(N(this,t||[],!0))},is:function(t){return!!N(this,"string"==typeof t&&k.test(t)?_(t):t||[],!1).length}});var j,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(_.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||j,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:L.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof _?e[0]:e,_.merge(this,_.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:a,!0)),D.test(r[1])&&_.isPlainObject(e))for(r in e)_.isFunction(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=a.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):_.isFunction(t)?void 0!==n.ready?n.ready(t):t(_):_.makeArray(t,this)}).prototype=_.fn,j=_(a);var $=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};function P(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}_.fn.extend({has:function(t){var e=_(t,this),n=e.length;return this.filter(function(){for(var t=0;t-1:1===n.nodeType&&_.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?_.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?f.call(_(t),this[0]):f.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(_.uniqueSort(_.merge(this.get(),_(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),_.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return A(t,"parentNode")},parentsUntil:function(t,e,n){return A(t,"parentNode",n)},next:function(t){return P(t,"nextSibling")},prev:function(t){return P(t,"previousSibling")},nextAll:function(t){return A(t,"nextSibling")},prevAll:function(t){return A(t,"previousSibling")},nextUntil:function(t,e,n){return A(t,"nextSibling",n)},prevUntil:function(t,e,n){return A(t,"previousSibling",n)},siblings:function(t){return S((t.parentNode||{}).firstChild,t)},children:function(t){return S(t.firstChild)},contents:function(t){return O(t,"iframe")?t.contentDocument:(O(t,"template")&&(t=t.content||t),_.merge([],t.childNodes))}},function(t,e){_.fn[t]=function(n,r){var i=_.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=_.filter(r,i)),this.length>1&&(R[t]||_.uniqueSort(i),$.test(t)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function F(t){return t}function H(t){throw t}function B(t,e,n,r){var i;try{t&&_.isFunction(i=t.promise)?i.call(t).done(e).fail(n):t&&_.isFunction(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}_.Callbacks=function(t){var e,n;t="string"==typeof t?(e=t,n={},_.each(e.match(M)||[],function(t,e){n[e]=!0}),n):_.extend({},t);var r,i,o,a,s=[],u=[],c=-1,l=function(){for(a=a||t.once,o=r=!0;u.length;c=-1)for(i=u.shift();++c-1;)s.splice(n,1),n<=c&&c--}),this},has:function(t){return t?_.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=i="",this},disabled:function(){return!s},lock:function(){return a=u=[],i||r||(s=i=""),this},locked:function(){return!!a},fireWith:function(t,e){return a||(e=[t,(e=e||[]).slice?e.slice():e],u.push(e),r||l()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},_.extend({Deferred:function(t){var e=[["notify","progress",_.Callbacks("memory"),_.Callbacks("memory"),2],["resolve","done",_.Callbacks("once memory"),_.Callbacks("once memory"),0,"resolved"],["reject","fail",_.Callbacks("once memory"),_.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return _.Deferred(function(n){_.each(e,function(e,r){var i=_.isFunction(t[r[4]])&&t[r[4]];o[r[1]](function(){var t=i&&i.apply(this,arguments);t&&_.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)})}),t=null}).promise()},then:function(t,r,i){var o=0;function a(t,e,r,i){return function(){var s=this,u=arguments,c=function(){var n,c;if(!(t=o&&(r!==H&&(s=void 0,u=[n]),e.rejectWith(s,u))}};t?l():(_.Deferred.getStackHook&&(l.stackTrace=_.Deferred.getStackHook()),n.setTimeout(l))}}return _.Deferred(function(n){e[0][3].add(a(0,n,_.isFunction(i)?i:F,n.notifyWith)),e[1][3].add(a(0,n,_.isFunction(t)?t:F)),e[2][3].add(a(0,n,_.isFunction(r)?r:H))}).promise()},promise:function(t){return null!=t?_.extend(t,i):i}},o={};return _.each(e,function(t,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add(function(){r=s},e[3-t][2].disable,e[0][2].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,r=Array(n),i=u.call(arguments),o=_.Deferred(),a=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?u.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&(B(t,o.done(a(n)).resolve,o.reject,!e),"pending"===o.state()||_.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)B(i[n],a(n),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;_.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&W.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},_.readyException=function(t){n.setTimeout(function(){throw t})};var q=_.Deferred();function U(){a.removeEventListener("DOMContentLoaded",U),n.removeEventListener("load",U),_.ready()}_.fn.ready=function(t){return q.then(t).catch(function(t){_.readyException(t)}),this},_.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--_.readyWait:_.isReady)||(_.isReady=!0,!0!==t&&--_.readyWait>0||q.resolveWith(a,[_]))}}),_.ready.then=q.then,"complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll?n.setTimeout(_.ready):(a.addEventListener("DOMContentLoaded",U),n.addEventListener("load",U));var z=function(t,e,n,r,i,o,a){var s=0,u=t.length,c=null==n;if("object"===_.type(n)){i=!0;for(s in n)z(t,e,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,_.isFunction(r)||(a=!0),c&&(a?(e.call(t,r),e=null):(c=e,e=function(t,e,n){return c.call(_(t),n)})),e))for(;s1,null,!0)},removeData:function(t){return this.each(function(){G.remove(this,t)})}}),_.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=Q.get(t,e),n&&(!r||Array.isArray(n)?r=Q.access(t,e,_.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=_.queue(t,e),r=n.length,i=n.shift(),o=_._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,function(){_.dequeue(t,e)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Q.get(t,n)||Q.access(t,n,{empty:_.Callbacks("once memory").add(function(){Q.remove(t,[e+"queue",n])})})}}),_.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]+)/i,ct=/^$|\/(?:java|ecma)script/i,lt={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ft(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&O(t,e)?_.merge([t],n):n}function pt(t,e){for(var n=0,r=t.length;n-1)i&&i.push(o);else if(c=_.contains(o.ownerDocument,o),a=ft(f.appendChild(o),"script"),c&&pt(a),n)for(l=0;o=a[l++];)ct.test(o.type||"")&&n.push(o);return f}dt=a.createDocumentFragment().appendChild(a.createElement("div")),(ht=a.createElement("input")).setAttribute("type","radio"),ht.setAttribute("checked","checked"),ht.setAttribute("name","t"),dt.appendChild(ht),m.checkClone=dt.cloneNode(!0).cloneNode(!0).lastChild.checked,dt.innerHTML="",m.noCloneChecked=!!dt.cloneNode(!0).lastChild.defaultValue;var mt=a.documentElement,yt=/^key/,_t=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,bt=/^([^.]*)(?:\.(.+)|)/;function wt(){return!0}function xt(){return!1}function Ct(){try{return a.activeElement}catch(t){}}function Tt(t,e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=void 0);for(s in e)Tt(t,s,n,r,e[s],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=xt;else if(!i)return t;return 1===o&&(a=i,(i=function(t){return _().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=_.guid++)),t.each(function(){_.event.add(this,e,i,r,n)})}_.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,c,l,f,p,d,h,v,g=Q.get(t);if(g)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&_.find.matchesSelector(mt,i),n.guid||(n.guid=_.guid++),(u=g.events)||(u=g.events={}),(a=g.handle)||(a=g.handle=function(e){return void 0!==_&&_.event.triggered!==e.type?_.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(M)||[""]).length;c--;)d=v=(s=bt.exec(e[c])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=_.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=_.event.special[d]||{},l=_.extend({type:d,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&_.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,l):p.push(l),_.event.global[d]=!0)},remove:function(t,e,n,r,i){var o,a,s,u,c,l,f,p,d,h,v,g=Q.hasData(t)&&Q.get(t);if(g&&(u=g.events)){for(c=(e=(e||"").match(M)||[""]).length;c--;)if(d=v=(s=bt.exec(e[c])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=_.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)l=p[o],!i&&v!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(p.splice(o,1),l.selector&&p.delegateCount--,f.remove&&f.remove.call(t,l));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(t,h,g.handle)||_.removeEvent(t,d,g.handle),delete u[d])}else for(d in u)_.event.remove(t,d+e[c],n,r,!0);_.isEmptyObject(u)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=_.event.fix(t),u=new Array(arguments.length),c=(Q.get(this,"events")||{})[s.type]||[],l=_.event.special[s.type]||{};for(u[0]=s,e=1;e=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(o=[],a={},n=0;n-1:_.find(i,this,null,[c]).length),a[i]&&o.push(r);o.length&&s.push({elem:c,handlers:o})}return c=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,At=/\s*$/g;function Dt(t,e){return O(t,"table")&&O(11!==e.nodeType?e:e.firstChild,"tr")&&_(">tbody",t)[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Nt(t){var e=kt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function jt(t,e){var n,r,i,o,a,s,u,c;if(1===e.nodeType){if(Q.hasData(t)&&(o=Q.access(t),a=Q.set(e,o),c=o.events)){delete a.handle,a.events={};for(i in c)for(n=0,r=c[i].length;n1&&"string"==typeof h&&!m.checkClone&&St.test(h))return t.each(function(i){var o=t.eq(i);v&&(e[0]=h.call(this,i,o.html())),Lt(o,e,n,r)});if(p&&(o=(i=gt(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=_.map(ft(i,"script"),It)).length;f")},clone:function(t,e,n){var r,i,o,a,s,u,c,l=t.cloneNode(!0),f=_.contains(t.ownerDocument,t);if(!(m.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||_.isXMLDoc(t)))for(a=ft(l),r=0,i=(o=ft(t)).length;r0&&pt(a,!f&&ft(t,"script")),l},cleanData:function(t){for(var e,n,r,i=_.event.special,o=0;void 0!==(n=t[o]);o++)if(V(n)){if(e=n[Q.expando]){if(e.events)for(r in e.events)i[r]?_.event.remove(n,r):_.removeEvent(n,r,e.handle);n[Q.expando]=void 0}n[G.expando]&&(n[G.expando]=void 0)}}}),_.fn.extend({detach:function(t){return $t(this,t,!0)},remove:function(t){return $t(this,t)},text:function(t){return z(this,function(t){return void 0===t?_.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return Lt(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Dt(this,t).appendChild(t)})},prepend:function(){return Lt(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Dt(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Lt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Lt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(_.cleanData(ft(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return _.clone(this,t,e)})},html:function(t){return z(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!At.test(t)&&!lt[(ut.exec(t)||["",""])[1].toLowerCase()]){t=_.htmlPrefilter(t);try{for(;n1)}}),_.Tween=Xt,Xt.prototype={constructor:Xt,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||_.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(_.cssNumber[n]?"":"px")},cur:function(){var t=Xt.propHooks[this.prop];return t&&t.get?t.get(this):Xt.propHooks._default.get(this)},run:function(t){var e,n=Xt.propHooks[this.prop];return this.options.duration?this.pos=e=_.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Xt.propHooks._default.set(this),this}},Xt.prototype.init.prototype=Xt.prototype,Xt.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=_.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){_.fx.step[t.prop]?_.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[_.cssProps[t.prop]]&&!_.cssHooks[t.prop]?t.elem[t.prop]=t.now:_.style(t.elem,t.prop,t.now+t.unit)}}},Xt.propHooks.scrollTop=Xt.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},_.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},_.fx=Xt.prototype.init,_.fx.step={};var Jt,Zt,te,ee,ne=/^(?:toggle|show|hide)$/,re=/queueHooks$/;function ie(){Zt&&(!1===a.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ie):n.setTimeout(ie,_.fx.interval),_.fx.tick())}function oe(){return n.setTimeout(function(){Jt=void 0}),Jt=_.now()}function ae(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=et[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function se(t,e,n){for(var r,i=(ue.tweeners[e]||[]).concat(ue.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(t){return this.each(function(){_.removeAttr(this,t)})}}),_.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?_.prop(t,e,n):(1===o&&_.isXMLDoc(t)||(i=_.attrHooks[e.toLowerCase()]||(_.expr.match.bool.test(e)?ce:void 0)),void 0!==n?null===n?void _.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=_.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!m.radioValue&&"radio"===e&&O(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(M);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),ce={set:function(t,e,n){return!1===e?_.removeAttr(t,n):t.setAttribute(n,n),n}},_.each(_.expr.match.bool.source.match(/\w+/g),function(t,e){var n=le[e]||_.find.attr;le[e]=function(t,e,r){var i,o,a=e.toLowerCase();return r||(o=le[a],le[a]=i,i=null!=n(t,e,r)?a:null,le[a]=o),i}});var fe=/^(?:input|select|textarea|button)$/i,pe=/^(?:a|area)$/i;function de(t){return(t.match(M)||[]).join(" ")}function he(t){return t.getAttribute&&t.getAttribute("class")||""}_.fn.extend({prop:function(t,e){return z(this,_.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[_.propFix[t]||t]})}}),_.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&_.isXMLDoc(t)||(e=_.propFix[e]||e,i=_.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=_.find.attr(t,"tabindex");return e?parseInt(e,10):fe.test(t.nodeName)||pe.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(_.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){_.propFix[this.toLowerCase()]=this}),_.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(_.isFunction(t))return this.each(function(e){_(this).addClass(t.call(this,e,he(this)))});if("string"==typeof t&&t)for(e=t.match(M)||[];n=this[u++];)if(i=he(n),r=1===n.nodeType&&" "+de(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=de(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(_.isFunction(t))return this.each(function(e){_(this).removeClass(t.call(this,e,he(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(M)||[];n=this[u++];)if(i=he(n),r=1===n.nodeType&&" "+de(i)+" "){for(a=0;o=e[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=de(r))&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):_.isFunction(t)?this.each(function(n){_(this).toggleClass(t.call(this,n,he(this),e),e)}):this.each(function(){var e,r,i,o;if("string"===n)for(r=0,i=_(this),o=t.match(M)||[];e=o[r++];)i.hasClass(e)?i.removeClass(e):i.addClass(e);else void 0!==t&&"boolean"!==n||((e=he(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Q.get(this,"__className__")||""))})},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+de(he(n))+" ").indexOf(e)>-1)return!0;return!1}});var ve=/\r/g;_.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=_.isFunction(t),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,_(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=_.map(i,function(t){return null==t?"":t+""})),(e=_.valHooks[this.type]||_.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))})):i?(e=_.valHooks[i.type]||_.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(ve,""):null==n?"":n:void 0}}),_.extend({valHooks:{option:{get:function(t){var e=_.find.attr(t,"value");return null!=e?e:de(_.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),_.each(["radio","checkbox"],function(){_.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=_.inArray(_(t).val(),e)>-1}},m.checkOn||(_.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var ge=/^(?:focusinfocus|focusoutblur)$/;_.extend(_.event,{trigger:function(t,e,r,i){var o,s,u,c,l,f,p,d=[r||a],v=h.call(t,"type")?t.type:t,g=h.call(t,"namespace")?t.namespace.split("."):[];if(s=u=r=r||a,3!==r.nodeType&&8!==r.nodeType&&!ge.test(v+_.event.triggered)&&(v.indexOf(".")>-1&&(v=(g=v.split(".")).shift(),g.sort()),l=v.indexOf(":")<0&&"on"+v,(t=t[_.expando]?t:new _.Event(v,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:_.makeArray(e,[t]),p=_.event.special[v]||{},i||!p.trigger||!1!==p.trigger.apply(r,e))){if(!i&&!p.noBubble&&!_.isWindow(r)){for(c=p.delegateType||v,ge.test(c+v)||(s=s.parentNode);s;s=s.parentNode)d.push(s),u=s;u===(r.ownerDocument||a)&&d.push(u.defaultView||u.parentWindow||n)}for(o=0;(s=d[o++])&&!t.isPropagationStopped();)t.type=o>1?c:p.bindType||v,(f=(Q.get(s,"events")||{})[t.type]&&Q.get(s,"handle"))&&f.apply(s,e),(f=l&&s[l])&&f.apply&&V(s)&&(t.result=f.apply(s,e),!1===t.result&&t.preventDefault());return t.type=v,i||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(d.pop(),e)||!V(r)||l&&_.isFunction(r[v])&&!_.isWindow(r)&&((u=r[l])&&(r[l]=null),_.event.triggered=v,r[v](),_.event.triggered=void 0,u&&(r[l]=u)),t.result}},simulate:function(t,e,n){var r=_.extend(new _.Event,n,{type:t,isSimulated:!0});_.event.trigger(r,null,e)}}),_.fn.extend({trigger:function(t,e){return this.each(function(){_.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return _.event.trigger(t,e,n,!0)}}),_.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){_.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),_.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),m.focusin="onfocusin"in n,m.focusin||_.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){_.event.simulate(e,t.target,_.event.fix(t))};_.event.special[e]={setup:function(){var r=this.ownerDocument||this,i=Q.access(r,e);i||r.addEventListener(t,n,!0),Q.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Q.access(r,e)-1;i?Q.access(r,e,i):(r.removeEventListener(t,n,!0),Q.remove(r,e))}}});var me=n.location,ye=_.now(),_e=/\?/;_.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||_.error("Invalid XML: "+t),e};var be=/\[\]$/,we=/\r?\n/g,xe=/^(?:submit|button|image|reset|file)$/i,Ce=/^(?:input|select|textarea|keygen)/i;function Te(t,e,n,r){var i;if(Array.isArray(e))_.each(e,function(e,i){n||be.test(t)?r(t,i):Te(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)});else if(n||"object"!==_.type(e))r(t,e);else for(i in e)Te(t+"["+i+"]",e[i],n,r)}_.param=function(t,e){var n,r=[],i=function(t,e){var n=_.isFunction(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(t)||t.jquery&&!_.isPlainObject(t))_.each(t,function(){i(this.name,this.value)});else for(n in t)Te(n,t[n],e,i);return r.join("&")},_.fn.extend({serialize:function(){return _.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=_.prop(this,"elements");return t?_.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!_(this).is(":disabled")&&Ce.test(this.nodeName)&&!xe.test(t)&&(this.checked||!st.test(t))}).map(function(t,e){var n=_(this).val();return null==n?null:Array.isArray(n)?_.map(n,function(t){return{name:e.name,value:t.replace(we,"\r\n")}}):{name:e.name,value:n.replace(we,"\r\n")}}).get()}});var Ee=/%20/g,Ae=/#.*$/,Se=/([?&])_=[^&]*/,ke=/^(.*?):[ \t]*([^\r\n]*)$/gm,Oe=/^(?:GET|HEAD)$/,De=/^\/\//,Ie={},Ne={},je="*/".concat("*"),Le=a.createElement("a");function $e(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(M)||[];if(_.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Re(t,e,n,r){var i={},o=t===Ne;function a(s){var u;return i[s]=!0,_.each(t[s]||[],function(t,s){var c=s(e,n,r);return"string"!=typeof c||o||i[c]?o?!(u=c):void 0:(e.dataTypes.unshift(c),a(c),!1)}),u}return a(e.dataTypes[0])||!i["*"]&&a("*")}function Pe(t,e){var n,r,i=_.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&_.extend(!0,t,r),t}Le.href=me.href,_.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:me.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(me.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":je,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":_.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Pe(Pe(t,_.ajaxSettings),e):Pe(_.ajaxSettings,t)},ajaxPrefilter:$e(Ie),ajaxTransport:$e(Ne),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var r,i,o,s,u,c,l,f,p,d,h=_.ajaxSetup({},e),v=h.context||h,g=h.context&&(v.nodeType||v.jquery)?_(v):_.event,m=_.Deferred(),y=_.Callbacks("once memory"),b=h.statusCode||{},w={},x={},C="canceled",T={readyState:0,getResponseHeader:function(t){var e;if(l){if(!s)for(s={};e=ke.exec(o);)s[e[1].toLowerCase()]=e[2];e=s[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==l&&(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)T.always(t[T.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||C;return r&&r.abort(e),E(0,e),this}};if(m.promise(T),h.url=((t||h.url||me.href)+"").replace(De,me.protocol+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){c=a.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=Le.protocol+"//"+Le.host!=c.protocol+"//"+c.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=_.param(h.data,h.traditional)),Re(Ie,h,e,T),l)return T;(f=_.event&&h.global)&&0==_.active++&&_.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Oe.test(h.type),i=h.url.replace(Ae,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Ee,"+")):(d=h.url.slice(i.length),h.data&&(i+=(_e.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(Se,"$1"),d=(_e.test(i)?"&":"?")+"_="+ye+++d),h.url=i+d),h.ifModified&&(_.lastModified[i]&&T.setRequestHeader("If-Modified-Since",_.lastModified[i]),_.etag[i]&&T.setRequestHeader("If-None-Match",_.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||e.contentType)&&T.setRequestHeader("Content-Type",h.contentType),T.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+je+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)T.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(v,T,h)||l))return T.abort();if(C="abort",y.add(h.complete),T.done(h.success),T.fail(h.error),r=Re(Ne,h,e,T)){if(T.readyState=1,f&&g.trigger("ajaxSend",[T,h]),l)return T;h.async&&h.timeout>0&&(u=n.setTimeout(function(){T.abort("timeout")},h.timeout));try{l=!1,r.send(w,E)}catch(t){if(l)throw t;E(-1,t)}}else E(-1,"No Transport");function E(t,e,a,s){var c,p,d,w,x,C=e;l||(l=!0,u&&n.clearTimeout(u),r=void 0,o=s||"",T.readyState=t>0?4:0,c=t>=200&&t<300||304===t,a&&(w=function(t,e,n){for(var r,i,o,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(h,T,a)),w=function(t,e,n,r){var i,o,a,s,u,c={},l=t.dataTypes.slice();if(l[1])for(a in t.converters)c[a.toLowerCase()]=t.converters[a];for(o=l.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=c[u+" "+o]||c["* "+o]))for(i in c)if((s=i.split(" "))[1]===o&&(a=c[u+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(h,w,T,c),c?(h.ifModified&&((x=T.getResponseHeader("Last-Modified"))&&(_.lastModified[i]=x),(x=T.getResponseHeader("etag"))&&(_.etag[i]=x)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=w.state,p=w.data,c=!(d=w.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(e||C)+"",c?m.resolveWith(v,[p,C,T]):m.rejectWith(v,[T,C,d]),T.statusCode(b),b=void 0,f&&g.trigger(c?"ajaxSuccess":"ajaxError",[T,h,c?p:d]),y.fireWith(v,[T,C]),f&&(g.trigger("ajaxComplete",[T,h]),--_.active||_.event.trigger("ajaxStop")))}return T},getJSON:function(t,e,n){return _.get(t,e,n,"json")},getScript:function(t,e){return _.get(t,void 0,e,"script")}}),_.each(["get","post"],function(t,e){_[e]=function(t,n,r,i){return _.isFunction(n)&&(i=i||r,r=n,n=void 0),_.ajax(_.extend({url:t,type:e,dataType:i,data:n,success:r},_.isPlainObject(t)&&t))}}),_._evalUrl=function(t){return _.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},_.fn.extend({wrapAll:function(t){var e;return this[0]&&(_.isFunction(t)&&(t=t.call(this[0])),e=_(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return _.isFunction(t)?this.each(function(e){_(this).wrapInner(t.call(this,e))}):this.each(function(){var e=_(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=_.isFunction(t);return this.each(function(n){_(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){_(this).replaceWith(this.childNodes)}),this}}),_.expr.pseudos.hidden=function(t){return!_.expr.pseudos.visible(t)},_.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},_.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var Me={0:200,1223:204},Fe=_.ajaxSettings.xhr();m.cors=!!Fe&&"withCredentials"in Fe,m.ajax=Fe=!!Fe,_.ajaxTransport(function(t){var e,r;if(m.cors||Fe&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);e=function(t){return function(){e&&(e=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Me[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),r=s.onerror=e("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){e&&r()})},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),_.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),_.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return _.globalEval(t),t}}}),_.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),_.ajaxTransport("script",function(t){var e,n;if(t.crossDomain)return{send:function(r,i){e=_(" diff --git a/frameworks/PHP/laravel/resources/assets/sass/_variables.scss b/frameworks/PHP/laravel/resources/assets/sass/_variables.scss deleted file mode 100644 index 70ecfdb39d0..00000000000 --- a/frameworks/PHP/laravel/resources/assets/sass/_variables.scss +++ /dev/null @@ -1,8 +0,0 @@ - -// Body -$body-bg: #f5f8fa; - -// Typography -$font-family-sans-serif: "Raleway", sans-serif; -$font-size-base: 0.9rem; -$line-height-base: 1.6; diff --git a/frameworks/PHP/laravel/resources/assets/sass/app.scss b/frameworks/PHP/laravel/resources/assets/sass/app.scss deleted file mode 100644 index 0077cb141b6..00000000000 --- a/frameworks/PHP/laravel/resources/assets/sass/app.scss +++ /dev/null @@ -1,14 +0,0 @@ - -// Fonts -@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600"); - -// Variables -@import "variables"; - -// Bootstrap -@import '~bootstrap/scss/bootstrap'; - -.navbar-laravel { - background-color: #fff; - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04); -} diff --git a/frameworks/PHP/laravel/resources/lang/en/auth.php b/frameworks/PHP/laravel/resources/lang/en/auth.php deleted file mode 100644 index e5506df2907..00000000000 --- a/frameworks/PHP/laravel/resources/lang/en/auth.php +++ /dev/null @@ -1,19 +0,0 @@ - 'These credentials do not match our records.', - 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', - -]; diff --git a/frameworks/PHP/laravel/resources/lang/en/pagination.php b/frameworks/PHP/laravel/resources/lang/en/pagination.php deleted file mode 100644 index d4814118778..00000000000 --- a/frameworks/PHP/laravel/resources/lang/en/pagination.php +++ /dev/null @@ -1,19 +0,0 @@ - '« Previous', - 'next' => 'Next »', - -]; diff --git a/frameworks/PHP/laravel/resources/lang/en/passwords.php b/frameworks/PHP/laravel/resources/lang/en/passwords.php deleted file mode 100644 index e5544d20166..00000000000 --- a/frameworks/PHP/laravel/resources/lang/en/passwords.php +++ /dev/null @@ -1,22 +0,0 @@ - 'Passwords must be at least six characters and match the confirmation.', - 'reset' => 'Your password has been reset!', - 'sent' => 'We have e-mailed your password reset link!', - 'token' => 'This password reset token is invalid.', - 'user' => "We can't find a user with that e-mail address.", - -]; diff --git a/frameworks/PHP/laravel/resources/lang/en/validation.php b/frameworks/PHP/laravel/resources/lang/en/validation.php deleted file mode 100644 index edc036dd01b..00000000000 --- a/frameworks/PHP/laravel/resources/lang/en/validation.php +++ /dev/null @@ -1,121 +0,0 @@ - 'The :attribute must be accepted.', - 'active_url' => 'The :attribute is not a valid URL.', - 'after' => 'The :attribute must be a date after :date.', - 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', - 'alpha' => 'The :attribute may only contain letters.', - 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', - 'alpha_num' => 'The :attribute may only contain letters and numbers.', - 'array' => 'The :attribute must be an array.', - 'before' => 'The :attribute must be a date before :date.', - 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', - 'between' => [ - 'numeric' => 'The :attribute must be between :min and :max.', - 'file' => 'The :attribute must be between :min and :max kilobytes.', - 'string' => 'The :attribute must be between :min and :max characters.', - 'array' => 'The :attribute must have between :min and :max items.', - ], - 'boolean' => 'The :attribute field must be true or false.', - 'confirmed' => 'The :attribute confirmation does not match.', - 'date' => 'The :attribute is not a valid date.', - 'date_format' => 'The :attribute does not match the format :format.', - 'different' => 'The :attribute and :other must be different.', - 'digits' => 'The :attribute must be :digits digits.', - 'digits_between' => 'The :attribute must be between :min and :max digits.', - 'dimensions' => 'The :attribute has invalid image dimensions.', - 'distinct' => 'The :attribute field has a duplicate value.', - 'email' => 'The :attribute must be a valid email address.', - 'exists' => 'The selected :attribute is invalid.', - 'file' => 'The :attribute must be a file.', - 'filled' => 'The :attribute field must have a value.', - 'image' => 'The :attribute must be an image.', - 'in' => 'The selected :attribute is invalid.', - 'in_array' => 'The :attribute field does not exist in :other.', - 'integer' => 'The :attribute must be an integer.', - 'ip' => 'The :attribute must be a valid IP address.', - 'ipv4' => 'The :attribute must be a valid IPv4 address.', - 'ipv6' => 'The :attribute must be a valid IPv6 address.', - 'json' => 'The :attribute must be a valid JSON string.', - 'max' => [ - 'numeric' => 'The :attribute may not be greater than :max.', - 'file' => 'The :attribute may not be greater than :max kilobytes.', - 'string' => 'The :attribute may not be greater than :max characters.', - 'array' => 'The :attribute may not have more than :max items.', - ], - 'mimes' => 'The :attribute must be a file of type: :values.', - 'mimetypes' => 'The :attribute must be a file of type: :values.', - 'min' => [ - 'numeric' => 'The :attribute must be at least :min.', - 'file' => 'The :attribute must be at least :min kilobytes.', - 'string' => 'The :attribute must be at least :min characters.', - 'array' => 'The :attribute must have at least :min items.', - ], - 'not_in' => 'The selected :attribute is invalid.', - 'numeric' => 'The :attribute must be a number.', - 'present' => 'The :attribute field must be present.', - 'regex' => 'The :attribute format is invalid.', - 'required' => 'The :attribute field is required.', - 'required_if' => 'The :attribute field is required when :other is :value.', - 'required_unless' => 'The :attribute field is required unless :other is in :values.', - 'required_with' => 'The :attribute field is required when :values is present.', - 'required_with_all' => 'The :attribute field is required when :values is present.', - 'required_without' => 'The :attribute field is required when :values is not present.', - 'required_without_all' => 'The :attribute field is required when none of :values are present.', - 'same' => 'The :attribute and :other must match.', - 'size' => [ - 'numeric' => 'The :attribute must be :size.', - 'file' => 'The :attribute must be :size kilobytes.', - 'string' => 'The :attribute must be :size characters.', - 'array' => 'The :attribute must contain :size items.', - ], - 'string' => 'The :attribute must be a string.', - 'timezone' => 'The :attribute must be a valid zone.', - 'unique' => 'The :attribute has already been taken.', - 'uploaded' => 'The :attribute failed to upload.', - 'url' => 'The :attribute format is invalid.', - - /* - |-------------------------------------------------------------------------- - | Custom Validation Language Lines - |-------------------------------------------------------------------------- - | - | Here you may specify custom validation messages for attributes using the - | convention "attribute.rule" to name the lines. This makes it quick to - | specify a specific custom language line for a given attribute rule. - | - */ - - 'custom' => [ - 'attribute-name' => [ - 'rule-name' => 'custom-message', - ], - ], - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. - | - */ - - 'attributes' => [], - -]; diff --git a/frameworks/PHP/laravel/resources/views/welcome.blade.php b/frameworks/PHP/laravel/resources/views/welcome.blade.php deleted file mode 100644 index a246e106a59..00000000000 --- a/frameworks/PHP/laravel/resources/views/welcome.blade.php +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - Laravel - - - - - - - - -
- @if (Route::has('login')) - - @endif - -
-
- Laravel -
- - -
-
- - diff --git a/frameworks/PHP/laravel/setup.sh b/frameworks/PHP/laravel/setup.sh deleted file mode 100644 index 82d23586082..00000000000 --- a/frameworks/PHP/laravel/setup.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer - -sed -i 's|__DBHOST__|'${DBHOST}'|g' .env - -sed -i 's|__IROOT__|'${IROOT}'|g' deploy/nginx.conf -sed -i 's|__TROOT__|'${TROOT}'|g' deploy/nginx.conf - -php artisan config:cache -php artisan route:cache - -php-fpm --fpm-config ${FWROOT}/toolset/setup/linux/languages/php/php-fpm.conf -g ${TROOT}/deploy/php-fpm.pid -nginx -c ${TROOT}/deploy/nginx.conf diff --git a/frameworks/PHP/limonade/benchmark_config.json b/frameworks/PHP/limonade/benchmark_config.json index 9e1f23fd83a..bdb46e7a527 100644 --- a/frameworks/PHP/limonade/benchmark_config.json +++ b/frameworks/PHP/limonade/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "limonade", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "db_url": "/db", diff --git a/frameworks/PHP/limonade/deploy/nginx.conf b/frameworks/PHP/limonade/deploy/nginx.conf index d71be4c1d4a..ba845e84c46 100644 --- a/frameworks/PHP/limonade/deploy/nginx.conf +++ b/frameworks/PHP/limonade/deploy/nginx.conf @@ -1,21 +1,42 @@ +user root; worker_processes auto; -error_log stderr error; - events { - worker_connections 16384; + worker_connections 16384; + multi_accept on; + use epoll; } http { - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; access_log off; server_tokens off; - sendfile on; - keepalive_timeout 65; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; + upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/var/run/php/php7.2-fpm.sock; keepalive 50; } @@ -23,15 +44,11 @@ http { listen 8080; server_name localhost; - root /home/ubuntu/FrameworkBenchmarks/limonade/; + root /limonade/; index index.php; location / { - try_files $uri $uri/ @rewrite; - } - - location @rewrite { - rewrite ^/(.*)$ /index.php?u=$1&$args; + try_files $uri $uri/ /index.php?$uri&$args; } location ~ \.php$ { @@ -40,8 +57,7 @@ http { fastcgi_keep_conn on; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } - } } diff --git a/frameworks/PHP/limonade/index.php b/frameworks/PHP/limonade/index.php index 95055bf728e..026fe78c027 100644 --- a/frameworks/PHP/limonade/index.php +++ b/frameworks/PHP/limonade/index.php @@ -6,7 +6,7 @@ function configure() { $cfg = ActiveRecord\Config::instance(); $cfg->set_model_directory("models"); $cfg->set_connections(array( - "development" => "mysql://benchmarkdbuser:benchmarkdbpass@localhost/hello_world?charset=utf8")); + "development" => "mysql://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world?charset=utf8")); option("bas_url", "/"); } diff --git a/frameworks/PHP/limonade/limonade.dockerfile b/frameworks/PHP/limonade/limonade.dockerfile new file mode 100644 index 00000000000..00df2327307 --- /dev/null +++ b/frameworks/PHP/limonade/limonade.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/php7:0.1 + +ADD ./ /limonade +WORKDIR /limonade + +RUN composer.phar install --no-progress + +CMD service php7.2-fpm start && \ + nginx -c /limonade/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/limonade/setup.sh b/frameworks/PHP/limonade/setup.sh deleted file mode 100644 index 8d707981b49..00000000000 --- a/frameworks/PHP/limonade/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer - -sed -i 's|localhost|'"${DBHOST}"'|g' index.php -sed -i 's|root .*/FrameworkBenchmarks/limonade|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/lithium/.gitignore b/frameworks/PHP/lithium/.gitignore deleted file mode 100644 index 26db5738450..00000000000 --- a/frameworks/PHP/lithium/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -/app/cache -/app/logs -/bin -/vendors -/build -/dist -.DS_Store -/tags -.idea -vendor -deploy/php-fpm.pid -/app/resources/ diff --git a/frameworks/PHP/lithium/.gitmodules b/frameworks/PHP/lithium/.gitmodules deleted file mode 100644 index 2e396e63829..00000000000 --- a/frameworks/PHP/lithium/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "libraries/lithium"] - path = libraries/lithium - url = git://github.com/UnionOfRAD/lithium.git diff --git a/frameworks/PHP/lithium/app/config/bootstrap/connections.php b/frameworks/PHP/lithium/app/config/bootstrap/connections.php index cee5a39cffd..859390ba89c 100644 --- a/frameworks/PHP/lithium/app/config/bootstrap/connections.php +++ b/frameworks/PHP/lithium/app/config/bootstrap/connections.php @@ -62,7 +62,7 @@ Connections::add('default', array( 'type' => 'database', 'adapter' => 'MySql', - 'host' => '192.168.100.102', + 'host' => 'tfb-database', 'login' => 'benchmarkdbuser', 'password' => 'benchmarkdbpass', 'database' => 'hello_world', diff --git a/frameworks/PHP/lithium/benchmark_config.json b/frameworks/PHP/lithium/benchmark_config.json index eb6afbf775d..c1466363362 100644 --- a/frameworks/PHP/lithium/benchmark_config.json +++ b/frameworks/PHP/lithium/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "lithium", "tests": [{ "default": { - "setup_file": "setup", "plaintext_url": "/plaintext", "json_url": "/json", "db_url": "/db", diff --git a/frameworks/PHP/lithium/deploy/nginx.conf b/frameworks/PHP/lithium/deploy/nginx.conf index 3678e60f5c3..a3eacd7c016 100644 --- a/frameworks/PHP/lithium/deploy/nginx.conf +++ b/frameworks/PHP/lithium/deploy/nginx.conf @@ -1,41 +1,42 @@ -#user nobody; +user root; worker_processes auto; -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - events { - worker_connections 16384; + worker_connections 16384; + multi_accept on; + use epoll; } - http { - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; access_log off; server_tokens off; - sendfile on; - #tcp_nopush on; + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; - #keepalive_timeout 0; - keepalive_timeout 65; + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; - #gzip on; upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/var/run/php/php5.6-fpm.sock; keepalive 50; } @@ -43,92 +44,20 @@ http { listen 8080; server_name localhost; - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - root /home/ubuntu/FrameworkBenchmarks/php-lithium/; + root /lithium/; index index.php; location / { try_files $uri $uri/ /index.php?$uri&$args; } - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # location ~ \.php$ { try_files $uri =404; fastcgi_pass fastcgi_backend; fastcgi_keep_conn on; fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - -} \ No newline at end of file +} diff --git a/frameworks/PHP/lithium/lithium.dockerfile b/frameworks/PHP/lithium/lithium.dockerfile new file mode 100644 index 00000000000..fa466edf80c --- /dev/null +++ b/frameworks/PHP/lithium/lithium.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/php5:0.1 + +ADD ./ /lithium +WORKDIR /lithium + +RUN composer.phar install --no-progress + +RUN chmod -R 777 /lithium + +CMD service php5.6-fpm start && \ + nginx -c /lithium/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/lithium/setup.sh b/frameworks/PHP/lithium/setup.sh deleted file mode 100644 index 76f2938c67f..00000000000 --- a/frameworks/PHP/lithium/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql php5 nginx composer - -sed -i 's|192.168.100.102|'"${DBHOST}"'|g' app/config/bootstrap/connections.php -sed -i 's|root .*/FrameworkBenchmarks/php-lithium|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/lumen/.env b/frameworks/PHP/lumen/.env index 71a404dfe3b..20669bcac2f 100644 --- a/frameworks/PHP/lumen/.env +++ b/frameworks/PHP/lumen/.env @@ -7,7 +7,7 @@ LOG_CHANNEL=stack LOG_SLACK_WEBHOOK_URL= DB_CONNECTION=mysql -DB_HOST=__DBHOST__ +DB_HOST=tfb-database DB_PORT=3306 DB_DATABASE=hello_world DB_USERNAME=benchmarkdbuser diff --git a/frameworks/PHP/lumen/.env.example b/frameworks/PHP/lumen/.env.example deleted file mode 100644 index 2d7f495805f..00000000000 --- a/frameworks/PHP/lumen/.env.example +++ /dev/null @@ -1,17 +0,0 @@ -APP_ENV=local -APP_DEBUG=true -APP_KEY= -APP_TIMEZONE=UTC - -LOG_CHANNEL=stack -LOG_SLACK_WEBHOOK_URL= - -DB_CONNECTION=mysql -DB_HOST=127.0.0.1 -DB_PORT=3306 -DB_DATABASE=homestead -DB_USERNAME=homestead -DB_PASSWORD=secret - -CACHE_DRIVER=file -QUEUE_DRIVER=sync diff --git a/frameworks/PHP/lumen/.gitignore b/frameworks/PHP/lumen/.gitignore deleted file mode 100644 index 1727f4eac4b..00000000000 --- a/frameworks/PHP/lumen/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/vendor -/.idea -Homestead.json -Homestead.yaml -/deploy/php-fpm.pid diff --git a/frameworks/PHP/lumen/benchmark_config.json b/frameworks/PHP/lumen/benchmark_config.json index c7b6c889b29..ab1955ffdbf 100644 --- a/frameworks/PHP/lumen/benchmark_config.json +++ b/frameworks/PHP/lumen/benchmark_config.json @@ -22,7 +22,7 @@ "webserver": "nginx", "os": "Linux", "database_os": "Linux", - "display_name": "Lumen 5.6", + "display_name": "Lumen", "notes": "", "versus": "php7" } diff --git a/frameworks/PHP/lumen/composer.lock b/frameworks/PHP/lumen/composer.lock deleted file mode 100644 index 2a31dd7dee8..00000000000 --- a/frameworks/PHP/lumen/composer.lock +++ /dev/null @@ -1,3862 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "content-hash": "ad8af3a630c5aaf41cb4c34e85f43c43", - "packages": [ - { - "name": "doctrine/inflector", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "5527a48b7313d15261292c149e55e26eae771b0a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", - "reference": "5527a48b7313d15261292c149e55e26eae771b0a", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^6.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "inflection", - "pluralize", - "singularize", - "string" - ], - "time": "2018-01-09T20:05:19+00:00" - }, - { - "name": "illuminate/auth", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/auth.git", - "reference": "46202d4df0e009f30a23d6b3bed62ef4e2592b2f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/auth/zipball/46202d4df0e009f30a23d6b3bed62ef4e2592b2f", - "reference": "46202d4df0e009f30a23d6b3bed62ef4e2592b2f", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.6.*", - "illuminate/http": "5.6.*", - "illuminate/queue": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3" - }, - "suggest": { - "illuminate/console": "Required to use the auth:clear-resets command (5.6.*).", - "illuminate/queue": "Required to fire login / logout events (5.6.*).", - "illuminate/session": "Required to use the session based guard (5.6.*)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Auth\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Auth package.", - "homepage": "https://laravel.com", - "time": "2018-03-09T13:52:50+00:00" - }, - { - "name": "illuminate/broadcasting", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/broadcasting.git", - "reference": "4953e8447b201552bb90c298276745a6a5240f81" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/broadcasting/zipball/4953e8447b201552bb90c298276745a6a5240f81", - "reference": "4953e8447b201552bb90c298276745a6a5240f81", - "shasum": "" - }, - "require": { - "illuminate/bus": "5.6.*", - "illuminate/contracts": "5.6.*", - "illuminate/queue": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3", - "psr/log": "~1.0" - }, - "suggest": { - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~3.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Broadcasting\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Broadcasting package.", - "homepage": "https://laravel.com", - "time": "2018-01-03T16:10:25+00:00" - }, - { - "name": "illuminate/bus", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/bus.git", - "reference": "8702a90ae06fabf080cb2cfffda3efaeae0e417a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/bus/zipball/8702a90ae06fabf080cb2cfffda3efaeae0e417a", - "reference": "8702a90ae06fabf080cb2cfffda3efaeae0e417a", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.6.*", - "illuminate/pipeline": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Bus\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Bus package.", - "homepage": "https://laravel.com", - "time": "2017-12-14T13:30:55+00:00" - }, - { - "name": "illuminate/cache", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/cache.git", - "reference": "d3059571b65122f8c1c6cdfe98694900debed950" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/cache/zipball/d3059571b65122f8c1c6cdfe98694900debed950", - "reference": "d3059571b65122f8c1c6cdfe98694900debed950", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3" - }, - "suggest": { - "illuminate/database": "Required to use the database cache driver (5.6.*).", - "illuminate/filesystem": "Required to use the file cache driver (5.6.*).", - "illuminate/redis": "Required to use the redis cache driver (5.6.*)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Cache\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Cache package.", - "homepage": "https://laravel.com", - "time": "2018-01-27T10:11:12+00:00" - }, - { - "name": "illuminate/config", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/config.git", - "reference": "e8158dff3189deed846c84c66c60fa68c21ee579" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/config/zipball/e8158dff3189deed846c84c66c60fa68c21ee579", - "reference": "e8158dff3189deed846c84c66c60fa68c21ee579", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Config\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Config package.", - "homepage": "https://laravel.com", - "time": "2017-11-07T20:23:51+00:00" - }, - { - "name": "illuminate/console", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/console.git", - "reference": "70cbf81da7bdf2fe1c31f6da56071469f1c00d16" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/console/zipball/70cbf81da7bdf2fe1c31f6da56071469f1c00d16", - "reference": "70cbf81da7bdf2fe1c31f6da56071469f1c00d16", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3", - "symfony/console": "~4.0" - }, - "suggest": { - "dragonmantank/cron-expression": "Required to use scheduling component (~2.0).", - "guzzlehttp/guzzle": "Required to use the ping methods on schedules (~6.0).", - "symfony/process": "Required to use scheduling component (~4.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Console package.", - "homepage": "https://laravel.com", - "time": "2018-03-04T02:06:37+00:00" - }, - { - "name": "illuminate/container", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/container.git", - "reference": "4a42d667a05ec6d31f05b532cdac7e8e68e5ea2a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/4a42d667a05ec6d31f05b532cdac7e8e68e5ea2a", - "reference": "4a42d667a05ec6d31f05b532cdac7e8e68e5ea2a", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.6.*", - "php": "^7.1.3", - "psr/container": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Container\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Container package.", - "homepage": "https://laravel.com", - "time": "2018-01-21T02:13:38+00:00" - }, - { - "name": "illuminate/contracts", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/contracts.git", - "reference": "00a8296c63b6429eb8705d2700c2436ea193c553" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/00a8296c63b6429eb8705d2700c2436ea193c553", - "reference": "00a8296c63b6429eb8705d2700c2436ea193c553", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "psr/container": "~1.0", - "psr/simple-cache": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Contracts\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Contracts package.", - "homepage": "https://laravel.com", - "time": "2018-02-20T16:46:51+00:00" - }, - { - "name": "illuminate/database", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/database.git", - "reference": "4d2fc3c816ed402fcac290e6ca7bc855d5313000" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/database/zipball/4d2fc3c816ed402fcac290e6ca7bc855d5313000", - "reference": "4d2fc3c816ed402fcac290e6ca7bc855d5313000", - "shasum": "" - }, - "require": { - "illuminate/container": "5.6.*", - "illuminate/contracts": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3" - }, - "suggest": { - "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.6).", - "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", - "illuminate/console": "Required to use the database commands (5.6.*).", - "illuminate/events": "Required to use the observers with Eloquent (5.6.*).", - "illuminate/filesystem": "Required to use the migrations (5.6.*).", - "illuminate/pagination": "Required to paginate the result set (5.6.*)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Database\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Database package.", - "homepage": "https://laravel.com", - "keywords": [ - "database", - "laravel", - "orm", - "sql" - ], - "time": "2018-03-09T13:55:05+00:00" - }, - { - "name": "illuminate/encryption", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/encryption.git", - "reference": "743de982df71a0826b7027da295d256a0d0659bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/encryption/zipball/743de982df71a0826b7027da295d256a0d0659bd", - "reference": "743de982df71a0826b7027da295d256a0d0659bd", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "ext-openssl": "*", - "illuminate/contracts": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Encryption\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Encryption package.", - "homepage": "https://laravel.com", - "time": "2017-11-07T20:23:51+00:00" - }, - { - "name": "illuminate/events", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/events.git", - "reference": "b6e73ed40478cef2ef98d5ddb27f333291606cea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/b6e73ed40478cef2ef98d5ddb27f333291606cea", - "reference": "b6e73ed40478cef2ef98d5ddb27f333291606cea", - "shasum": "" - }, - "require": { - "illuminate/container": "5.6.*", - "illuminate/contracts": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Events\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Events package.", - "homepage": "https://laravel.com", - "time": "2018-02-26T19:00:55+00:00" - }, - { - "name": "illuminate/filesystem", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/filesystem.git", - "reference": "51680913527709ed509c857100302da4688b8637" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/51680913527709ed509c857100302da4688b8637", - "reference": "51680913527709ed509c857100302da4688b8637", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3", - "symfony/finder": "~4.0" - }, - "suggest": { - "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", - "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", - "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (~1.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Filesystem package.", - "homepage": "https://laravel.com", - "time": "2018-03-05T13:55:50+00:00" - }, - { - "name": "illuminate/hashing", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/hashing.git", - "reference": "7226dc43c3e309112e6ae65f4f720c31cf3f75ec" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/hashing/zipball/7226dc43c3e309112e6ae65f4f720c31cf3f75ec", - "reference": "7226dc43c3e309112e6ae65f4f720c31cf3f75ec", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Hashing\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Hashing package.", - "homepage": "https://laravel.com", - "time": "2018-02-11T14:45:58+00:00" - }, - { - "name": "illuminate/http", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/http.git", - "reference": "39131ae386ff4b84903cdc3ae5a6dd2af2eb05ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/http/zipball/39131ae386ff4b84903cdc3ae5a6dd2af2eb05ba", - "reference": "39131ae386ff4b84903cdc3ae5a6dd2af2eb05ba", - "shasum": "" - }, - "require": { - "illuminate/session": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3", - "symfony/http-foundation": "~4.0", - "symfony/http-kernel": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Http\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Http package.", - "homepage": "https://laravel.com", - "time": "2018-03-09T14:19:22+00:00" - }, - { - "name": "illuminate/log", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/log.git", - "reference": "e835839b9f3a417e0cdbf9f34b8b21dff7e8e44c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/log/zipball/e835839b9f3a417e0cdbf9f34b8b21dff7e8e44c", - "reference": "e835839b9f3a417e0cdbf9f34b8b21dff7e8e44c", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.6.*", - "illuminate/support": "5.6.*", - "monolog/monolog": "~1.11", - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Log package.", - "homepage": "https://laravel.com", - "time": "2018-03-08T14:31:27+00:00" - }, - { - "name": "illuminate/pagination", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/pagination.git", - "reference": "6b9b1def1347430a31e7519d381e2f14a55a97dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/pagination/zipball/6b9b1def1347430a31e7519d381e2f14a55a97dd", - "reference": "6b9b1def1347430a31e7519d381e2f14a55a97dd", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Pagination\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Pagination package.", - "homepage": "https://laravel.com", - "time": "2018-02-12T14:12:25+00:00" - }, - { - "name": "illuminate/pipeline", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/pipeline.git", - "reference": "0ea9439ed6e4b0bbbc74bf15aab84e4c9a3a9b3b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/pipeline/zipball/0ea9439ed6e4b0bbbc74bf15aab84e4c9a3a9b3b", - "reference": "0ea9439ed6e4b0bbbc74bf15aab84e4c9a3a9b3b", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Pipeline\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Pipeline package.", - "homepage": "https://laravel.com", - "time": "2017-11-07T20:23:51+00:00" - }, - { - "name": "illuminate/queue", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/queue.git", - "reference": "7a981b7cdba4ff346f6d20450f7adac0f38f7ebf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/queue/zipball/7a981b7cdba4ff346f6d20450f7adac0f38f7ebf", - "reference": "7a981b7cdba4ff346f6d20450f7adac0f38f7ebf", - "shasum": "" - }, - "require": { - "illuminate/console": "5.6.*", - "illuminate/container": "5.6.*", - "illuminate/contracts": "5.6.*", - "illuminate/database": "5.6.*", - "illuminate/filesystem": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3", - "symfony/debug": "~4.0", - "symfony/process": "~4.0" - }, - "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver (~3.0).", - "ext-pcntl": "Required to use all features of the queue worker.", - "ext-posix": "Required to use all features of the queue worker.", - "illuminate/redis": "Required to use the Redis queue driver (5.6.*).", - "pda/pheanstalk": "Required to use the Beanstalk queue driver (~3.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Queue\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Queue package.", - "homepage": "https://laravel.com", - "time": "2018-02-25T15:35:05+00:00" - }, - { - "name": "illuminate/session", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/session.git", - "reference": "90bb5857fb64e269d8d331f02f820555ee471f64" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/session/zipball/90bb5857fb64e269d8d331f02f820555ee471f64", - "reference": "90bb5857fb64e269d8d331f02f820555ee471f64", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.6.*", - "illuminate/filesystem": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3", - "symfony/finder": "~4.0", - "symfony/http-foundation": "~4.0" - }, - "suggest": { - "illuminate/console": "Required to use the session:table command (5.6.*)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Session\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Session package.", - "homepage": "https://laravel.com", - "time": "2018-03-06T14:29:02+00:00" - }, - { - "name": "illuminate/support", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/support.git", - "reference": "259f6f17a11b0379340ec5311fcba27bc2a04070" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/259f6f17a11b0379340ec5311fcba27bc2a04070", - "reference": "259f6f17a11b0379340ec5311fcba27bc2a04070", - "shasum": "" - }, - "require": { - "doctrine/inflector": "~1.1", - "ext-mbstring": "*", - "illuminate/contracts": "5.6.*", - "nesbot/carbon": "^1.20", - "php": "^7.1.3" - }, - "conflict": { - "tightenco/collect": "<5.5.33" - }, - "suggest": { - "illuminate/filesystem": "Required to use the composer class (5.2.*).", - "symfony/process": "Required to use the composer class (~4.0).", - "symfony/var-dumper": "Required to use the dd function (~4.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Support\\": "" - }, - "files": [ - "helpers.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Support package.", - "homepage": "https://laravel.com", - "time": "2018-03-09T16:52:54+00:00" - }, - { - "name": "illuminate/translation", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/translation.git", - "reference": "3612f41b450b8d14e7f5785c087af451ccd3be9c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/translation/zipball/3612f41b450b8d14e7f5785c087af451ccd3be9c", - "reference": "3612f41b450b8d14e7f5785c087af451ccd3be9c", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.6.*", - "illuminate/filesystem": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Translation package.", - "homepage": "https://laravel.com", - "time": "2018-02-22T15:33:29+00:00" - }, - { - "name": "illuminate/validation", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/validation.git", - "reference": "07a0a10b9b09ef666fe7ee600867b90afdd7504b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/validation/zipball/07a0a10b9b09ef666fe7ee600867b90afdd7504b", - "reference": "07a0a10b9b09ef666fe7ee600867b90afdd7504b", - "shasum": "" - }, - "require": { - "illuminate/container": "5.6.*", - "illuminate/contracts": "5.6.*", - "illuminate/support": "5.6.*", - "illuminate/translation": "5.6.*", - "php": "^7.1.3", - "symfony/http-foundation": "~4.0" - }, - "suggest": { - "illuminate/database": "Required to use the database presence verifier (5.6.*)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Validation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Validation package.", - "homepage": "https://laravel.com", - "time": "2018-03-07T22:05:15+00:00" - }, - { - "name": "illuminate/view", - "version": "v5.6.11", - "source": { - "type": "git", - "url": "https://github.com/illuminate/view.git", - "reference": "2c6db84a5cf122bfe8b0721000df811f0b820c62" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/2c6db84a5cf122bfe8b0721000df811f0b820c62", - "reference": "2c6db84a5cf122bfe8b0721000df811f0b820c62", - "shasum": "" - }, - "require": { - "illuminate/container": "5.6.*", - "illuminate/contracts": "5.6.*", - "illuminate/events": "5.6.*", - "illuminate/filesystem": "5.6.*", - "illuminate/support": "5.6.*", - "php": "^7.1.3", - "symfony/debug": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\View\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate View package.", - "homepage": "https://laravel.com", - "time": "2018-03-05T14:05:53+00:00" - }, - { - "name": "laravel/lumen-framework", - "version": "v5.6.1", - "source": { - "type": "git", - "url": "https://github.com/laravel/lumen-framework.git", - "reference": "5f06af6ba20dc36c001359befa72e725d7f0d567" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/lumen-framework/zipball/5f06af6ba20dc36c001359befa72e725d7f0d567", - "reference": "5f06af6ba20dc36c001359befa72e725d7f0d567", - "shasum": "" - }, - "require": { - "illuminate/auth": "5.6.*", - "illuminate/broadcasting": "5.6.*", - "illuminate/bus": "5.6.*", - "illuminate/cache": "5.6.*", - "illuminate/config": "5.6.*", - "illuminate/container": "5.6.*", - "illuminate/contracts": "5.6.*", - "illuminate/database": "5.6.*", - "illuminate/encryption": "5.6.*", - "illuminate/events": "5.6.*", - "illuminate/filesystem": "5.6.*", - "illuminate/hashing": "5.6.*", - "illuminate/http": "5.6.*", - "illuminate/log": "5.6.*", - "illuminate/pagination": "5.6.*", - "illuminate/pipeline": "5.6.*", - "illuminate/queue": "5.6.*", - "illuminate/support": "5.6.*", - "illuminate/translation": "5.6.*", - "illuminate/validation": "5.6.*", - "illuminate/view": "5.6.*", - "mtdowling/cron-expression": "~1.0", - "nikic/fast-route": "~1.2", - "php": "^7.1.3", - "symfony/http-foundation": "~4.0", - "symfony/http-kernel": "~4.0" - }, - "require-dev": { - "mockery/mockery": "~1.0", - "phpunit/phpunit": "~6.0" - }, - "suggest": { - "laravel/tinker": "Required to use the tinker console command (~1.0).", - "vlucas/phpdotenv": "Required to use .env files (~2.2)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Laravel\\Lumen\\": "src/" - }, - "files": [ - "src/helpers.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Laravel Lumen Framework.", - "homepage": "https://lumen.laravel.com", - "keywords": [ - "framework", - "laravel", - "lumen" - ], - "time": "2018-02-08T17:37:51+00:00" - }, - { - "name": "monolog/monolog", - "version": "1.23.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4", - "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "1.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "jakub-onderka/php-parallel-lint": "0.9", - "php-amqplib/php-amqplib": "~2.4", - "php-console/php-console": "^3.1.3", - "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "2.3.0", - "ruflin/elastica": ">=0.90 <3.0", - "sentry/sentry": "^0.13", - "swiftmailer/swiftmailer": "^5.3|^6.0" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "sentry/sentry": "Allow sending log messages to a Sentry server" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "time": "2017-06-19T01:22:40+00:00" - }, - { - "name": "mtdowling/cron-expression", - "version": "v1.2.1", - "source": { - "type": "git", - "url": "https://github.com/mtdowling/cron-expression.git", - "reference": "9504fa9ea681b586028adaaa0877db4aecf32bad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/9504fa9ea681b586028adaaa0877db4aecf32bad", - "reference": "9504fa9ea681b586028adaaa0877db4aecf32bad", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Cron\\": "src/Cron/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", - "keywords": [ - "cron", - "schedule" - ], - "time": "2017-01-23T04:29:33+00:00" - }, - { - "name": "nesbot/carbon", - "version": "1.24.1", - "source": { - "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "ef12cbd8ba5ce624f0a6a95e0850c4cc13e71e41" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/ef12cbd8ba5ce624f0a6a95e0850c4cc13e71e41", - "reference": "ef12cbd8ba5ce624f0a6a95e0850c4cc13e71e41", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/translation": "~2.6 || ~3.0 || ~4.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2", - "phpunit/phpunit": "^4.8.35 || ^5.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.23-dev" - } - }, - "autoload": { - "psr-4": { - "Carbon\\": "src/Carbon/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" - } - ], - "description": "A simple API extension for DateTime.", - "homepage": "http://carbon.nesbot.com", - "keywords": [ - "date", - "datetime", - "time" - ], - "time": "2018-03-09T15:49:34+00:00" - }, - { - "name": "nikic/fast-route", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/FastRoute.git", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35|~5.7" - }, - "type": "library", - "autoload": { - "psr-4": { - "FastRoute\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov", - "email": "nikic@php.net" - } - ], - "description": "Fast request router for PHP", - "keywords": [ - "router", - "routing" - ], - "time": "2018-02-13T20:26:39+00:00" - }, - { - "name": "psr/container", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "time": "2017-02-14T16:28:37+00:00" - }, - { - "name": "psr/log", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2016-10-10T12:19:37+00:00" - }, - { - "name": "psr/simple-cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "time": "2017-10-23T01:57:42+00:00" - }, - { - "name": "symfony/console", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "555c8dbe0ae9e561740451eabdbed2cc554b6a51" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/555c8dbe0ae9e561740451eabdbed2cc554b6a51", - "reference": "555c8dbe0ae9e561740451eabdbed2cc554b6a51", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/process": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2018-02-26T15:55:47+00:00" - }, - { - "name": "symfony/debug", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "1721e4e7effb23480966690cdcdc7d2a4152d489" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/1721e4e7effb23480966690cdcdc7d2a4152d489", - "reference": "1721e4e7effb23480966690cdcdc7d2a4152d489", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": "<3.4" - }, - "require-dev": { - "symfony/http-kernel": "~3.4|~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com", - "time": "2018-02-28T21:50:02+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "85eaf6a8ec915487abac52e133efc4a268204428" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/85eaf6a8ec915487abac52e133efc4a268204428", - "reference": "85eaf6a8ec915487abac52e133efc4a268204428", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "conflict": { - "symfony/dependency-injection": "<3.4" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/stopwatch": "~3.4|~4.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2018-02-14T14:11:10+00:00" - }, - { - "name": "symfony/finder", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "44a796d2ecc2a16a5fc8f2956a34ee617934d55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/44a796d2ecc2a16a5fc8f2956a34ee617934d55f", - "reference": "44a796d2ecc2a16a5fc8f2956a34ee617934d55f", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com", - "time": "2018-03-05T18:28:26+00:00" - }, - { - "name": "symfony/http-foundation", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "6c181e81a3a9a7996c62ebd7803592536e729c5a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6c181e81a3a9a7996c62ebd7803592536e729c5a", - "reference": "6c181e81a3a9a7996c62ebd7803592536e729c5a", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.1" - }, - "require-dev": { - "symfony/expression-language": "~3.4|~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpFoundation Component", - "homepage": "https://symfony.com", - "time": "2018-03-05T16:01:10+00:00" - }, - { - "name": "symfony/http-kernel", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "2a1ebfe8c37240500befcb17bceb3893adacffa3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/2a1ebfe8c37240500befcb17bceb3893adacffa3", - "reference": "2a1ebfe8c37240500befcb17bceb3893adacffa3", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "psr/log": "~1.0", - "symfony/debug": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/http-foundation": "~3.4.4|~4.0.4" - }, - "conflict": { - "symfony/config": "<3.4", - "symfony/dependency-injection": "<3.4.5|<4.0.5,>=4", - "symfony/var-dumper": "<3.4", - "twig/twig": "<1.34|<2.4,>=2" - }, - "provide": { - "psr/log-implementation": "1.0" - }, - "require-dev": { - "psr/cache": "~1.0", - "symfony/browser-kit": "~3.4|~4.0", - "symfony/config": "~3.4|~4.0", - "symfony/console": "~3.4|~4.0", - "symfony/css-selector": "~3.4|~4.0", - "symfony/dependency-injection": "^3.4.5|^4.0.5", - "symfony/dom-crawler": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/finder": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0", - "symfony/routing": "~3.4|~4.0", - "symfony/stopwatch": "~3.4|~4.0", - "symfony/templating": "~3.4|~4.0", - "symfony/translation": "~3.4|~4.0", - "symfony/var-dumper": "~3.4|~4.0" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/var-dumper": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpKernel\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpKernel Component", - "homepage": "https://symfony.com", - "time": "2018-03-05T22:27:01+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2018-01-30T19:27:44+00:00" - }, - { - "name": "symfony/process", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "6ed08502a7c9559da8e60ea343bdbd19c3350b3e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/6ed08502a7c9559da8e60ea343bdbd19c3350b3e", - "reference": "6ed08502a7c9559da8e60ea343bdbd19c3350b3e", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com", - "time": "2018-02-19T12:18:43+00:00" - }, - { - "name": "symfony/translation", - "version": "v4.0.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/e20a9b7f9f62cb33a11638b345c248e7d510c938", - "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/config": "<3.4", - "symfony/dependency-injection": "<3.4", - "symfony/yaml": "<3.4" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/finder": "~2.8|~3.0|~4.0", - "symfony/intl": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "psr/log": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Translation Component", - "homepage": "https://symfony.com", - "time": "2018-02-22T10:50:29+00:00" - }, - { - "name": "vlucas/phpdotenv", - "version": "v2.4.0", - "source": { - "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", - "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-4": { - "Dotenv\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause-Attribution" - ], - "authors": [ - { - "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "http://www.vancelucas.com" - } - ], - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", - "keywords": [ - "dotenv", - "env", - "environment" - ], - "time": "2016-09-01T10:05:43+00:00" - } - ], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "^6.2.3", - "squizlabs/php_codesniffer": "^3.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2017-07-22T11:58:36+00:00" - }, - { - "name": "fzaninotto/faker", - "version": "v1.7.1", - "source": { - "type": "git", - "url": "https://github.com/fzaninotto/Faker.git", - "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", - "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "ext-intl": "*", - "phpunit/phpunit": "^4.0 || ^5.0", - "squizlabs/php_codesniffer": "^1.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Faker\\": "src/Faker/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "François Zaninotto" - } - ], - "description": "Faker is a PHP library that generates fake data for you.", - "keywords": [ - "data", - "faker", - "fixtures" - ], - "time": "2017-08-15T16:48:10+00:00" - }, - { - "name": "hamcrest/hamcrest-php", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad", - "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad", - "shasum": "" - }, - "require": { - "php": "^5.3|^7.0" - }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" - }, - "require-dev": { - "phpunit/php-file-iterator": "1.3.3", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "hamcrest" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD" - ], - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": [ - "test" - ], - "time": "2016-01-20T08:20:44+00:00" - }, - { - "name": "mockery/mockery", - "version": "1.0", - "source": { - "type": "git", - "url": "https://github.com/mockery/mockery.git", - "reference": "1bac8c362b12f522fdd1f1fa3556284c91affa38" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/1bac8c362b12f522fdd1f1fa3556284c91affa38", - "reference": "1bac8c362b12f522fdd1f1fa3556284c91affa38", - "shasum": "" - }, - "require": { - "hamcrest/hamcrest-php": "~2.0", - "lib-pcre": ">=7.0", - "php": ">=5.6.0" - }, - "require-dev": { - "phpunit/phpunit": "~5.7|~6.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Mockery": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" - }, - { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" - } - ], - "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", - "homepage": "http://github.com/mockery/mockery", - "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ], - "time": "2017-10-06T16:20:43+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.7.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^4.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2017-10-19T19:58:43+00:00" - }, - { - "name": "phar-io/manifest", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "phar-io/version": "^1.0.1", - "php": "^5.6 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2017-03-05T18:14:27+00:00" - }, - { - "name": "phar-io/version", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "time": "2017-03-05T17:38:23+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2017-09-11T18:02:19+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "4.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08", - "shasum": "" - }, - "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "doctrine/instantiator": "~1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-30T07:14:17+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "time": "2017-07-14T14:27:02+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "1.7.5", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2018-02-19T10:16:54+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "6.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f8ca4b604baf23dab89d87773c28cc07405189ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f8ca4b604baf23dab89d87773c28cc07405189ba", - "reference": "f8ca4b604baf23dab89d87773c28cc07405189ba", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^1.4.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.0", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "suggest": { - "ext-xdebug": "^2.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2018-02-02T07:01:41+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2017-11-27T13:52:08+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", - "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2018-02-01T13:07:23+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", - "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2018-02-01T13:16:43+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "7.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e2f8aa21bc54b6ba218bdd4f9e0dac1e9bc3b4e9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e2f8aa21bc54b6ba218bdd4f9e0dac1e9bc3b4e9", - "reference": "e2f8aa21bc54b6ba218bdd4f9e0dac1e9bc3b4e9", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "myclabs/deep-copy": "^1.6.1", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0", - "phpunit/php-file-iterator": "^1.4.3", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.0", - "phpunit/phpunit-mock-objects": "^6.0", - "sebastian/comparator": "^2.1", - "sebastian/diff": "^3.0", - "sebastian/environment": "^3.1", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", - "sebastian/version": "^2.0.1" - }, - "require-dev": { - "ext-pdo": "*" - }, - "suggest": { - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2018-02-26T07:03:12+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "6.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "e3249dedc2d99259ccae6affbc2684eac37c2e53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/e3249dedc2d99259ccae6affbc2684eac37c2e53", - "reference": "e3249dedc2d99259ccae6affbc2684eac37c2e53", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.5", - "php": "^7.1", - "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2018-02-15T05:27:38+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" - }, - { - "name": "sebastian/comparator", - "version": "2.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2018-02-01T13:46:46+00:00" - }, - { - "name": "sebastian/diff", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e09160918c66281713f1c324c1f4c4c3037ba1e8", - "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0", - "symfony/process": "^2 || ^3.3 || ^4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "time": "2018-02-01T13:45:15+00:00" - }, - { - "name": "sebastian/environment", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2017-07-01T08:51:00+00:00" - }, - { - "name": "sebastian/exporter", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2017-04-03T13:19:02+00:00" - }, - { - "name": "sebastian/global-state", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2017-04-27T15:39:26+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" - }, - { - "name": "sebastian/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2017-04-07T12:08:54+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2018-01-29T19:49:41+00:00" - } - ], - "aliases": [], - "minimum-stability": "dev", - "stability-flags": [], - "prefer-stable": true, - "prefer-lowest": false, - "platform": { - "php": ">=7.1.3" - }, - "platform-dev": [] -} diff --git a/frameworks/PHP/lumen/deploy/nginx.conf b/frameworks/PHP/lumen/deploy/nginx.conf index 8cb23b7defe..c5eea2f0711 100755 --- a/frameworks/PHP/lumen/deploy/nginx.conf +++ b/frameworks/PHP/lumen/deploy/nginx.conf @@ -1,41 +1,63 @@ - -worker_processes auto; -error_log stderr error; +user root; +worker_processes auto; events { - worker_connections 16384; + worker_connections 16384; + multi_accept on; + use epoll; } http { - include __IROOT__/nginx/conf/mime.types; - default_type application/octet-stream; - access_log off; - server_tokens off; - sendfile on; - keepalive_timeout 65; + include /nginx/conf/mime.types; + default_type application/octet-stream; + access_log off; + server_tokens off; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; + upstream fastcgi_backend { - server 127.0.0.1:9001; - keepalive 50; + server unix:/var/run/php/php7.2-fpm.sock; + keepalive 50; } server { - listen 8080; - server_name localhost; - root __TROOT__/public; - index index.php; + listen 8080; + server_name localhost; + + root /lumen/public/; + index index.php; location / { - try_files $uri $uri/ /index.php?$query_string; + try_files $uri $uri/ /index.php?$uri&$args; } location ~ \.php$ { - try_files $uri =404; - fastcgi_pass fastcgi_backend; - fastcgi_keep_conn on; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include __IROOT__/nginx/conf/fastcgi_params; + try_files $uri =404; + fastcgi_pass fastcgi_backend; + fastcgi_keep_conn on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include /nginx/conf/fastcgi_params; } } } diff --git a/frameworks/PHP/lumen/lumen.dockerfile b/frameworks/PHP/lumen/lumen.dockerfile new file mode 100644 index 00000000000..4856c3c4017 --- /dev/null +++ b/frameworks/PHP/lumen/lumen.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/php7:0.1 + +ADD ./ /lumen +WORKDIR /lumen + +RUN composer.phar install --no-progress + +RUN chmod -R 777 /lumen + +CMD service php7.2-fpm start && \ + nginx -c /lumen/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/lumen/setup.sh b/frameworks/PHP/lumen/setup.sh deleted file mode 100644 index c201871bccd..00000000000 --- a/frameworks/PHP/lumen/setup.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer - -sed -i 's|__DBHOST__|'${DBHOST}'|g' .env - -sed -i 's|__IROOT__|'${IROOT}'|g' deploy/nginx.conf -sed -i 's|__TROOT__|'${TROOT}'|g' deploy/nginx.conf - -php-fpm --fpm-config ${FWROOT}/toolset/setup/linux/languages/php/php-fpm.conf -g ${TROOT}/deploy/php-fpm.pid -nginx -c ${TROOT}/deploy/nginx.conf diff --git a/frameworks/PHP/peachpie/.gitignore b/frameworks/PHP/peachpie/.gitignore deleted file mode 100644 index 1d1e8372b43..00000000000 --- a/frameworks/PHP/peachpie/.gitignore +++ /dev/null @@ -1,275 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ - -# Visual Studio 2015 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ -**/Properties/launchSettings.json - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config -# NuGet v3's project.json files produces more ignoreable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -node_modules/ -orleans.codegen.cs - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# JetBrains Rider -.idea/ -*.sln.iml - -# CodeRush -.cr/ - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config diff --git a/frameworks/PHP/peachpie/Server/Program.cs b/frameworks/PHP/peachpie/Server/Program.cs index 64a49d1a814..6f0122f4cb3 100644 --- a/frameworks/PHP/peachpie/Server/Program.cs +++ b/frameworks/PHP/peachpie/Server/Program.cs @@ -24,6 +24,7 @@ class Startup { public void Configure(IApplicationBuilder app) { + app.UseResponseBuffering(); app.UsePhp(new PhpRequestOptions(scriptAssemblyName: "Website")); app.UseDefaultFiles(); app.UseStaticFiles(); diff --git a/frameworks/PHP/peachpie/Server/Server.csproj b/frameworks/PHP/peachpie/Server/Server.csproj index 30f1acc6b39..302965350b5 100644 --- a/frameworks/PHP/peachpie/Server/Server.csproj +++ b/frameworks/PHP/peachpie/Server/Server.csproj @@ -10,11 +10,12 @@ - + + - + \ No newline at end of file diff --git a/frameworks/PHP/peachpie/Website/Website.msbuildproj b/frameworks/PHP/peachpie/Website/Website.msbuildproj index fa03fdd7f9e..08478fca5a3 100644 --- a/frameworks/PHP/peachpie/Website/Website.msbuildproj +++ b/frameworks/PHP/peachpie/Website/Website.msbuildproj @@ -11,8 +11,8 @@ - - + + - - + + \ No newline at end of file diff --git a/frameworks/PHP/peachpie/Website/dbraw.php b/frameworks/PHP/peachpie/Website/dbraw.php index 000b8eb3149..a709c772e7d 100644 --- a/frameworks/PHP/peachpie/Website/dbraw.php +++ b/frameworks/PHP/peachpie/Website/dbraw.php @@ -5,7 +5,7 @@ function dbraw() { // Database connection (TODO: When it works, use PDO instead) - $link = mysql_connect('TFB-database', 'benchmarkdbuser', 'benchmarkdbpass'); + $link = mysql_connect('tfb-database', 'benchmarkdbuser', 'benchmarkdbpass'); mysql_select_db('hello_world', $link); // Read number of queries to run from URL parameter diff --git a/frameworks/PHP/peachpie/Website/fortune.php b/frameworks/PHP/peachpie/Website/fortune.php index 73f345faa5b..61c55bde03d 100644 --- a/frameworks/PHP/peachpie/Website/fortune.php +++ b/frameworks/PHP/peachpie/Website/fortune.php @@ -5,7 +5,7 @@ function fortune() { // Database connection // TODO: use PDO once implemented - $link = mysql_connect('TFB-database', 'benchmarkdbuser', 'benchmarkdbpass'); + $link = mysql_connect('tfb-database', 'benchmarkdbuser', 'benchmarkdbpass'); mysql_select_db('hello_world', $link); // Store result in array. diff --git a/frameworks/PHP/peachpie/Website/updateraw.php b/frameworks/PHP/peachpie/Website/updateraw.php index 5ec507b8f7d..9b326619fd3 100644 --- a/frameworks/PHP/peachpie/Website/updateraw.php +++ b/frameworks/PHP/peachpie/Website/updateraw.php @@ -5,7 +5,7 @@ function updateraw() { // Database connection (TODO: When it works, use PDO instead) - $link = mysql_connect('TFB-database', 'benchmarkdbuser', 'benchmarkdbpass'); + $link = mysql_connect('tfb-database', 'benchmarkdbuser', 'benchmarkdbpass'); mysql_select_db('hello_world', $link); // Read number of queries to run from URL parameter diff --git a/frameworks/PHP/peachpie/benchmark_config.json b/frameworks/PHP/peachpie/benchmark_config.json index c160a8a3c0c..df777817675 100644 --- a/frameworks/PHP/peachpie/benchmark_config.json +++ b/frameworks/PHP/peachpie/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "peachpie", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json.php", "plaintext_url": "/plaintext.php", "db_url": "/dbraw.php", diff --git a/frameworks/PHP/peachpie/peachpie.dockerfile b/frameworks/PHP/peachpie/peachpie.dockerfile new file mode 100644 index 00000000000..40f0f562681 --- /dev/null +++ b/frameworks/PHP/peachpie/peachpie.dockerfile @@ -0,0 +1,17 @@ +FROM techempower/base:0.1 + +ADD ./ /peachpie +WORKDIR /peachpie + +ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE true +ENV DOTNET_CLI_TELEMETRY_OPTOUT true + +RUN apt-get install apt-transport-https +RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg +RUN sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list' +RUN apt-get update +RUN apt-get install -y dotnet-sdk-2.1.4 + +ENV PATH="/root/.dotnet:${PATH}" + +CMD dotnet run -p Server -c Release diff --git a/frameworks/PHP/peachpie/setup.sh b/frameworks/PHP/peachpie/setup.sh deleted file mode 100644 index 0e03d22bfa9..00000000000 --- a/frameworks/PHP/peachpie/setup.sh +++ /dev/null @@ -1,3 +0,0 @@ -fw_depends mysql dotnetcore - -dotnet run -p Server -c Release diff --git a/frameworks/PHP/phalcon-micro/.gitignore b/frameworks/PHP/phalcon-micro/.gitignore deleted file mode 100644 index 5fa62bcc1eb..00000000000 --- a/frameworks/PHP/phalcon-micro/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/compiled-templates/*.c -/deploy/php-fpm.pid diff --git a/frameworks/PHP/phalcon-micro/README.md b/frameworks/PHP/phalcon-micro/README.md deleted file mode 100644 index f8713c15e3c..00000000000 --- a/frameworks/PHP/phalcon-micro/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# Phalcon PHP Micro Benchmarking Test - -This is the Phalcon Micro PHP portion of a [benchmarking test suite](../) comparing a variety of web development platforms. - -### JSON Encoding Test -Uses the PHP standard [JSON encoder](http://www.php.net/manual/en/function.json-encode.php). - -* [JSON test controller](public/index.php) - - -### Data-Store/Database Mapping Test -Uses Phalcon\DB component - -* [DB test controller](public/index.php) - -### Template Test -Uses Phalcon's template engine 'Volt' - -* [Template test controller](public/index.php) - - -## Infrastructure Software Versions -The tests were run with: - -* [Phalcon 3.3.1](http://phalconphp.com/) -* [PHP Version 5.6.33](http://www.php.net/) with FPM, APC and Phalcon extension -* [nginx 1.12.2](http://nginx.org/) -* [MySQL 5.7.21](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 - -### Templating Test - -http://localhost/fortunes diff --git a/frameworks/PHP/phalcon-micro/benchmark_config.json b/frameworks/PHP/phalcon-micro/benchmark_config.json deleted file mode 100644 index b9f8d13fa56..00000000000 --- a/frameworks/PHP/phalcon-micro/benchmark_config.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "framework": "php-phalcon-micro", - "tests": [{ - "default": { - "setup_file": "setup", - "json_url": "/json", - "db_url": "/db", - "query_url": "/queries?queries=", - "fortune_url": "/fortunes", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "MySQL", - "framework": "phalcon", - "language": "PHP", - "flavor": "PHP7", - "orm": "raw", - "platform": "None", - "webserver": "nginx", - "os": "Linux", - "database_os": "Linux", - "display_name": "phalcon", - "notes": "", - "versus": "php7" - } - }] -} diff --git a/frameworks/PHP/phalcon-micro/compiled-templates/.blank b/frameworks/PHP/phalcon-micro/compiled-templates/.blank deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/PHP/phalcon-micro/deploy/nginx.conf b/frameworks/PHP/phalcon-micro/deploy/nginx.conf deleted file mode 100644 index 812e86f2f75..00000000000 --- a/frameworks/PHP/phalcon-micro/deploy/nginx.conf +++ /dev/null @@ -1,132 +0,0 @@ -#user nobody; -worker_processes auto; - -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - -events { - worker_connections 16384; -} - - -http { - include /usr/local/nginx/conf/mime.types; - default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; - access_log off; - server_tokens off; - - sendfile on; - #tcp_nopush on; - - #keepalive_timeout 0; - keepalive_timeout 65; - - #gzip on; - upstream fastcgi_backend { - server 127.0.0.1:9001; - keepalive 50; - } - server { - listen 8080; - server_name localhost; - - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - root /home/pfalls/FrameworkBenchmarks/php-phalcon-micro/public/; - index index.php; - - location / { - try_files $uri $uri/ /index.php?_url=$uri&$args; - } - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # - location ~ \.php$ { - try_files $uri =404; - fastcgi_pass fastcgi_backend; - fastcgi_keep_conn on; - fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; - } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} - } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - -} diff --git a/frameworks/PHP/phalcon-micro/deploy/php-phalcon-micro b/frameworks/PHP/phalcon-micro/deploy/php-phalcon-micro deleted file mode 100644 index 98763e93944..00000000000 --- a/frameworks/PHP/phalcon-micro/deploy/php-phalcon-micro +++ /dev/null @@ -1,9 +0,0 @@ - - Alias /php-phalcon/ "/home/ubuntu/FrameworkBenchmarks/php-phalcon-micro/public/" - - Options Indexes FollowSymLinks MultiViews - #AllowOverride None - Order allow,deny - allow from all - - diff --git a/frameworks/PHP/phalcon-micro/public/index.php b/frameworks/PHP/phalcon-micro/public/index.php deleted file mode 100644 index 91d3dd535d2..00000000000 --- a/frameworks/PHP/phalcon-micro/public/index.php +++ /dev/null @@ -1,114 +0,0 @@ - 'host=localhost;dbname=hello_world;charset=utf8', - 'username' => 'benchmarkdbuser', - 'password' => 'benchmarkdbpass', - 'persistent' => true - )); - }; - - // Setting up the view component (seems to be required even when not used) - $app['view'] = function() { - - $view = new \Phalcon\Mvc\View(); - - $view->setViewsDir(__DIR__ . '/../views/'); - - $view->registerEngines(array( - ".volt" => function($view, $di) { - - $volt = new \Phalcon\Mvc\View\Engine\Volt($view, $di); - - $volt->setOptions(array( - "compiledPath" => __DIR__ . "/../compiled-templates/", - "compiledExtension" => ".c", - "compiledSeparator" => '_', - )); - - return $volt; - } - )); - - return $view; - }; - - $app->map('/json', function() { - header("Content-Type: application/json"); - echo json_encode(array('message' => 'Hello, World!')); - }); - - // - $app->map('/db', function() use ($app) { - header("Content-Type: application/json"); - - $db = $app['db']; - - $world = $db->fetchOne('SELECT * FROM world WHERE id = ' . mt_rand(1, 10000), Phalcon\Db::FETCH_ASSOC); - - echo json_encode($world); - }); - - - // queries - $app->map('/queries', function() use ($app) { - header("Content-Type: application/json"); - - $db = $app['db']; - - $queries = $app->request->getQuery('queries', null, 1); - $queries = is_numeric($queries) ? min(max(intval($queries), 1), 500) : 1; - - $worlds = array(); - - for ($i = 0; $i < $queries; ++$i) { - $worlds[] = $db->fetchOne('SELECT * FROM world WHERE id = ' . mt_rand(1, 10000), Phalcon\Db::FETCH_ASSOC); - } - - echo json_encode($worlds); - }); - - // /fortunes - $app->map('/fortunes', function() use ($app) { - - $fortunes = $app['db']->query('SELECT * FROM fortune')->fetchAll(); - - $fortunes[] = array( - 'id' => 0, - 'message' => 'Additional fortune added at request time.' - ); - - usort($fortunes, function($left, $right) { - $l = $left['message']; - $r = $right['message']; - if ($l === $r) { - return 0; - } else { - if ($l > $r) { - return 1; - } else { - return -1; - } - } - }); - - header("Content-Type: text/html; charset=utf-8"); - - echo $app['view']->getRender('bench', 'fortunes', array( - 'fortunes' => $fortunes - )); - - }); - - $app->handle(); - -} catch(\Phalcon\Exception $e) { - echo "PhalconException: ", $e->getMessage(); -} diff --git a/frameworks/PHP/phalcon-micro/setup.sh b/frameworks/PHP/phalcon-micro/setup.sh deleted file mode 100644 index 8fddd09e5f8..00000000000 --- a/frameworks/PHP/phalcon-micro/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql php5 phalcon nginx - -sed -i 's|localhost|'"${DBHOST}"'|g' public/index.php -sed -i 's|root .*/FrameworkBenchmarks/php-phalcon-micro|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/phalcon-micro/source_code b/frameworks/PHP/phalcon-micro/source_code deleted file mode 100644 index 60dd835cb95..00000000000 --- a/frameworks/PHP/phalcon-micro/source_code +++ /dev/null @@ -1,8 +0,0 @@ -./php-phalcon-micro/deploy/php-phalcon-micro -./php-phalcon-micro/public/ -./php-phalcon-micro/public/index.php -./php-phalcon-micro/views/ -./php-phalcon-micro/views/layouts -./php-phalcon-micro/views/layouts/bench.volt -./php-phalcon-micro/views/bench -./php-phalcon-micro/views/bench/fortunes.volt diff --git a/frameworks/PHP/phalcon-micro/views/bench/fortunes.volt b/frameworks/PHP/phalcon-micro/views/bench/fortunes.volt deleted file mode 100644 index 5ba93fff7f2..00000000000 --- a/frameworks/PHP/phalcon-micro/views/bench/fortunes.volt +++ /dev/null @@ -1 +0,0 @@ -{% for fortune in fortunes %}{% endfor %}
idmessage
{{ fortune['id'] }}{{ fortune['message'] | e }}
\ No newline at end of file diff --git a/frameworks/PHP/phalcon-micro/views/layouts/bench.volt b/frameworks/PHP/phalcon-micro/views/layouts/bench.volt deleted file mode 100644 index e829f388f0d..00000000000 --- a/frameworks/PHP/phalcon-micro/views/layouts/bench.volt +++ /dev/null @@ -1 +0,0 @@ -Fortunes{{ content() }} \ No newline at end of file diff --git a/frameworks/PHP/phalcon/.gitignore b/frameworks/PHP/phalcon/.gitignore deleted file mode 100644 index 38925c67ccf..00000000000 --- a/frameworks/PHP/phalcon/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -/app/cache -/app/logs -/app/compiled-templates/*.compiled -/bin -/vendor -/vendors -/build -/dist -.DS_Store -/tags -.idea -/deploy/php-fpm.pid diff --git a/frameworks/PHP/phalcon/app/config/config.php b/frameworks/PHP/phalcon/app/config/config.php index c29b97f17c6..5d65e585d55 100644 --- a/frameworks/PHP/phalcon/app/config/config.php +++ b/frameworks/PHP/phalcon/app/config/config.php @@ -3,13 +3,13 @@ return new \Phalcon\Config(array( 'database' => array( 'adapter' => 'Mysql', - 'host' => 'localhost', + 'host' => 'tfb-database', 'username' => 'benchmarkdbuser', 'password' => 'benchmarkdbpass', 'name' => 'hello_world', ), 'mongodb' => array( - 'url' => 'mongodb://localhost:27017', + 'url' => 'mongodb://tfb-database:27017', 'db' => 'hello_world' ), 'application' => array( diff --git a/frameworks/PHP/phalcon/benchmark_config.json b/frameworks/PHP/phalcon/benchmark_config.json index a4135c7ae29..7c974abf7fd 100644 --- a/frameworks/PHP/phalcon/benchmark_config.json +++ b/frameworks/PHP/phalcon/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "phalcon", "tests": [{ "default": { - "setup_file": "setup-mysql", "plaintext_url": "/plaintext", "json_url": "/json", "db_url": "/db", @@ -26,7 +25,6 @@ "versus": "php7" }, "mongodb": { - "setup_file": "setup-mongodb", "db_url": "/mongodb/db", "query_url": "/mongodb/queries?queries=", "fortune_url": "/mongodb/fortunes", @@ -45,6 +43,27 @@ "display_name": "phalcon", "notes": "", "versus": "php7" + }, + "micro": { + "json_url": "/json", + "db_url": "/db", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "MySQL", + "framework": "phalcon", + "language": "PHP", + "flavor": "PHP7", + "orm": "raw", + "platform": "None", + "webserver": "nginx", + "os": "Linux", + "database_os": "Linux", + "display_name": "phalcon", + "notes": "", + "versus": "php7" } }] } diff --git a/frameworks/PHP/phalcon/composer.lock b/frameworks/PHP/phalcon/composer.lock deleted file mode 100644 index ee2c67e897c..00000000000 --- a/frameworks/PHP/phalcon/composer.lock +++ /dev/null @@ -1,191 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "content-hash": "59ebd7bea8b15a15497fef28c11720f9", - "packages": [ - { - "name": "mongodb/mongodb", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/mongodb/mongo-php-library.git", - "reference": "faf8a1d86b5c10684ef91fa6c81475b0c7f95240" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/faf8a1d86b5c10684ef91fa6c81475b0c7f95240", - "reference": "faf8a1d86b5c10684ef91fa6c81475b0c7f95240", - "shasum": "" - }, - "require": { - "ext-mongodb": "^1.1.0", - "php": ">=5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "MongoDB\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Jeremy Mikola", - "email": "jmikola@gmail.com" - }, - { - "name": "Hannes Magnusson", - "email": "bjori@mongodb.com" - }, - { - "name": "Derick Rethans", - "email": "github@derickrethans.nl" - } - ], - "description": "MongoDB driver library", - "homepage": "https://jira.mongodb.org/browse/PHPLIB", - "keywords": [ - "database", - "driver", - "mongodb", - "persistence" - ], - "time": "2016-03-30T19:10:28+00:00" - }, - { - "name": "phalcon/incubator", - "version": "v3.0.2", - "source": { - "type": "git", - "url": "https://github.com/phalcon/incubator.git", - "reference": "e35352e27fb25521686da4acc82bbffa208c206b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phalcon/incubator/zipball/e35352e27fb25521686da4acc82bbffa208c206b", - "reference": "e35352e27fb25521686da4acc82bbffa208c206b", - "shasum": "" - }, - "require": { - "ext-phalcon": "^3.0", - "php": ">=5.5", - "swiftmailer/swiftmailer": "~5.2" - }, - "require-dev": { - "codeception/aerospike-module": "~1.0", - "codeception/codeception": "~2.2", - "codeception/mockery-module": "~0.2", - "codeception/specify": "~0.4", - "codeception/verify": "~0.3", - "phpdocumentor/reflection-docblock": "^2.0.4", - "phpunit/phpunit": "4.8.*", - "squizlabs/php_codesniffer": "~2.6" - }, - "suggest": { - "duncan3dc/fork-helper": "To use extended class to access the beanstalk queue service", - "ext-aerospike": "*", - "sergeyklay/aerospike-php-stubs": "The most complete Aerospike PHP stubs which allows autocomplete in modern IDEs" - }, - "type": "library", - "autoload": { - "psr-4": { - "Phalcon\\": "Library/Phalcon/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Phalcon Team", - "email": "team@phalconphp.com", - "homepage": "http://phalconphp.com/en/team" - }, - { - "name": "Contributors", - "homepage": "https://github.com/phalcon/incubator/graphs/contributors" - } - ], - "description": "Adapters, prototypes or functionality that can be potentially incorporated to the C-framework.", - "homepage": "http://phalconphp.com", - "keywords": [ - "framework", - "incubator", - "phalcon" - ], - "time": "2016-11-27T11:58:38+00:00" - }, - { - "name": "swiftmailer/swiftmailer", - "version": "v5.4.9", - "source": { - "type": "git", - "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "7ffc1ea296ed14bf8260b6ef11b80208dbadba91" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/7ffc1ea296ed14bf8260b6ef11b80208dbadba91", - "reference": "7ffc1ea296ed14bf8260b6ef11b80208dbadba91", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "~3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "autoload": { - "files": [ - "lib/swift_required.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Corbyn" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "https://swiftmailer.symfony.com", - "keywords": [ - "email", - "mail", - "mailer" - ], - "time": "2018-01-23T07:37:21+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [] -} diff --git a/frameworks/PHP/phalcon/deploy/nginx.conf b/frameworks/PHP/phalcon/deploy/nginx.conf index 0f0a3d63d88..2ae28762501 100644 --- a/frameworks/PHP/phalcon/deploy/nginx.conf +++ b/frameworks/PHP/phalcon/deploy/nginx.conf @@ -1,41 +1,42 @@ -#user nobody; +user root; worker_processes auto; -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - events { - worker_connections 16384; + worker_connections 16384; + multi_accept on; + use epoll; } - http { - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; access_log off; server_tokens off; - sendfile on; - #tcp_nopush on; + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; - #keepalive_timeout 0; - keepalive_timeout 65; - #gzip on; - upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/var/run/php/php7.2-fpm.sock; keepalive 50; } @@ -43,92 +44,20 @@ http { listen 8080; server_name localhost; - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - root /home/pfalls/FrameworkBenchmarks/php-phalcon/public/; + root /phalcon/public/; index index.php; location / { try_files $uri $uri/ /index.php?_url=$uri&$args; } - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # location ~ \.php$ { try_files $uri =404; fastcgi_pass fastcgi_backend; fastcgi_keep_conn on; fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - } diff --git a/frameworks/PHP/phalcon/deploy/php-phalcon b/frameworks/PHP/phalcon/deploy/php-phalcon index 85d86b04068..99394015fdf 100644 --- a/frameworks/PHP/phalcon/deploy/php-phalcon +++ b/frameworks/PHP/phalcon/deploy/php-phalcon @@ -1,6 +1,5 @@ - Alias /php-phalcon/ "/home/ubuntu/FrameworkBenchmarks/php-phalcon/public/" - + Options Indexes FollowSymLinks MultiViews #AllowOverride None Order allow,deny diff --git a/frameworks/PHP/phalcon/phalcon-base.dockerfile b/frameworks/PHP/phalcon/phalcon-base.dockerfile new file mode 100644 index 00000000000..9f0a2fb2c6d --- /dev/null +++ b/frameworks/PHP/phalcon/phalcon-base.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/php7:0.1 + +ADD ./ /phalcon +WORKDIR /phalcon + +RUN apt-get install -y php7.2-phalcon + +RUN composer.phar install --no-progress + +RUN chmod -R 777 app diff --git a/frameworks/PHP/phalcon/phalcon-micro.dockerfile b/frameworks/PHP/phalcon/phalcon-micro.dockerfile new file mode 100644 index 00000000000..34affbdc4b9 --- /dev/null +++ b/frameworks/PHP/phalcon/phalcon-micro.dockerfile @@ -0,0 +1,19 @@ +FROM techempower/php7:0.1 + +ADD ./ /phalcon +WORKDIR /phalcon + +RUN apt install -yqq php7.2-phalcon php7.2-dev + +ENV VERSION="3.3.1" + +RUN wget -q https://github.com/phalcon/cphalcon/archive/v${VERSION}.tar.gz +RUN tar xf v${VERSION}.tar.gz +RUN cd cphalcon-${VERSION}/build && ./install + +RUN mv /phalcon/public/index-micro.php /phalcon/public/index.php + +RUN chmod -R 777 app + +CMD service php7.2-fpm start && \ + nginx -c /phalcon/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/phalcon/phalcon-mongodb.dockerfile b/frameworks/PHP/phalcon/phalcon-mongodb.dockerfile new file mode 100644 index 00000000000..610304ca2b4 --- /dev/null +++ b/frameworks/PHP/phalcon/phalcon-mongodb.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/phalcon-base:0.1 + +CMD service php7.2-fpm start && \ + nginx -c /phalcon/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/phalcon/phalcon.dockerfile b/frameworks/PHP/phalcon/phalcon.dockerfile new file mode 100644 index 00000000000..610304ca2b4 --- /dev/null +++ b/frameworks/PHP/phalcon/phalcon.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/phalcon-base:0.1 + +CMD service php7.2-fpm start && \ + nginx -c /phalcon/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/phalcon/public/index-micro.php b/frameworks/PHP/phalcon/public/index-micro.php new file mode 100644 index 00000000000..b3e5f29eb70 --- /dev/null +++ b/frameworks/PHP/phalcon/public/index-micro.php @@ -0,0 +1,114 @@ + 'host=tfb-database;dbname=hello_world;charset=utf8', + 'username' => 'benchmarkdbuser', + 'password' => 'benchmarkdbpass', + 'persistent' => true + )); + }; + + // Setting up the view component (seems to be required even when not used) + $app['view'] = function() { + + $view = new \Phalcon\Mvc\View(); + + $view->setViewsDir(__DIR__ . '/../app/views/'); + + $view->registerEngines(array( + ".volt" => function($view, $di) { + + $volt = new \Phalcon\Mvc\View\Engine\Volt($view, $di); + + $volt->setOptions(array( + "compiledPath" => __DIR__ . "/../app/compiled-templates/", + "compiledExtension" => ".c", + "compiledSeparator" => '_', + )); + + return $volt; + } + )); + + return $view; + }; + + $app->map('/json', function() { + header("Content-Type: application/json"); + echo json_encode(array('message' => 'Hello, World!')); + }); + + // + $app->map('/db', function() use ($app) { + header("Content-Type: application/json"); + + $db = $app['db']; + + $world = $db->fetchOne('SELECT * FROM world WHERE id = ' . mt_rand(1, 10000), Phalcon\Db::FETCH_ASSOC); + + echo json_encode($world); + }); + + + // queries + $app->map('/queries', function() use ($app) { + header("Content-Type: application/json"); + + $db = $app['db']; + + $queries = $app->request->getQuery('queries', null, 1); + $queries = is_numeric($queries) ? min(max(intval($queries), 1), 500) : 1; + + $worlds = array(); + + for ($i = 0; $i < $queries; ++$i) { + $worlds[] = $db->fetchOne('SELECT * FROM world WHERE id = ' . mt_rand(1, 10000), Phalcon\Db::FETCH_ASSOC); + } + + echo json_encode($worlds); + }); + + // /fortunes + $app->map('/fortunes', function() use ($app) { + + $fortunes = $app['db']->query('SELECT * FROM fortune')->fetchAll(); + + $fortunes[] = array( + 'id' => 0, + 'message' => 'Additional fortune added at request time.' + ); + + usort($fortunes, function($left, $right) { + $l = $left['message']; + $r = $right['message']; + if ($l === $r) { + return 0; + } else { + if ($l > $r) { + return 1; + } else { + return -1; + } + } + }); + + header("Content-Type: text/html; charset=utf-8"); + + echo $app['view']->getRender('bench', 'fortunes', array( + 'fortunes' => $fortunes + )); + + }); + + $app->handle(); + +} catch(\Phalcon\Exception $e) { + echo "PhalconException: ", $e->getMessage(); +} diff --git a/frameworks/PHP/phalcon/setup-mongodb.sh b/frameworks/PHP/phalcon/setup-mongodb.sh deleted file mode 100644 index 121233b49eb..00000000000 --- a/frameworks/PHP/phalcon/setup-mongodb.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends mongodb - -source ./setup.sh diff --git a/frameworks/PHP/phalcon/setup-mysql.sh b/frameworks/PHP/phalcon/setup-mysql.sh deleted file mode 100644 index 49fe2646c7e..00000000000 --- a/frameworks/PHP/phalcon/setup-mysql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends mysql - -source ./setup.sh diff --git a/frameworks/PHP/phalcon/setup.sh b/frameworks/PHP/phalcon/setup.sh deleted file mode 100644 index 47286d74a0e..00000000000 --- a/frameworks/PHP/phalcon/setup.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends php7 phalcon nginx composer - -sed -i 's|mongodb://localhost|mongodb://'"${DBHOST}"'|g' app/config/config.php -sed -i 's|localhost|'"${DBHOST}"'|g' app/config/config.php -sed -i 's|root .*/FrameworkBenchmarks/php-phalcon|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/php/.gitignore b/frameworks/PHP/php/.gitignore deleted file mode 100644 index 5dbb10b8450..00000000000 --- a/frameworks/PHP/php/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -# These files are touched during framework tests, but may need to be edited at times. Make sure to force add the files you edit. - -dborm.php -dbraw.php -fortune.php -updateraw.php -deploy/ -vendor/ - diff --git a/frameworks/PHP/php/benchmark_config.json b/frameworks/PHP/php/benchmark_config.json index 2635b8a949e..7edf4ffa87d 100644 --- a/frameworks/PHP/php/benchmark_config.json +++ b/frameworks/PHP/php/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "php", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json.php", "plaintext_url": "/plaintext.php", "db_url": "/dborm.php", @@ -24,7 +23,6 @@ "versus": "php7" }, "raw7": { - "setup_file": "setup", "db_url": "/dbraw.php", "query_url": "/dbraw.php?queries=", "fortune_url": "/fortune.php", @@ -46,7 +44,6 @@ "versus": "php7" }, "php5": { - "setup_file": "setup_php5", "json_url": "/json.php", "plaintext_url": "/plaintext.php", "db_url": "/dborm.php", @@ -68,7 +65,6 @@ "versus": "php-php5" }, "php5-raw": { - "setup_file": "setup", "db_url": "/dbraw.php", "query_url": "/dbraw.php?queries=", "fortune_url": "/fortune.php", diff --git a/frameworks/PHP/php/dborm.php b/frameworks/PHP/php/dborm.php index 53f6d3ae1da..49d3d71202f 100644 --- a/frameworks/PHP/php/dborm.php +++ b/frameworks/PHP/php/dborm.php @@ -4,7 +4,7 @@ // Database connection // http://www.php.net/manual/en/ref.pdo-mysql.php -// $pdo = new PDO('mysql:host=TFB-database;dbname=hello_world', 'benchmarkdbuser', 'benchmarkdbpass'); +// $pdo = new PDO('mysql:host=tfb-database;dbname=hello_world', 'benchmarkdbuser', 'benchmarkdbpass'); # inclue the ActiveRecord library require_once 'vendor/php-activerecord/php-activerecord/ActiveRecord.php'; @@ -13,7 +13,7 @@ { $cfg->set_model_directory('models'); $cfg->set_connections(array('development' => - 'mysql://benchmarkdbuser:benchmarkdbpass@TFB-database/hello_world')); + 'mysql://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world')); }); // Read number of queries to run from URL parameter diff --git a/frameworks/PHP/php/dbraw.php b/frameworks/PHP/php/dbraw.php index 27eeae2ff59..0335e7808e6 100644 --- a/frameworks/PHP/php/dbraw.php +++ b/frameworks/PHP/php/dbraw.php @@ -3,7 +3,7 @@ // Database connection // http://www.php.net/manual/en/ref.pdo-mysql.php -$pdo = new PDO('mysql:host=TFB-database;dbname=hello_world', 'benchmarkdbuser', 'benchmarkdbpass', array( +$pdo = new PDO('mysql:host=tfb-database;dbname=hello_world', 'benchmarkdbuser', 'benchmarkdbpass', array( PDO::ATTR_PERSISTENT => true )); diff --git a/frameworks/PHP/php/deploy/nginx.conf b/frameworks/PHP/php/deploy/nginx.conf deleted file mode 100755 index db5e9d078bd..00000000000 --- a/frameworks/PHP/php/deploy/nginx.conf +++ /dev/null @@ -1,128 +0,0 @@ -#user nobody; -worker_processes auto; - -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - -events { - worker_connections 16384; -} - -http { - include /usr/local/nginx/conf/mime.types; - default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; - access_log off; - - sendfile on; - #tcp_nopush on; - - #keepalive_timeout 0; - keepalive_timeout 65; - - #gzip on; - server_tokens off; - - upstream fastcgi_backend { - server 127.0.0.1:9001; - keepalive 50; - } - - server { - listen 8080; - server_name localhost; - - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # - location ~ \.php$ { - root TEST_ROOT; - fastcgi_pass fastcgi_backend; - fastcgi_keep_conn on; -# fastcgi_pass 127.0.0.1:9001; -# fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; - } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} - } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - -} diff --git a/frameworks/PHP/php/deploy/nginx5.conf b/frameworks/PHP/php/deploy/nginx5.conf new file mode 100644 index 00000000000..8d1cfba2d55 --- /dev/null +++ b/frameworks/PHP/php/deploy/nginx5.conf @@ -0,0 +1,63 @@ +user root; +worker_processes auto; + +events { + worker_connections 16384; + multi_accept on; + use epoll; +} + +http { + include /nginx/conf/mime.types; + default_type application/octet-stream; + access_log off; + server_tokens off; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; + + + upstream fastcgi_backend { + server unix:/var/run/php/php5.6-fpm.sock; + keepalive 50; + } + + server { + listen 8080; + server_name localhost; + + root /php/; + index index.php; + + location / { + try_files $uri $uri/ /index.php?$uri&$args; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass fastcgi_backend; + fastcgi_keep_conn on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include /nginx/conf/fastcgi_params; + } + } +} diff --git a/frameworks/PHP/php/deploy/nginx7.conf b/frameworks/PHP/php/deploy/nginx7.conf new file mode 100644 index 00000000000..3e5b7e3cf93 --- /dev/null +++ b/frameworks/PHP/php/deploy/nginx7.conf @@ -0,0 +1,63 @@ +user root; +worker_processes auto; + +events { + worker_connections 16384; + multi_accept on; + use epoll; +} + +http { + include /nginx/conf/mime.types; + default_type application/octet-stream; + access_log off; + server_tokens off; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; + + + upstream fastcgi_backend { + server unix:/var/run/php/php7.2-fpm.sock; + keepalive 50; + } + + server { + listen 8080; + server_name localhost; + + root /php/; + index index.php; + + location / { + try_files $uri $uri/ /index.php?$uri&$args; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass fastcgi_backend; + fastcgi_keep_conn on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include /nginx/conf/fastcgi_params; + } + } +} diff --git a/frameworks/PHP/php/fortune.php b/frameworks/PHP/php/fortune.php index 98aeabcea41..a6cbf638941 100644 --- a/frameworks/PHP/php/fortune.php +++ b/frameworks/PHP/php/fortune.php @@ -5,7 +5,7 @@ // Database connection // http://www.php.net/manual/en/ref.pdo-mysql.php -$pdo = new PDO('mysql:host=TFB-database;dbname=hello_world;charset=utf8', 'benchmarkdbuser', 'benchmarkdbpass', array( +$pdo = new PDO('mysql:host=tfb-database;dbname=hello_world;charset=utf8', 'benchmarkdbuser', 'benchmarkdbpass', array( PDO::ATTR_PERSISTENT => true )); diff --git a/frameworks/PHP/php/php-php5-raw.dockerfile b/frameworks/PHP/php/php-php5-raw.dockerfile new file mode 100644 index 00000000000..b8fe321da11 --- /dev/null +++ b/frameworks/PHP/php/php-php5-raw.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/php5-base:0.1 + +CMD service php5.6-fpm start && \ + nginx -c /php/deploy/nginx5.conf -g "daemon off;" diff --git a/frameworks/PHP/php/php-php5.dockerfile b/frameworks/PHP/php/php-php5.dockerfile new file mode 100644 index 00000000000..b8fe321da11 --- /dev/null +++ b/frameworks/PHP/php/php-php5.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/php5-base:0.1 + +CMD service php5.6-fpm start && \ + nginx -c /php/deploy/nginx5.conf -g "daemon off;" diff --git a/frameworks/PHP/php/php-raw7.dockerfile b/frameworks/PHP/php/php-raw7.dockerfile new file mode 100644 index 00000000000..2dd2517a08d --- /dev/null +++ b/frameworks/PHP/php/php-raw7.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/php7-base:0.1 + +CMD service php7.2-fpm start && \ + nginx -c /php/deploy/nginx7.conf -g "daemon off;" diff --git a/frameworks/PHP/php/php.dockerfile b/frameworks/PHP/php/php.dockerfile new file mode 100644 index 00000000000..2dd2517a08d --- /dev/null +++ b/frameworks/PHP/php/php.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/php7-base:0.1 + +CMD service php7.2-fpm start && \ + nginx -c /php/deploy/nginx7.conf -g "daemon off;" diff --git a/frameworks/PHP/php/php5-base.dockerfile b/frameworks/PHP/php/php5-base.dockerfile new file mode 100644 index 00000000000..adde6562664 --- /dev/null +++ b/frameworks/PHP/php/php5-base.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/php5:0.1 + +ADD ./ /php +WORKDIR /php + +RUN composer.phar install --no-progress + +RUN chmod -R 777 /php diff --git a/frameworks/PHP/php/php7-base.dockerfile b/frameworks/PHP/php/php7-base.dockerfile new file mode 100644 index 00000000000..f04f1e0ae9b --- /dev/null +++ b/frameworks/PHP/php/php7-base.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/php7:0.1 + +ADD ./ /php +WORKDIR /php + +RUN composer.phar install --no-progress + +RUN chmod -R 777 /php diff --git a/frameworks/PHP/php/setup.sh b/frameworks/PHP/php/setup.sh deleted file mode 100644 index febc72b56da..00000000000 --- a/frameworks/PHP/php/setup.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer - -sed -i "s|TEST_ROOT|${TROOT}|g" deploy/php -sed -i "s|TEST_ROOT|${TROOT}|g" deploy/nginx.conf - -sed -i "s|/usr/local/nginx/|${IROOT}/nginx/|g" deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/php/setup_php5.sh b/frameworks/PHP/php/setup_php5.sh deleted file mode 100644 index 6da269e4de7..00000000000 --- a/frameworks/PHP/php/setup_php5.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends mysql php5 nginx composer - -sed -i "s|TEST_ROOT|${TROOT}|g" deploy/php -sed -i "s|TEST_ROOT|${TROOT}|g" deploy/nginx.conf - -sed -i "s|/usr/local/nginx/|${IROOT}/nginx/|g" deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/php/updateraw.php b/frameworks/PHP/php/updateraw.php index a7427c5aefa..45da3f6f9f8 100644 --- a/frameworks/PHP/php/updateraw.php +++ b/frameworks/PHP/php/updateraw.php @@ -3,7 +3,7 @@ // Database connection // http://www.php.net/manual/en/ref.pdo-mysql.php -$pdo = new PDO('mysql:host=TFB-database;dbname=hello_world', 'benchmarkdbuser', 'benchmarkdbpass', array( +$pdo = new PDO('mysql:host=tfb-database;dbname=hello_world', 'benchmarkdbuser', 'benchmarkdbpass', array( PDO::ATTR_PERSISTENT => true )); diff --git a/frameworks/PHP/phpixie/.gitignore b/frameworks/PHP/phpixie/.gitignore deleted file mode 100644 index 60db428532f..00000000000 --- a/frameworks/PHP/phpixie/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/deploy/php-fpm.pid -/vendor/ diff --git a/frameworks/PHP/phpixie/assets/config/db.php b/frameworks/PHP/phpixie/assets/config/db.php index c5392963ed4..8e4c49a2188 100644 --- a/frameworks/PHP/phpixie/assets/config/db.php +++ b/frameworks/PHP/phpixie/assets/config/db.php @@ -7,10 +7,10 @@ 'driver' => 'PDO', //'Connection' is required if you use the PDO driver - 'connection'=>'mysql:host=localhost;dbname=hello_world', + 'connection'=>'mysql:host=tfb-database;dbname=hello_world', // 'db' and 'host' are required if you use Mysqli driver 'db' => 'hello_world', - 'host'=>'tfbdata' + 'host'=>'tfb-database' ) ); diff --git a/frameworks/PHP/phpixie/benchmark_config.json b/frameworks/PHP/phpixie/benchmark_config.json index 4c1a9d5e857..9345aae9974 100755 --- a/frameworks/PHP/phpixie/benchmark_config.json +++ b/frameworks/PHP/phpixie/benchmark_config.json @@ -1,8 +1,7 @@ { - "framework": "php-phpixie", + "framework": "phpixie", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/PHP/phpixie/deploy/nginx.conf b/frameworks/PHP/phpixie/deploy/nginx.conf index 4e9ab91eb0c..5aeffca2fc4 100755 --- a/frameworks/PHP/phpixie/deploy/nginx.conf +++ b/frameworks/PHP/phpixie/deploy/nginx.conf @@ -1,128 +1,63 @@ -#user nobody; +user root; worker_processes auto; -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - events { - worker_connections 16384; + worker_connections 16384; + multi_accept on; + use epoll; } - http { - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; access_log off; - server_tokens off; - - sendfile on; - #tcp_nopush on; - - #keepalive_timeout 0; - keepalive_timeout 65; - - #gzip on; + server_tokens off; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; + + + upstream fastcgi_backend { + server unix:/var/run/php/php7.2-fpm.sock; + keepalive 50; + } server { listen 8080; server_name localhost; - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - root /home/tfb/FrameworkBenchmarks/php-phpixie/web/; + root /phpixie/web/; index index.php; location / { try_files $uri $uri/ /index.php?$uri&$args; } - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # location ~ \.php$ { try_files $uri =404; - fastcgi_pass 127.0.0.1:9001; + fastcgi_pass fastcgi_backend; + fastcgi_keep_conn on; fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - } diff --git a/frameworks/PHP/phpixie/deploy/php-phpixie b/frameworks/PHP/phpixie/deploy/php-phpixie index 1aaae632f25..769b2712ac5 100755 --- a/frameworks/PHP/phpixie/deploy/php-phpixie +++ b/frameworks/PHP/phpixie/deploy/php-phpixie @@ -1,6 +1,6 @@ - Alias /php-phpixie/ "/home/tfb/FrameworkBenchmarks/php-phpixie/web/" - + Alias /php-phpixie/ "/phpixie/web/" + Options Indexes FollowSymLinks MultiViews #AllowOverride None Order allow,deny diff --git a/frameworks/PHP/phpixie/phpixie.dockerfile b/frameworks/PHP/phpixie/phpixie.dockerfile new file mode 100644 index 00000000000..27ee3957a25 --- /dev/null +++ b/frameworks/PHP/phpixie/phpixie.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/php7:0.1 + +ADD ./ /phpixie +WORKDIR /phpixie + +RUN composer.phar install --no-progress + +CMD service php7.2-fpm start && \ + nginx -c /phpixie/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/phpixie/setup.sh b/frameworks/PHP/phpixie/setup.sh deleted file mode 100644 index 570b81fbdc5..00000000000 --- a/frameworks/PHP/phpixie/setup.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer - -sed -i 's|localhost|'"${DBHOST}"'|g' assets/config/db.php -sed -i 's|".*/FrameworkBenchmarks/php-phpixie|"'"${TROOT}"'|g' deploy/php-phpixie -sed -i 's|Directory .*/FrameworkBenchmarks/php-phpixie|Directory '"${TROOT}"'|g' deploy/php-phpixie -sed -i 's|root .*/FrameworkBenchmarks/php-phpixie|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/phreeze/.gitignore b/frameworks/PHP/phreeze/.gitignore deleted file mode 100644 index 556ef9f3f7a..00000000000 --- a/frameworks/PHP/phreeze/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -vendor -deploy/php-fpm.pid diff --git a/frameworks/PHP/phreeze/benchmark_config.json b/frameworks/PHP/phreeze/benchmark_config.json index afd71dd0060..4f1098e1e02 100644 --- a/frameworks/PHP/phreeze/benchmark_config.json +++ b/frameworks/PHP/phreeze/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "phreeze", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/index.php?json", "db_url": "/index.php?db", "query_url": "/index.php?query&queries=", diff --git a/frameworks/PHP/phreeze/deploy/nginx.conf b/frameworks/PHP/phreeze/deploy/nginx.conf index 129b7e3b001..49290010ea9 100644 --- a/frameworks/PHP/phreeze/deploy/nginx.conf +++ b/frameworks/PHP/phreeze/deploy/nginx.conf @@ -1,41 +1,42 @@ -#user nobody; +user root; worker_processes auto; -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - events { - worker_connections 16384; + worker_connections 16384; + multi_accept on; + use epoll; } - http { - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; access_log off; server_tokens off; - sendfile on; - #tcp_nopush on; + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; - #keepalive_timeout 0; - keepalive_timeout 65; + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; - #gzip on; upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/var/run/php/php5.6-fpm.sock; keepalive 50; } @@ -43,86 +44,20 @@ http { listen 8080; server_name localhost; - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} + root /phreeze/; + index index.php; - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} + location / { + try_files $uri $uri/ /index.php?$uri&$args; + } - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # location ~ \.php$ { - root /var/www/FrameworkBenchmarks/phreeze; + try_files $uri =404; fastcgi_pass fastcgi_backend; fastcgi_keep_conn on; -# fastcgi_pass 127.0.0.1:9001; fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - } diff --git a/frameworks/PHP/phreeze/deploy/phreeze b/frameworks/PHP/phreeze/deploy/phreeze index 289378ed2a7..bb534fe302a 100644 --- a/frameworks/PHP/phreeze/deploy/phreeze +++ b/frameworks/PHP/phreeze/deploy/phreeze @@ -1,6 +1,5 @@ - Alias /phreeze/ "/home/ubuntu/FrameworkBenchmarks/phreeze/" - + Options Indexes FollowSymLinks MultiViews #AllowOverride None Order allow,deny diff --git a/frameworks/PHP/phreeze/index.php b/frameworks/PHP/phreeze/index.php index 730aa7ed050..cf124b18f0e 100644 --- a/frameworks/PHP/phreeze/index.php +++ b/frameworks/PHP/phreeze/index.php @@ -15,7 +15,7 @@ require_once 'Controller/TestController.php'; $cs = new ConnectionSetting(); -$cs->ConnectionString = "localhost:3306"; +$cs->ConnectionString = "tfb-database:3306"; $cs->DBName = "hello_world"; $cs->Username = "benchmarkdbuser"; $cs->Password = "benchmarkdbpass"; diff --git a/frameworks/PHP/phreeze/phreeze.dockerfile b/frameworks/PHP/phreeze/phreeze.dockerfile new file mode 100644 index 00000000000..33ad2bb1bee --- /dev/null +++ b/frameworks/PHP/phreeze/phreeze.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/php5:0.1 + +ADD ./ /phreeze +WORKDIR /phreeze + +RUN composer.phar install --no-progress + +CMD service php5.6-fpm start && \ + nginx -c /phreeze/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/phreeze/setup.sh b/frameworks/PHP/phreeze/setup.sh deleted file mode 100644 index 4554c606a63..00000000000 --- a/frameworks/PHP/phreeze/setup.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends mysql php5 nginx composer - -sed -i 's|localhost:3306|'"${DBHOST}"':3306|g' index.php -sed -i 's|.*/FrameworkBenchmarks/phreeze|"'"${TROOT}"'|g' deploy/phreeze -sed -i 's|Directory .*/FrameworkBenchmarks/phreeze|Directory '"${TROOT}"'|g' deploy/phreeze -sed -i 's|root .*/FrameworkBenchmarks/phreeze|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/silex-orm/.gitignore b/frameworks/PHP/silex-orm/.gitignore deleted file mode 100644 index d426896d139..00000000000 --- a/frameworks/PHP/silex-orm/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/app/cache -/app/logs -/bin -/vendor/ -/build -/dist -.DS_Store -/tags -.idea -/deploy/php-fpm.pid diff --git a/frameworks/PHP/silex-orm/README.md b/frameworks/PHP/silex-orm/README.md deleted file mode 100644 index d822388a40a..00000000000 --- a/frameworks/PHP/silex-orm/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# Silex ORM Benchmarking Test - -This is the Silex PHP + ORM portion of a [benchmarking test suite](../) comparing a variety of web development platforms. - -### JSON Encoding Test -Uses the PHP standard [JSON encoder](http://www.php.net/manual/en/function.json-encode.php). - -* [JSON test controller](web/index.php) - - -### Data-Store/Database Mapping Test -Uses the Doctrine ORM functionality. - -* [DB test controller](web/index.php) - - -## Infrastructure Software Versions -The tests were run with: - -* [Silex Version 1.0](http://silex.sensiolabs.org/) -* [Doctrine ORM Service Provider](https://github.com/dflydev/dflydev-doctrine-orm-service-provider) -* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC -* [nginx 1.2.7](http://nginx.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/PHP/silex-orm/benchmark_config.json b/frameworks/PHP/silex-orm/benchmark_config.json deleted file mode 100644 index 2d6beebdb3b..00000000000 --- a/frameworks/PHP/silex-orm/benchmark_config.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "framework": "silex-orm", - "tests": [{ - "default": { - "setup_file": "setup", - "json_url": "/json", - "db_url": "/db", - "query_url": "/queries?queries=", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "MySQL", - "framework": "silex", - "language": "PHP", - "flavor": "PHP5", - "orm": "Full", - "platform": "None", - "webserver": "nginx", - "os": "Linux", - "database_os": "Linux", - "display_name": "silex", - "notes": "", - "versus": "php-php5" - } - }] -} diff --git a/frameworks/PHP/silex-orm/composer.json b/frameworks/PHP/silex-orm/composer.json deleted file mode 100644 index b858e628443..00000000000 --- a/frameworks/PHP/silex-orm/composer.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "autoload": { - "psr-0": { "": "src/" } - }, - "require": { - "silex/silex": "1.0.*@dev", - "dflydev/doctrine-orm-service-provider": "1.0.*@dev" - } -} diff --git a/frameworks/PHP/silex-orm/composer.lock b/frameworks/PHP/silex-orm/composer.lock deleted file mode 100644 index ab18a085987..00000000000 --- a/frameworks/PHP/silex-orm/composer.lock +++ /dev/null @@ -1,1305 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "content-hash": "cedc8dfaf10a28c925be3067821ec864", - "packages": [ - { - "name": "dflydev/doctrine-orm-service-provider", - "version": "1.0.x-dev", - "source": { - "type": "git", - "url": "https://github.com/dflydev/dflydev-doctrine-orm-service-provider.git", - "reference": "68f6805bbbedfdebccb9f24802f0484204b6a17d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dflydev/dflydev-doctrine-orm-service-provider/zipball/68f6805bbbedfdebccb9f24802f0484204b6a17d", - "reference": "68f6805bbbedfdebccb9f24802f0484204b6a17d", - "shasum": "" - }, - "require": { - "doctrine/orm": "~2.3", - "php": ">=5.3.3", - "pimple/pimple": "1.*@dev" - }, - "require-dev": { - "cilex/cilex": "1.*@dev", - "cilex/console-service-provider": "@dev", - "silex/silex": "1.*@dev" - }, - "suggest": { - "dflydev/psr0-resource-locator-service-provider": "1.0.*@dev" - }, - "type": "library", - "autoload": { - "psr-0": { - "Dflydev\\Cilex\\Provider\\DoctrineOrm": "src", - "Dflydev\\Pimple\\Provider\\DoctrineOrm": "src", - "Dflydev\\Silex\\Provider\\DoctrineOrm": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dragonfly Development Inc.", - "email": "info@dflydev.com", - "homepage": "http://dflydev.com" - }, - { - "name": "Beau Simensen", - "email": "beau@dflydev.com", - "homepage": "http://beausimensen.com" - } - ], - "description": "Doctrine ORM Service Provider", - "homepage": "http://dflydev.com/projects/doctrine-orm-service-provider/", - "keywords": [ - "cilex", - "doctrine", - "orm", - "pimple", - "silex" - ], - "time": "2015-09-07T12:16:54+00:00" - }, - { - "name": "doctrine/annotations", - "version": "v1.6.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", - "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "php": "^7.1" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "time": "2017-12-06T07:11:42+00:00" - }, - { - "name": "doctrine/cache", - "version": "v1.7.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "b3217d58609e9c8e661cd41357a54d926c4a2a1a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/b3217d58609e9c8e661cd41357a54d926c4a2a1a", - "reference": "b3217d58609e9c8e661cd41357a54d926c4a2a1a", - "shasum": "" - }, - "require": { - "php": "~7.1" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "require-dev": { - "alcaeus/mongo-php-adapter": "^1.1", - "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^5.7", - "predis/predis": "~1.0" - }, - "suggest": { - "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "cache", - "caching" - ], - "time": "2017-08-25T07:02:50+00:00" - }, - { - "name": "doctrine/collections", - "version": "v1.5.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/collections.git", - "reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/a01ee38fcd999f34d9bfbcee59dbda5105449cbf", - "reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "doctrine/coding-standard": "~0.1@dev", - "phpunit/phpunit": "^5.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Collections\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Collections Abstraction library", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "array", - "collections", - "iterator" - ], - "time": "2017-07-22T10:37:32+00:00" - }, - { - "name": "doctrine/common", - "version": "v2.8.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/common.git", - "reference": "f68c297ce6455e8fd794aa8ffaf9fa458f6ade66" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/f68c297ce6455e8fd794aa8ffaf9fa458f6ade66", - "reference": "f68c297ce6455e8fd794aa8ffaf9fa458f6ade66", - "shasum": "" - }, - "require": { - "doctrine/annotations": "1.*", - "doctrine/cache": "1.*", - "doctrine/collections": "1.*", - "doctrine/inflector": "1.*", - "doctrine/lexer": "1.*", - "php": "~7.1" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Common Library for Doctrine projects", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "collections", - "eventmanager", - "persistence", - "spl" - ], - "time": "2017-08-31T08:43:38+00:00" - }, - { - "name": "doctrine/dbal", - "version": "v2.6.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/dbal.git", - "reference": "e3eed9b1facbb0ced3a0995244843a189e7d1b13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/e3eed9b1facbb0ced3a0995244843a189e7d1b13", - "reference": "e3eed9b1facbb0ced3a0995244843a189e7d1b13", - "shasum": "" - }, - "require": { - "doctrine/common": "^2.7.1", - "ext-pdo": "*", - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^5.4.6", - "phpunit/phpunit-mock-objects": "!=3.2.4,!=3.2.5", - "symfony/console": "2.*||^3.0" - }, - "suggest": { - "symfony/console": "For helpful console commands such as SQL execution and import of files." - }, - "bin": [ - "bin/doctrine-dbal" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\DBAL\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - } - ], - "description": "Database Abstraction Layer", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "database", - "dbal", - "persistence", - "queryobject" - ], - "time": "2017-11-19T13:38:54+00:00" - }, - { - "name": "doctrine/inflector", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "5527a48b7313d15261292c149e55e26eae771b0a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", - "reference": "5527a48b7313d15261292c149e55e26eae771b0a", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^6.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "inflection", - "pluralize", - "singularize", - "string" - ], - "time": "2018-01-09T20:05:19+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "^6.2.3", - "squizlabs/php_codesniffer": "^3.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2017-07-22T11:58:36+00:00" - }, - { - "name": "doctrine/lexer", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ], - "time": "2014-09-09T13:34:57+00:00" - }, - { - "name": "doctrine/orm", - "version": "v2.6.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/doctrine2.git", - "reference": "87ee409783a4a322b5597ebaae558661404055a7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/87ee409783a4a322b5597ebaae558661404055a7", - "reference": "87ee409783a4a322b5597ebaae558661404055a7", - "shasum": "" - }, - "require": { - "doctrine/annotations": "~1.5", - "doctrine/cache": "~1.6", - "doctrine/collections": "^1.4", - "doctrine/common": "^2.7.1", - "doctrine/dbal": "^2.6", - "doctrine/instantiator": "~1.1", - "ext-pdo": "*", - "php": "^7.1", - "symfony/console": "~3.0|~4.0" - }, - "require-dev": { - "doctrine/coding-standard": "^1.0", - "phpunit/phpunit": "^6.5", - "squizlabs/php_codesniffer": "^3.2", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" - }, - "bin": [ - "bin/doctrine" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\ORM\\": "lib/Doctrine/ORM" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "Object-Relational-Mapper for PHP", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "database", - "orm" - ], - "time": "2018-02-27T07:30:56+00:00" - }, - { - "name": "pimple/pimple", - "version": "v1.1.1", - "source": { - "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/2019c145fe393923f3441b23f29bbdfaa5c58c4d", - "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-0": { - "Pimple": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Pimple is a simple Dependency Injection Container for PHP 5.3", - "homepage": "http://pimple.sensiolabs.org", - "keywords": [ - "container", - "dependency injection" - ], - "time": "2013-11-22T08:30:29+00:00" - }, - { - "name": "psr/log", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2016-10-10T12:19:37+00:00" - }, - { - "name": "silex/silex", - "version": "1.0.x-dev", - "source": { - "type": "git", - "url": "https://github.com/silexphp/Silex.git", - "reference": "75b8714f00bf4e64eedc0d9283b03eb05af67196" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/silexphp/Silex/zipball/75b8714f00bf4e64eedc0d9283b03eb05af67196", - "reference": "75b8714f00bf4e64eedc0d9283b03eb05af67196", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "pimple/pimple": "1.*", - "symfony/event-dispatcher": ">=2.1,<2.4-dev", - "symfony/http-foundation": ">=2.1,<2.4-dev", - "symfony/http-kernel": ">=2.1,<2.4-dev", - "symfony/routing": ">=2.1,<2.4-dev" - }, - "require-dev": { - "doctrine/dbal": ">=2.2.0,<2.4.0-dev", - "monolog/monolog": "~1.4,>=1.4.1", - "swiftmailer/swiftmailer": "5.*", - "symfony/browser-kit": ">=2.1,<2.4-dev", - "symfony/config": ">=2.1,<2.4-dev", - "symfony/css-selector": ">=2.1,<2.4-dev", - "symfony/dom-crawler": ">=2.1,<2.4-dev", - "symfony/finder": ">=2.1,<2.4-dev", - "symfony/form": ">=2.1.4,<2.4-dev", - "symfony/locale": ">=2.1,<2.4-dev", - "symfony/monolog-bridge": ">=2.1,<2.4-dev", - "symfony/options-resolver": ">=2.1,<2.4-dev", - "symfony/process": ">=2.1,<2.4-dev", - "symfony/security": ">=2.1,<2.4-dev", - "symfony/serializer": ">=2.1,<2.4-dev", - "symfony/translation": ">=2.1,<2.4-dev", - "symfony/twig-bridge": ">=2.1,<2.4-dev", - "symfony/validator": ">=2.1,<2.4-dev", - "twig/twig": ">=1.8.0,<2.0-dev" - }, - "suggest": { - "symfony/browser-kit": ">=2.1,<2.4-dev", - "symfony/css-selector": ">=2.1,<2.4-dev", - "symfony/dom-crawler": ">=2.1,<2.4-dev", - "symfony/form": ">= 2.1.4,<2.4-dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Silex": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch", - "homepage": "http://wiedler.ch/igor/" - } - ], - "description": "The PHP micro-framework based on the Symfony2 Components", - "homepage": "http://silex.sensiolabs.org", - "keywords": [ - "microframework" - ], - "time": "2014-06-06T05:48:07+00:00" - }, - { - "name": "symfony/console", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "36d5b41e7d4e1ccf0370f6babe966c08ef0a1488" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/36d5b41e7d4e1ccf0370f6babe966c08ef0a1488", - "reference": "36d5b41e7d4e1ccf0370f6babe966c08ef0a1488", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/process": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2018-01-29T09:06:29+00:00" - }, - { - "name": "symfony/debug", - "version": "v2.8.34", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "35e36287fc0fdc8a08f70efcd4865ae6d8a6ee55" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/35e36287fc0fdc8a08f70efcd4865ae6d8a6ee55", - "reference": "35e36287fc0fdc8a08f70efcd4865ae6d8a6ee55", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" - }, - "require-dev": { - "symfony/class-loader": "~2.2|~3.0.0", - "symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com", - "time": "2018-01-18T22:12:33+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.3.42", - "target-dir": "Symfony/Component/EventDispatcher", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "fd6d162d97bf3e6060622e5c015af39ca72e33bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/fd6d162d97bf3e6060622e5c015af39ca72e33bc", - "reference": "fd6d162d97bf3e6060622e5c015af39ca72e33bc", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/dependency-injection": "~2.0,>=2.0.5" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2016-04-04T09:22:54+00:00" - }, - { - "name": "symfony/http-foundation", - "version": "v2.3.42", - "target-dir": "Symfony/Component/HttpFoundation", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "9f4dbb1f3e3cad22d9462e0306c9c71212458f61" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/9f4dbb1f3e3cad22d9462e0306c9c71212458f61", - "reference": "9f4dbb1f3e3cad22d9462e0306c9c71212458f61", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/polyfill-mbstring": "~1.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "classmap": [ - "Symfony/Component/HttpFoundation/Resources/stubs" - ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpFoundation Component", - "homepage": "https://symfony.com", - "time": "2016-05-13T15:22:39+00:00" - }, - { - "name": "symfony/http-kernel", - "version": "v2.3.42", - "target-dir": "Symfony/Component/HttpKernel", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "57e0329236e8edf2b0e683043c604f7c9aba9398" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/57e0329236e8edf2b0e683043c604f7c9aba9398", - "reference": "57e0329236e8edf2b0e683043c604f7c9aba9398", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "psr/log": "~1.0", - "symfony/debug": "~2.3.24|~2.5.9|~2.6,>=2.6.2", - "symfony/event-dispatcher": "~2.1", - "symfony/http-foundation": "~2.3,>=2.3.4" - }, - "require-dev": { - "symfony/browser-kit": "~2.3", - "symfony/class-loader": "~2.1", - "symfony/config": "~2.0,>=2.0.5", - "symfony/console": "~2.2", - "symfony/css-selector": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.2", - "symfony/dom-crawler": "~2.0,>=2.0.5", - "symfony/finder": "~2.0,>=2.0.5", - "symfony/process": "~2.0,>=2.0.5", - "symfony/routing": "~2.2", - "symfony/stopwatch": "~2.3", - "symfony/templating": "~2.2" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/class-loader": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/finder": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\HttpKernel\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpKernel Component", - "homepage": "https://symfony.com", - "time": "2016-05-30T08:41:10+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2018-01-30T19:27:44+00:00" - }, - { - "name": "symfony/routing", - "version": "v2.3.42", - "target-dir": "Symfony/Component/Routing", - "source": { - "type": "git", - "url": "https://github.com/symfony/routing.git", - "reference": "5b8a2bb7569df81401171829498809e90d6e446c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/5b8a2bb7569df81401171829498809e90d6e446c", - "reference": "5b8a2bb7569df81401171829498809e90d6e446c", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "doctrine/common": "~2.2", - "psr/log": "~1.0", - "symfony/config": "~2.2", - "symfony/http-foundation": "~2.3", - "symfony/yaml": "~2.0,>=2.0.5" - }, - "suggest": { - "doctrine/common": "", - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Routing\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Routing Component", - "homepage": "https://symfony.com", - "time": "2016-05-29T10:13:06+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": { - "silex/silex": 20, - "dflydev/doctrine-orm-service-provider": 20 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [] -} diff --git a/frameworks/PHP/silex-orm/deploy/nginx.conf b/frameworks/PHP/silex-orm/deploy/nginx.conf deleted file mode 100644 index 1e67d624609..00000000000 --- a/frameworks/PHP/silex-orm/deploy/nginx.conf +++ /dev/null @@ -1,134 +0,0 @@ -#user nobody; -worker_processes auto; - -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - -events { - worker_connections 16384; -} - - -http { - include /usr/local/nginx/conf/mime.types; - default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; - access_log off; - server_tokens off; - - sendfile on; - #tcp_nopush on; - - #keepalive_timeout 0; - keepalive_timeout 65; - - #gzip on; - - upstream fastcgi_backend { - server 127.0.0.1:9001; - keepalive 50; - } - - server { - listen 8080; - server_name localhost; - - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - root /home/ubuntu/FrameworkBenchmarks/php-silex-orm/web/; - index index.php; - - location / { - try_files $uri $uri/ /index.php?$uri&$args; - } - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # - location ~ \.php$ { - try_files $uri =404; - fastcgi_pass fastcgi_backend; - fastcgi_keep_conn on; - fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; - } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} - } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - -} \ No newline at end of file diff --git a/frameworks/PHP/silex-orm/deploy/php-silex-orm b/frameworks/PHP/silex-orm/deploy/php-silex-orm deleted file mode 100644 index e5300e4efde..00000000000 --- a/frameworks/PHP/silex-orm/deploy/php-silex-orm +++ /dev/null @@ -1,9 +0,0 @@ - - Alias /php-silex-orm/ "/home/ubuntu/FrameworkBenchmarks/php-silex-orm/web/" - - Options Indexes FollowSymLinks MultiViews - #AllowOverride None - Order allow,deny - allow from all - - diff --git a/frameworks/PHP/silex-orm/setup.sh b/frameworks/PHP/silex-orm/setup.sh deleted file mode 100644 index 0c003451df4..00000000000 --- a/frameworks/PHP/silex-orm/setup.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer - -sed -i 's|127.0.0.1|'"${DBHOST}"'|g' web/index.php -sed -i 's|".*/FrameworkBenchmarks/php-silex-orm|"'"${TROOT}"'|g' deploy/php-silex-orm -sed -i 's|Directory .*/FrameworkBenchmarks/php-silex-orm|Directory '"${TROOT}"'|g' deploy/php-silex-orm -sed -i 's|root .*/FrameworkBenchmarks/php-silex-orm|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/silex-orm/source_code b/frameworks/PHP/silex-orm/source_code deleted file mode 100644 index ac9116c583f..00000000000 --- a/frameworks/PHP/silex-orm/source_code +++ /dev/null @@ -1,5 +0,0 @@ -./php-silex-orm/deploy/php-silex-orm -./php-silex-orm/src/ -./php-silex-orm/src/Entity -./php-silex-orm/src/Entity/World.php -./php-silex-orm/web/index.php diff --git a/frameworks/PHP/silex-orm/src/Entity/World.php b/frameworks/PHP/silex-orm/src/Entity/World.php deleted file mode 100644 index 49ca58f8cf2..00000000000 --- a/frameworks/PHP/silex-orm/src/Entity/World.php +++ /dev/null @@ -1,85 +0,0 @@ - $this->id, - 'randomNumber' => $this->randomNumber - ]; - } - */ - - /** - * Set id - * - * @param integer $id - * @return World - */ - public function setId($id) - { - $this->id = $id; - - return $this; - } - - /** - * Get id - * - * @return integer - */ - public function getId() - { - return $this->id; - } - - /** - * Set randomNumber - * - * @param integer $randomNumber - * @return World - */ - public function setRandomNumber($randomNumber) - { - $this->randomNumber = $randomNumber; - - return $this; - } - - /** - * Get randomNumber - * - * @return integer - */ - public function getRandomNumber() - { - return $this->randomNumber; - } -} \ No newline at end of file diff --git a/frameworks/PHP/silex-orm/web/.htaccess b/frameworks/PHP/silex-orm/web/.htaccess deleted file mode 100644 index 76c8c2673da..00000000000 --- a/frameworks/PHP/silex-orm/web/.htaccess +++ /dev/null @@ -1,8 +0,0 @@ -# /web/.htaccess - - Options -MultiViews - - RewriteEngine On - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^ index.php [L] - \ No newline at end of file diff --git a/frameworks/PHP/silex-orm/web/index.php b/frameworks/PHP/silex-orm/web/index.php deleted file mode 100644 index 9cc5887057d..00000000000 --- a/frameworks/PHP/silex-orm/web/index.php +++ /dev/null @@ -1,72 +0,0 @@ - true -)); - -$app->register(new Silex\Provider\DoctrineServiceProvider(), array( - 'db.options' => array( - 'pdo' => $dbh - ), -)); - -$app->register(new DoctrineOrmServiceProvider, array( - 'orm.proxies_dir' => __DIR__.'/../proxies', // Not sure how or if this needs handling... - 'orm.em.options' => array( - 'mappings' => array( - array( - 'type' => 'annotation', - 'namespace' => 'Entity', - 'path' => __DIR__.'/../src/Entity', - 'use_simple_annotation_reader' => false, - ), - ) - ), -)); - -$app->get('/json', function() { - return new JsonResponse(array('message' => 'Hello, World!')); -}); - -$app->get('/db', function(Request $request) use ($app) { - $repo = $app['orm.em']->getRepository('Entity\World'); - - $worlds = $repo->find(mt_rand(1, 10000)); - - return new JsonResponse($worlds); -}); - -$app->get('/queries', function(Request $request) use ($app) { - $queries = $request->query->getInt('queries', 1); - $queries = is_numeric($queries) ? min(max($queries, 1), 500) : 1; - // possibility for micro enhancement could be the use of SplFixedArray -> http://php.net/manual/de/class.splfixedarray.php - $worlds = array(); - $repo = $app['orm.em']->getRepository('Entity\World'); - - for ($i = 0; $i < $queries; ++$i) { - $worlds[] = $repo->find(mt_rand(1, 10000)); - } - - return new JsonResponse($worlds); -}); - - -$app->run(); - - - - diff --git a/frameworks/PHP/silex/.gitignore b/frameworks/PHP/silex/.gitignore deleted file mode 100644 index d426896d139..00000000000 --- a/frameworks/PHP/silex/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/app/cache -/app/logs -/bin -/vendor/ -/build -/dist -.DS_Store -/tags -.idea -/deploy/php-fpm.pid diff --git a/frameworks/PHP/silex/benchmark_config.json b/frameworks/PHP/silex/benchmark_config.json index 067dd2d35fe..5ddbdc04bbf 100644 --- a/frameworks/PHP/silex/benchmark_config.json +++ b/frameworks/PHP/silex/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "silex", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -23,7 +22,6 @@ "versus": "php-php5" }, "raw": { - "setup_file": "setup_raw", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/PHP/silex/deploy/nginx.conf b/frameworks/PHP/silex/deploy/nginx.conf index 9e51c48f0e5..95a879b53ff 100644 --- a/frameworks/PHP/silex/deploy/nginx.conf +++ b/frameworks/PHP/silex/deploy/nginx.conf @@ -1,41 +1,42 @@ -#user nobody; +user root; worker_processes auto; -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - events { - worker_connections 16384; + worker_connections 16384; + multi_accept on; + use epoll; } - http { - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; access_log off; server_tokens off; - sendfile on; - #tcp_nopush on; + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; - #keepalive_timeout 0; - keepalive_timeout 65; + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; - #gzip on; upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/var/run/php/php7.2-fpm.sock; keepalive 50; } @@ -43,92 +44,20 @@ http { listen 8080; server_name localhost; - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - root /home/ubuntu/FrameworkBenchmarks/php-silex/web/; + root /silex/web/; index index.php; location / { try_files $uri $uri/ /index.php?$uri&$args; } - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # location ~ \.php$ { try_files $uri =404; fastcgi_pass fastcgi_backend; fastcgi_keep_conn on; fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - -} \ No newline at end of file +} diff --git a/frameworks/PHP/silex/deploy/nginx_raw.conf b/frameworks/PHP/silex/deploy/nginx_raw.conf deleted file mode 100644 index c07f74478f2..00000000000 --- a/frameworks/PHP/silex/deploy/nginx_raw.conf +++ /dev/null @@ -1,128 +0,0 @@ -#user nobody; -worker_processes auto; - -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - -events { - worker_connections 16384; -} - - -http { - include /usr/local/nginx/conf/mime.types; - default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; - access_log off; - server_tokens off; - - sendfile on; - #tcp_nopush on; - - #keepalive_timeout 0; - keepalive_timeout 65; - - #gzip on; - - server { - listen 8080; - server_name localhost; - - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - root /home/mrobertson/FrameworkBenchmarks/php-silex/web/; - index index_raw.php; - - location / { - try_files $uri $uri/ /index_raw.php?$uri&$args; - } - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # - location ~ \.php$ { - try_files $uri =404; - fastcgi_pass 127.0.0.1:9001; - fastcgi_index index_raw.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; - } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} - } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - -} diff --git a/frameworks/PHP/silex/deploy/php-silex b/frameworks/PHP/silex/deploy/php-silex index d4595812999..659c8d98128 100644 --- a/frameworks/PHP/silex/deploy/php-silex +++ b/frameworks/PHP/silex/deploy/php-silex @@ -1,6 +1,6 @@ - Alias /php-silex/ "/home/mrobertson/FrameworkBenchmarks/php-silex/web/" - + Alias /php-silex/ "/silex/web/" + Options Indexes FollowSymLinks MultiViews #AllowOverride None Order allow,deny diff --git a/frameworks/PHP/silex/setup.sh b/frameworks/PHP/silex/setup.sh deleted file mode 100644 index 3b5623b1490..00000000000 --- a/frameworks/PHP/silex/setup.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer - -sed -i 's|localhost|'"${DBHOST}"'|g' web/index.php -sed -i 's|".*\FrameworkBenchmarks/php-silex|"'"${TROOT}"'|g' deploy/php-silex -sed -i 's|Directory .*/FrameworkBenchmarks/php-silex|Directory '"${TROOT}"'|g' deploy/php-silex -sed -i 's|root .*/FrameworkBenchmarks/php-silex|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/silex/setup_raw.sh b/frameworks/PHP/silex/setup_raw.sh deleted file mode 100644 index 3821b0b12d2..00000000000 --- a/frameworks/PHP/silex/setup_raw.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer - -sed -i 's|localhost|'"${DBHOST}"'|g' web/index_raw.php -sed -i 's|".*\FrameworkBenchmarks/php-silex|"'"${TROOT}"'|g' deploy/php-silex -sed -i 's|Directory .*/FrameworkBenchmarks/php-silex|Directory '"${TROOT}"'|g' deploy/php-silex -sed -i 's|root .*/FrameworkBenchmarks/php-silex|root '"${TROOT}"'|g' deploy/nginx_raw.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx_raw.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx_raw.conf diff --git a/frameworks/PHP/silex/silex-base.dockerfile b/frameworks/PHP/silex/silex-base.dockerfile new file mode 100644 index 00000000000..d1bf51847fc --- /dev/null +++ b/frameworks/PHP/silex/silex-base.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/php7:0.1 + +ADD ./ /silex +WORKDIR /silex + +RUN composer.phar install --no-progress diff --git a/frameworks/PHP/silex/silex-raw.dockerfile b/frameworks/PHP/silex/silex-raw.dockerfile new file mode 100644 index 00000000000..a57cc3c91b1 --- /dev/null +++ b/frameworks/PHP/silex/silex-raw.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/silex-base:0.1 + +RUN mv /silex/web/index_raw.php /silex/web/index.php + +CMD service php7.2-fpm start && \ + nginx -c /silex/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/silex/silex.dockerfile b/frameworks/PHP/silex/silex.dockerfile new file mode 100644 index 00000000000..a313152f34e --- /dev/null +++ b/frameworks/PHP/silex/silex.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/silex-base:0.1 + +CMD service php7.2-fpm start && \ + nginx -c /silex/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/silex/web/index.php b/frameworks/PHP/silex/web/index.php index 35156b1be41..7a1a6ba3443 100644 --- a/frameworks/PHP/silex/web/index.php +++ b/frameworks/PHP/silex/web/index.php @@ -9,7 +9,7 @@ $app = new Silex\Application(); -$dbh = new PDO('mysql:host=localhost;dbname=hello_world', 'benchmarkdbuser', 'benchmarkdbpass', array( +$dbh = new PDO('mysql:host=tfb-database;dbname=hello_world', 'benchmarkdbuser', 'benchmarkdbpass', array( PDO::ATTR_PERSISTENT => true )); diff --git a/frameworks/PHP/silex/web/index_raw.php b/frameworks/PHP/silex/web/index_raw.php index ab9d3e8b24d..4b6f0836cf5 100644 --- a/frameworks/PHP/silex/web/index_raw.php +++ b/frameworks/PHP/silex/web/index_raw.php @@ -19,7 +19,7 @@ // Test 2: Single database query $app->get('/db', function() { - $db = new mysqli('localhost', 'benchmarkdbuser', 'benchmarkdbpass', 'hello_world'); + $db = new mysqli('tfb-database', 'benchmarkdbuser', 'benchmarkdbpass', 'hello_world'); $row = mysqli_query($db, 'SELECT id, randomNumber FROM World WHERE id = '.rand(1, 10000)); $result = mysqli_fetch_assoc($row); $result['id'] = (int) $result['id']; @@ -31,7 +31,7 @@ // Test 3: Multiple database queries $app->get('/queries', function(Request $request) { $queries = max(1, min($request->query->get('queries'), 500)); - $db = new mysqli('localhost', 'benchmarkdbuser', 'benchmarkdbpass', 'hello_world'); + $db = new mysqli('tfb-database', 'benchmarkdbuser', 'benchmarkdbpass', 'hello_world'); for ($i=0; $i<$queries; $i++) { $result = mysqli_fetch_assoc(mysqli_query($db, 'SELECT id, randomNumber FROM World WHERE id = '.rand(1, 10000))); @@ -45,7 +45,7 @@ // Test 4: Fortunes $app->get('/fortunes', function() { - $db = new mysqli('localhost', 'benchmarkdbuser', 'benchmarkdbpass', 'hello_world'); + $db = new mysqli('tfb-database', 'benchmarkdbuser', 'benchmarkdbpass', 'hello_world'); $result = mysqli_query($db, 'SELECT * FROM Fortune'); while ($row = mysqli_fetch_row($result)) { $fortunes[$row[0]] = htmlspecialchars($row[1], ENT_IGNORE); @@ -64,7 +64,7 @@ // Test 5: Database updates $app->get('/updates', function(Request $request) { $queries = max(1, min($request->query->get('queries'), 500)); - $db = new mysqli('localhost', 'benchmarkdbuser', 'benchmarkdbpass', 'hello_world'); + $db = new mysqli('tfb-database', 'benchmarkdbuser', 'benchmarkdbpass', 'hello_world'); for ($i=0; $i<$queries; $i++) { $rows[] = mysqli_fetch_assoc(mysqli_query($db, 'SELECT id, randomNumber FROM World WHERE id = '.rand(1, 10000))); } diff --git a/frameworks/PHP/slim/.gitignore b/frameworks/PHP/slim/.gitignore deleted file mode 100644 index eff4e25eab5..00000000000 --- a/frameworks/PHP/slim/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -deploy/nginx.conf -deploy/php-fpm.pid -/app/cache -/app/logs -/bin -/vendors -/build -/dist -.DS_Store -/tags -.idea -/vendor diff --git a/frameworks/PHP/slim/benchmark_config.json b/frameworks/PHP/slim/benchmark_config.json index 73bed6ff0f4..6fd3a9df0b0 100644 --- a/frameworks/PHP/slim/benchmark_config.json +++ b/frameworks/PHP/slim/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "slim", "tests": [{ "default": { - "setup_file": "setup", "plaintext_url": "/plaintext", "json_url": "/json", "db_url": "/db", @@ -23,10 +22,9 @@ "database_os": "Linux", "display_name": "slim", "notes": "", - "versus": "php7" + "versus": "" }, "hhvm": { - "setup_file": "setup_hhvm", "plaintext_url": "/plaintext", "json_url": "/json", "db_url": "/db", @@ -47,10 +45,9 @@ "database_os": "Linux", "display_name": "slim", "notes": "", - "versus": "php5" + "versus": "" }, "php5": { - "setup_file": "setup_php5", "plaintext_url": "/plaintext", "json_url": "/json", "db_url": "/db", @@ -71,7 +68,7 @@ "database_os": "Linux", "display_name": "slim", "notes": "", - "versus": "php-php5" + "versus": "" } }] } diff --git a/frameworks/PHP/slim/deploy/config.hdf b/frameworks/PHP/slim/deploy/config.hdf index 53eab9e6cf7..41542e048fc 100644 --- a/frameworks/PHP/slim/deploy/config.hdf +++ b/frameworks/PHP/slim/deploy/config.hdf @@ -5,12 +5,13 @@ PidFile = /home/vagrant/FrameworkBenchmarks/frameworks/PHP/php-slim/hhvm.pid # Server settings Server { - Port = 9001 + FileSocket = /slim/hhvm.sock Type = fastcgi - SourceRoot = /home/vagrant/FrameworkBenchmarks/frameworks/PHP/php-slim + SourceRoot = /slim DefaultDocument = index.php GzipCompressionLevel = 0 EnableKeepAlive = true + AllowRunAsRoot = 1 } # Disable logging completely @@ -18,7 +19,7 @@ Log { UseLogFile = false UseSyslog = false Level = Error - #File = /home/vagrant/FrameworkBenchmarks/frameworks/PHP/php-slim/error.log + #File = /slim/error.log } # Enable jit for production mode @@ -30,7 +31,7 @@ Eval { # Repo file Repo { Central { - Path = /home/vagrant/FrameworkBenchmarks/frameworks/PHP/php-slim/.hhvm.bbhc + Path = /slim/.hhvm.bbhc } } diff --git a/frameworks/PHP/slim/deploy/nginx-fpm-5.conf b/frameworks/PHP/slim/deploy/nginx-fpm-5.conf new file mode 100644 index 00000000000..75d3f07a1a1 --- /dev/null +++ b/frameworks/PHP/slim/deploy/nginx-fpm-5.conf @@ -0,0 +1,63 @@ +user root; +worker_processes auto; + +events { + worker_connections 16384; + multi_accept on; + use epoll; +} + +http { + include /nginx/conf/mime.types; + default_type application/octet-stream; + access_log off; + server_tokens off; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; + + + upstream fastcgi_backend { + server unix:/var/run/php/php5.6-fpm.sock; + keepalive 50; + } + + server { + listen 8080; + server_name localhost; + + root /slim/; + index index.php; + + location / { + try_files $uri $uri/ /index.php?$uri&$args; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass fastcgi_backend; + fastcgi_keep_conn on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include /nginx/conf/fastcgi_params; + } + } +} diff --git a/frameworks/PHP/slim/deploy/nginx-fpm-7.conf b/frameworks/PHP/slim/deploy/nginx-fpm-7.conf new file mode 100644 index 00000000000..901dcabfde2 --- /dev/null +++ b/frameworks/PHP/slim/deploy/nginx-fpm-7.conf @@ -0,0 +1,63 @@ +user root; +worker_processes auto; + +events { + worker_connections 16384; + multi_accept on; + use epoll; +} + +http { + include /nginx/conf/mime.types; + default_type application/octet-stream; + access_log off; + server_tokens off; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; + + + upstream fastcgi_backend { + server unix:/var/run/php/php7.2-fpm.sock; + keepalive 50; + } + + server { + listen 8080; + server_name localhost; + + root /slim/; + index index.php; + + location / { + try_files $uri $uri/ /index.php?$uri&$args; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass fastcgi_backend; + fastcgi_keep_conn on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include /nginx/conf/fastcgi_params; + } + } +} diff --git a/frameworks/PHP/slim/deploy/nginx-hhvm.conf b/frameworks/PHP/slim/deploy/nginx-hhvm.conf new file mode 100644 index 00000000000..dd544ab0cd9 --- /dev/null +++ b/frameworks/PHP/slim/deploy/nginx-hhvm.conf @@ -0,0 +1,62 @@ +user root; +worker_processes auto; + +events { + worker_connections 16384; + multi_accept on; + use epoll; +} + +http { + include /nginx/conf/mime.types; + default_type application/octet-stream; + access_log off; + server_tokens off; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + #FastCGI optimizations + fastcgi_buffers 256 16k; + fastcgi_buffer_size 128k; + fastcgi_connect_timeout 30s; + fastcgi_send_timeout 60s; + fastcgi_read_timeout 60s; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + reset_timedout_connection on; + server_names_hash_bucket_size 100; + + upstream fastcgi_backend { + server unix:/slim/hhvm.sock; + keepalive 50; + } + + server { + listen 8080; + server_name localhost; + + root /slim/; + index index.php; + + location / { + try_files $uri $uri/ /index.php?$uri&$args; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass fastcgi_backend; + fastcgi_keep_conn on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include /nginx/conf/fastcgi_params; + } + } +} \ No newline at end of file diff --git a/frameworks/PHP/slim/deploy/nginx.conf b/frameworks/PHP/slim/deploy/nginx.conf deleted file mode 100644 index 963fd720681..00000000000 --- a/frameworks/PHP/slim/deploy/nginx.conf +++ /dev/null @@ -1,133 +0,0 @@ -#user nobody; -worker_processes 8; - -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - -events { - worker_connections 1024; -} - - -http { - include /usr/local/nginx/conf/mime.types; - default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; - access_log off; - - sendfile on; - #tcp_nopush on; - - #keepalive_timeout 0; - keepalive_timeout 65; - - #gzip on; - - upstream fastcgi_backend { - server 127.0.0.1:9001; - keepalive 50; - } - - server { - listen 8080; - server_name localhost; - - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - root /home/ubuntu/FrameworkBenchmarks/php-slim/; - index index.php; - - location / { - try_files $uri $uri/ /index.php?$uri&$args; - } - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # - location ~ \.php$ { - try_files $uri =404; - fastcgi_pass fastcgi_backend; - fastcgi_keep_conn on; - fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; - } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} - } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - -} \ No newline at end of file diff --git a/frameworks/PHP/slim/deploy/php-slim b/frameworks/PHP/slim/deploy/php-slim deleted file mode 100644 index 2ffca5da8e5..00000000000 --- a/frameworks/PHP/slim/deploy/php-slim +++ /dev/null @@ -1,9 +0,0 @@ - - Alias /php-slim/ "/home/ubuntu/FrameworkBenchmarks/php-slim/" - - Options Indexes FollowSymLinks MultiViews - #AllowOverride None - Order allow,deny - allow from all - - diff --git a/frameworks/PHP/slim/index.php b/frameworks/PHP/slim/index.php index dad19d0774a..0457db8b23e 100755 --- a/frameworks/PHP/slim/index.php +++ b/frameworks/PHP/slim/index.php @@ -5,7 +5,7 @@ $app = new Slim\App(array( 'db' => function ($c) { - $pdo = new PDO('mysql:host=localhost;dbname=hello_world;charset=utf8', 'benchmarkdbuser', 'benchmarkdbpass'); + $pdo = new PDO('mysql:host=tfb-database;dbname=hello_world;charset=utf8', 'benchmarkdbuser', 'benchmarkdbpass'); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); @@ -14,7 +14,11 @@ 'view' => function ($c) { return new Slim\Views\PhpRenderer("templates/"); - } + }, + + 'settings' => [ + 'outputBuffering' => false, + ] )); // Test 1: Plaintext @@ -50,7 +54,12 @@ // Test 4: Multiple database queries $app->get('/dbs', function ($request, $response) { - $queries = max(1, min($request->getParam('queries'), 500)); + $queries = $request->getParam('queries'); + if (is_numeric($queries)) { + $queries = max(1, min($queries, 500)); + } else { + $queries = 1; + } $sth = $this->db->prepare('SELECT * FROM World WHERE id = ?'); $worlds = array(); @@ -71,7 +80,12 @@ // Test 5: Updates $app->get('/updates', function ($request, $response) { - $queries = max(1, min($request->getParam('queries'), 500)); + $queries = $request->getParam('queries'); + if (is_numeric($queries)) { + $queries = max(1, min($queries, 500)); + } else { + $queries = 1; + } $sth = $this->db->prepare('SELECT * FROM World WHERE id = ?'); $updateSth = $this->db->prepare('UPDATE World SET randomNumber = ? WHERE id = ?'); diff --git a/frameworks/PHP/slim/setup.sh b/frameworks/PHP/slim/setup.sh deleted file mode 100644 index b5a6374928e..00000000000 --- a/frameworks/PHP/slim/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer - -sed -i 's|localhost|'"${DBHOST}"'|g' index.php -sed -i 's|root .*/FrameworkBenchmarks/php-slim| root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/slim/setup_hhvm.sh b/frameworks/PHP/slim/setup_hhvm.sh deleted file mode 100644 index ef09d8046d3..00000000000 --- a/frameworks/PHP/slim/setup_hhvm.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -fw_depends mysql php5 nginx composer hhvm - -sed -i 's|localhost|'"${DBHOST}"'|g' index.php -sed -i 's|SourceRoot = .*/FrameworkBenchmarks/php-slim|SourceRoot = '"${TROOT}"'|g' deploy/config.hdf -sed -i 's|Path = .*/.hhvm.hhbc|Path = '"${TROOT}"'/.hhvm.bbhc|g' deploy/config.hdf -sed -i 's|PidFile = .*/hhvm.pid|PidFile = '"${TROOT}"'/hhvm.pid|g' deploy/config.hdf -sed -i 's|File = .*/error.log|File = '"${TROOT}"'/error.log|g' deploy/config.hdf -sed -i 's|root .*/FrameworkBenchmarks/php-slim| root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -hhvm -m daemon --config $TROOT/deploy/config.hdf --user $(whoami) -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/slim/setup_php5.sh b/frameworks/PHP/slim/setup_php5.sh deleted file mode 100644 index 95b304ec978..00000000000 --- a/frameworks/PHP/slim/setup_php5.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql php5 nginx composer - -sed -i 's|localhost|'"${DBHOST}"'|g' index.php -sed -i 's|root .*/FrameworkBenchmarks/php-slim| root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/slim/slim-hhvm.dockerfile b/frameworks/PHP/slim/slim-hhvm.dockerfile new file mode 100644 index 00000000000..674e7e78030 --- /dev/null +++ b/frameworks/PHP/slim/slim-hhvm.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/hhvm-php5:0.1 + +ADD ./ /slim +WORKDIR /slim + +RUN composer.phar install --no-progress + +RUN chmod -R 777 /slim + +CMD hhvm -m daemon --config /slim/deploy/config.hdf && \ + nginx -c /slim/deploy/nginx-hhvm.conf -g "daemon off;" diff --git a/frameworks/PHP/slim/slim-php5.dockerfile b/frameworks/PHP/slim/slim-php5.dockerfile new file mode 100644 index 00000000000..df877ad2985 --- /dev/null +++ b/frameworks/PHP/slim/slim-php5.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/php5:0.1 + +ADD ./ /slim +WORKDIR /slim + +RUN composer.phar install --no-progress + +RUN chmod -R 777 /slim + +CMD service php5.6-fpm start && \ + nginx -c /slim/deploy/nginx-fpm-5.conf -g "daemon off;" diff --git a/frameworks/PHP/slim/slim.dockerfile b/frameworks/PHP/slim/slim.dockerfile new file mode 100644 index 00000000000..f8ad67baad0 --- /dev/null +++ b/frameworks/PHP/slim/slim.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/php7:0.1 + +ADD ./ /slim +WORKDIR /slim + +RUN composer.phar install --no-progress + +RUN chmod -R 777 /slim + +CMD service php7.2-fpm start && \ + nginx -c /slim/deploy/nginx-fpm-7.conf -g "daemon off;" diff --git a/frameworks/PHP/symfony/.gitignore b/frameworks/PHP/symfony/.gitignore deleted file mode 100644 index d48b1859c3f..00000000000 --- a/frameworks/PHP/symfony/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -/var/cache -/var/logs -/var/sessions -!/bin -/vendors -/vendor -/build -/dist -.DS_Store -/tags -.idea -app/bootstrap.php.cache -/deploy/php-fpm.pid -/.buildpath - -###> symfony/framework-bundle ### -.env -.env.dist -/public/bundles/ -/var/ -/vendor/ -###< symfony/framework-bundle ### diff --git a/frameworks/PHP/symfony/benchmark_config.json b/frameworks/PHP/symfony/benchmark_config.json index 805d4d88968..ef28f6176ee 100644 --- a/frameworks/PHP/symfony/benchmark_config.json +++ b/frameworks/PHP/symfony/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "symfony", "tests": [{ "default": { - "setup_file": "setup", "plaintext_url": "/plaintext", "json_url": "/json", "db_url": "/db", @@ -26,7 +25,6 @@ "versus": "php-php5" }, "raw": { - "setup_file": "setup", "db_url": "/db-raw", "update_url": "/update-raw?queries=", "query_url": "/db-raw?queries=", diff --git a/frameworks/PHP/symfony/composer.lock b/frameworks/PHP/symfony/composer.lock deleted file mode 100644 index 77a2f6f3522..00000000000 --- a/frameworks/PHP/symfony/composer.lock +++ /dev/null @@ -1,2390 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "content-hash": "ee162fec5cbe81559ce2fde941dde6b5", - "packages": [ - { - "name": "doctrine/annotations", - "version": "v1.6.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", - "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "php": "^7.1" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "time": "2017-12-06T07:11:42+00:00" - }, - { - "name": "doctrine/cache", - "version": "v1.7.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "b3217d58609e9c8e661cd41357a54d926c4a2a1a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/b3217d58609e9c8e661cd41357a54d926c4a2a1a", - "reference": "b3217d58609e9c8e661cd41357a54d926c4a2a1a", - "shasum": "" - }, - "require": { - "php": "~7.1" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "require-dev": { - "alcaeus/mongo-php-adapter": "^1.1", - "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^5.7", - "predis/predis": "~1.0" - }, - "suggest": { - "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "cache", - "caching" - ], - "time": "2017-08-25T07:02:50+00:00" - }, - { - "name": "doctrine/collections", - "version": "v1.5.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/collections.git", - "reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/a01ee38fcd999f34d9bfbcee59dbda5105449cbf", - "reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "doctrine/coding-standard": "~0.1@dev", - "phpunit/phpunit": "^5.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Collections\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Collections Abstraction library", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "array", - "collections", - "iterator" - ], - "time": "2017-07-22T10:37:32+00:00" - }, - { - "name": "doctrine/common", - "version": "v2.8.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/common.git", - "reference": "f68c297ce6455e8fd794aa8ffaf9fa458f6ade66" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/f68c297ce6455e8fd794aa8ffaf9fa458f6ade66", - "reference": "f68c297ce6455e8fd794aa8ffaf9fa458f6ade66", - "shasum": "" - }, - "require": { - "doctrine/annotations": "1.*", - "doctrine/cache": "1.*", - "doctrine/collections": "1.*", - "doctrine/inflector": "1.*", - "doctrine/lexer": "1.*", - "php": "~7.1" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Common Library for Doctrine projects", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "collections", - "eventmanager", - "persistence", - "spl" - ], - "time": "2017-08-31T08:43:38+00:00" - }, - { - "name": "doctrine/dbal", - "version": "v2.6.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/dbal.git", - "reference": "e3eed9b1facbb0ced3a0995244843a189e7d1b13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/e3eed9b1facbb0ced3a0995244843a189e7d1b13", - "reference": "e3eed9b1facbb0ced3a0995244843a189e7d1b13", - "shasum": "" - }, - "require": { - "doctrine/common": "^2.7.1", - "ext-pdo": "*", - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^5.4.6", - "phpunit/phpunit-mock-objects": "!=3.2.4,!=3.2.5", - "symfony/console": "2.*||^3.0" - }, - "suggest": { - "symfony/console": "For helpful console commands such as SQL execution and import of files." - }, - "bin": [ - "bin/doctrine-dbal" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\DBAL\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - } - ], - "description": "Database Abstraction Layer", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "database", - "dbal", - "persistence", - "queryobject" - ], - "time": "2017-11-19T13:38:54+00:00" - }, - { - "name": "doctrine/doctrine-bundle", - "version": "1.8.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/DoctrineBundle.git", - "reference": "eb6e4fb904a459be28872765ab6e2d246aac7c87" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/eb6e4fb904a459be28872765ab6e2d246aac7c87", - "reference": "eb6e4fb904a459be28872765ab6e2d246aac7c87", - "shasum": "" - }, - "require": { - "doctrine/dbal": "^2.5.12", - "doctrine/doctrine-cache-bundle": "~1.2", - "jdorn/sql-formatter": "^1.2.16", - "php": "^5.5.9|^7.0", - "symfony/console": "~2.7|~3.0|~4.0", - "symfony/dependency-injection": "~2.7|~3.0|~4.0", - "symfony/doctrine-bridge": "~2.7|~3.0|~4.0", - "symfony/framework-bundle": "~2.7|~3.0|~4.0" - }, - "conflict": { - "symfony/http-foundation": "<2.6" - }, - "require-dev": { - "doctrine/orm": "~2.3", - "phpunit/phpunit": "^4.8.36|^5.7|^6.4", - "satooshi/php-coveralls": "^1.0", - "symfony/phpunit-bridge": "~2.7|~3.0|~4.0", - "symfony/property-info": "~2.8|~3.0|~4.0", - "symfony/validator": "~2.7|~3.0|~4.0", - "symfony/web-profiler-bundle": "~2.7|~3.0|~4.0", - "symfony/yaml": "~2.7|~3.0|~4.0", - "twig/twig": "~1.26|~2.0" - }, - "suggest": { - "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", - "symfony/web-profiler-bundle": "To use the data collector." - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "1.8.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Bundle\\DoctrineBundle\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Doctrine Project", - "homepage": "http://www.doctrine-project.org/" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony DoctrineBundle", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "database", - "dbal", - "orm", - "persistence" - ], - "time": "2017-11-24T13:09:19+00:00" - }, - { - "name": "doctrine/doctrine-cache-bundle", - "version": "1.3.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/DoctrineCacheBundle.git", - "reference": "9baecbd6bfdd1123b0cf8c1b88fee0170a84ddd1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineCacheBundle/zipball/9baecbd6bfdd1123b0cf8c1b88fee0170a84ddd1", - "reference": "9baecbd6bfdd1123b0cf8c1b88fee0170a84ddd1", - "shasum": "" - }, - "require": { - "doctrine/cache": "^1.4.2", - "doctrine/inflector": "~1.0", - "php": ">=5.3.2", - "symfony/doctrine-bridge": "~2.2|~3.0|~4.0" - }, - "require-dev": { - "instaclick/coding-standard": "~1.1", - "instaclick/object-calisthenics-sniffs": "dev-master", - "instaclick/symfony2-coding-standard": "dev-remaster", - "phpunit/phpunit": "~4", - "predis/predis": "~0.8", - "satooshi/php-coveralls": "^1.0", - "squizlabs/php_codesniffer": "~1.5", - "symfony/console": "~2.2|~3.0|~4.0", - "symfony/finder": "~2.2|~3.0|~4.0", - "symfony/framework-bundle": "~2.2|~3.0|~4.0", - "symfony/phpunit-bridge": "~2.7|~3.0|~4.0", - "symfony/security-acl": "~2.3|~3.0", - "symfony/validator": "~2.2|~3.0|~4.0", - "symfony/yaml": "~2.2|~3.0|~4.0" - }, - "suggest": { - "symfony/security-acl": "For using this bundle to cache ACLs" - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Bundle\\DoctrineCacheBundle\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Fabio B. Silva", - "email": "fabio.bat.silva@gmail.com" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@hotmail.com" - }, - { - "name": "Doctrine Project", - "homepage": "http://www.doctrine-project.org/" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Bundle for Doctrine Cache", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "cache", - "caching" - ], - "time": "2017-10-12T17:23:29+00:00" - }, - { - "name": "doctrine/inflector", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "5527a48b7313d15261292c149e55e26eae771b0a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", - "reference": "5527a48b7313d15261292c149e55e26eae771b0a", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^6.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "inflection", - "pluralize", - "singularize", - "string" - ], - "time": "2018-01-09T20:05:19+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "^6.2.3", - "squizlabs/php_codesniffer": "^3.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2017-07-22T11:58:36+00:00" - }, - { - "name": "doctrine/lexer", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ], - "time": "2014-09-09T13:34:57+00:00" - }, - { - "name": "doctrine/orm", - "version": "v2.6.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/doctrine2.git", - "reference": "87ee409783a4a322b5597ebaae558661404055a7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/87ee409783a4a322b5597ebaae558661404055a7", - "reference": "87ee409783a4a322b5597ebaae558661404055a7", - "shasum": "" - }, - "require": { - "doctrine/annotations": "~1.5", - "doctrine/cache": "~1.6", - "doctrine/collections": "^1.4", - "doctrine/common": "^2.7.1", - "doctrine/dbal": "^2.6", - "doctrine/instantiator": "~1.1", - "ext-pdo": "*", - "php": "^7.1", - "symfony/console": "~3.0|~4.0" - }, - "require-dev": { - "doctrine/coding-standard": "^1.0", - "phpunit/phpunit": "^6.5", - "squizlabs/php_codesniffer": "^3.2", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" - }, - "bin": [ - "bin/doctrine" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\ORM\\": "lib/Doctrine/ORM" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "Object-Relational-Mapper for PHP", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "database", - "orm" - ], - "time": "2018-02-27T07:30:56+00:00" - }, - { - "name": "jdorn/sql-formatter", - "version": "v1.2.17", - "source": { - "type": "git", - "url": "https://github.com/jdorn/sql-formatter.git", - "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jdorn/sql-formatter/zipball/64990d96e0959dff8e059dfcdc1af130728d92bc", - "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc", - "shasum": "" - }, - "require": { - "php": ">=5.2.4" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "lib" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jeremy Dorn", - "email": "jeremy@jeremydorn.com", - "homepage": "http://jeremydorn.com/" - } - ], - "description": "a PHP SQL highlighting library", - "homepage": "https://github.com/jdorn/sql-formatter/", - "keywords": [ - "highlight", - "sql" - ], - "time": "2014-01-12T16:20:24+00:00" - }, - { - "name": "psr/cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "time": "2016-08-06T20:24:11+00:00" - }, - { - "name": "psr/container", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "time": "2017-02-14T16:28:37+00:00" - }, - { - "name": "psr/log", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2016-10-10T12:19:37+00:00" - }, - { - "name": "psr/simple-cache", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/753fa598e8f3b9966c886fe13f370baa45ef0e24", - "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "time": "2017-01-02T13:31:39+00:00" - }, - { - "name": "symfony/cache", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache.git", - "reference": "e901ff335ef5e8ef57ee9b8e098bd54a1d39a857" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/e901ff335ef5e8ef57ee9b8e098bd54a1d39a857", - "reference": "e901ff335ef5e8ef57ee9b8e098bd54a1d39a857", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "psr/cache": "~1.0", - "psr/log": "~1.0", - "psr/simple-cache": "^1.0" - }, - "conflict": { - "symfony/var-dumper": "<3.4" - }, - "provide": { - "psr/cache-implementation": "1.0", - "psr/simple-cache-implementation": "1.0" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/cache": "~1.6", - "doctrine/dbal": "~2.4", - "predis/predis": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Cache\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Cache component with PSR-6, PSR-16, and tags", - "homepage": "https://symfony.com", - "keywords": [ - "caching", - "psr6" - ], - "time": "2018-01-18T22:19:33+00:00" - }, - { - "name": "symfony/config", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "ecd917899167922086ddb3247aa43eb1c418fcb2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/ecd917899167922086ddb3247aa43eb1c418fcb2", - "reference": "ecd917899167922086ddb3247aa43eb1c418fcb2", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/filesystem": "~3.4|~4.0" - }, - "conflict": { - "symfony/finder": "<3.4" - }, - "require-dev": { - "symfony/finder": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Config Component", - "homepage": "https://symfony.com", - "time": "2018-01-21T19:06:11+00:00" - }, - { - "name": "symfony/console", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "36d5b41e7d4e1ccf0370f6babe966c08ef0a1488" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/36d5b41e7d4e1ccf0370f6babe966c08ef0a1488", - "reference": "36d5b41e7d4e1ccf0370f6babe966c08ef0a1488", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/process": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2018-01-29T09:06:29+00:00" - }, - { - "name": "symfony/debug", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "c77bb31d0f6310a2ac11e657475d396a92e5dc54" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/c77bb31d0f6310a2ac11e657475d396a92e5dc54", - "reference": "c77bb31d0f6310a2ac11e657475d396a92e5dc54", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": "<3.4" - }, - "require-dev": { - "symfony/http-kernel": "~3.4|~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com", - "time": "2018-01-18T22:19:33+00:00" - }, - { - "name": "symfony/dependency-injection", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/dependency-injection.git", - "reference": "f78ca49c6360c710ca8e316511e71a23b10e3bf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f78ca49c6360c710ca8e316511e71a23b10e3bf2", - "reference": "f78ca49c6360c710ca8e316511e71a23b10e3bf2", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "psr/container": "^1.0" - }, - "conflict": { - "symfony/config": "<3.4", - "symfony/finder": "<3.4", - "symfony/proxy-manager-bridge": "<3.4", - "symfony/yaml": "<3.4" - }, - "provide": { - "psr/container-implementation": "1.0" - }, - "require-dev": { - "symfony/config": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "symfony/config": "", - "symfony/expression-language": "For using expressions in service container configuration", - "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", - "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\DependencyInjection\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony DependencyInjection Component", - "homepage": "https://symfony.com", - "time": "2018-01-29T09:29:16+00:00" - }, - { - "name": "symfony/doctrine-bridge", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/doctrine-bridge.git", - "reference": "85d54596a1fe1089536ce03979a1992bf71b7e04" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/85d54596a1fe1089536ce03979a1992bf71b7e04", - "reference": "85d54596a1fe1089536ce03979a1992bf71b7e04", - "shasum": "" - }, - "require": { - "doctrine/common": "~2.4", - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", - "symfony/dependency-injection": "<3.4" - }, - "require-dev": { - "doctrine/data-fixtures": "1.0.*", - "doctrine/dbal": "~2.4", - "doctrine/orm": "^2.4.5", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/form": "~3.4|~4.0", - "symfony/http-kernel": "~3.4|~4.0", - "symfony/property-access": "~3.4|~4.0", - "symfony/property-info": "~3.4|~4.0", - "symfony/proxy-manager-bridge": "~3.4|~4.0", - "symfony/security": "~3.4|~4.0", - "symfony/stopwatch": "~3.4|~4.0", - "symfony/translation": "~3.4|~4.0", - "symfony/validator": "~3.4|~4.0" - }, - "suggest": { - "doctrine/data-fixtures": "", - "doctrine/dbal": "", - "doctrine/orm": "", - "symfony/form": "", - "symfony/property-info": "", - "symfony/validator": "" - }, - "type": "symfony-bridge", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Bridge\\Doctrine\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Doctrine Bridge", - "homepage": "https://symfony.com", - "time": "2018-01-03T07:38:00+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "74d33aac36208c4d6757807d9f598f0133a3a4eb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/74d33aac36208c4d6757807d9f598f0133a3a4eb", - "reference": "74d33aac36208c4d6757807d9f598f0133a3a4eb", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "conflict": { - "symfony/dependency-injection": "<3.4" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/stopwatch": "~3.4|~4.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2018-01-03T07:38:00+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "760e47a4ee64b4c48f4b30017011e09d4c0f05ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/760e47a4ee64b4c48f4b30017011e09d4c0f05ed", - "reference": "760e47a4ee64b4c48f4b30017011e09d4c0f05ed", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2018-01-03T07:38:00+00:00" - }, - { - "name": "symfony/finder", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "8b08180f2b7ccb41062366b9ad91fbc4f1af8601" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/8b08180f2b7ccb41062366b9ad91fbc4f1af8601", - "reference": "8b08180f2b7ccb41062366b9ad91fbc4f1af8601", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com", - "time": "2018-01-03T07:38:00+00:00" - }, - { - "name": "symfony/flex", - "version": "v1.0.70", - "source": { - "type": "git", - "url": "https://github.com/symfony/flex.git", - "reference": "1f00c05d35523dc0ac52e4a457989a069be5a7a4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/flex/zipball/1f00c05d35523dc0ac52e4a457989a069be5a7a4", - "reference": "1f00c05d35523dc0ac52e4a457989a069be5a7a4", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0", - "php": "^7.0" - }, - "require-dev": { - "composer/composer": "^1.0.2", - "symfony/phpunit-bridge": "^3.2.8" - }, - "type": "composer-plugin", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, - "class": "Symfony\\Flex\\Flex" - }, - "autoload": { - "psr-4": { - "Symfony\\Flex\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien.potencier@gmail.com" - } - ], - "time": "2018-02-22T07:00:47+00:00" - }, - { - "name": "symfony/framework-bundle", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/framework-bundle.git", - "reference": "3766b9b88e9918f68560b58a404340b41112b861" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/3766b9b88e9918f68560b58a404340b41112b861", - "reference": "3766b9b88e9918f68560b58a404340b41112b861", - "shasum": "" - }, - "require": { - "ext-xml": "*", - "php": "^7.1.3", - "symfony/cache": "~3.4|~4.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "^3.4.3|^4.0.3", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/filesystem": "~3.4|~4.0", - "symfony/finder": "~3.4|~4.0", - "symfony/http-foundation": "~3.4|~4.0", - "symfony/http-kernel": "~3.4|~4.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/routing": "~3.4|~4.0" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "<3.0", - "phpdocumentor/type-resolver": "<0.2.1", - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", - "symfony/asset": "<3.4", - "symfony/console": "<3.4", - "symfony/form": "<3.4", - "symfony/property-info": "<3.4", - "symfony/serializer": "<3.4", - "symfony/stopwatch": "<3.4", - "symfony/translation": "<3.4", - "symfony/validator": "<3.4", - "symfony/workflow": "<3.4" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "doctrine/cache": "~1.0", - "fig/link-util": "^1.0", - "phpdocumentor/reflection-docblock": "^3.0|^4.0", - "symfony/asset": "~3.4|~4.0", - "symfony/browser-kit": "~3.4|~4.0", - "symfony/console": "~3.4|~4.0", - "symfony/css-selector": "~3.4|~4.0", - "symfony/dom-crawler": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/form": "~3.4|~4.0", - "symfony/lock": "~3.4|~4.0", - "symfony/polyfill-intl-icu": "~1.0", - "symfony/process": "~3.4|~4.0", - "symfony/property-info": "~3.4|~4.0", - "symfony/security": "~3.4|~4.0", - "symfony/security-core": "~3.4|~4.0", - "symfony/security-csrf": "~3.4|~4.0", - "symfony/serializer": "~3.4|~4.0", - "symfony/stopwatch": "~3.4|~4.0", - "symfony/templating": "~3.4|~4.0", - "symfony/translation": "~3.4|~4.0", - "symfony/validator": "~3.4|~4.0", - "symfony/var-dumper": "~3.4|~4.0", - "symfony/web-link": "~3.4|~4.0", - "symfony/workflow": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0", - "twig/twig": "~1.34|~2.4" - }, - "suggest": { - "ext-apcu": "For best performance of the system caches", - "symfony/console": "For using the console commands", - "symfony/form": "For using forms", - "symfony/property-info": "For using the property_info service", - "symfony/serializer": "For using the serializer service", - "symfony/validator": "For using validation", - "symfony/web-link": "For using web links, features such as preloading, prefetching or prerendering", - "symfony/yaml": "For using the debug:config and lint:yaml commands" - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Bundle\\FrameworkBundle\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony FrameworkBundle", - "homepage": "https://symfony.com", - "time": "2018-01-29T09:06:29+00:00" - }, - { - "name": "symfony/http-foundation", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "82a3ee2c6662d08ca1adf99e1ef2e31ab48196d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/82a3ee2c6662d08ca1adf99e1ef2e31ab48196d4", - "reference": "82a3ee2c6662d08ca1adf99e1ef2e31ab48196d4", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.1" - }, - "require-dev": { - "symfony/expression-language": "~3.4|~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpFoundation Component", - "homepage": "https://symfony.com", - "time": "2018-01-29T09:06:29+00:00" - }, - { - "name": "symfony/http-kernel", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "194bd224ec27952eac6d4fea6264b22990834eca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/194bd224ec27952eac6d4fea6264b22990834eca", - "reference": "194bd224ec27952eac6d4fea6264b22990834eca", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "psr/log": "~1.0", - "symfony/debug": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/http-foundation": "~3.4.4|~4.0.4" - }, - "conflict": { - "symfony/config": "<3.4", - "symfony/dependency-injection": "<3.4", - "symfony/var-dumper": "<3.4", - "twig/twig": "<1.34|<2.4,>=2" - }, - "provide": { - "psr/log-implementation": "1.0" - }, - "require-dev": { - "psr/cache": "~1.0", - "symfony/browser-kit": "~3.4|~4.0", - "symfony/config": "~3.4|~4.0", - "symfony/console": "~3.4|~4.0", - "symfony/css-selector": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/dom-crawler": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/finder": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0", - "symfony/routing": "~3.4|~4.0", - "symfony/stopwatch": "~3.4|~4.0", - "symfony/templating": "~3.4|~4.0", - "symfony/translation": "~3.4|~4.0", - "symfony/var-dumper": "~3.4|~4.0" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/var-dumper": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpKernel\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpKernel Component", - "homepage": "https://symfony.com", - "time": "2018-01-29T13:27:08+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2018-01-30T19:27:44+00:00" - }, - { - "name": "symfony/routing", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/routing.git", - "reference": "a69bd948700b672e036147762f46749bcae33796" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/a69bd948700b672e036147762f46749bcae33796", - "reference": "a69bd948700b672e036147762f46749bcae33796", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "conflict": { - "symfony/config": "<3.4", - "symfony/dependency-injection": "<3.4", - "symfony/yaml": "<3.4" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "doctrine/common": "~2.2", - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/http-foundation": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "doctrine/annotations": "For using the annotation loader", - "symfony/config": "For using the all-in-one router or any loader", - "symfony/dependency-injection": "For loading routes from a service", - "symfony/expression-language": "For using expression matching", - "symfony/http-foundation": "For using a Symfony Request object", - "symfony/yaml": "For using the YAML loader" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Routing\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Routing Component", - "homepage": "https://symfony.com", - "keywords": [ - "router", - "routing", - "uri", - "url" - ], - "time": "2018-01-16T18:04:12+00:00" - }, - { - "name": "symfony/twig-bridge", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/twig-bridge.git", - "reference": "81260f5539bdd7a4b5c39c55e197dae6daecc33f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/81260f5539bdd7a4b5c39c55e197dae6daecc33f", - "reference": "81260f5539bdd7a4b5c39c55e197dae6daecc33f", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "twig/twig": "^1.35|^2.4.4" - }, - "conflict": { - "symfony/console": "<3.4", - "symfony/form": "<3.4" - }, - "require-dev": { - "symfony/asset": "~3.4|~4.0", - "symfony/console": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/finder": "~3.4|~4.0", - "symfony/form": "~3.4|~4.0", - "symfony/http-foundation": "~3.4|~4.0", - "symfony/http-kernel": "~3.4|~4.0", - "symfony/polyfill-intl-icu": "~1.0", - "symfony/routing": "~3.4|~4.0", - "symfony/security": "~3.4|~4.0", - "symfony/security-acl": "~2.8|~3.0", - "symfony/stopwatch": "~3.4|~4.0", - "symfony/templating": "~3.4|~4.0", - "symfony/translation": "~3.4|~4.0", - "symfony/var-dumper": "~3.4|~4.0", - "symfony/web-link": "~3.4|~4.0", - "symfony/workflow": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "symfony/asset": "For using the AssetExtension", - "symfony/expression-language": "For using the ExpressionExtension", - "symfony/finder": "", - "symfony/form": "For using the FormExtension", - "symfony/http-kernel": "For using the HttpKernelExtension", - "symfony/routing": "For using the RoutingExtension", - "symfony/security": "For using the SecurityExtension", - "symfony/stopwatch": "For using the StopwatchExtension", - "symfony/templating": "For using the TwigEngine", - "symfony/translation": "For using the TranslationExtension", - "symfony/var-dumper": "For using the DumpExtension", - "symfony/web-link": "For using the WebLinkExtension", - "symfony/yaml": "For using the YamlExtension" - }, - "type": "symfony-bridge", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Bridge\\Twig\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Twig Bridge", - "homepage": "https://symfony.com", - "time": "2018-01-18T22:19:33+00:00" - }, - { - "name": "symfony/twig-bundle", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/twig-bundle.git", - "reference": "854b3ae1e761cf9443241119675c64e263ff21a7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bundle/zipball/854b3ae1e761cf9443241119675c64e263ff21a7", - "reference": "854b3ae1e761cf9443241119675c64e263ff21a7", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/config": "~3.4|~4.0", - "symfony/http-foundation": "~3.4|~4.0", - "symfony/http-kernel": "~3.4|~4.0", - "symfony/twig-bridge": "^3.4.3|^4.0.3", - "twig/twig": "~1.34|~2.4" - }, - "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<3.4" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "doctrine/cache": "~1.0", - "symfony/asset": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/finder": "~3.4|~4.0", - "symfony/form": "~3.4|~4.0", - "symfony/framework-bundle": "~3.4|~4.0", - "symfony/routing": "~3.4|~4.0", - "symfony/stopwatch": "~3.4|~4.0", - "symfony/templating": "~3.4|~4.0", - "symfony/web-link": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Bundle\\TwigBundle\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony TwigBundle", - "homepage": "https://symfony.com", - "time": "2018-01-29T09:06:29+00:00" - }, - { - "name": "symfony/yaml", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "ffc60bda1d4a00ec0b32eeabf39dc017bf480028" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ffc60bda1d4a00ec0b32eeabf39dc017bf480028", - "reference": "ffc60bda1d4a00ec0b32eeabf39dc017bf480028", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "conflict": { - "symfony/console": "<3.4" - }, - "require-dev": { - "symfony/console": "~3.4|~4.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2018-01-21T19:06:11+00:00" - }, - { - "name": "twig/twig", - "version": "v2.4.4", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "eddb97148ad779f27e670e1e3f19fb323aedafeb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/eddb97148ad779f27e670e1e3f19fb323aedafeb", - "reference": "eddb97148ad779f27e670e1e3f19fb323aedafeb", - "shasum": "" - }, - "require": { - "php": "^7.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "require-dev": { - "psr/container": "^1.0", - "symfony/debug": "~2.7", - "symfony/phpunit-bridge": "~3.3@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Twig_": "lib/" - }, - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - }, - { - "name": "Twig Team", - "homepage": "http://twig.sensiolabs.org/contributors", - "role": "Contributors" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", - "keywords": [ - "templating" - ], - "time": "2017-09-27T18:10:31+00:00" - } - ], - "packages-dev": [ - { - "name": "symfony/dotenv", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/dotenv.git", - "reference": "afb6923923e22874dac20bd042167ccb8df1d158" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dotenv/zipball/afb6923923e22874dac20bd042167ccb8df1d158", - "reference": "afb6923923e22874dac20bd042167ccb8df1d158", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "require-dev": { - "symfony/process": "~3.4|~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Dotenv\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Registers environment variables from a .env file", - "homepage": "https://symfony.com", - "keywords": [ - "dotenv", - "env", - "environment" - ], - "time": "2018-01-03T17:15:19+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "^7.1.3" - }, - "platform-dev": [] -} diff --git a/frameworks/PHP/symfony/config/packages/dev/routing.yaml b/frameworks/PHP/symfony/config/packages/dev/routing.yaml deleted file mode 100644 index 4116679a2e0..00000000000 --- a/frameworks/PHP/symfony/config/packages/dev/routing.yaml +++ /dev/null @@ -1,3 +0,0 @@ -framework: - router: - strict_requirements: true diff --git a/frameworks/PHP/symfony/config/packages/doctrine.yaml b/frameworks/PHP/symfony/config/packages/doctrine.yaml index 281ad5d5e67..56d9fac4557 100644 --- a/frameworks/PHP/symfony/config/packages/doctrine.yaml +++ b/frameworks/PHP/symfony/config/packages/doctrine.yaml @@ -13,7 +13,7 @@ doctrine: charset: utf8mb4 # With Symfony 3.3, remove the `resolve:` prefix - url: '%env(resolve:DATABASE_URL)%' + url: 'mysql://benchmarkdbuser:benchmarkdbpass@tfb-database:3306/hello_world' orm: auto_generate_proxy_classes: '%kernel.debug%' #naming_strategy: doctrine.orm.naming_strategy.underscore diff --git a/frameworks/PHP/symfony/config/packages/test/framework.yaml b/frameworks/PHP/symfony/config/packages/test/framework.yaml deleted file mode 100644 index 9c5dc40917f..00000000000 --- a/frameworks/PHP/symfony/config/packages/test/framework.yaml +++ /dev/null @@ -1,4 +0,0 @@ -framework: - test: ~ - #session: - # storage_id: session.storage.mock_file diff --git a/frameworks/PHP/symfony/deploy/nginx.conf b/frameworks/PHP/symfony/deploy/nginx.conf index b41447ed3fb..440af176565 100644 --- a/frameworks/PHP/symfony/deploy/nginx.conf +++ b/frameworks/PHP/symfony/deploy/nginx.conf @@ -1,15 +1,15 @@ +user root; worker_processes auto; events { worker_connections 16384; - multi_accept on; - use epoll; + multi_accept on; + use epoll; } http { - include /home/vagrant/FrameworkBenchmarks/installs/nginx/conf/mime.types; - default_type application/octet-stream; - + include /nginx/conf/mime.types; + default_type application/octet-stream; access_log off; server_tokens off; @@ -21,7 +21,7 @@ http { open_file_cache max=2000 inactive=20s; open_file_cache_valid 60s; open_file_cache_min_uses 5; - open_file_cache_errors off; + open_file_cache_errors off; #FastCGI optimizations fastcgi_buffers 256 16k; @@ -34,8 +34,9 @@ http { reset_timedout_connection on; server_names_hash_bucket_size 100; + upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/var/run/php/php7.2-fpm.sock; keepalive 50; } @@ -43,24 +44,20 @@ http { listen 8080; server_name localhost; - root /home/vagrant/FrameworkBenchmarks/frameworks/PHP/php-symfony/public/; + root /symfony/public/; index index.php; location / { try_files $uri $uri/ /index.php?$uri&$args; } - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # location ~ \.php$ { try_files $uri =404; fastcgi_pass fastcgi_backend; fastcgi_keep_conn on; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_param APP_ENV "prod"; - fastcgi_param DATABASE_URL "mysql://benchmarkdbuser:benchmarkdbpass@db_host/hello_world"; - include /home/vagrant/FrameworkBenchmarks/installs/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } } } diff --git a/frameworks/PHP/symfony/deploy/php-symfony b/frameworks/PHP/symfony/deploy/php-symfony index 3148d767132..3ee63649b52 100644 --- a/frameworks/PHP/symfony/deploy/php-symfony +++ b/frameworks/PHP/symfony/deploy/php-symfony @@ -3,8 +3,8 @@ SetEnv APP_ENV "prod" SetEnv DATABASE_URL "mysql://benchmarkdbuser:benchmarkdbpass@tfbdata:3306/hello_world" - Alias /php-symfony/ "/home/ubuntu/FrameworkBenchmarks/php-symfony/public/" - + Alias /php-symfony/ "/symfony/public/" + Options Indexes FollowSymLinks MultiViews #AllowOverride None Order allow,deny diff --git a/frameworks/PHP/symfony/public/favicon.ico b/frameworks/PHP/symfony/public/favicon.ico deleted file mode 100644 index 864803618e0..00000000000 Binary files a/frameworks/PHP/symfony/public/favicon.ico and /dev/null differ diff --git a/frameworks/PHP/symfony/setup.sh b/frameworks/PHP/symfony/setup.sh deleted file mode 100644 index fbe6c272878..00000000000 --- a/frameworks/PHP/symfony/setup.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer - -sed -i 's|db_host|'"${DBHOST}"'|g' deploy/nginx.conf -sed -i 's|root .*/FrameworkBenchmarks/frameworks/PHP/php-symfony|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/home/vagrant/FrameworkBenchmarks/installs/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -export APP_ENV=prod -php bin/console cache:clear --env=prod --no-debug --no-warmup -php bin/console cache:warmup --env=prod --no-debug - -php-fpm --fpm-config ${FWROOT}/toolset/setup/linux/languages/php/php-fpm.conf -g ${TROOT}/deploy/php-fpm.pid -nginx -c ${TROOT}/deploy/nginx.conf diff --git a/frameworks/PHP/symfony/symfony-base.dockerfile b/frameworks/PHP/symfony/symfony-base.dockerfile new file mode 100644 index 00000000000..0e9e083058a --- /dev/null +++ b/frameworks/PHP/symfony/symfony-base.dockerfile @@ -0,0 +1,17 @@ +FROM techempower/php7:0.1 + +ADD ./ /symfony +WORKDIR /symfony + +ENV APP_ENV=prod + +RUN composer.phar install --no-progress + +RUN php bin/console cache:clear --env=prod --no-debug --no-warmup +RUN php bin/console cache:warmup --env=prod --no-debug + +RUN mkdir -p /symfony/var/cache/dev +RUN chmod 777 -R /symfony/var/cache/dev + +RUN mkdir -p /symfony/var/log +RUN chmod 777 -R /symfony/var/log diff --git a/frameworks/PHP/symfony/symfony-raw.dockerfile b/frameworks/PHP/symfony/symfony-raw.dockerfile new file mode 100644 index 00000000000..e545e7f5984 --- /dev/null +++ b/frameworks/PHP/symfony/symfony-raw.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/symfony-base:0.1 + +CMD service php7.2-fpm start && \ + nginx -c /symfony/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/symfony/symfony.dockerfile b/frameworks/PHP/symfony/symfony.dockerfile new file mode 100644 index 00000000000..e545e7f5984 --- /dev/null +++ b/frameworks/PHP/symfony/symfony.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/symfony-base:0.1 + +CMD service php7.2-fpm start && \ + nginx -c /symfony/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/workerman/.gitignore b/frameworks/PHP/workerman/.gitignore deleted file mode 100644 index e807858241e..00000000000 --- a/frameworks/PHP/workerman/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/vendor -/composer.phar \ No newline at end of file diff --git a/frameworks/PHP/workerman/benchmark_config.json b/frameworks/PHP/workerman/benchmark_config.json index 351d0ef9eab..4241f6c31e0 100644 --- a/frameworks/PHP/workerman/benchmark_config.json +++ b/frameworks/PHP/workerman/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "workerman", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json.php", "plaintext_url": "/plaintext.php", "db_url": "/dbraw.php", diff --git a/frameworks/PHP/workerman/server.php b/frameworks/PHP/workerman/server.php index 5226bd08d60..89bc7b42cc1 100644 --- a/frameworks/PHP/workerman/server.php +++ b/frameworks/PHP/workerman/server.php @@ -15,7 +15,7 @@ function get_processor_cores_number() { $http_worker->count = get_processor_cores_number() * 2 || 8; $http_worker->onMessage = function($connection, $data) { - $pdo = new PDO('mysql:host=TFB-database;dbname=hello_world;charset=utf8', + $pdo = new PDO('mysql:host=tfb-database;dbname=hello_world;charset=utf8', 'benchmarkdbuser', 'benchmarkdbpass', array( PDO::ATTR_PERSISTENT => true )); diff --git a/frameworks/PHP/workerman/setup.sh b/frameworks/PHP/workerman/setup.sh deleted file mode 100644 index 7edfc5d43af..00000000000 --- a/frameworks/PHP/workerman/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql -sudo add-apt-repository -y ppa:ondrej/php -sudo apt-get update -sudo apt-get -y --force-yes install php-cli php-mysql libpcre3 -sudo add-apt-repository -y --remove ppa:ondrej/php -php -r 'file_put_contents("composer.phar", file_get_contents("https://getcomposer.org/composer.phar"));' -php composer.phar update -php $TROOT/server.php start -d diff --git a/frameworks/PHP/workerman/workerman.dockerfile b/frameworks/PHP/workerman/workerman.dockerfile new file mode 100644 index 00000000000..b72106554bc --- /dev/null +++ b/frameworks/PHP/workerman/workerman.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/php7:0.1 + +ADD ./ /workerman +WORKDIR /workerman + +RUN composer.phar install --no-progress + +CMD php /workerman/server.php start diff --git a/frameworks/PHP/yaf/.gitignore b/frameworks/PHP/yaf/.gitignore deleted file mode 100644 index d9cd41f98f0..00000000000 --- a/frameworks/PHP/yaf/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/deploy/php-fpm.pid diff --git a/frameworks/PHP/yaf/README.md b/frameworks/PHP/yaf/README.md deleted file mode 100644 index c5b9b26fe23..00000000000 --- a/frameworks/PHP/yaf/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# YAF PHP Benchmarking Test - -This is the YAF PHP portion of a [benchmarking test suite](../) comparing a variety of web development platforms. - -### JSON Encoding Test -Use the PHP standard [JSON encoder](http://www.php.net/manual/en/function.json-encode.php) - -* [Test RawController::jsonAction()](app/modules/Bench/controllers/Raw.php) - -### Data-Store/Database Mapping Test - -* [Test RawController::dbAction()](app/modules/Bench/controllers/Raw.php) - -### Template (Fortunes) Test - -* [Test RawController::fortunesAction()](app/modules/Bench/controllers/Raw.php) - -## Infrastructure Software Versions - -The tests were run with: - -* [YAF 2.2.9](http://www.yafdev.com/) -* [PHP Version 5.4.14](http://www.php.net/) with FPM, APC and YAF extension -* [nginx 1.2.8](http://nginx.org/) -* [MySQL 5.5.31](https://dev.mysql.com/) - -## Test URLs -### JSON Encoding Test - -http://localhost:8080/bench/raw/json - -### Data-Store/Database Mapping Test - -http://localhost:8080/bench/raw/db - -### Variable Query Test - -http://localhost:8080/bench/raw/db?queries=5 - -### Fortunes (Template) Test - -http://localhost:8080/bench/raw/fortunes \ No newline at end of file diff --git a/frameworks/PHP/yaf/app/conf/application.ini b/frameworks/PHP/yaf/app/conf/application.ini deleted file mode 100644 index 068fcfe2f17..00000000000 --- a/frameworks/PHP/yaf/app/conf/application.ini +++ /dev/null @@ -1,22 +0,0 @@ -[common] -application.directory = APP_PATH "/app" -application.modules = "Index,Bench" -application.library = APP_PATH "/library" -application.library.directory = APP_PATH "/library" -application.view.ext = phtml - -db.connections.default.dsn = "mysql:host=TFB-database;port=3306;dbname=hello_world;charset=utf8" -db.connections.default.user = benchmarkdbuser -db.connections.default.pass = benchmarkdbpass -db.connections.default.params.ATTR_ERRMODE = 2 ; PDO::ERRMODE_EXCEPTION -db.connections.default.params.ATTR_PERSISTENT = TRUE - -[dev:common] -application.dispatcher.throwException=1 -application.dispatcher.catchException=1 -application.debug = TRUE - -[product:common] -application.dispatcher.throwException=0 -application.dispatcher.catchException=0 -application.debug = FALSE diff --git a/frameworks/PHP/yaf/app/controllers/Index.php b/frameworks/PHP/yaf/app/controllers/Index.php deleted file mode 100644 index f857a2b6fa8..00000000000 --- a/frameworks/PHP/yaf/app/controllers/Index.php +++ /dev/null @@ -1,13 +0,0 @@ - 'Hello, World!'))); - } - - public function dbAction () - { - $dbh = DatabaseManager::getInstance()->getConnection(); - - $query_count = (int) $this->getRequest()->get('queries', 1); - - if (0 >= $query_count) { - $query_count = 1; - } elseif (500 < $query_count) { - $query_count = 500; - } - - $arr = array(); - $id = mt_rand(1, 10000); - - $statement = $dbh->prepare('SELECT `randomNumber` FROM `World` WHERE `id` = :id'); - $statement->bindParam(':id', $id, \PDO::PARAM_INT); - - while (0 < $query_count--) { - $statement->execute(); - $arr[] = array('id' => $id, 'randomNumber' => $statement->fetchColumn()); - $id = mt_rand(1, 10000); - } - - if (count($arr) == 1) { - $arr = $arr[0]; - } - - header('Content-type: application/json'); - die(json_encode($arr)); - } - - public function updatesAction () - { - $dbh = DatabaseManager::getInstance()->getConnection(); - - $query_count = (int) $this->getRequest()->get('queries', 1); - - if (0 >= $query_count) { - $query_count = 1; - } elseif (500 < $query_count) { - $query_count = 500; - } - - $arr = array(); - $id = mt_rand(1, 10000); - $random_number = mt_rand(1, 10000); - - $statement = $dbh->prepare('UPDATE `World` SET `randomNumber` = :random_number WHERE `id` = :id'); - $statement->bindParam(':id', $id, \PDO::PARAM_INT); - $statement->bindParam(':random_number', $random_number, \PDO::PARAM_INT); - - while (0 < $query_count--) { - $statement->execute(); - $arr[] = array('id' => $id, 'randomNumber' => $random_number); - $random_number = mt_rand(1, 10000); - $id = mt_rand(1, 10000); - } - - header('Content-type: application/json'); - die(json_encode($arr)); - } - - public function fortunesAction () - { - $view = $this->getView(); - - $dbh = DatabaseManager::getInstance()->getConnection(); - - $statement = $dbh->query('SELECT `id`, `message` FROM `Fortune`'); - - $arr = $statement->fetchAll(\PDO::FETCH_KEY_PAIR); - $arr[0] = 'Additional fortune added at request time.'; - - asort($arr); - $view->rows = $arr; - - header('Content-Type: text/html; charset=utf-8'); - } - -} diff --git a/frameworks/PHP/yaf/app/modules/Bench/views/raw/fortunes.phtml b/frameworks/PHP/yaf/app/modules/Bench/views/raw/fortunes.phtml deleted file mode 100644 index e089fe7e7e3..00000000000 --- a/frameworks/PHP/yaf/app/modules/Bench/views/raw/fortunes.phtml +++ /dev/null @@ -1,14 +0,0 @@ -Fortunes - - - - - - $fortune) { ?> - - - - - -
idmessage
- diff --git a/frameworks/PHP/yaf/app/views/index/index.phtml b/frameworks/PHP/yaf/app/views/index/index.phtml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/PHP/yaf/benchmark_config.json b/frameworks/PHP/yaf/benchmark_config.json deleted file mode 100644 index 6a9bfc5e125..00000000000 --- a/frameworks/PHP/yaf/benchmark_config.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "framework": "yaf", - "tests": [{ - "default": { - "setup_file": "setup", - "plaintext_url": "/bench/raw/plaintext", - "json_url": "/bench/raw/json", - "db_url": "/bench/raw/db", - "update_url": "/bench/raw/updates?queries=", - "query_url": "/bench/raw/db?queries=", - "fortune_url": "/bench/raw/fortunes", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "MySQL", - "framework": "yaf", - "language": "PHP", - "flavor": "PHP5", - "orm": "Raw", - "platform": "None", - "webserver": "nginx", - "os": "Linux", - "database_os": "Linux", - "display_name": "yaf", - "notes": "", - "versus": "php-php5" - } - }] -} diff --git a/frameworks/PHP/yaf/deploy/nginx.conf b/frameworks/PHP/yaf/deploy/nginx.conf deleted file mode 100644 index 26e1593fdc0..00000000000 --- a/frameworks/PHP/yaf/deploy/nginx.conf +++ /dev/null @@ -1,46 +0,0 @@ -worker_processes auto; -error_log stderr error; - -events { - worker_connections 16384; -} - -http { - include /usr/local/nginx/conf/mime.types; - default_type application/octet-stream; - sendfile on; - keepalive_timeout 65; - access_log off; - server_tokens off; - - upstream fastcgi_backend { - server 127.0.0.1:9001; - keepalive 50; - } - - server { - listen 8080; - server_name localhost; - - root /home/ubuntu/FrameworkBenchmarks/php-yaf/public/; - index index.php; - - location / { - try_files $uri /index.php?$args; - - if (-f $request_filename) { - expires max; - break; - } - } - - location ~ \.php$ { - try_files $uri =404; - fastcgi_pass fastcgi_backend; - fastcgi_keep_conn on; - fastcgi_index index.php; - include /usr/local/nginx/conf/fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - } - } -} \ No newline at end of file diff --git a/frameworks/PHP/yaf/library/DatabaseManager.php b/frameworks/PHP/yaf/library/DatabaseManager.php deleted file mode 100644 index 65f6fcdfea5..00000000000 --- a/frameworks/PHP/yaf/library/DatabaseManager.php +++ /dev/null @@ -1,165 +0,0 @@ - - */ -class DatabaseManager -{ - - /** - * @var DatabaseManager - */ - protected static $instance = null; - - /** - * Initialized database connections - * - * @var array - */ - protected $connections = array(); - - /** - * All database connection parameters - * - * @var array - */ - protected $definedConnections = array(); - - private function __construct (array $definedConnections) - { - $this->definedConnections = $definedConnections; - } - - /** - * @param array $definedConnections - * @return DatabaseManager - */ - public static function getInstance () - { - if ( ! isset(self::$instance)) { - $definedConnections = Yaf\Application::app()->getConfig()->get('db.connections')->toArray(); - self::$instance = new self($definedConnections); - register_shutdown_function(array(self::$instance, 'resetInstance')); - } - - return self::$instance; - } - - /** - * Initialises database connection by given connection name - * - * @param string $connectionName - * @return \PDO - */ - public function getConnection ($connectionName = 'default') - { - if ( ! isset($this->connections[$connectionName])) { - $this->connections[$connectionName] = $this->createPdoInstance($connectionName); - } - - return $this->connections[$connectionName]; - } - - /** - * Initialize connection defined in application.ini under db.connection area - * - * @param string $connectionName - * @return \PDO - */ - protected function createPdoInstance ($connectionName) - { - $options = $this->getConnectionOptions($connectionName); - - $params = array(); - - if (isset($options['params']) && is_array($options['params'])) { - foreach ($options['params'] as $key => $val) { - $attributeName = '\\PDO::' . $key; - - if ( ! defined($attributeName)) { - throw new Exception(sprintf('Unknown PDO attribute "%s"', $attributeName)); - } - - $params[constant($attributeName)] = $val; - } - } - - return new PDO($options['dsn'], $options['user'], $options['pass'], $params); - } - - /** - * @param string $connectionName - * @throws Exception - * @return array - */ - protected function getConnectionOptions ($connectionName) - { - if ( ! $this->hasConnectionOptions($connectionName)) { - throw new Exception(sprintf('Unknown connection alias "%s"', $connectionName)); - } - - return $this->definedConnections[$connectionName]; - } - - /** - * Check whether connection is defined within configuration file - * - * @param string $connectionName - * @return boolean - */ - protected function hasConnectionOptions ($connectionName) - { - return isset($this->definedConnections[$connectionName]); - } - - public function closeConnections () - { - foreach (array_keys($this->connections) as $connectionName) { - $this->closeConnection($connectionName); - } - } - - public function closeConnection ($connectionName = 'default') - { - if ( ! isset($this->connections[$connectionName])) { - return false; - } - - unset($this->connections[$connectionName]); - - return true; - } - - /** - * Reset the internal static instance - * - * @return void - */ - public static function resetInstance () - { - if ( ! self::$instance) { - return; - } - - self::$instance->reset(); - self::$instance = null; - } - - /** - * Reset this instance of the manager - * - * @return void - */ - public function reset () - { - $this->closeConnections(); - - $this->definedConnections = array(); - } - -} - diff --git a/frameworks/PHP/yaf/public/favicon.ico b/frameworks/PHP/yaf/public/favicon.ico deleted file mode 100644 index d352e461590..00000000000 Binary files a/frameworks/PHP/yaf/public/favicon.ico and /dev/null differ diff --git a/frameworks/PHP/yaf/public/index.php b/frameworks/PHP/yaf/public/index.php deleted file mode 100644 index f45ceec0f90..00000000000 --- a/frameworks/PHP/yaf/public/index.php +++ /dev/null @@ -1,5 +0,0 @@ -run(); diff --git a/frameworks/PHP/yaf/setup.sh b/frameworks/PHP/yaf/setup.sh deleted file mode 100644 index b9ee6de4d42..00000000000 --- a/frameworks/PHP/yaf/setup.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends mysql php5 yaf nginx - -sed -i 's|root .*/FrameworkBenchmarks/php-yaf|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/yaf/source_code b/frameworks/PHP/yaf/source_code deleted file mode 100644 index f9cf5c09f63..00000000000 --- a/frameworks/PHP/yaf/source_code +++ /dev/null @@ -1,15 +0,0 @@ -./php-yaf/app/controllers/ -./php-yaf/app/controllers/Index.php -./php-yaf/app/modules/ -./php-yaf/app/modules/Bench -./php-yaf/app/modules/Bench/controllers -./php-yaf/app/modules/Bench/controllers/Raw.php -./php-yaf/app/modules/Bench/views -./php-yaf/app/modules/Bench/views/raw -./php-yaf/app/modules/Bench/views/raw/fortunes.phtml -./php-yaf/app/views/ -./php-yaf/app/views/index/ -./php-yaf/app/views/index/index.phtml -./php-yaf/public/ -./php-yaf/public/index.php -./php-yaf/public/favicon.ico diff --git a/frameworks/PHP/yii2/.gitignore b/frameworks/PHP/yii2/.gitignore deleted file mode 100644 index 556ef9f3f7a..00000000000 --- a/frameworks/PHP/yii2/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -vendor -deploy/php-fpm.pid diff --git a/frameworks/PHP/yii2/app/index.php b/frameworks/PHP/yii2/app/index.php index 42e25b41d7c..04bff1a861f 100755 --- a/frameworks/PHP/yii2/app/index.php +++ b/frameworks/PHP/yii2/app/index.php @@ -14,7 +14,7 @@ 'components' => [ 'db' => [ 'class' => 'yii\db\Connection', - 'dsn' => 'mysql:host=TFB-database;dbname=hello_world', + 'dsn' => 'mysql:host=tfb-database;dbname=hello_world', 'username' => 'benchmarkdbuser', 'password' => 'benchmarkdbpass', 'charset' => 'utf8', diff --git a/frameworks/PHP/yii2/benchmark_config.json b/frameworks/PHP/yii2/benchmark_config.json index fb654e6005e..924b869cc56 100644 --- a/frameworks/PHP/yii2/benchmark_config.json +++ b/frameworks/PHP/yii2/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "yii2", "tests": [{ "default": { - "setup_file": "setup", "plaintext_url": "/site/plaintext", "json_url": "/site/json", "db_url": "/site/db", @@ -26,7 +25,6 @@ "versus": "php7" }, "hhvm": { - "setup_file": "setup_hhvm", "plaintext_url": "/site/plaintext", "json_url": "/site/json", "db_url": "/site/db", diff --git a/frameworks/PHP/yii2/deploy/config.hdf b/frameworks/PHP/yii2/deploy/config.hdf index 5990172478e..a51e725d827 100755 --- a/frameworks/PHP/yii2/deploy/config.hdf +++ b/frameworks/PHP/yii2/deploy/config.hdf @@ -1,16 +1,17 @@ # main configuration file # Application PID File -PidFile = __TROOT__/hhvm.pid +PidFile = /yii2/hhvm.pid # Server settings Server { - Port = 9001 + FileSocket = /yii2/hhvm.sock Type = fastcgi - SourceRoot = __TROOT__/app + SourceRoot = /yii2 DefaultDocument = index.php GzipCompressionLevel = 0 EnableKeepAlive = true + AllowRunAsRoot = 1 } # Disable logging completely @@ -18,7 +19,7 @@ Log { UseLogFile = false UseSyslog = false Level = Error - #File = __TROOT__/error.log + #File = /yii2/error.log } # Enable jit for production mode @@ -30,7 +31,7 @@ Eval { # Repo file Repo { Central { - Path = __TROOT__/.hhvm.bbhc + Path = /yii2/.hhvm.hhbc } } diff --git a/frameworks/PHP/yii2/deploy/nginx-fpm.conf b/frameworks/PHP/yii2/deploy/nginx-fpm.conf new file mode 100644 index 00000000000..caba8254db4 --- /dev/null +++ b/frameworks/PHP/yii2/deploy/nginx-fpm.conf @@ -0,0 +1,47 @@ +user root; +worker_processes auto; +error_log stderr error; + +events { + worker_connections 16384; +} + +http { + include /nginx/conf/mime.types; + default_type application/octet-stream; + access_log off; + server_tokens off; + sendfile on; + keepalive_timeout 65; + + upstream fastcgi_backend { + server unix:/var/run/php/php7.2-fpm.sock; + keepalive 50; + } + + server { + listen 8080; + server_name localhost; + + root /yii2/app; + index index.php; + + location / { + try_files $uri $uri/ /index.php?$args; + } + + location ~ \.php$ { + fastcgi_split_path_info ^(.+\.php)(.*)$; + fastcgi_pass fastcgi_backend; + fastcgi_keep_conn on; + set $fsn /index.php; + if (-f $document_root$fastcgi_script_name){ + set $fsn $fastcgi_script_name; + } + fastcgi_param SCRIPT_FILENAME $document_root$fsn; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param PATH_TRANSLATED $document_root$fsn; + include /nginx/conf/fastcgi_params; + } + } +} \ No newline at end of file diff --git a/frameworks/PHP/yii2/deploy/nginx-hhvm.conf b/frameworks/PHP/yii2/deploy/nginx-hhvm.conf new file mode 100644 index 00000000000..915189a44ab --- /dev/null +++ b/frameworks/PHP/yii2/deploy/nginx-hhvm.conf @@ -0,0 +1,47 @@ +user root; +worker_processes auto; +error_log stderr error; + +events { + worker_connections 16384; +} + +http { + include /nginx/conf/mime.types; + default_type application/octet-stream; + access_log off; + server_tokens off; + sendfile on; + keepalive_timeout 65; + + upstream fastcgi_backend { + server unix:/yii2/hhvm.sock; + keepalive 50; + } + + server { + listen 8080; + server_name localhost; + + root /yii2/app; + index index.php; + + location / { + try_files $uri $uri/ /index.php?$args; + } + + location ~ \.php$ { + fastcgi_split_path_info ^(.+\.php)(.*)$; + fastcgi_pass fastcgi_backend; + fastcgi_keep_conn on; + set $fsn /index.php; + if (-f $document_root$fastcgi_script_name){ + set $fsn $fastcgi_script_name; + } + fastcgi_param SCRIPT_FILENAME $document_root$fsn; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param PATH_TRANSLATED $document_root$fsn; + include /nginx/conf/fastcgi_params; + } + } +} \ No newline at end of file diff --git a/frameworks/PHP/yii2/deploy/nginx.conf b/frameworks/PHP/yii2/deploy/nginx.conf deleted file mode 100644 index 75a88badb32..00000000000 --- a/frameworks/PHP/yii2/deploy/nginx.conf +++ /dev/null @@ -1,66 +0,0 @@ -#user nobody; -worker_processes auto; - -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; -error_log stderr error; - -#pid logs/nginx.pid; - - -events { - worker_connections 16384; -} - -http { - include /usr/local/nginx/conf/mime.types; - default_type application/octet-stream; - - #access_log logs/access.log main; - access_log off; - server_tokens off; - - sendfile on; - #tcp_nopush on; - - #keepalive_timeout 0; - keepalive_timeout 65; - - #gzip on; - - upstream fastcgi_backend { - server 127.0.0.1:9001; - keepalive 50; - } - - server { - listen 8080; - server_name localhost; - - root /home/tfb/FrameworkBenchmarks/php-yii2/app; - index index.php; - - location / { - try_files $uri $uri/ /index.php?$args; - } - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # - location ~ \.php$ { - fastcgi_split_path_info ^(.+\.php)(.*)$; - fastcgi_pass fastcgi_backend; - fastcgi_keep_conn on; - set $fsn /index.php; - if (-f $document_root$fastcgi_script_name){ - set $fsn $fastcgi_script_name; - } - - fastcgi_param SCRIPT_FILENAME $document_root$fsn; - #PATH_INFO and PATH_TRANSLATED can be omitted, but RFC 3875 specifies them for CGI - fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param PATH_TRANSLATED $document_root$fsn; - include /usr/local/nginx/conf/fastcgi_params; - } - } -} \ No newline at end of file diff --git a/frameworks/PHP/yii2/setup.sh b/frameworks/PHP/yii2/setup.sh deleted file mode 100644 index da4dea43fdc..00000000000 --- a/frameworks/PHP/yii2/setup.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer - -sed -i 's|root .*/FrameworkBenchmarks/php-yii2|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/yii2/setup_hhvm.sh b/frameworks/PHP/yii2/setup_hhvm.sh deleted file mode 100644 index 3b965f88812..00000000000 --- a/frameworks/PHP/yii2/setup_hhvm.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer hhvm - -sed -i 's|__TROOT__|'"${TROOT}"'|g' deploy/config.hdf - -sed -i 's|root .*/FrameworkBenchmarks/php-yii2|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -hhvm -m daemon --config $TROOT/deploy/config.hdf --user $(whoami) -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/yii2/yii2-hhvm.dockerfile b/frameworks/PHP/yii2/yii2-hhvm.dockerfile new file mode 100644 index 00000000000..26f0ae34670 --- /dev/null +++ b/frameworks/PHP/yii2/yii2-hhvm.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/hhvm-php7:0.1 + +ADD ./ /yii2 +WORKDIR /yii2 + +RUN composer.phar install --no-progress + +CMD hhvm -m daemon --config /yii2/deploy/config.hdf && \ + nginx -c /yii2/deploy/nginx-hhvm.conf -g "daemon off;" diff --git a/frameworks/PHP/yii2/yii2.dockerfile b/frameworks/PHP/yii2/yii2.dockerfile new file mode 100644 index 00000000000..5d2d5fe714a --- /dev/null +++ b/frameworks/PHP/yii2/yii2.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/php7:0.1 + +ADD ./ /yii2 +WORKDIR /yii2 + +RUN composer.phar install --no-progress + +CMD service php7.2-fpm start && \ + nginx -c /yii2/deploy/nginx-fpm.conf -g "daemon off;" diff --git a/frameworks/PHP/zend/.gitignore b/frameworks/PHP/zend/.gitignore deleted file mode 100644 index 89d0f420959..00000000000 --- a/frameworks/PHP/zend/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/vendor -/build -/dist -.DS_Store -/tags -.idea -/data -/deploy/php-fpm.pid diff --git a/frameworks/PHP/zend/benchmark_config.json b/frameworks/PHP/zend/benchmark_config.json index c6eeda61e5c..ac9128ca71a 100644 --- a/frameworks/PHP/zend/benchmark_config.json +++ b/frameworks/PHP/zend/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "zend", "tests": [{ "default": { - "setup_file": "setup", "plaintext_url": "/plaintext", "json_url": "/json", "db_url": "/db", diff --git a/frameworks/PHP/zend/config/autoload/.gitkeep b/frameworks/PHP/zend/config/autoload/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/PHP/zend/config/autoload/benchmarks.local.php b/frameworks/PHP/zend/config/autoload/benchmarks.local.php index 0db99064990..de927d1dbc6 100644 --- a/frameworks/PHP/zend/config/autoload/benchmarks.local.php +++ b/frameworks/PHP/zend/config/autoload/benchmarks.local.php @@ -3,7 +3,7 @@ return array( 'db' => array( 'driver' => 'Pdo', - 'dsn' => 'mysql:dbname=hello_world;host=localhost;port=3306', + 'dsn' => 'mysql:dbname=hello_world;host=tfb-database;port=3306', 'username' => 'benchmarkdbuser', 'password' => 'benchmarkdbpass' ), diff --git a/frameworks/PHP/zend/deploy/nginx.conf b/frameworks/PHP/zend/deploy/nginx.conf index f1e1bf4c38b..64859960865 100644 --- a/frameworks/PHP/zend/deploy/nginx.conf +++ b/frameworks/PHP/zend/deploy/nginx.conf @@ -1,41 +1,24 @@ -#user nobody; +user root; worker_processes auto; - -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; error_log stderr error; -#pid logs/nginx.pid; - - events { worker_connections 16384; } - http { - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; access_log off; server_tokens off; sendfile on; - #tcp_nopush on; - #keepalive_timeout 0; keepalive_timeout 65; - #gzip on; - upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/var/run/php/php7.2-fpm.sock; keepalive 50; } @@ -43,92 +26,20 @@ http { listen 8080; server_name localhost; - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - root /home/tfb/FrameworkBenchmarks/php-zend-framework/public/; + root /zend/public/; index index.php; location / { try_files $uri $uri/ /index.php?$uri&$args; } - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # location ~ \.php$ { try_files $uri =404; fastcgi_pass fastcgi_backend; fastcgi_keep_conn on; fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - } diff --git a/frameworks/PHP/zend/setup.sh b/frameworks/PHP/zend/setup.sh deleted file mode 100644 index eff59570f7b..00000000000 --- a/frameworks/PHP/zend/setup.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer - -sed -i 's|host=localhost|host='"${DBHOST}"'|g' config/autoload/benchmarks.local.php -sed -i 's|root .*/FrameworkBenchmarks/php-zend-framework|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf - -mkdir -p data/cache -chmod 777 data/cache diff --git a/frameworks/PHP/zend/zend.dockerfile b/frameworks/PHP/zend/zend.dockerfile new file mode 100644 index 00000000000..0c9d504b2a3 --- /dev/null +++ b/frameworks/PHP/zend/zend.dockerfile @@ -0,0 +1,12 @@ +FROM techempower/php7:0.1 + +ADD ./ /zend +WORKDIR /zend + +RUN mkdir -p data/cache +RUN chmod 777 data/cache + +RUN composer.phar install --no-progress + +CMD service php7.2-fpm start && \ + nginx -c /zend/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/zend1/.gitignore b/frameworks/PHP/zend1/.gitignore deleted file mode 100644 index 3cac8377e15..00000000000 --- a/frameworks/PHP/zend1/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor or -# operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile ~/.gitignore_global - -/vendor -/build -/dist -.DS_Store -/tags -.idea -cache.properties -phpunit.xml -tmp -/deploy/php-fpm.pid - -# VIM -[._]*.s[a-w][a-z] -[._]s[a-w][a-z] -*.un~ -Session.vim -.netrwhist -*~ - -# Sublime Text -*.sublime-workspace - -# Netbeans IDE -nbproject - -# Eclipse IDE -.buildpath -.project -.settings/ - -# Notepad++ -nppBackup - -# ctags -tags diff --git a/frameworks/PHP/zend1/application/configs/application.ini b/frameworks/PHP/zend1/application/configs/application.ini index d58182e8f17..70b263e845b 100644 --- a/frameworks/PHP/zend1/application/configs/application.ini +++ b/frameworks/PHP/zend1/application/configs/application.ini @@ -8,7 +8,7 @@ resources.frontcontroller.moduledirectory = APPLICATION_PATH resources.frontcontroller.params.displayExceptions = 1 resources.db.adapter = "pdo_mysql" -resources.db.params.host = "localhost" +resources.db.params.host = "tfb-database" resources.db.params.charset = "utf8" resources.db.params.dbname = "hello_world" resources.db.params.username = "benchmarkdbuser" diff --git a/frameworks/PHP/zend1/benchmark_config.json b/frameworks/PHP/zend1/benchmark_config.json index 48359414c53..aea930c5b8d 100644 --- a/frameworks/PHP/zend1/benchmark_config.json +++ b/frameworks/PHP/zend1/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "zend1", "tests": [{ "default": { - "setup_file": "setup", "plaintext_url": "/plaintext", "json_url": "/json", "db_url": "/db", diff --git a/frameworks/PHP/zend1/deploy/nginx.conf b/frameworks/PHP/zend1/deploy/nginx.conf index eae72d27797..acdf2128e2e 100644 --- a/frameworks/PHP/zend1/deploy/nginx.conf +++ b/frameworks/PHP/zend1/deploy/nginx.conf @@ -1,41 +1,24 @@ -#user nobody; +user root; worker_processes auto; - -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; error_log stderr error; -#pid logs/nginx.pid; - - events { worker_connections 16384; } - http { - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; default_type application/octet-stream; - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; access_log off; server_tokens off; sendfile on; - #tcp_nopush on; - #keepalive_timeout 0; keepalive_timeout 65; - #gzip on; - upstream fastcgi_backend { - server 127.0.0.1:9001; + server unix:/var/run/php/php7.2-fpm.sock; keepalive 50; } @@ -43,92 +26,20 @@ http { listen 8080; server_name localhost; - #charset koi8-r; - - #access_log logs/host.access.log main; - - #location / { - # root html; - # index index.html index.htm; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root html; - #} - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - root /home/tfb/FrameworkBenchmarks/php-zend-framework1/public/; + root /zend1/public/; index index.php; location / { try_files $uri $uri/ /index.php?$uri&$args; } - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # location ~ \.php$ { try_files $uri =404; fastcgi_pass fastcgi_backend; fastcgi_keep_conn on; fastcgi_index index.php; -# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include /usr/local/nginx/conf/fastcgi_params; + include /nginx/conf/fastcgi_params; } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_timeout 5m; - - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - } diff --git a/frameworks/PHP/zend1/setup.sh b/frameworks/PHP/zend1/setup.sh deleted file mode 100644 index bbc6935e45e..00000000000 --- a/frameworks/PHP/zend1/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql php7 nginx composer - -sed -i 's|host = "localhost"|host = "'"${DBHOST}"'"|g' application/configs/application.ini -sed -i 's|root .*/FrameworkBenchmarks/php-zend-framework1|root '"${TROOT}"'|g' deploy/nginx.conf -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf - -php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid -nginx -c $TROOT/deploy/nginx.conf diff --git a/frameworks/PHP/zend1/zend1.dockerfile b/frameworks/PHP/zend1/zend1.dockerfile new file mode 100644 index 00000000000..b3781e9a5ca --- /dev/null +++ b/frameworks/PHP/zend1/zend1.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/php7:0.1 + +ADD ./ /zend1 +WORKDIR /zend1 + +RUN composer.phar install --no-progress + +CMD service php7.2-fpm start && \ + nginx -c /zend1/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/Perl/dancer/.gitignore b/frameworks/Perl/dancer/.gitignore deleted file mode 100644 index 6e953d7ed6a..00000000000 --- a/frameworks/Perl/dancer/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/cpanfile.snapshot -/local/ diff --git a/frameworks/Perl/dancer/app.pl b/frameworks/Perl/dancer/app.pl index 5311aab44e0..6bb98e85a36 100755 --- a/frameworks/Perl/dancer/app.pl +++ b/frameworks/Perl/dancer/app.pl @@ -8,7 +8,7 @@ set serializer => 'JSON'; -my $dsn = "dbi:mysql:database=hello_world;host=TFB-database;port=3306"; +my $dsn = "dbi:mysql:database=hello_world;host=tfb-database;port=3306"; my $dbh = DBI->connect( $dsn, 'benchmarkdbuser', 'benchmarkdbpass', { mysql_auto_reconnect=>1 } ); my $sth = $dbh->prepare("SELECT * FROM World where id = ?"); diff --git a/frameworks/Perl/dancer/benchmark_config.json b/frameworks/Perl/dancer/benchmark_config.json index cea71a48477..a97d27095fe 100644 --- a/frameworks/Perl/dancer/benchmark_config.json +++ b/frameworks/Perl/dancer/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "dancer", "tests": [{ "default": { - "setup_file": "setup-mysql", "json_url": "/json", "db_url": "/db", "query_url": "/db?queries=", diff --git a/frameworks/Perl/dancer/dancer.dockerfile b/frameworks/Perl/dancer/dancer.dockerfile new file mode 100644 index 00000000000..60db00204e4 --- /dev/null +++ b/frameworks/Perl/dancer/dancer.dockerfile @@ -0,0 +1,28 @@ +FROM techempower/nginx:0.1 + +FROM techempower/perl:0.1 + +COPY --from=0 /nginx /nginx + +ENV NGINX_HOME="/nginx" +ENV PATH=/nginx/sbin:${PATH} + +ADD ./ /dancer + +WORKDIR /dancer + +ENV PERL_CARTON_PATH=/dancer/local +ENV PERL5LIB=${PERL_CARTON_PATH}/lib/perl5 +ENV PATH=${PERL_CARTON_PATH}/bin:${PERL_HOME}/bin:${PATH} + +RUN cpanm --notest --no-man-page \ + Dancer@1.3134 \ + Dancer::Plugin::Database@2.10 \ + DBI@1.633 \ + DBD::mysql@4.033 \ + JSON::XS@3.01 \ + Plack@1.0034 \ + Starman@0.4011 + +CMD nginx -c /dancer/nginx.conf && \ + plackup -E production -s Starman --workers=$(nproc) -l /tmp/perl-dancer.sock -a ./app.pl diff --git a/frameworks/Perl/dancer/nginx.conf b/frameworks/Perl/dancer/nginx.conf index cca929938b3..f8e5d7e3405 100644 --- a/frameworks/Perl/dancer/nginx.conf +++ b/frameworks/Perl/dancer/nginx.conf @@ -1,13 +1,16 @@ -# Replaced by setup.py +user root; error_log stderr error; worker_processes 2; events { worker_connections 1024; + multi_accept on; } http { + client_body_temp_path /tmp; + output_buffers 1 32k; postpone_output 1460; @@ -18,22 +21,13 @@ http { tcp_nodelay on; - upstream backendurl { - server unix:/tmp/perl-dancer.sock; - } - server { listen 8080; server_name localhost; location / { - try_files $uri @proxy; - expires max; + proxy_pass http://unix:/tmp/perl-dancer.sock; } - location @proxy { - proxy_set_header Host $http_host; - proxy_pass http://backendurl; - } } } diff --git a/frameworks/Perl/dancer/setup-mysql.sh b/frameworks/Perl/dancer/setup-mysql.sh deleted file mode 100644 index 49fe2646c7e..00000000000 --- a/frameworks/Perl/dancer/setup-mysql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends mysql - -source ./setup.sh diff --git a/frameworks/Perl/dancer/setup.sh b/frameworks/Perl/dancer/setup.sh deleted file mode 100755 index f71ffd98072..00000000000 --- a/frameworks/Perl/dancer/setup.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -fw_depends perl nginx - -cpanm --notest --no-man-page \ - Dancer@1.3134 \ - Dancer::Plugin::Database@2.10 \ - DBI@1.633 \ - DBD::mysql@4.033 \ - JSON::XS@3.01 \ - Plack@1.0034 \ - Starman@0.4011 - -nginx -c ${TROOT}/nginx.conf - -plackup -E production -s Starman --workers=${CPU_COUNT} -l /tmp/perl-dancer.sock -a ./app.pl & diff --git a/frameworks/Perl/kelp/app.pl b/frameworks/Perl/kelp/app.pl index 6b715440ebc..4dac8bdaa6a 100755 --- a/frameworks/Perl/kelp/app.pl +++ b/frameworks/Perl/kelp/app.pl @@ -8,23 +8,31 @@ module 'JSON::XS'; -my $mongo = MongoDB::MongoClient->new( host => 'localhost', port => 27017 ); -my $mdb = $mongo->get_database('hello_world'); -my $world = $mdb->get_collection('world'); -my $fortune = $mdb->get_collection('fortune'); - -my $dbh = DBI->connect( - "dbi:mysql:database=hello_world;host=localhost;port=3306", - 'benchmarkdbuser', - 'benchmarkdbpass', - { RaiseError => 0, PrintError => 0, mysql_enable_utf8 => 1 } -); - -my @sth = map { $dbh->prepare($_) } ( - "SELECT * FROM World WHERE id = ?", - "SELECT * FROM Fortune", - "UPDATE World SET randomNumber = ? WHERE id = ?", -); +my $mongo; +my $mdb; +my $world; +my $fortune; +my @sth; +my $dbh; + +if ($ENV{MONGO}) { + $mongo = MongoDB::MongoClient->new( host => 'tfb-database', port => 27017 ); + $mdb = $mongo->get_database('hello_world'); + $world = $mdb->get_collection('world'); + $fortune = $mdb->get_collection('fortune'); +} else { + $dbh = DBI->connect( + "dbi:mysql:database=hello_world;host=tfb-database;port=3306", + 'benchmarkdbuser', + 'benchmarkdbpass', + { RaiseError => 0, PrintError => 0, mysql_enable_utf8 => 1 } + ); + @sth = map { $dbh->prepare($_) } ( + "SELECT * FROM World WHERE id = ?", + "SELECT * FROM Fortune", + "UPDATE World SET randomNumber = ? WHERE id = ?", + ); +} get '/json' => sub { { message => 'Hello, World!' }; diff --git a/frameworks/Perl/kelp/benchmark_config.json b/frameworks/Perl/kelp/benchmark_config.json index 76184458a82..11f7eabab3f 100644 --- a/frameworks/Perl/kelp/benchmark_config.json +++ b/frameworks/Perl/kelp/benchmark_config.json @@ -2,11 +2,9 @@ "framework": "kelp", "tests": [{ "default": { - "setup_file": "setup", - "json_url": "/json", - "db_url": "/db", - "query_url": "/queries?queries=", - "fortune_url": "/fortunes", + "db_url": "/db/mysql", + "query_url": "/queries/mysql?queries=", + "fortune_url": "/fortunes/mysql", "plaintext_url": "/plaintext", "port": 8080, "approach": "Realistic", @@ -24,9 +22,7 @@ "versus": "" }, "mongodb": { - "setup_file": "setup", - "json_url": "/json", - "db_url": "/db", + "db_url": "/db/mongo", "query_url": "/queries/mongo?queries=", "fortune_url": "/fortunes/mongo", "plaintext_url": "/plaintext", diff --git a/frameworks/Perl/kelp/kelp-base.dockerfile b/frameworks/Perl/kelp/kelp-base.dockerfile new file mode 100644 index 00000000000..ac8e3f142a2 --- /dev/null +++ b/frameworks/Perl/kelp/kelp-base.dockerfile @@ -0,0 +1,28 @@ +FROM techempower/nginx:0.1 + +FROM techempower/perl:0.1 + +COPY --from=0 /nginx /nginx + +ENV NGINX_HOME="/nginx" +ENV PATH=/nginx/sbin:${PATH} + +WORKDIR /kelp + +ENV PERL_CARTON_PATH=/kelp/local +ENV PERL5LIB=${PERL_CARTON_PATH}/lib/perl5 +ENV PATH=${PERL_CARTON_PATH}/bin:${PERL_HOME}/bin:${PATH} + +RUN cpanm --notest --no-man-page \ + Kelp@0.9071 \ + DBI@1.636 \ + DBD::mysql@4.033 \ + MongoDB@1.8.1 \ + Kelp::Module::JSON::XS@0.502 \ + HTML::Escape@1.10 \ + HTTP::Parser::XS@0.17 \ + Starman@0.4014 + +ADD ./app.ini /kelp/ +ADD ./app.pl /kelp/ +ADD ./nginx.conf /kelp/ diff --git a/frameworks/Perl/kelp/kelp-mongodb.dockerfile b/frameworks/Perl/kelp/kelp-mongodb.dockerfile new file mode 100644 index 00000000000..c5f1f23a951 --- /dev/null +++ b/frameworks/Perl/kelp/kelp-mongodb.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/kelp-base:0.1 + +ENV MONGO=1 + +RUN sleep 10 + +CMD nginx -c /kelp/nginx.conf && \ + plackup -E production -s Starman --workers=$(nproc) -l /tmp/perl-kelp.sock -a ./app.pl diff --git a/frameworks/Perl/kelp/kelp.dockerfile b/frameworks/Perl/kelp/kelp.dockerfile new file mode 100644 index 00000000000..05f4ffac3d4 --- /dev/null +++ b/frameworks/Perl/kelp/kelp.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/kelp-base:0.1 + +CMD nginx -c /kelp/nginx.conf && \ + plackup -E production -s Starman --workers=$(nproc) -l /tmp/perl-kelp.sock -a ./app.pl diff --git a/frameworks/Perl/kelp/nginx.conf b/frameworks/Perl/kelp/nginx.conf index d00756daf9d..9a68f2c056b 100644 --- a/frameworks/Perl/kelp/nginx.conf +++ b/frameworks/Perl/kelp/nginx.conf @@ -1,13 +1,16 @@ -# Replaced by setup.py +user root; error_log stderr error; worker_processes 2; events { worker_connections 1024; + multi_accept on; } http { + client_body_temp_path /tmp; + output_buffers 1 32k; postpone_output 1460; @@ -18,22 +21,13 @@ http { tcp_nodelay on; - upstream backendurl { - server unix:/home/tfb/FrameworkBenchmarks/kelp/frameworks-benchmark.sock; - } - server { listen 8080; server_name localhost; location / { - try_files $uri @proxy; - expires max; + proxy_pass http://unix:/tmp/perl-kelp.sock; } - location @proxy { - proxy_set_header Host $http_host; - proxy_pass http://backendurl; - } } } diff --git a/frameworks/Perl/kelp/setup.sh b/frameworks/Perl/kelp/setup.sh deleted file mode 100755 index 6219231f2bb..00000000000 --- a/frameworks/Perl/kelp/setup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -sed -i 's|localhost|'"${DBHOST}"'|g' app.pl -sed -i 's|user .*;|user '"$(id -u -n)"';|g' nginx.conf -sed -i 's|server unix.*frameworks-benchmark.sock;|server unix:'"${TROOT}"'/frameworks-benchmark.sock;|g' nginx.conf - -fw_depends perl nginx mysql mongodb - -cpanm --notest --no-man-page \ - Kelp@0.9071 \ - DBI@1.636 \ - DBD::mysql@4.033 \ - MongoDB@1.4.2 \ - Kelp::Module::JSON::XS@0.502 \ - HTML::Escape@1.10 \ - HTTP::Parser::XS@0.17 \ - Starman@0.4014 - -nginx -c ${TROOT}/nginx.conf - -plackup -E production -s Starman --workers=${CPU_COUNT} -l ${TROOT}/frameworks-benchmark.sock -a ./app.pl & diff --git a/frameworks/Perl/mojolicious/.gitignore b/frameworks/Perl/mojolicious/.gitignore deleted file mode 100755 index b1ce095ca4d..00000000000 --- a/frameworks/Perl/mojolicious/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -local -*.pid diff --git a/frameworks/Perl/mojolicious/mojolicious.dockerfile b/frameworks/Perl/mojolicious/mojolicious.dockerfile new file mode 100644 index 00000000000..9cac76862f4 --- /dev/null +++ b/frameworks/Perl/mojolicious/mojolicious.dockerfile @@ -0,0 +1,17 @@ +FROM techempower/perl:0.1 + +WORKDIR /mojo + +ENV PERL_CARTON_PATH=/kelp/local +ENV PERL5LIB=${PERL_CARTON_PATH}/lib/perl5 +ENV PATH=${PERL_CARTON_PATH}/bin:${PERL_HOME}/bin:${PATH} + +ADD ./cpanfile* ./ + +RUN carton install --cpanfile /mojo/cpanfile + +ENV LIBEV_FLAGS=7 + +ADD ./app.pl ./ + +CMD hypnotoad -f /mojo/app.pl diff --git a/frameworks/Perl/mojolicious/setup.sh b/frameworks/Perl/mojolicious/setup.sh deleted file mode 100644 index c33d642f94b..00000000000 --- a/frameworks/Perl/mojolicious/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends postgresql perl - -carton install --cpanfile ${TROOT}/cpanfile - -export LIBEV_FLAGS=7 -HYPNOTOAD=$(${PERL_HOME}/bin/carton exec which hypnotoad) - -carton exec perl ${HYPNOTOAD} ${TROOT}/app.pl diff --git a/frameworks/Perl/plack/app.psgi b/frameworks/Perl/plack/app.psgi index ad1c60d0128..8e609ba8828 100644 --- a/frameworks/Perl/plack/app.psgi +++ b/frameworks/Perl/plack/app.psgi @@ -5,7 +5,7 @@ use JSON::XS qw(encode_json); use DBI; my $dbh = DBI->connect_cached( - 'dbi:mysql:database=hello_world;host=localhost;port=3306', + 'dbi:mysql:database=hello_world;host=tfb-database;port=3306', 'benchmarkdbuser', 'benchmarkdbpass', { AutoInactiveDestroy => 1, mysql_enable_utf8 => 1 } diff --git a/frameworks/Perl/plack/benchmark_config.json b/frameworks/Perl/plack/benchmark_config.json index 303511fc41d..8b53480f8f1 100644 --- a/frameworks/Perl/plack/benchmark_config.json +++ b/frameworks/Perl/plack/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "plack", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "port": 8080, diff --git a/frameworks/Perl/plack/nginx.conf b/frameworks/Perl/plack/nginx.conf index d4f4a7c6dcd..3d838667e50 100644 --- a/frameworks/Perl/plack/nginx.conf +++ b/frameworks/Perl/plack/nginx.conf @@ -1,32 +1,33 @@ -# Replaced by setup.py +user root; error_log stderr error; -pid /tmp/nginx.pid; -worker_processes 4; + +worker_processes 2; events { - worker_connections 4096; + worker_connections 1024; multi_accept on; } http { + client_body_temp_path /tmp; + + output_buffers 1 32k; + postpone_output 1460; + access_log off; - tcp_nodelay on; - keepalive_requests 50000; - etag off; - upstream backendurl { - server unix:/home/tfb/FrameworkBenchmarks/plack/app.sock; - keepalive 8; - } + sendfile on; + tcp_nopush on; + + tcp_nodelay on; server { listen 8080; server_name localhost; + location / { - proxy_http_version 1.1; - proxy_set_header Connection ""; - proxy_pass http://backendurl; + proxy_pass http://unix:/tmp/perl-plack.sock; } + } } - diff --git a/frameworks/Perl/plack/plack.dockerfile b/frameworks/Perl/plack/plack.dockerfile new file mode 100644 index 00000000000..86b615987e4 --- /dev/null +++ b/frameworks/Perl/plack/plack.dockerfile @@ -0,0 +1,31 @@ +FROM techempower/nginx:0.1 + +FROM techempower/perl:0.1 + +COPY --from=0 /nginx /nginx + +ENV NGINX_HOME="/nginx" +ENV PATH=/nginx/sbin:${PATH} + +WORKDIR /plack + +ENV PERL_CARTON_PATH=/plack/local +ENV PERL5LIB=${PERL_CARTON_PATH}/lib/perl5 +ENV PATH=${PERL_CARTON_PATH}/bin:${PERL_HOME}/bin:${PATH} + +RUN cpanm --notest --no-man-page \ + JSON::XS@3.01 \ + HTTP::Parser::XS@0.16 \ + Plack@1.0030 \ + DBI@1.631 \ + DBD::mysql@4.033 \ + Starlet@0.24 + +ADD ./app.pid /plack/ +ADD ./app.psgi /plack/ +add ./nginx.conf /plack/ + +CMD nginx -c /plack/nginx.conf && \ + start_server --backlog=16384 --pid-file=/plack/app.pid --path=/tmp/perl-plack.sock -- plackup \ + -E production -s Starlet --max-keepalive-reqs 1000 --max-reqs-per-child 50000 \ + --min-reqs-per-child 40000 --max-workers=$(nproc) -a /plack/app.psgi diff --git a/frameworks/Perl/plack/setup.sh b/frameworks/Perl/plack/setup.sh deleted file mode 100644 index 0b9bcfb0408..00000000000 --- a/frameworks/Perl/plack/setup.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -sed -i 's|localhost|'"${DBHOST}"'|g' app.psgi -sed -i 's|server unix:.*/FrameworkBenchmarks/plack|server unix:'"${TROOT}"'|g' nginx.conf - -fw_depends mysql perl nginx - -cpanm --notest --no-man-page \ - JSON::XS@3.01 \ - HTTP::Parser::XS@0.16 \ - Plack@1.0030 \ - DBI@1.631 \ - DBD::mysql@4.033 \ - Starlet@0.24 - -nginx -c $TROOT/nginx.conf -start_server --backlog=16384 --pid-file=$TROOT/app.pid --path=$TROOT/app.sock -- plackup -E production -s Starlet --max-keepalive-reqs 1000 --max-reqs-per-child 50000 --min-reqs-per-child 40000 --max-workers=${CPU_COUNT} -a $TROOT/app.psgi & diff --git a/frameworks/Perl/web-simple/app.pl b/frameworks/Perl/web-simple/app.pl index 708e9294fb3..d2db3e11299 100755 --- a/frameworks/Perl/web-simple/app.pl +++ b/frameworks/Perl/web-simple/app.pl @@ -4,7 +4,7 @@ use DBI; sub get_database_handle { - DBI->connect_cached('dbi:mysql:database=hello_world;host=TFB-database', 'benchmarkdbuser', 'benchmarkdbpass', { RaiseError => 1 }); + DBI->connect_cached('dbi:mysql:database=hello_world;host=tfb-database', 'benchmarkdbuser', 'benchmarkdbpass', { RaiseError => 1 }); } sub dispatch_request { diff --git a/frameworks/Perl/web-simple/benchmark_config.json b/frameworks/Perl/web-simple/benchmark_config.json index 4a8a8ef51b0..f169a2613a8 100644 --- a/frameworks/Perl/web-simple/benchmark_config.json +++ b/frameworks/Perl/web-simple/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "web-simple", "tests": [{ "default": { - "setup_file": "setup-mysql", "json_url": "/json", "db_url": "/db", "query_url": "/query?queries=", diff --git a/frameworks/Perl/web-simple/nginx.conf b/frameworks/Perl/web-simple/nginx.conf index 51bcec2a8b2..295ffe7b499 100644 --- a/frameworks/Perl/web-simple/nginx.conf +++ b/frameworks/Perl/web-simple/nginx.conf @@ -1,14 +1,16 @@ -# Replaced by setup.py -user USR; +user root; error_log stderr error; worker_processes 2; events { worker_connections 1024; + multi_accept on; } http { + client_body_temp_path /tmp; + output_buffers 1 32k; postpone_output 1460; @@ -19,22 +21,13 @@ http { tcp_nodelay on; - upstream backendurl { - server unix:/home/tfb/FrameworkBenchmarks/web-simple/frameworks-benchmark.sock; - } - server { listen 8080; server_name localhost; location / { - try_files $uri @proxy; - expires max; + proxy_pass http://unix:/tmp/perl-simple.sock; } - location @proxy { - proxy_set_header Host $http_host; - proxy_pass http://backendurl; - } } } diff --git a/frameworks/Perl/web-simple/setup-mysql.sh b/frameworks/Perl/web-simple/setup-mysql.sh deleted file mode 100644 index 49fe2646c7e..00000000000 --- a/frameworks/Perl/web-simple/setup-mysql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends mysql - -source ./setup.sh diff --git a/frameworks/Perl/web-simple/setup.sh b/frameworks/Perl/web-simple/setup.sh deleted file mode 100644 index 36fd8ed644f..00000000000 --- a/frameworks/Perl/web-simple/setup.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -sed -i 's|server unix:.*/FrameworkBenchmarks/web-simple|server unix:'"${TROOT}"'|g' nginx.conf - -fw_depends perl nginx - -cpanm --notest --no-man-page \ - Web::Simple@0.033 \ - DBI@1.637 \ - DBD::mysql@4.043 \ - Plack@1.0044 \ - Starman@0.4014 \ - JSON::XS@3.04 - -nginx -c $TROOT/nginx.conf - -plackup -E production -s Starman --workers=${CPU_COUNT} -l $TROOT/frameworks-benchmark.sock -a $TROOT/app.pl & diff --git a/frameworks/Perl/web-simple/web-simple.dockerfile b/frameworks/Perl/web-simple/web-simple.dockerfile new file mode 100644 index 00000000000..be1d757d1f6 --- /dev/null +++ b/frameworks/Perl/web-simple/web-simple.dockerfile @@ -0,0 +1,30 @@ +FROM techempower/nginx:0.1 + +FROM techempower/perl:0.1 + +COPY --from=0 /nginx /nginx + +ENV NGINX_HOME="/nginx" +ENV PATH=/nginx/sbin:${PATH} + +WORKDIR /simple + +ENV PERL_CARTON_PATH=/simple/local +ENV PERL5LIB=${PERL_CARTON_PATH}/lib/perl5 +ENV PATH=${PERL_CARTON_PATH}/bin:${PERL_HOME}/bin:${PATH} + +RUN cpanm --notest --no-man-page \ + Web::Simple@0.033 \ + DBI@1.637 \ + DBD::mysql@4.043 \ + Plack@1.0044 \ + Starman@0.4014 \ + JSON::XS@3.04 + +ADD ./conf /simple/ +ADD ./app.pl /simple/ +ADD ./nginx.conf /simple/ + +CMD nginx -c /simple/nginx.conf && \ + plackup -E production -s Starman --workers=$(nproc) \ + -l /tmp/perl-simple.sock -a /simple/app.pl diff --git a/frameworks/Python/.gitignore b/frameworks/Python/.gitignore deleted file mode 100644 index 296b9676390..00000000000 --- a/frameworks/Python/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -uwsgi_params -*.pid -__pycache__ -!*.lock - -# ignore virtual environments -pyvenv*/ -venv*/ diff --git a/frameworks/Python/aiohttp/aiohttp-base.dockerfile b/frameworks/Python/aiohttp/aiohttp-base.dockerfile new file mode 100644 index 00000000000..8ccd4d59e50 --- /dev/null +++ b/frameworks/Python/aiohttp/aiohttp-base.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /aiohttp + +WORKDIR aiohttp + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /aiohttp/requirements.txt + +CMD gunicorn app.gunicorn:app -c gunicorn_conf.py diff --git a/frameworks/Python/aiohttp/aiohttp-pg-raw.dockerfile b/frameworks/Python/aiohttp/aiohttp-pg-raw.dockerfile new file mode 100644 index 00000000000..407f0da7781 --- /dev/null +++ b/frameworks/Python/aiohttp/aiohttp-pg-raw.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/aiohttp-base:0.1 + +WORKDIR /aiohttp + +ENV CONNECTION=RAW + +CMD gunicorn app.gunicorn:app -c gunicorn_conf.py diff --git a/frameworks/Python/aiohttp/aiohttp.dockerfile b/frameworks/Python/aiohttp/aiohttp.dockerfile new file mode 100644 index 00000000000..f38f35d1f25 --- /dev/null +++ b/frameworks/Python/aiohttp/aiohttp.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/aiohttp-base:0.1 + +WORKDIR /aiohttp + +CMD gunicorn app.gunicorn:app -c gunicorn_conf.py diff --git a/frameworks/Python/aiohttp/benchmark_config.json b/frameworks/Python/aiohttp/benchmark_config.json index 4e53d00affa..dad6b2fcc87 100644 --- a/frameworks/Python/aiohttp/benchmark_config.json +++ b/frameworks/Python/aiohttp/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "aiohttp", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries/", @@ -25,7 +24,6 @@ "notes": "uses aiopg with sqlalchemy for database access" }, "pg-raw": { - "setup_file": "setup_raw", "db_url": "/db", "query_url": "/queries/", "fortune_url": "/fortunes", diff --git a/frameworks/Python/aiohttp/requirements.txt b/frameworks/Python/aiohttp/requirements.txt index f2cd41cf9a7..66c9485f8d7 100644 --- a/frameworks/Python/aiohttp/requirements.txt +++ b/frameworks/Python/aiohttp/requirements.txt @@ -1,10 +1,10 @@ -aiohttp==2.1.0 -aiohttp-jinja2==0.13.0 -aiopg==0.13.0 -asyncpg==0.11.0 -cchardet==2.1.0 +aiohttp==3.0.9 +aiohttp-jinja2==0.17.0 +aiopg==0.13.2 +asyncpg==0.15.0 +cchardet==2.1.1 gunicorn==19.7.1 -psycopg2==2.7.1 +psycopg2==2.7.4 SQLAlchemy==1.1.10 ujson==1.35 -uvloop==0.8.0 +uvloop==0.9.1 diff --git a/frameworks/Python/aiohttp/setup.sh b/frameworks/Python/aiohttp/setup.sh deleted file mode 100644 index fe41e32f2f0..00000000000 --- a/frameworks/Python/aiohttp/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -gunicorn app.gunicorn:app -c gunicorn_conf.py & diff --git a/frameworks/Python/aiohttp/setup_raw.sh b/frameworks/Python/aiohttp/setup_raw.sh deleted file mode 100644 index 22b1b1f4314..00000000000 --- a/frameworks/Python/aiohttp/setup_raw.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -export CONNECTION=RAW - -source $TROOT/setup.sh diff --git a/frameworks/Python/api_hour/.gitignore b/frameworks/Python/api_hour/.gitignore deleted file mode 100644 index 4f00cd9a736..00000000000 --- a/frameworks/Python/api_hour/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/src/ diff --git a/frameworks/Python/api_hour/aiohttp.web/.gitignore b/frameworks/Python/api_hour/aiohttp.web/.gitignore deleted file mode 100644 index 0fd61d16bfe..00000000000 --- a/frameworks/Python/api_hour/aiohttp.web/.gitignore +++ /dev/null @@ -1,64 +0,0 @@ -# Created by .gitignore support plugin (hsz.mobi) -### Python template -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.cache -nosetests.xml -coverage.xml - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# PyCharm/IDEA files -.idea -*.iml - -# Virtualenvs -venv/ -pyvenv/ \ No newline at end of file diff --git a/frameworks/Python/api_hour/aiohttp.web/README.rst b/frameworks/Python/api_hour/aiohttp.web/README.rst deleted file mode 100644 index bf9ec0acc59..00000000000 --- a/frameworks/Python/api_hour/aiohttp.web/README.rst +++ /dev/null @@ -1,22 +0,0 @@ -hello -===== - -Install -------- - -#. Follow pythonz install doc -#. pythonz install 3.4.2 -#. cd /opt -#. Git clone your app here -#. cd /opt/hello/ -#. /usr/local/pythonz/pythons/CPython-3.4.2/bin/pyvenv pyvenv -#. . pyvenv/bin/activate -#. pip install -r requirements.txt -#. cd /etc/init.d/ && ln -s /opt/hello/etc/init.d/hello -#. cd /etc/default/ && ln -s /opt/hello/etc/default/hello -#. cd /etc/monit/conf.d/ && ln -s /opt/hello/etc/monit/conf.d/hello -#. update-rc.d hello defaults -#. cp -a /opt/hello/etc/hello /etc/ -#. Adapt rsyslog and lograte -#. service hello start -#. service monit restart diff --git a/frameworks/Python/api_hour/aiohttp.web/etc/hello/main/main.yaml b/frameworks/Python/api_hour/aiohttp.web/etc/hello/main/main.yaml index bfea99e0b57..da8536c0c00 100644 --- a/frameworks/Python/api_hour/aiohttp.web/etc/hello/main/main.yaml +++ b/frameworks/Python/api_hour/aiohttp.web/etc/hello/main/main.yaml @@ -1,7 +1,7 @@ --- engines: pg: - host: TFB-database + host: tfb-database port: 5432 dbname: hello_world user: benchmarkdbuser @@ -9,7 +9,7 @@ engines: minsize: 22 maxsize: 22 mysql: - host: TFB-database + host: tfb-database port: 3306 db: hello_world user: benchmarkdbuser @@ -17,6 +17,6 @@ engines: minsize: 22 maxsize: 22 #redis: -# host: TFB-database +# host: tfb-database # port: 6379 # poolsize: 40 diff --git a/frameworks/Python/api_hour/aiohttp.web/setup-mysql.sh b/frameworks/Python/api_hour/aiohttp.web/setup-mysql.sh deleted file mode 100644 index 2663168a8a2..00000000000 --- a/frameworks/Python/api_hour/aiohttp.web/setup-mysql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends mysql - -source $TROOT/aiohttp.web/setup.sh diff --git a/frameworks/Python/api_hour/aiohttp.web/setup-postgresql.sh b/frameworks/Python/api_hour/aiohttp.web/setup-postgresql.sh deleted file mode 100644 index 5683dba2af1..00000000000 --- a/frameworks/Python/api_hour/aiohttp.web/setup-postgresql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends postgresql - -source $TROOT/aiohttp.web/setup.sh diff --git a/frameworks/Python/api_hour/aiohttp.web/setup.sh b/frameworks/Python/api_hour/aiohttp.web/setup.sh deleted file mode 100755 index a7f3abce708..00000000000 --- a/frameworks/Python/api_hour/aiohttp.web/setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -cd $TROOT/aiohttp.web -api_hour -ac hello:Container & diff --git a/frameworks/Python/api_hour/aiohttpweb-base.dockerfile b/frameworks/Python/api_hour/aiohttpweb-base.dockerfile new file mode 100644 index 00000000000..95a1beae61f --- /dev/null +++ b/frameworks/Python/api_hour/aiohttpweb-base.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/python3:0.1 + +ADD ./aiohttp.web /aiohttp.web +ADD ./requirements.txt /aiohttp.web + +WORKDIR /aiohttp.web + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /aiohttp.web/requirements.txt diff --git a/frameworks/Python/api_hour/api_hour-dbs.dockerfile b/frameworks/Python/api_hour/api_hour-dbs.dockerfile new file mode 100644 index 00000000000..c03f03bb89f --- /dev/null +++ b/frameworks/Python/api_hour/api_hour-dbs.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/yocto_http-base:0.1 + +WORKDIR /yocto_http + +CMD api_hour -ac hello:Container diff --git a/frameworks/Python/api_hour/api_hour-json.dockerfile b/frameworks/Python/api_hour/api_hour-json.dockerfile new file mode 100644 index 00000000000..c03f03bb89f --- /dev/null +++ b/frameworks/Python/api_hour/api_hour-json.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/yocto_http-base:0.1 + +WORKDIR /yocto_http + +CMD api_hour -ac hello:Container diff --git a/frameworks/Python/api_hour/api_hour-mysql.dockerfile b/frameworks/Python/api_hour/api_hour-mysql.dockerfile new file mode 100644 index 00000000000..b113b9d22c4 --- /dev/null +++ b/frameworks/Python/api_hour/api_hour-mysql.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/aiohttpweb-base:0.1 + +WORKDIR /aiohttp.web + +CMD api_hour -ac hello:Container diff --git a/frameworks/Python/api_hour/api_hour-plaintext.dockerfile b/frameworks/Python/api_hour/api_hour-plaintext.dockerfile new file mode 100644 index 00000000000..c03f03bb89f --- /dev/null +++ b/frameworks/Python/api_hour/api_hour-plaintext.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/yocto_http-base:0.1 + +WORKDIR /yocto_http + +CMD api_hour -ac hello:Container diff --git a/frameworks/Python/api_hour/api_hour.dockerfile b/frameworks/Python/api_hour/api_hour.dockerfile new file mode 100644 index 00000000000..b113b9d22c4 --- /dev/null +++ b/frameworks/Python/api_hour/api_hour.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/aiohttpweb-base:0.1 + +WORKDIR /aiohttp.web + +CMD api_hour -ac hello:Container diff --git a/frameworks/Python/api_hour/benchmark_config.json b/frameworks/Python/api_hour/benchmark_config.json index 6f8922b3490..b33e01cadd5 100644 --- a/frameworks/Python/api_hour/benchmark_config.json +++ b/frameworks/Python/api_hour/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "api_hour", "tests": [{ "default": { - "setup_file": "aiohttp.web/setup-postgresql", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -25,7 +24,6 @@ "notes": "Python 3 + API-Hour + AsyncIO + aiohttp + PostgreSQL" }, "mysql": { - "setup_file": "aiohttp.web/setup-mysql", "db_url": "/db_mysql", "query_url": "/queries_mysql?queries=", "fortune_url": "/fortunes_mysql", @@ -46,7 +44,6 @@ "notes": "Python 3 + API-Hour + AsyncIO + aiohttp + MySQL" }, "json": { - "setup_file": "yocto_http/setup", "json_url": "/json", "port": 8080, "approach": "Stripped", @@ -64,7 +61,6 @@ "notes": "Python 3 + API-Hour + AsyncIO" }, "dbs": { - "setup_file": "yocto_http/setup", "db_url": "/db", "query_url": "/queries?queries=", "update_url": "/updates?queries=", @@ -84,7 +80,6 @@ "notes": "Python 3 + API-Hour + AsyncIO" }, "plaintext": { - "setup_file": "yocto_http/setup", "plaintext_url": "/plaintext", "port": 8082, "approach": "Stripped", diff --git a/frameworks/Python/api_hour/yocto_http-base.dockerfile b/frameworks/Python/api_hour/yocto_http-base.dockerfile new file mode 100644 index 00000000000..7df6b1c267f --- /dev/null +++ b/frameworks/Python/api_hour/yocto_http-base.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/python3:0.1 + +ADD ./yocto_http /yocto_http +ADD ./requirements.txt /yocto_http + +WORKDIR /yocto_http + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /yocto_http/requirements.txt diff --git a/frameworks/Python/api_hour/yocto_http/.gitignore b/frameworks/Python/api_hour/yocto_http/.gitignore deleted file mode 100644 index 0fd61d16bfe..00000000000 --- a/frameworks/Python/api_hour/yocto_http/.gitignore +++ /dev/null @@ -1,64 +0,0 @@ -# Created by .gitignore support plugin (hsz.mobi) -### Python template -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.cache -nosetests.xml -coverage.xml - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# PyCharm/IDEA files -.idea -*.iml - -# Virtualenvs -venv/ -pyvenv/ \ No newline at end of file diff --git a/frameworks/Python/api_hour/yocto_http/README.rst b/frameworks/Python/api_hour/yocto_http/README.rst deleted file mode 100644 index bf9ec0acc59..00000000000 --- a/frameworks/Python/api_hour/yocto_http/README.rst +++ /dev/null @@ -1,22 +0,0 @@ -hello -===== - -Install -------- - -#. Follow pythonz install doc -#. pythonz install 3.4.2 -#. cd /opt -#. Git clone your app here -#. cd /opt/hello/ -#. /usr/local/pythonz/pythons/CPython-3.4.2/bin/pyvenv pyvenv -#. . pyvenv/bin/activate -#. pip install -r requirements.txt -#. cd /etc/init.d/ && ln -s /opt/hello/etc/init.d/hello -#. cd /etc/default/ && ln -s /opt/hello/etc/default/hello -#. cd /etc/monit/conf.d/ && ln -s /opt/hello/etc/monit/conf.d/hello -#. update-rc.d hello defaults -#. cp -a /opt/hello/etc/hello /etc/ -#. Adapt rsyslog and lograte -#. service hello start -#. service monit restart diff --git a/frameworks/Python/api_hour/yocto_http/etc/hello/main/main.yaml b/frameworks/Python/api_hour/yocto_http/etc/hello/main/main.yaml index 8272df3ef8d..480b7d8ac3f 100644 --- a/frameworks/Python/api_hour/yocto_http/etc/hello/main/main.yaml +++ b/frameworks/Python/api_hour/yocto_http/etc/hello/main/main.yaml @@ -1,7 +1,7 @@ --- engines: pg: - host: TFB-database + host: tfb-database port: 5432 dbname: hello_world user: benchmarkdbuser diff --git a/frameworks/Python/api_hour/yocto_http/setup.sh b/frameworks/Python/api_hour/yocto_http/setup.sh deleted file mode 100755 index 1f9b5f34dc4..00000000000 --- a/frameworks/Python/api_hour/yocto_http/setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends mysql postgresql python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -cd $TROOT/yocto_http -api_hour -ac hello:Container & diff --git a/frameworks/Python/apistar/apistar.dockerfile b/frameworks/Python/apistar/apistar.dockerfile new file mode 100644 index 00000000000..617ac16722b --- /dev/null +++ b/frameworks/Python/apistar/apistar.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /apistar + +WORKDIR /apistar + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /apistar/requirements.txt + +CMD gunicorn app:app.wsgi -c gunicorn_conf.py diff --git a/frameworks/Python/apistar/benchmark_config.json b/frameworks/Python/apistar/benchmark_config.json index 634c2c89c7d..7ab138beedb 100644 --- a/frameworks/Python/apistar/benchmark_config.json +++ b/frameworks/Python/apistar/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "apistar", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/Python/apistar/setup.sh b/frameworks/Python/apistar/setup.sh deleted file mode 100755 index e6d79925d1a..00000000000 --- a/frameworks/Python/apistar/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -gunicorn app:app.wsgi -c gunicorn_conf.py & diff --git a/frameworks/Python/bottle/benchmark_config.json b/frameworks/Python/bottle/benchmark_config.json index 24b0e4f34ce..7ce6ba00633 100644 --- a/frameworks/Python/bottle/benchmark_config.json +++ b/frameworks/Python/bottle/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "bottle", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -26,7 +25,6 @@ "versus": "wsgi" }, "pypy2": { - "setup_file": "setup_pypy2", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -50,7 +48,6 @@ "versus": "wsgi" }, "raw": { - "setup_file": "setup", "db_url": "/raw-db", "query_url": "/raw-queries?queries=", "fortune_url": "/raw-fortune", @@ -72,7 +69,6 @@ "versus": "wsgi" }, "nginx-uwsgi": { - "setup_file": "setup_nginxuwsgi", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Python/bottle/bottle-nginx-uwsgi.dockerfile b/frameworks/Python/bottle/bottle-nginx-uwsgi.dockerfile new file mode 100644 index 00000000000..27e782097bb --- /dev/null +++ b/frameworks/Python/bottle/bottle-nginx-uwsgi.dockerfile @@ -0,0 +1,18 @@ +FROM techempower/nginx:0.1 + +FROM techempower/python3:0.1 + +COPY --from=0 /nginx /nginx + +ENV NGINX_HOME="/nginx" +ENV PATH=/nginx/sbin:${PATH} + +ADD ./ /bottle + +WORKDIR /bottle + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /bottle/requirements.txt + +RUN sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' /bottle/nginx.conf + +CMD nginx -c /bottle/nginx.conf && uwsgi --ini /bottle/uwsgi.ini --processes $(($(nproc)*3)) --wsgi app:app diff --git a/frameworks/Python/bottle/bottle-pypy2.dockerfile b/frameworks/Python/bottle/bottle-pypy2.dockerfile new file mode 100644 index 00000000000..22dc63c97b4 --- /dev/null +++ b/frameworks/Python/bottle/bottle-pypy2.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/pypy2:0.1 + +ADD ./ /bottle + +WORKDIR /bottle + +RUN pip install --install-option="--prefix=${PYPY2_ROOT}" -r /bottle/requirements-pypy.txt + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/bottle/bottle-raw.dockerfile b/frameworks/Python/bottle/bottle-raw.dockerfile new file mode 100644 index 00000000000..a3da2653ef5 --- /dev/null +++ b/frameworks/Python/bottle/bottle-raw.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /bottle + +WORKDIR /bottle + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /bottle/requirements.txt + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/bottle/bottle.dockerfile b/frameworks/Python/bottle/bottle.dockerfile new file mode 100644 index 00000000000..a3da2653ef5 --- /dev/null +++ b/frameworks/Python/bottle/bottle.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /bottle + +WORKDIR /bottle + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /bottle/requirements.txt + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/bottle/setup.sh b/frameworks/Python/bottle/setup.sh deleted file mode 100755 index ce30e87c0cf..00000000000 --- a/frameworks/Python/bottle/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -gunicorn app:app -c gunicorn_conf.py & diff --git a/frameworks/Python/bottle/setup_nginxuwsgi.sh b/frameworks/Python/bottle/setup_nginxuwsgi.sh deleted file mode 100755 index 871a3793214..00000000000 --- a/frameworks/Python/bottle/setup_nginxuwsgi.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -fw_depends mysql python3 nginx - -sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' nginx.conf - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -nginx -c $TROOT/nginx.conf -uwsgi --ini $TROOT/uwsgi.ini --processes $((CPU_COUNT*3)) --wsgi app:app & diff --git a/frameworks/Python/bottle/setup_pypy2.sh b/frameworks/Python/bottle/setup_pypy2.sh deleted file mode 100755 index 80810508d63..00000000000 --- a/frameworks/Python/bottle/setup_pypy2.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql pypy2 - -pip install --install-option="--prefix=${PYPY2_ROOT}" -r $TROOT/requirements-pypy.txt - -gunicorn app:app -c gunicorn_conf.py & diff --git a/frameworks/Python/cherrypy/app.py b/frameworks/Python/cherrypy/app.py index adfb8eb1930..a45fafafd02 100755 --- a/frameworks/Python/cherrypy/app.py +++ b/frameworks/Python/cherrypy/app.py @@ -16,6 +16,7 @@ if sys.version_info[0] == 3: xrange = range + def getQueryNum(queryString): try: int(queryString) @@ -23,40 +24,35 @@ def getQueryNum(queryString): except ValueError: return 1 + class Fortune(Base): __tablename__ = "fortune" - id = Column(Integer, primary_key = True) + id = Column(Integer, primary_key=True) message = Column(String) def serialize(self): - return { - 'id' : self.id, - 'message' : self.message - } + return {'id': self.id, 'message': self.message} + class World(Base): __tablename__ = "world" - id = Column(Integer, primary_key = True) + id = Column(Integer, primary_key=True) randomNumber = Column(Integer) def serialize(self): - return { - 'id' : self.id, - 'randomNumber' : self.randomNumber - } + return {'id': self.id, 'randomNumber': self.randomNumber} -class CherryPyBenchmark(object): +class CherryPyBenchmark(object): @cherrypy.expose @cherrypy.tools.json_out() def json(self): cherrypy.response.headers["Content-Type"] = "application/json" - json_message = {"message" : "Hello, world!"} + json_message = {"message": "Hello, world!"} return json_message - @cherrypy.expose def plaintext(self): cherrypy.response.headers["Content-Type"] = "text/plain" @@ -97,7 +93,7 @@ def updates(self, queries=1): worlds = [] rp = partial(randint, 1, 10000) ids = [rp() for _ in xrange(num_queries)] - ids.sort() # To avoid deadlock + ids.sort() # To avoid deadlock for id in ids: world = cherrypy.request.db.query(World).get(id) world.randomNumber = rp() @@ -108,23 +104,33 @@ def updates(self, queries=1): @cherrypy.expose def fortune(self): fortunes = cherrypy.request.db.query(Fortune).all() - fortunes.append(Fortune(id=0, message="Additional fortune added at request time.")) + fortunes.append( + Fortune(id=0, message="Additional fortune added at request time.")) fortunes.sort(key=attrgetter("message")) html = "Fortunes" for f in fortunes: - html += "" + html += "" html += "
idmessage
" + str(f.id) + "" + cgi.escape(f.message) + "
" + str(f.id) + "" + cgi.escape( + f.message) + "
" return html + if __name__ == "__main__": # Register the SQLAlchemy plugin from saplugin import SAEnginePlugin DBDRIVER = 'mysql' - DATABASE_URI = '%s://benchmarkdbuser:benchmarkdbpass@TFB-database:3306/hello_world?charset=utf8' % (DBDRIVER) + DATABASE_URI = '%s://benchmarkdbuser:benchmarkdbpass@tfb-database:3306/hello_world?charset=utf8' % ( + DBDRIVER) SAEnginePlugin(cherrypy.engine, DATABASE_URI).subscribe() - + # Register the SQLAlchemy tool from satool import SATool cherrypy.tools.db = SATool() cherrypy.server.socket_host = '0.0.0.0' - cherrypy.quickstart(CherryPyBenchmark(), '', {'/': {'tools.db.on': True, 'log.screen': False, 'log.access_file': ''}}) + cherrypy.quickstart(CherryPyBenchmark(), '', { + '/': { + 'tools.db.on': True, + 'log.screen': False, + 'log.access_file': '' + } + }) diff --git a/frameworks/Python/cherrypy/benchmark_config.json b/frameworks/Python/cherrypy/benchmark_config.json index 10b8367f2dc..b29fb1b4c9b 100644 --- a/frameworks/Python/cherrypy/benchmark_config.json +++ b/frameworks/Python/cherrypy/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "cherrypy", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -25,7 +24,6 @@ "notes": "CPython 2.7" }, "py3": { - "setup_file": "setup_py3", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Python/cherrypy/cherrypy-py3.dockerfile b/frameworks/Python/cherrypy/cherrypy-py3.dockerfile new file mode 100644 index 00000000000..1464f3f4e20 --- /dev/null +++ b/frameworks/Python/cherrypy/cherrypy-py3.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /cherrypy + +WORKDIR /cherrypy + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /cherrypy/requirements.txt + +CMD python3 app.py diff --git a/frameworks/Python/cherrypy/cherrypy.dockerfile b/frameworks/Python/cherrypy/cherrypy.dockerfile new file mode 100644 index 00000000000..9dd163d5783 --- /dev/null +++ b/frameworks/Python/cherrypy/cherrypy.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python2:0.1 + +ADD ./ /cherrypy + +WORKDIR /cherrypy + +RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /cherrypy/requirements.txt + +CMD python app.py diff --git a/frameworks/Python/cherrypy/setup.sh b/frameworks/Python/cherrypy/setup.sh deleted file mode 100755 index 8018015155a..00000000000 --- a/frameworks/Python/cherrypy/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql python2 - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements.txt - -python app.py & diff --git a/frameworks/Python/cherrypy/setup_py3.sh b/frameworks/Python/cherrypy/setup_py3.sh deleted file mode 100755 index 03fa45c2dd2..00000000000 --- a/frameworks/Python/cherrypy/setup_py3.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -python3 app.py & diff --git a/frameworks/Python/django/.gitignore b/frameworks/Python/django/.gitignore deleted file mode 100644 index 9b1dffd90fd..00000000000 --- a/frameworks/Python/django/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.sqlite diff --git a/frameworks/Python/django/benchmark_config.json b/frameworks/Python/django/benchmark_config.json index 25d2e9db4b5..849d528cbe3 100644 --- a/frameworks/Python/django/benchmark_config.json +++ b/frameworks/Python/django/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "django", "tests": [{ "default": { - "setup_file": "setup", "plaintext_url" : "/plaintext", "json_url": "/json", "db_url": "/db", @@ -26,7 +25,6 @@ "versus": "wsgi" }, "py3": { - "setup_file": "setup_py3", "plaintext_url" : "/plaintext", "json_url": "/json", "db_url": "/db", @@ -50,7 +48,6 @@ "versus": "wsgi" }, "postgresql": { - "setup_file": "setup_pg", "db_url": "/db", "query_url": "/dbs?queries=", "fortune_url": "/fortunes", diff --git a/frameworks/Python/django/django-base.dockerfile b/frameworks/Python/django/django-base.dockerfile new file mode 100644 index 00000000000..ea719ddcb92 --- /dev/null +++ b/frameworks/Python/django/django-base.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/python2:0.1 + +ADD ./ /django + +WORKDIR /django + +RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /django/requirements.txt diff --git a/frameworks/Python/django/django-postgresql.dockerfile b/frameworks/Python/django/django-postgresql.dockerfile new file mode 100644 index 00000000000..554488dba03 --- /dev/null +++ b/frameworks/Python/django/django-postgresql.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/django-base:0.1 + +WORKDIR /django + +CMD gunicorn --pid=gunicorn.pid hello.wsgi:application -c gunicorn_conf.py --env DJANGO_DB=postgresql_psycopg2 diff --git a/frameworks/Python/django/django-py3.dockerfile b/frameworks/Python/django/django-py3.dockerfile new file mode 100644 index 00000000000..4004adfa1eb --- /dev/null +++ b/frameworks/Python/django/django-py3.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /django + +WORKDIR /django + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /django/requirements_py3.txt + +CMD gunicorn --pid=gunicorn.pid hello.wsgi:application -c gunicorn_conf.py --env DJANGO_DB=mysql diff --git a/frameworks/Python/django/django.dockerfile b/frameworks/Python/django/django.dockerfile new file mode 100644 index 00000000000..7be4ea0c1ce --- /dev/null +++ b/frameworks/Python/django/django.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/django-base:0.1 + +WORKDIR /django + +CMD gunicorn --pid=gunicorn.pid hello.wsgi:application -c gunicorn_conf.py --env DJANGO_DB=mysql diff --git a/frameworks/Python/django/setup.sh b/frameworks/Python/django/setup.sh deleted file mode 100755 index 1f98bcbe663..00000000000 --- a/frameworks/Python/django/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql python2 - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements.txt - -gunicorn --pid=gunicorn.pid hello.wsgi:application -c gunicorn_conf.py --env DJANGO_DB=mysql & diff --git a/frameworks/Python/django/setup_pg.sh b/frameworks/Python/django/setup_pg.sh deleted file mode 100755 index 54f0f25d9a7..00000000000 --- a/frameworks/Python/django/setup_pg.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql python2 - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements.txt - -gunicorn --pid=gunicorn.pid hello.wsgi:application -c gunicorn_conf.py --env DJANGO_DB=postgresql_psycopg2 & diff --git a/frameworks/Python/django/setup_py3.sh b/frameworks/Python/django/setup_py3.sh deleted file mode 100755 index 2fc32ca7db8..00000000000 --- a/frameworks/Python/django/setup_py3.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements_py3.txt - -gunicorn --pid=gunicorn.pid hello.wsgi:application -c gunicorn_conf.py --env DJANGO_DB=mysql & diff --git a/frameworks/Python/falcon/benchmark_config.json b/frameworks/Python/falcon/benchmark_config.json index 549d74b3e38..6cb83c72eed 100644 --- a/frameworks/Python/falcon/benchmark_config.json +++ b/frameworks/Python/falcon/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "falcon", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -22,7 +21,6 @@ "versus": "wsgi" }, "py3": { - "setup_file": "setup_py3", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -42,7 +40,6 @@ "versus": "wsgi" }, "pypy2": { - "setup_file": "setup_pypy2", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/Python/falcon/falcon-py3.dockerfile b/frameworks/Python/falcon/falcon-py3.dockerfile new file mode 100644 index 00000000000..09d4134e9fe --- /dev/null +++ b/frameworks/Python/falcon/falcon-py3.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /falcon + +WORKDIR /falcon + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /falcon/requirements.lock + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/falcon/falcon-pypy2.dockerfile b/frameworks/Python/falcon/falcon-pypy2.dockerfile new file mode 100644 index 00000000000..73d41cbf82c --- /dev/null +++ b/frameworks/Python/falcon/falcon-pypy2.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/pypy2:0.1 + +ADD ./ /falcon + +WORKDIR /falcon + +RUN pip install --install-option="--prefix=${PYPY2_ROOT}" -r /falcon/requirements-pypy.lock + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/falcon/falcon.dockerfile b/frameworks/Python/falcon/falcon.dockerfile new file mode 100644 index 00000000000..a10076af4b0 --- /dev/null +++ b/frameworks/Python/falcon/falcon.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python2:0.1 + +ADD ./ /falcon + +WORKDIR /falcon + +RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /falcon/requirements.lock + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/falcon/setup.sh b/frameworks/Python/falcon/setup.sh deleted file mode 100755 index 270cf8511b5..00000000000 --- a/frameworks/Python/falcon/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends python2 - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements.lock - -gunicorn app:app -c gunicorn_conf.py & diff --git a/frameworks/Python/falcon/setup_py3.sh b/frameworks/Python/falcon/setup_py3.sh deleted file mode 100755 index 37158975091..00000000000 --- a/frameworks/Python/falcon/setup_py3.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.lock - -gunicorn app:app -c gunicorn_conf.py & diff --git a/frameworks/Python/falcon/setup_pypy2.sh b/frameworks/Python/falcon/setup_pypy2.sh deleted file mode 100755 index e61b1febdd0..00000000000 --- a/frameworks/Python/falcon/setup_pypy2.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends pypy2 - -pip install --install-option="--prefix=${PYPY2_ROOT}" -r $TROOT/requirements-pypy.lock - -gunicorn app:app -c gunicorn_conf.py & diff --git a/frameworks/Python/flask/benchmark_config.json b/frameworks/Python/flask/benchmark_config.json index ff6312e0d14..2dc3eff434d 100644 --- a/frameworks/Python/flask/benchmark_config.json +++ b/frameworks/Python/flask/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "flask", "tests": [{ "default": { - "setup_file": "setup_py3", "json_url": "/json", "db_url": "/dbs", "query_url": "/db?queries=", @@ -26,7 +25,6 @@ "versus": "wsgi" }, "raw": { - "setup_file": "setup_py3", "db_url": "/dbsraw", "query_url": "/dbraw?queries=", "fortune_url": "/fortunesraw", @@ -48,7 +46,6 @@ "versus": "wsgi" }, "pypy2": { - "setup_file": "setup_pypy2", "json_url": "/json", "db_url": "/dbs", "query_url": "/db?queries=", @@ -94,7 +91,6 @@ "versus": "wsgi" }, "nginx-uwsgi": { - "setup_file": "setup_nginxuwsgi", "json_url": "/json", "db_url": "/dbs", "query_url": "/db?queries=", diff --git a/frameworks/Python/flask/flask-nginx-uwsgi.dockerfile b/frameworks/Python/flask/flask-nginx-uwsgi.dockerfile new file mode 100644 index 00000000000..c0c71c09a28 --- /dev/null +++ b/frameworks/Python/flask/flask-nginx-uwsgi.dockerfile @@ -0,0 +1,18 @@ +FROM techempower/nginx:0.1 + +FROM techempower/python3:0.1 + +COPY --from=0 /nginx /nginx + +ENV NGINX_HOME="/nginx" +ENV PATH=/nginx/sbin:${PATH} + +ADD ./ /flask + +WORKDIR /flask + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /flask/requirements.txt + +RUN sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' /flask/nginx.conf + +CMD nginx -c /flask/nginx.conf && uwsgi --ini /flask/uwsgi.ini --processes $(($(nproc)*3)) --wsgi app:app diff --git a/frameworks/Python/flask/flask-py3-base.dockerfile b/frameworks/Python/flask/flask-py3-base.dockerfile new file mode 100644 index 00000000000..1807137a778 --- /dev/null +++ b/frameworks/Python/flask/flask-py3-base.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/python3:0.1 + +ADD ./ /flask + +WORKDIR /flask + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /flask/requirements.txt diff --git a/frameworks/Python/flask/flask-pypy2-base.dockerfile b/frameworks/Python/flask/flask-pypy2-base.dockerfile new file mode 100644 index 00000000000..bbba9dd7a4e --- /dev/null +++ b/frameworks/Python/flask/flask-pypy2-base.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/pypy2:0.1 + +ADD ./ /flask + +WORKDIR /flask + +RUN pip install --install-option="--prefix=${PYPY2_ROOT}" -r /flask/requirements-pypy.txt diff --git a/frameworks/Python/flask/flask-pypy2-raw.dockerfile b/frameworks/Python/flask/flask-pypy2-raw.dockerfile new file mode 100644 index 00000000000..7049fb74543 --- /dev/null +++ b/frameworks/Python/flask/flask-pypy2-raw.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/flask-pypy2-base:0.1 + +WORKDIR /flask + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/flask/flask-pypy2.dockerfile b/frameworks/Python/flask/flask-pypy2.dockerfile new file mode 100644 index 00000000000..7049fb74543 --- /dev/null +++ b/frameworks/Python/flask/flask-pypy2.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/flask-pypy2-base:0.1 + +WORKDIR /flask + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/flask/flask-raw.dockerfile b/frameworks/Python/flask/flask-raw.dockerfile new file mode 100644 index 00000000000..5107712c7ad --- /dev/null +++ b/frameworks/Python/flask/flask-raw.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/flask-py3-base:0.1 + +WORKDIR /flask + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/flask/flask.dockerfile b/frameworks/Python/flask/flask.dockerfile new file mode 100644 index 00000000000..92e607eed94 --- /dev/null +++ b/frameworks/Python/flask/flask.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/flask-py3-base:0.1 + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/flask/setup_nginxuwsgi.sh b/frameworks/Python/flask/setup_nginxuwsgi.sh deleted file mode 100755 index aaab37168bc..00000000000 --- a/frameworks/Python/flask/setup_nginxuwsgi.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends mysql python3 nginx - -sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' nginx.conf - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -nginx -c $TROOT/nginx.conf - -uwsgi --ini $TROOT/uwsgi.ini --processes $((CPU_COUNT*3)) --wsgi app:app & diff --git a/frameworks/Python/flask/setup_py3.sh b/frameworks/Python/flask/setup_py3.sh deleted file mode 100755 index ce30e87c0cf..00000000000 --- a/frameworks/Python/flask/setup_py3.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -gunicorn app:app -c gunicorn_conf.py & diff --git a/frameworks/Python/flask/setup_pypy2.sh b/frameworks/Python/flask/setup_pypy2.sh deleted file mode 100755 index 80810508d63..00000000000 --- a/frameworks/Python/flask/setup_pypy2.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql pypy2 - -pip install --install-option="--prefix=${PYPY2_ROOT}" -r $TROOT/requirements-pypy.txt - -gunicorn app:app -c gunicorn_conf.py & diff --git a/frameworks/Python/japronto/benchmark_config.json b/frameworks/Python/japronto/benchmark_config.json index 1470f8ff287..21bb719516d 100644 --- a/frameworks/Python/japronto/benchmark_config.json +++ b/frameworks/Python/japronto/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "japronto", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/Python/japronto/japronto.dockerfile b/frameworks/Python/japronto/japronto.dockerfile new file mode 100644 index 00000000000..d1a45da565c --- /dev/null +++ b/frameworks/Python/japronto/japronto.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /japronto + +WORKDIR /japronto + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /japronto/requirements.txt + +CMD python3 app.py diff --git a/frameworks/Python/japronto/setup.sh b/frameworks/Python/japronto/setup.sh deleted file mode 100755 index 44283b5dc7c..00000000000 --- a/frameworks/Python/japronto/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -python3 app.py & diff --git a/frameworks/Python/klein/app.py b/frameworks/Python/klein/app.py index ab4d2f57a22..41a34f64c91 100644 --- a/frameworks/Python/klein/app.py +++ b/frameworks/Python/klein/app.py @@ -14,18 +14,20 @@ from sqlalchemy.orm import sessionmaker from sqlalchemy.types import String, Integer, Unicode - if sys.version_info[0] == 3: xrange = range -DATABASE_URI = 'mysql://benchmarkdbuser:benchmarkdbpass@TFB-database:3306/hello_world?charset=utf8' +DATABASE_URI = 'mysql://benchmarkdbuser:benchmarkdbpass@tfb-database:3306/hello_world?charset=utf8' Base = declarative_base() db_engine = create_engine(DATABASE_URI) Session = sessionmaker(bind=db_engine) db_session = Session() -env = Environment(loader=PackageLoader("app", "templates"), autoescape=True, auto_reload=False) +env = Environment( + loader=PackageLoader("app", "templates"), + autoescape=True, + auto_reload=False) app = Klein() @@ -41,16 +43,19 @@ def serialize(self): 'randomNumber': self.randomNumber, } + class World(Base): __tablename__ = "World" id = Column(Integer, primary_key=True) randomNumber = Column(Integer) + def serialize(self): return { 'id': self.id, 'randomNumber': self.randomNumber, } + def getQueryNum(queryString): try: num_queries = int(queryString) @@ -60,7 +65,7 @@ def getQueryNum(queryString): return 500 return num_queries except ValueError: - return 1 + return 1 def close_session(func): @@ -70,6 +75,7 @@ def wrapper(request): return func(request) finally: db_session.close() + return wrapper @@ -78,11 +84,13 @@ def plaintext(request): request.setHeader("Content-Type", "text/plain; charset=UTF-8") return "Hello, World!" + @app.route("/json") def jsonHandler(request): request.setHeader("Content-Type", "application/json; charset=UTF-8") return json.dumps({"message": "Hello, World!"}) + @app.route("/db") @close_session def db(request): @@ -91,6 +99,7 @@ def db(request): world = db_session.query(World).get(wid).serialize() return json.dumps(world) + @app.route("/queries") @close_session def queries(request): @@ -101,6 +110,7 @@ def queries(request): worlds = [get(rp()).serialize() for _ in xrange(num_queries)] return json.dumps(worlds) + @app.route("/updates") @close_session def updates(request): @@ -117,16 +127,19 @@ def updates(request): db_session.commit() return json.dumps(worlds) + @app.route("/fortune") @close_session def fortune(request): request.setHeader("Content-Type", "text/html; charset=UTF-8") fortunes = db_session.query(Fortune).all() - fortunes.append(Fortune(id=0, message="Additional fortune added at request time.")) + fortunes.append( + Fortune(id=0, message="Additional fortune added at request time.")) fortunes.sort(key=attrgetter("message")) template = env.get_template("fortunes.html") return template.render(fortunes=fortunes) + if __name__ == "__main__": app.run("0.0.0.0", 8080) diff --git a/frameworks/Python/klein/benchmark_config.json b/frameworks/Python/klein/benchmark_config.json index a2cd71cae31..e43ece59d8d 100644 --- a/frameworks/Python/klein/benchmark_config.json +++ b/frameworks/Python/klein/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "klein", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Python/klein/klein.dockerfile b/frameworks/Python/klein/klein.dockerfile new file mode 100644 index 00000000000..4230d362000 --- /dev/null +++ b/frameworks/Python/klein/klein.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python2:0.1 + +ADD ./ /klein + +WORKDIR /klein + +RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /klein/requirements.txt + +CMD python app.py diff --git a/frameworks/Python/klein/setup.sh b/frameworks/Python/klein/setup.sh deleted file mode 100644 index 8018015155a..00000000000 --- a/frameworks/Python/klein/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql python2 - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements.txt - -python app.py & diff --git a/frameworks/Python/morepath/.gitignore b/frameworks/Python/morepath/.gitignore deleted file mode 100644 index 8b6dae7326f..00000000000 --- a/frameworks/Python/morepath/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.venv -*.egg-info -__pycache__ -.coverage -htmlcov -.cache diff --git a/frameworks/Python/morepath/benchmark_config.json b/frameworks/Python/morepath/benchmark_config.json index 9b6d6030639..43f1b3200d4 100644 --- a/frameworks/Python/morepath/benchmark_config.json +++ b/frameworks/Python/morepath/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "morepath", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Python/morepath/morepath.dockerfile b/frameworks/Python/morepath/morepath.dockerfile new file mode 100644 index 00000000000..9d3a47a23a5 --- /dev/null +++ b/frameworks/Python/morepath/morepath.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /japronto + +WORKDIR /japronto + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /japronto/requirements.txt + +CMD gunicorn app.run -c gunicorn_conf.py diff --git a/frameworks/Python/morepath/setup.sh b/frameworks/Python/morepath/setup.sh deleted file mode 100644 index 8a5382a813f..00000000000 --- a/frameworks/Python/morepath/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -gunicorn app.run -c gunicorn_conf.py & diff --git a/frameworks/Python/pyramid/.gitignore b/frameworks/Python/pyramid/.gitignore deleted file mode 100644 index aa1c0cc07e8..00000000000 --- a/frameworks/Python/pyramid/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.venv -*.egg-info -__pycache__ -*.pt.py -*.egg -.coverage diff --git a/frameworks/Python/pyramid/benchmark_config.json b/frameworks/Python/pyramid/benchmark_config.json index f7bc97751ce..6c398684ae4 100644 --- a/frameworks/Python/pyramid/benchmark_config.json +++ b/frameworks/Python/pyramid/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "pyramid", "tests": [{ "default": { - "setup_file": "setup_py3", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -26,7 +25,6 @@ "versus": "wsgi" }, "py2": { - "setup_file": "setup_py2", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Python/pyramid/frameworkbenchmarks/models.py b/frameworks/Python/pyramid/frameworkbenchmarks/models.py index 59ea03742ab..80bde820093 100644 --- a/frameworks/Python/pyramid/frameworkbenchmarks/models.py +++ b/frameworks/Python/pyramid/frameworkbenchmarks/models.py @@ -11,14 +11,15 @@ from sqlalchemy.pool import QueuePool from sqlalchemy.ext.declarative import declarative_base, DeclarativeMeta + def get_conn(): return psycopg2.connect( - user = 'benchmarkdbuser', - password = 'benchmarkdbpass', - host = 'TFB-database', - port = '5432', - database = 'hello_world' - ) + user='benchmarkdbuser', + password='benchmarkdbpass', + host='tfb-database', + port='5432', + database='hello_world') + conn_pool = QueuePool(get_conn, pool_size=100, max_overflow=25, echo=False) @@ -28,12 +29,12 @@ def get_conn(): DatabaseBase = declarative_base() + def sqlalchemy_encoder_factory(system_values): return SQLAlchemyEncoder() class SQLAlchemyEncoder(json.JSONEncoder): - def __call__(self, obj, system_values): if isinstance(obj, Iterable): return json.dumps([self.default(x) for x in obj]) @@ -50,7 +51,8 @@ class World(DatabaseBase): __tablename__ = 'world' id = Column('id', Integer, primary_key=True) - randomNumber = Column('randomnumber', Integer, nullable=False, server_default='0') + randomNumber = Column( + 'randomnumber', Integer, nullable=False, server_default='0') def __json__(self): return {'id': self.id, 'randomNumber': self.randomNumber} diff --git a/frameworks/Python/pyramid/pyramid-py2.dockerfile b/frameworks/Python/pyramid/pyramid-py2.dockerfile new file mode 100644 index 00000000000..24f11a45059 --- /dev/null +++ b/frameworks/Python/pyramid/pyramid-py2.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python2:0.1 + +ADD ./ /pyramid + +WORKDIR /pyramid + +RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /pyramid/requirements.txt + +CMD gunicorn wsgi:app -c gunicorn_conf.py diff --git a/frameworks/Python/pyramid/pyramid.dockerfile b/frameworks/Python/pyramid/pyramid.dockerfile new file mode 100644 index 00000000000..2ef00b04bf9 --- /dev/null +++ b/frameworks/Python/pyramid/pyramid.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /pyramid + +WORKDIR /pyramid + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /pyramid/requirements.txt + +CMD gunicorn wsgi:app -c gunicorn_conf.py diff --git a/frameworks/Python/pyramid/setup_py2.sh b/frameworks/Python/pyramid/setup_py2.sh deleted file mode 100755 index d93198729bc..00000000000 --- a/frameworks/Python/pyramid/setup_py2.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql python2 - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements.txt - -gunicorn wsgi:app -c gunicorn_conf.py & diff --git a/frameworks/Python/pyramid/setup_py3.sh b/frameworks/Python/pyramid/setup_py3.sh deleted file mode 100755 index 62acf3df5f6..00000000000 --- a/frameworks/Python/pyramid/setup_py3.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -gunicorn wsgi:app -c gunicorn_conf.py & diff --git a/frameworks/Python/sanic/benchmark_config.json b/frameworks/Python/sanic/benchmark_config.json index 8546d8212a4..ba6a5d40358 100644 --- a/frameworks/Python/sanic/benchmark_config.json +++ b/frameworks/Python/sanic/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "sanic", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/Python/sanic/sanic.dockerfile b/frameworks/Python/sanic/sanic.dockerfile new file mode 100644 index 00000000000..594222980ca --- /dev/null +++ b/frameworks/Python/sanic/sanic.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /sanic + +WORKDIR /sanic + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /sanic/requirements.txt + +CMD python3 app.py diff --git a/frameworks/Python/sanic/setup.sh b/frameworks/Python/sanic/setup.sh deleted file mode 100755 index 44283b5dc7c..00000000000 --- a/frameworks/Python/sanic/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -python3 app.py & diff --git a/frameworks/Python/tornado/benchmark_config.json b/frameworks/Python/tornado/benchmark_config.json index 1e85e5e1588..e0c365be6b4 100644 --- a/frameworks/Python/tornado/benchmark_config.json +++ b/frameworks/Python/tornado/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "tornado", "tests": [{ "default": { - "setup_file": "setup_py2", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -26,7 +25,6 @@ "versus": "tornado" }, "pypy2": { - "setup_file": "setup_pypy2", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -50,7 +48,6 @@ "versus": "tornado" }, "postgresql-raw": { - "setup_file": "setup_pg", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -72,7 +69,6 @@ "versus": "tornado" }, "py3": { - "setup_file": "setup_py3", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Python/tornado/requirements_mongo.txt b/frameworks/Python/tornado/requirements_mongo.txt index 47c9dc0b3ba..b7760ed8e99 100644 --- a/frameworks/Python/tornado/requirements_mongo.txt +++ b/frameworks/Python/tornado/requirements_mongo.txt @@ -1,2 +1,2 @@ -tornado==4.5.1 -motor==1.1 +tornado==5.0.1 +motor==1.2.1 diff --git a/frameworks/Python/tornado/requirements_pg.txt b/frameworks/Python/tornado/requirements_pg.txt index 44dc8cbfd8b..7955984bb0e 100644 --- a/frameworks/Python/tornado/requirements_pg.txt +++ b/frameworks/Python/tornado/requirements_pg.txt @@ -1,2 +1,2 @@ -tornado==4.5.1 +tornado==5.0.1 Momoko==2.2.4 diff --git a/frameworks/Python/tornado/server_pg.py b/frameworks/Python/tornado/server_pg.py index 721026bcebf..1a354d80dbc 100755 --- a/frameworks/Python/tornado/server_pg.py +++ b/frameworks/Python/tornado/server_pg.py @@ -12,7 +12,7 @@ tornado.options.define('port', default=8888, type=int, help="Server port") -tornado.options.define('postgres', default=None, +tornado.options.define('postgres', default="localhost", type=str, help="PostgreSQL host") tornado.options.define('backlog', default=8192, type=int, help="Server backlog") diff --git a/frameworks/Python/tornado/server_py3.py b/frameworks/Python/tornado/server_py3.py index b161ca5a5d2..7bcf9e884dc 100644 --- a/frameworks/Python/tornado/server_py3.py +++ b/frameworks/Python/tornado/server_py3.py @@ -1,5 +1,5 @@ #!/usr/bin/env python - +import asyncio import json import motor import tornado.ioloop @@ -9,9 +9,6 @@ from random import randint from tornado.options import options from commons import JsonHandler, JsonHelloWorldHandler, PlaintextHelloWorldHandler, HtmlHandler -from tornado.ioloop import IOLoop - -IOLoop.configure('tornado.platform.asyncio.AsyncIOLoop') options.define('port', default=8888, type=int, help="Server port") @@ -44,8 +41,10 @@ async def get(self): queries = 500 worlds = [] - for future in [db.world.find_one(randint(1, 10000)) for _ in range(queries)]: - world = await future + futures, _ = await asyncio.wait([db.world.find_one(randint(1, 10000)) for _ in range(queries)]) + + for future in futures: + world = future.result() worlds.append({self.ID: int(world['_id']), self.RANDOM_NUMBER: int(world[self.RANDOM_NUMBER])}) @@ -66,15 +65,17 @@ async def get(self): queries = 500 worlds = [] - futures = [db.world.find_one(randint(1, 10000)) for _ in range(queries)] + updates = [] + futures, _ = await asyncio.wait([db.world.find_one(randint(1, 10000)) for _ in range(queries)]) - for world in futures: - world = await world + for future in futures: + world = future.result() new_value = randint(1, 10000) - await db.world.update_one({'_id': world['_id']}, {"$set": {self.RANDOM_NUMBER: new_value}}) + updates.append(db.world.update_one({'_id': world['_id']}, {"$set": {self.RANDOM_NUMBER: new_value}})) worlds.append({self.ID: int(world['_id']), self.RANDOM_NUMBER: world[self.RANDOM_NUMBER]}) + await asyncio.wait(updates) self.finish(json.dumps(worlds)) diff --git a/frameworks/Python/tornado/setup_pg.sh b/frameworks/Python/tornado/setup_pg.sh deleted file mode 100755 index 71393ce89dd..00000000000 --- a/frameworks/Python/tornado/setup_pg.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql python2 - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements_pg.txt - -python server_pg.py --port=8080 --postgres=$DBHOST --logging=error & diff --git a/frameworks/Python/tornado/setup_py2.sh b/frameworks/Python/tornado/setup_py2.sh deleted file mode 100755 index 3ee576fd392..00000000000 --- a/frameworks/Python/tornado/setup_py2.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mongodb python2 - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements_mongo.txt - -python server_py2.py --port=8080 --mongo=$DBHOST --logging=error & diff --git a/frameworks/Python/tornado/setup_py3.sh b/frameworks/Python/tornado/setup_py3.sh deleted file mode 100755 index 42672b059a0..00000000000 --- a/frameworks/Python/tornado/setup_py3.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mongodb python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements_mongo.txt - -python3 server_py3.py --port=8080 --mongo=$DBHOST --logging=error & diff --git a/frameworks/Python/tornado/setup_pypy2.sh b/frameworks/Python/tornado/setup_pypy2.sh deleted file mode 100755 index 9c40fab17d4..00000000000 --- a/frameworks/Python/tornado/setup_pypy2.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mongodb pypy2 - -pip install --install-option="--prefix=${PYPY2_ROOT}" -r $TROOT/requirements_mongo.txt - -pypy server_py2.py --port=8080 --mongo=$DBHOST --logging=error & diff --git a/frameworks/Python/tornado/tornado-postgresql-raw.dockerfile b/frameworks/Python/tornado/tornado-postgresql-raw.dockerfile new file mode 100644 index 00000000000..66ac953e400 --- /dev/null +++ b/frameworks/Python/tornado/tornado-postgresql-raw.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python2:0.1 + +ADD ./ /tornado + +WORKDIR /tornado + +RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /tornado/requirements_pg.txt + +CMD python server_pg.py --port=8080 --postgres=$DBHOST --logging=error diff --git a/frameworks/Python/tornado/tornado-py3.dockerfile b/frameworks/Python/tornado/tornado-py3.dockerfile new file mode 100644 index 00000000000..a02c46a9bdb --- /dev/null +++ b/frameworks/Python/tornado/tornado-py3.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /pyramid + +WORKDIR /pyramid + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /pyramid/requirements_mongo.txt + +CMD python3 server_py3.py --port=8080 --mongo=$DBHOST --logging=error diff --git a/frameworks/Python/tornado/tornado-pypy2.dockerfile b/frameworks/Python/tornado/tornado-pypy2.dockerfile new file mode 100644 index 00000000000..307ebb1986d --- /dev/null +++ b/frameworks/Python/tornado/tornado-pypy2.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/pypy2:0.1 + +ADD ./ /tornado + +WORKDIR /tornado + +RUN pip install --install-option="--prefix=${PYPY2_ROOT}" -r /tornado/requirements_mongo.txt + +CMD pypy server_py2.py --port=8080 --mongo=$DBHOST --logging=error diff --git a/frameworks/Python/tornado/tornado.dockerfile b/frameworks/Python/tornado/tornado.dockerfile new file mode 100644 index 00000000000..20209d4e06b --- /dev/null +++ b/frameworks/Python/tornado/tornado.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python2:0.1 + +ADD ./ /tornado + +WORKDIR /tornado + +RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /tornado/requirements_mongo.txt + +CMD python server_py2.py --port=8080 --mongo=$DBHOST --logging=error diff --git a/frameworks/Python/turbogears/benchmark_config.json b/frameworks/Python/turbogears/benchmark_config.json index 6ee4afd10fa..598444aa955 100644 --- a/frameworks/Python/turbogears/benchmark_config.json +++ b/frameworks/Python/turbogears/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "turbogears", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Python/turbogears/setup.sh b/frameworks/Python/turbogears/setup.sh deleted file mode 100755 index 996c149fa12..00000000000 --- a/frameworks/Python/turbogears/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql python2 - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements.txt - -gunicorn app:app -c gunicorn_conf.py & diff --git a/frameworks/Python/turbogears/turbogears.dockerfile b/frameworks/Python/turbogears/turbogears.dockerfile new file mode 100644 index 00000000000..e8c93d5291a --- /dev/null +++ b/frameworks/Python/turbogears/turbogears.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python2:0.1 + +ADD ./ /turbogears + +WORKDIR /turbogears + +RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /turbogears/requirements.txt + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/uvicorn/benchmark_config.json b/frameworks/Python/uvicorn/benchmark_config.json index 70af0709838..1693737cad1 100644 --- a/frameworks/Python/uvicorn/benchmark_config.json +++ b/frameworks/Python/uvicorn/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "uvicorn", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "fortune_url": "/fortunes", "plaintext_url": "/plaintext", diff --git a/frameworks/Python/uvicorn/setup.sh b/frameworks/Python/uvicorn/setup.sh deleted file mode 100755 index 6fdfcc19990..00000000000 --- a/frameworks/Python/uvicorn/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -uvicorn app:main -c uvicorn_conf.py & diff --git a/frameworks/Python/uvicorn/uvicorn.dockerfile b/frameworks/Python/uvicorn/uvicorn.dockerfile new file mode 100644 index 00000000000..93acb0f79c2 --- /dev/null +++ b/frameworks/Python/uvicorn/uvicorn.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /uvicorn + +WORKDIR /uvicorn + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /uvicorn/requirements.txt + +CMD uvicorn app:main -c uvicorn_conf.py diff --git a/frameworks/Python/uwsgi/benchmark_config.json b/frameworks/Python/uwsgi/benchmark_config.json index 52a467107fe..5b9567dfc11 100644 --- a/frameworks/Python/uwsgi/benchmark_config.json +++ b/frameworks/Python/uwsgi/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "uwsgi", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "port": 8080, "approach": "Stripped", @@ -21,7 +20,6 @@ "versus": "" }, "nginx-uwsgi": { - "setup_file": "setup_nginx", "json_url": "/json", "port": 8080, "approach": "Stripped", diff --git a/frameworks/Python/uwsgi/setup.sh b/frameworks/Python/uwsgi/setup.sh deleted file mode 100755 index 8d86d4caaf9..00000000000 --- a/frameworks/Python/uwsgi/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends python2 - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements.txt - -uwsgi --master -L -l 5000 --gevent 1000 --http :8080 --http-keepalive --http-processes $CPU_COUNT -p $CPU_COUNT -w hello --add-header "Connection: keep-alive" --pidfile /tmp/uwsgi.pid & diff --git a/frameworks/Python/uwsgi/setup_nginx.sh b/frameworks/Python/uwsgi/setup_nginx.sh deleted file mode 100755 index f39223b055a..00000000000 --- a/frameworks/Python/uwsgi/setup_nginx.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends python2 nginx - -sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' nginx.conf - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements.txt - -nginx -c $TROOT/nginx.conf - -uwsgi --ini uwsgi.ini --processes $CPU_COUNT --gevent 1000 --wsgi hello & diff --git a/frameworks/Python/uwsgi/uwsgi-nginx-uwsgi.dockerfile b/frameworks/Python/uwsgi/uwsgi-nginx-uwsgi.dockerfile new file mode 100644 index 00000000000..29103422240 --- /dev/null +++ b/frameworks/Python/uwsgi/uwsgi-nginx-uwsgi.dockerfile @@ -0,0 +1,18 @@ +FROM techempower/nginx:0.1 + +FROM techempower/python2:0.1 + +COPY --from=0 /nginx /nginx + +ENV NGINX_HOME="/nginx" +ENV PATH=/nginx/sbin:${PATH} + +ADD ./ /uw + +WORKDIR /uw + +RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /uw/requirements.txt + +RUN sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' /uw/nginx.conf + +CMD nginx -c /uw/nginx.conf && uwsgi --ini uwsgi.ini --processes $(nproc) --gevent 1000 --wsgi hello diff --git a/frameworks/Python/uwsgi/uwsgi.dockerfile b/frameworks/Python/uwsgi/uwsgi.dockerfile new file mode 100644 index 00000000000..9a331c3a27b --- /dev/null +++ b/frameworks/Python/uwsgi/uwsgi.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python2:0.1 + +ADD ./ /uw + +WORKDIR /uw + +RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /uw/requirements.txt + +CMD uwsgi --master -L -l 5000 --gevent 1000 --http :8080 --http-keepalive --http-processes $(nproc) -p $(nproc) -w hello --add-header "Connection: keep-alive" --pidfile /tmp/uwsgi.pid diff --git a/frameworks/Python/web2py/.gitignore b/frameworks/Python/web2py/.gitignore deleted file mode 100644 index 9c5c7fe9c39..00000000000 --- a/frameworks/Python/web2py/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/web2py/ diff --git a/frameworks/Python/web2py/benchmark_config.json b/frameworks/Python/web2py/benchmark_config.json index fa1643b9446..d1349f5633e 100644 --- a/frameworks/Python/web2py/benchmark_config.json +++ b/frameworks/Python/web2py/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "web2py", "tests": [{ "default": { - "setup_file": "setup", "plaintext_url": "/standard/plaintext", "json_url": "/standard/json", "db_url": "/standard/db", @@ -26,7 +25,6 @@ "versus": "wsgi" }, "optimized": { - "setup_file": "setup", "plaintext_url": "/optimized/plaintext", "json_url": "/optimized/json", "db_url": "/optimized/db", diff --git a/frameworks/Python/web2py/setup.sh b/frameworks/Python/web2py/setup.sh deleted file mode 100644 index 5544518eba0..00000000000 --- a/frameworks/Python/web2py/setup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -fw_depends mysql python2 - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements.txt - -rm -fr web2py -git clone --recursive --branch master https://github.com/web2py/web2py.git -cd web2py -# The following commit is checked out in order to take advantage of several -# bug fixes that were made after the latest stable release. This can be changed -# in future rounds once a new stable release has been made. -git checkout 623f3b99477eb97ffadb20d6f7cb3da398253c9c -cd .. -cp -r app/standard/ web2py/applications/ -cp -r app/optimized/ web2py/applications/ -cp app/wsgi.py web2py/ -cp app/routes.py web2py/ -touch web2py/__init__.py -python compile_apps.py - -gunicorn web2py.wsgi:application -c gunicorn_conf.py & diff --git a/frameworks/Python/web2py/web2py-base.dockerfile b/frameworks/Python/web2py/web2py-base.dockerfile new file mode 100644 index 00000000000..4ceb110c86a --- /dev/null +++ b/frameworks/Python/web2py/web2py-base.dockerfile @@ -0,0 +1,25 @@ +FROM techempower/python2:0.1 + +ADD ./ /web2py + +WORKDIR /web2py + +RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /web2py/requirements.txt + +RUN git clone --recursive --branch master https://github.com/web2py/web2py.git + +WORKDIR /web2py/web2py + +# The following commit is checked out in order to take advantage of several +# bug fixes that were made after the latest stable release. This can be changed +# in future rounds once a new stable release has been made. +RUN git checkout 623f3b99477eb97ffadb20d6f7cb3da398253c9c + +WORKDIR /web2py + +RUN cp -r app/standard/ web2py/applications/ +RUN cp -r app/optimized/ web2py/applications/ +RUN cp app/wsgi.py web2py/ +RUN cp app/routes.py web2py/ +RUN touch web2py/__init__.py +RUN python compile_apps.py diff --git a/frameworks/Python/web2py/web2py-optimized.dockerfile b/frameworks/Python/web2py/web2py-optimized.dockerfile new file mode 100644 index 00000000000..ee671e4a14c --- /dev/null +++ b/frameworks/Python/web2py/web2py-optimized.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/web2py-base:0.1 + +WORKDIR /web2py + +CMD gunicorn web2py.wsgi:application -c gunicorn_conf.py diff --git a/frameworks/Python/web2py/web2py.dockerfile b/frameworks/Python/web2py/web2py.dockerfile new file mode 100644 index 00000000000..ee671e4a14c --- /dev/null +++ b/frameworks/Python/web2py/web2py.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/web2py-base:0.1 + +WORKDIR /web2py + +CMD gunicorn web2py.wsgi:application -c gunicorn_conf.py diff --git a/frameworks/Python/webware/.gitignore b/frameworks/Python/webware/.gitignore deleted file mode 100644 index c0ac336f3d8..00000000000 --- a/frameworks/Python/webware/.gitignore +++ /dev/null @@ -1 +0,0 @@ -Webware* diff --git a/frameworks/Python/webware/benchmark_config.json b/frameworks/Python/webware/benchmark_config.json index cb4452acb12..988504b0af2 100644 --- a/frameworks/Python/webware/benchmark_config.json +++ b/frameworks/Python/webware/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "webware", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json2", "plaintext_url": "/plaintext", "db_url": "/db", diff --git a/frameworks/Python/webware/setup.sh b/frameworks/Python/webware/setup.sh deleted file mode 100644 index 6eff24239f4..00000000000 --- a/frameworks/Python/webware/setup.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -fw_depends mysql python2 apache - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements.txt - -rm -fr Webware Webware-1.1.1 Webware-1.1.1.tar.gz - -fw_get -O https://downloads.sourceforge.net/webware/Webware-1.1.1.tar.gz -fw_untar Webware-1.1.1.tar.gz -cp -r app/ Webware-1.1.1/ - -cd $TROOT/Webware-1.1.1 -python install.py --no-password-prompt -cd $TROOT/Webware-1.1.1/app -python Launch.py & diff --git a/frameworks/Python/webware/webware.dockerfile b/frameworks/Python/webware/webware.dockerfile new file mode 100644 index 00000000000..6ee0b2c6096 --- /dev/null +++ b/frameworks/Python/webware/webware.dockerfile @@ -0,0 +1,19 @@ +FROM techempower/python2:0.1 + +ADD ./ /webware + +WORKDIR /webware + +RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /webware/requirements.txt + +RUN wget -q https://downloads.sourceforge.net/webware/Webware-1.1.1.tar.gz +RUN tar xf Webware-1.1.1.tar.gz +RUN cp -r app/ Webware-1.1.1/ + +WORKDIR /webware/Webware-1.1.1 + +RUN python install.py --no-password-prompt + +WORKDIR /webware/Webware-1.1.1/app + +CMD python Launch.py diff --git a/frameworks/Python/weppy/benchmark_config.json b/frameworks/Python/weppy/benchmark_config.json index fc577c5e63c..8fd3e455e4a 100644 --- a/frameworks/Python/weppy/benchmark_config.json +++ b/frameworks/Python/weppy/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "weppy", "tests": [{ "default": { - "setup_file": "setup_py2", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -25,7 +24,6 @@ "versus": "wsgi" }, "py3": { - "setup_file": "setup_py3", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -48,7 +46,6 @@ "versus": "wsgi" }, "pypy2": { - "setup_file": "setup_pypy2", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -72,7 +69,6 @@ "versus": "wsgi" }, "nginx-uwsgi": { - "setup_file": "setup_nginxuwsgi", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Python/weppy/setup_nginxuwsgi.sh b/frameworks/Python/weppy/setup_nginxuwsgi.sh deleted file mode 100644 index e33866a06ec..00000000000 --- a/frameworks/Python/weppy/setup_nginxuwsgi.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends postgresql python2 nginx - -sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' nginx.conf - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements.txt - -nginx -c $TROOT/nginx.conf - -uwsgi --ini $TROOT/uwsgi.ini --processes $CPU_COUNT --wsgi app:app & diff --git a/frameworks/Python/weppy/setup_py2.sh b/frameworks/Python/weppy/setup_py2.sh deleted file mode 100644 index 5c6990d3dd3..00000000000 --- a/frameworks/Python/weppy/setup_py2.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql python2 - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements.txt - -gunicorn app:app -c gunicorn_conf.py & diff --git a/frameworks/Python/weppy/setup_py3.sh b/frameworks/Python/weppy/setup_py3.sh deleted file mode 100644 index 5ca06186095..00000000000 --- a/frameworks/Python/weppy/setup_py3.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -gunicorn app:app -c gunicorn_conf.py & diff --git a/frameworks/Python/weppy/setup_pypy2.sh b/frameworks/Python/weppy/setup_pypy2.sh deleted file mode 100644 index 2df32e2f94e..00000000000 --- a/frameworks/Python/weppy/setup_pypy2.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql pypy2 - -pip install --install-option="--prefix=${PYPY2_ROOT}" -r $TROOT/requirements-pypy.txt - -gunicorn app:app -c gunicorn_conf.py & diff --git a/frameworks/Python/weppy/weppy-nginx-uwsgi.dockerfile b/frameworks/Python/weppy/weppy-nginx-uwsgi.dockerfile new file mode 100644 index 00000000000..82b30c07c5d --- /dev/null +++ b/frameworks/Python/weppy/weppy-nginx-uwsgi.dockerfile @@ -0,0 +1,18 @@ +FROM techempower/nginx:0.1 + +FROM techempower/python2:0.1 + +COPY --from=0 /nginx /nginx + +ENV NGINX_HOME="/nginx" +ENV PATH=/nginx/sbin:${PATH} + +ADD ./ /weppy + +WORKDIR /weppy + +RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /weppy/requirements.txt + +RUN sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' /weppy/nginx.conf + +CMD nginx -c /weppy/nginx.conf && uwsgi --ini /weppy/uwsgi.ini --processes $(nproc) --wsgi app:app diff --git a/frameworks/Python/weppy/weppy-py3.dockerfile b/frameworks/Python/weppy/weppy-py3.dockerfile new file mode 100644 index 00000000000..b82eceb1777 --- /dev/null +++ b/frameworks/Python/weppy/weppy-py3.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /weppy + +WORKDIR /weppy + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /weppy/requirements.txt + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/weppy/weppy-pypy2.dockerfile b/frameworks/Python/weppy/weppy-pypy2.dockerfile new file mode 100644 index 00000000000..7f934ff4ce7 --- /dev/null +++ b/frameworks/Python/weppy/weppy-pypy2.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/pypy2:0.1 + +ADD ./ /weppy + +WORKDIR /weppy + +RUN pip install --install-option="--prefix=${PYPY2_ROOT}" -r /weppy/requirements-pypy.txt + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/weppy/weppy.dockerfile b/frameworks/Python/weppy/weppy.dockerfile new file mode 100644 index 00000000000..c4f2709c61c --- /dev/null +++ b/frameworks/Python/weppy/weppy.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python2:0.1 + +ADD ./ /weppy + +WORKDIR /weppy + +RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /weppy/requirements.txt + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/wheezyweb/benchmark_config.json b/frameworks/Python/wheezyweb/benchmark_config.json index 5273cf65b70..0a38bdfa8d1 100644 --- a/frameworks/Python/wheezyweb/benchmark_config.json +++ b/frameworks/Python/wheezyweb/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "wheezyweb", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -25,7 +24,6 @@ "notes": "" }, "py3": { - "setup_file": "setup_py3", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Python/wheezyweb/setup.sh b/frameworks/Python/wheezyweb/setup.sh deleted file mode 100755 index 996c149fa12..00000000000 --- a/frameworks/Python/wheezyweb/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql python2 - -pip install --install-option="--prefix=${PY2_ROOT}" -r $TROOT/requirements.txt - -gunicorn app:app -c gunicorn_conf.py & diff --git a/frameworks/Python/wheezyweb/setup_py3.sh b/frameworks/Python/wheezyweb/setup_py3.sh deleted file mode 100755 index ce30e87c0cf..00000000000 --- a/frameworks/Python/wheezyweb/setup_py3.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -gunicorn app:app -c gunicorn_conf.py & diff --git a/frameworks/Python/wheezyweb/wheezyweb-py3.dockerfile b/frameworks/Python/wheezyweb/wheezyweb-py3.dockerfile new file mode 100644 index 00000000000..16eb25bf962 --- /dev/null +++ b/frameworks/Python/wheezyweb/wheezyweb-py3.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /wheezyweb + +WORKDIR /wheezyweb + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /wheezyweb/requirements.txt + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/wheezyweb/wheezyweb.dockerfile b/frameworks/Python/wheezyweb/wheezyweb.dockerfile new file mode 100644 index 00000000000..ad513649957 --- /dev/null +++ b/frameworks/Python/wheezyweb/wheezyweb.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python2:0.1 + +ADD ./ /wheezyweb + +WORKDIR /wheezyweb + +RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /wheezyweb/requirements.txt + +CMD gunicorn app:app -c gunicorn_conf.py diff --git a/frameworks/Python/wsgi/benchmark_config.json b/frameworks/Python/wsgi/benchmark_config.json index 577b242b591..4b597b803b9 100644 --- a/frameworks/Python/wsgi/benchmark_config.json +++ b/frameworks/Python/wsgi/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "wsgi", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/Python/wsgi/setup.sh b/frameworks/Python/wsgi/setup.sh deleted file mode 100755 index 081e523c342..00000000000 --- a/frameworks/Python/wsgi/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends python3 - -pip3 install --install-option="--prefix=${PY3_ROOT}" -r $TROOT/requirements.txt - -gunicorn hello:app -c gunicorn_conf.py & diff --git a/frameworks/Python/wsgi/wsgi.dockerfile b/frameworks/Python/wsgi/wsgi.dockerfile new file mode 100644 index 00000000000..ca7b5c51aff --- /dev/null +++ b/frameworks/Python/wsgi/wsgi.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/python3:0.1 + +ADD ./ /wsgi + +WORKDIR /wsgi + +RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /wsgi/requirements.txt + +CMD gunicorn hello:app -c gunicorn_conf.py diff --git a/frameworks/Ruby/grape/.gitignore b/frameworks/Ruby/grape/.gitignore deleted file mode 100644 index a8fdfed281d..00000000000 --- a/frameworks/Ruby/grape/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.bundle -/vendor/ -/tmp/ -Gemfile.lock diff --git a/frameworks/Ruby/grape/Gemfile b/frameworks/Ruby/grape/Gemfile index 4dabeec334e..2476663b81f 100644 --- a/frameworks/Ruby/grape/Gemfile +++ b/frameworks/Ruby/grape/Gemfile @@ -1,21 +1,10 @@ source 'http://rubygems.org' -platforms :jruby do - gem 'activerecord-jdbcmysql-adapter', '~> 1.3.9', :require => false - gem 'torquebox', '3.2.0' - gem 'trinidad', '1.4.6' -end - -platforms :ruby do - gem 'mysql2', '0.4.5' - gem 'unicorn', '5.3.0' - gem 'thin', '1.7.0' -end - +gem 'mysql2', '0.4.10' +gem 'unicorn', '5.3.0' gem 'puma', '~> 3.9.1' - -gem 'activerecord', '5.1.0', :require => 'active_record' +gem 'activerecord', '5.1.5', :require => 'active_record' gem 'activerecord-import', "~> 0.18.1" -gem 'grape', '0.19.2' +gem 'grape', '1.0.2' gem 'rack', '1.6.5' gem 'json', '2.1.0' diff --git a/frameworks/Ruby/grape/benchmark_config.json b/frameworks/Ruby/grape/benchmark_config.json index 9c4ed6277d1..f0afa34bc72 100644 --- a/frameworks/Ruby/grape/benchmark_config.json +++ b/frameworks/Ruby/grape/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "grape", "tests": [{ "default": { - "setup_file": "run_mri_puma", "json_url": "/json", "db_url": "/db", "query_url": "/query?queries=", @@ -23,30 +22,7 @@ "notes": "", "versus": "rack-puma-mri" }, - "thin": { - "setup_file": "run_mri_thin", - "json_url": "/json", - "db_url": "/db", - "query_url": "/query?queries=", - "update_url": "/updates?queries=", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "MySQL", - "framework": "grape", - "language": "Ruby", - "orm": "Full", - "platform": "Rack", - "webserver": "Thin", - "os": "Linux", - "database_os": "Linux", - "display_name": "grape-thin-mri", - "notes": "", - "versus": "rack-thin-mri" - }, "unicorn": { - "setup_file": "run_mri_unicorn", "json_url": "/json", "db_url": "/db", "query_url": "/query?queries=", diff --git a/frameworks/Ruby/grape/config.ru b/frameworks/Ruby/grape/config.ru index ee97276790d..8c4ad932e7a 100644 --- a/frameworks/Ruby/grape/config.ru +++ b/frameworks/Ruby/grape/config.ru @@ -1,5 +1,6 @@ require 'erb' require 'active_record' +require 'yaml' Bundler.require :default diff --git a/frameworks/Ruby/grape/config/database.yml b/frameworks/Ruby/grape/config/database.yml index d427ccedc14..f69080e07bd 100644 --- a/frameworks/Ruby/grape/config/database.yml +++ b/frameworks/Ruby/grape/config/database.yml @@ -1,9 +1,9 @@ production: - adapter: <%= RUBY_PLATFORM == 'java' ? 'jdbcmysql' : 'mysql2' %> + adapter: mysql2 encoding: utf8 - host: localhost + host: tfb-database database: hello_world username: benchmarkdbuser password: benchmarkdbpass - pool: 256 + pool: 512 timeout: 5000 diff --git a/frameworks/Ruby/grape/config/nginx.conf b/frameworks/Ruby/grape/config/nginx.conf index dd4984f3256..50821281f05 100644 --- a/frameworks/Ruby/grape/config/nginx.conf +++ b/frameworks/Ruby/grape/config/nginx.conf @@ -37,7 +37,7 @@ events { http { # nginx will find this file in the config directory set at nginx build time - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; # fallback in case we can't determine a type default_type application/octet-stream; @@ -76,7 +76,7 @@ http { # single worker for timing out). # for UNIX domain socket setups: - server unix:/tmp/.sock fail_timeout=0; + server unix:/tmp/unicorn.sock fail_timeout=0; # for TCP setups, point these to your backend servers # server 192.168.0.7:8080 fail_timeout=0; diff --git a/frameworks/Ruby/grape/config/thin.yml b/frameworks/Ruby/grape/config/thin.yml deleted file mode 100644 index 132f66a3135..00000000000 --- a/frameworks/Ruby/grape/config/thin.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -timeout: 30 -wait: 30 -max_conns: 1024 -max_persistent_conns: 512 -environment: production -port: 8080 -servers: 8 -log: /tmp/thin.log -quiet: true \ No newline at end of file diff --git a/frameworks/Ruby/grape/config/trinidad.yml b/frameworks/Ruby/grape/config/trinidad.yml deleted file mode 100644 index f56a0afd572..00000000000 --- a/frameworks/Ruby/grape/config/trinidad.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- - port: 8080 - threadsafe: true - environment: production - http: - address: '*' - logging: - level: SEVERE diff --git a/frameworks/Ruby/grape/config/unicorn.rb b/frameworks/Ruby/grape/config/unicorn.rb index fa84460c73d..e6677b10d90 100644 --- a/frameworks/Ruby/grape/config/unicorn.rb +++ b/frameworks/Ruby/grape/config/unicorn.rb @@ -1,5 +1,5 @@ worker_processes 8 -listen "/tmp/.sock", :backlog => 4096 +listen "/tmp/unicorn.sock", :backlog => 4096 preload_app true GC.respond_to?(:copy_on_write_friendly=) and GC.copy_on_write_friendly = true diff --git a/frameworks/Ruby/grape/grape-unicorn.dockerfile b/frameworks/Ruby/grape/grape-unicorn.dockerfile new file mode 100644 index 00000000000..1209d490276 --- /dev/null +++ b/frameworks/Ruby/grape/grape-unicorn.dockerfile @@ -0,0 +1,16 @@ +FROM techempower/nginx:0.1 + +FROM techempower/ruby-2.4:0.1 + +COPY --from=0 /nginx /nginx + +ENV NGINX_HOME="/nginx" +ENV PATH=/nginx/sbin:${PATH} + +ADD ./ /grape + +WORKDIR /grape + +RUN bundle install --jobs=4 --gemfile=/grape/Gemfile --path=/grape/grape/bundle + +CMD nginx -c /grape/config/nginx.conf && bundle exec unicorn -E production -c config/unicorn.rb diff --git a/frameworks/Ruby/grape/grape.dockerfile b/frameworks/Ruby/grape/grape.dockerfile new file mode 100644 index 00000000000..50abe0ca212 --- /dev/null +++ b/frameworks/Ruby/grape/grape.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/ruby-2.4:0.1 + +ADD ./ /grape + +WORKDIR /grape + +RUN bundle install --jobs=4 --gemfile=/grape/Gemfile --path=/grape/grape/bundle + +CMD bundle exec puma -t 8:32 -w 8 --preload -b tcp://0.0.0.0:8080 -e production diff --git a/frameworks/Ruby/grape/run_mri_puma.sh b/frameworks/Ruby/grape/run_mri_puma.sh deleted file mode 100755 index bf94126e612..00000000000 --- a/frameworks/Ruby/grape/run_mri_puma.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm ruby-2.4 - -sed -i 's| host:.*| host: '"${DBHOST}"'|g' config/database.yml - -rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/grape/bundle - -rvm ruby-$MRI_VERSION do bundle exec puma -t 8:32 -w 8 --preload -b tcp://0.0.0.0:8080 -e production & diff --git a/frameworks/Ruby/grape/run_mri_thin.sh b/frameworks/Ruby/grape/run_mri_thin.sh deleted file mode 100755 index 21bb4d30fcb..00000000000 --- a/frameworks/Ruby/grape/run_mri_thin.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm ruby-2.4 - -sed -i 's| host:.*| host: '"${DBHOST}"'|g' config/database.yml - -rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/grape/bundle - -rvm ruby-$MRI_VERSION do bundle exec thin start -C config/thin.yml & diff --git a/frameworks/Ruby/grape/run_mri_unicorn.sh b/frameworks/Ruby/grape/run_mri_unicorn.sh deleted file mode 100755 index 13e56b5f519..00000000000 --- a/frameworks/Ruby/grape/run_mri_unicorn.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm nginx ruby-2.4 - -sed -i 's| host:.*| host: '"${DBHOST}"'|g' config/database.yml -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' config/nginx.conf - -nginx -c $TROOT/config/nginx.conf - -rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/grape/bundle - -rvm ruby-$MRI_VERSION do bundle exec unicorn -E production -c config/unicorn.rb & diff --git a/frameworks/Ruby/h2o_mruby/benchmark_config.json b/frameworks/Ruby/h2o_mruby/benchmark_config.json index a2dfa2bd269..75b6f75587d 100644 --- a/frameworks/Ruby/h2o_mruby/benchmark_config.json +++ b/frameworks/Ruby/h2o_mruby/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "h2o_mruby", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/Ruby/h2o_mruby/h2o_mruby.dockerfile b/frameworks/Ruby/h2o_mruby/h2o_mruby.dockerfile new file mode 100644 index 00000000000..b09e61b60c9 --- /dev/null +++ b/frameworks/Ruby/h2o_mruby/h2o_mruby.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/h2o:0.1 + +ADD ./h2o.conf /h2o_mruby/ + +CMD "${H2O_HOME}/bin/h2o" -c "/h2o_mruby/h2o.conf" diff --git a/frameworks/Ruby/h2o_mruby/setup.sh b/frameworks/Ruby/h2o_mruby/setup.sh deleted file mode 100755 index c51ddc8d1f9..00000000000 --- a/frameworks/Ruby/h2o_mruby/setup.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends h2o - -"${H2O_HOME}/bin/h2o" -c "$TROOT/h2o.conf" -m daemon diff --git a/frameworks/Ruby/hanami/.gitignore b/frameworks/Ruby/hanami/.gitignore deleted file mode 100644 index 1a3e7054ebb..00000000000 --- a/frameworks/Ruby/hanami/.gitignore +++ /dev/null @@ -1,56 +0,0 @@ -/public/assets* -/tmp - -# Except the .gitkeep -!.gitkeep - -### Ruby ### -*.gem -*.rbc -/.config -/coverage/ -/InstalledFiles -/pkg/ -/spec/reports/ -/spec/examples.txt -/test/tmp/ -/test/version_tmp/ -/tmp/ - -# Used by dotenv library to load environment variables. -# .env - -## Specific to RubyMotion: -.dat* -.repl_history -build/ -*.bridgesupport -build-iPhoneOS/ -build-iPhoneSimulator/ - -## Specific to RubyMotion (use of CocoaPods): -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# vendor/Pods/ - -## Documentation cache and generated files: -/.yardoc/ -/_yardoc/ -/doc/ -/rdoc/ - -## Environment normalization: -/.bundle/ -/vendor/bundle - -# for a library or gem, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# Gemfile.lock -# .ruby-version -# .ruby-gemset - -# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: -.rvmrc diff --git a/frameworks/Ruby/hanami/Gemfile b/frameworks/Ruby/hanami/Gemfile index ceffb52ef16..da23d40ce1d 100644 --- a/frameworks/Ruby/hanami/Gemfile +++ b/frameworks/Ruby/hanami/Gemfile @@ -1,15 +1,9 @@ source 'https://rubygems.org' -gem 'rake' -gem 'hanami', '~> 1.0' -gem 'hanami-model', '~> 1.0' - -gem 'mysql2' - -gem 'rom-sql' - -group :production do - gem 'puma', "~> 3.9.1" - gem 'unicorn' - gem 'thin' -end +gem 'rake', '12.3.0' +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.9.1' diff --git a/frameworks/Ruby/hanami/Gemfile.lock b/frameworks/Ruby/hanami/Gemfile.lock deleted file mode 100644 index 662563b31ba..00000000000 --- a/frameworks/Ruby/hanami/Gemfile.lock +++ /dev/null @@ -1,149 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - concurrent-ruby (1.0.5) - daemons (1.2.4) - dry-configurable (0.7.0) - concurrent-ruby (~> 1.0) - dry-container (0.6.0) - concurrent-ruby (~> 1.0) - dry-configurable (~> 0.1, >= 0.1.3) - dry-core (0.3.1) - concurrent-ruby (~> 1.0) - dry-equalizer (0.2.0) - dry-initializer (1.4.1) - dry-logic (0.4.1) - dry-container (~> 0.2, >= 0.2.6) - dry-core (~> 0.2) - dry-equalizer (~> 0.2) - dry-struct (0.3.0) - dry-configurable (~> 0.1) - dry-core (~> 0.3) - dry-equalizer (~> 0.2) - dry-types (~> 0.9, >= 0.9.0) - ice_nine (~> 0.11) - dry-types (0.10.3) - concurrent-ruby (~> 1.0) - dry-configurable (~> 0.1) - dry-container (~> 0.3) - dry-core (~> 0.2, >= 0.2.1) - dry-equalizer (~> 0.2) - dry-logic (~> 0.4, >= 0.4.0) - inflecto (~> 0.0.0, >= 0.0.2) - dry-validation (0.10.7) - concurrent-ruby (~> 1.0) - dry-configurable (~> 0.1, >= 0.1.3) - dry-core (~> 0.2, >= 0.2.1) - dry-equalizer (~> 0.2) - dry-logic (~> 0.4, >= 0.4.0) - dry-types (~> 0.9, >= 0.9.0) - eventmachine (1.2.3) - hanami (1.0.0) - bundler (~> 1.13) - concurrent-ruby (~> 1.0) - hanami-assets (~> 1.0) - hanami-controller (~> 1.0) - hanami-helpers (~> 1.0) - hanami-mailer (~> 1.0) - hanami-router (~> 1.0) - hanami-utils (~> 1.0) - hanami-validations (~> 1.0) - hanami-view (~> 1.0) - thor (~> 0.19) - hanami-assets (1.0.0) - hanami-helpers (~> 1.0) - hanami-utils (~> 1.0) - tilt (~> 2.0, >= 2.0.2) - hanami-controller (1.0.0) - hanami-utils (~> 1.0) - rack (~> 2.0) - hanami-helpers (1.0.0) - hanami-utils (~> 1.0) - hanami-mailer (1.0.0) - hanami-utils (~> 1.0) - mail (~> 2.5) - tilt (~> 2.0, >= 2.0.1) - hanami-model (1.0.0) - concurrent-ruby (~> 1.0) - dry-types (~> 0.9) - hanami-utils (~> 1.0) - rom-repository (~> 1.3) - rom-sql (~> 1.2) - hanami-router (1.0.0) - hanami-utils (~> 1.0) - http_router (= 0.11.2) - rack (~> 2.0) - hanami-utils (1.0.0) - hanami-validations (1.0.0) - dry-validation (~> 0.10) - hanami-utils (~> 1.0) - hanami-view (1.0.0) - hanami-utils (~> 1.0) - tilt (~> 2.0, >= 2.0.1) - http_router (0.11.2) - rack (>= 1.0.0) - url_mount (~> 0.2.1) - ice_nine (0.11.2) - inflecto (0.0.2) - kgio (2.11.0) - mail (2.6.5) - mime-types (>= 1.16, < 4) - mime-types (3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) - mysql2 (0.4.6) - puma (3.9.1) - rack (2.0.3) - raindrops (0.18.0) - rake (12.0.0) - rom (3.2.3) - concurrent-ruby (~> 1.0) - dry-core (~> 0.3) - dry-equalizer (~> 0.2) - dry-initializer (~> 1.3) - dry-types (~> 0.9, >= 0.9.4) - rom-mapper (~> 0.5, >= 0.5.1) - rom-mapper (0.5.1) - dry-core (~> 0.2, >= 0.2.3) - dry-equalizer (~> 0.2) - transproc (~> 1.0) - rom-repository (1.3.3) - dry-core (~> 0.3, >= 0.3.1) - dry-struct (~> 0.1) - rom (~> 3.2, >= 3.2.3) - rom-mapper (~> 0.5) - rom-sql (1.3.3) - dry-core (~> 0.3) - dry-equalizer (~> 0.2) - dry-types (~> 0.10, >= 0.10.2) - rom (~> 3.2, >= 3.2.2) - sequel (~> 4.43) - sequel (4.47.0) - thin (1.7.0) - daemons (~> 1.0, >= 1.0.9) - eventmachine (~> 1.0, >= 1.0.4) - rack (>= 1, < 3) - thor (0.19.4) - tilt (2.0.7) - transproc (1.0.2) - unicorn (5.3.0) - kgio (~> 2.6) - raindrops (~> 0.7) - url_mount (0.2.1) - rack - -PLATFORMS - ruby - -DEPENDENCIES - hanami (~> 1.0) - hanami-model (~> 1.0) - mysql2 - puma (~> 3.9.1) - rake - rom-sql - thin - unicorn - -BUNDLED WITH - 1.15.1 diff --git a/frameworks/Ruby/hanami/benchmark_config.json b/frameworks/Ruby/hanami/benchmark_config.json index 2b7db0559d7..c32480e180e 100644 --- a/frameworks/Ruby/hanami/benchmark_config.json +++ b/frameworks/Ruby/hanami/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "hanami", "tests": [{ "default": { - "setup_file": "run_mri_puma", "json_url": "/hello_world/json", "db_url": "/hello_world/db", "query_url": "/hello_world/query?queries=", @@ -24,31 +23,7 @@ "notes": "", "versus": "rack-puma-mri" }, - "thin": { - "setup_file": "run_mri_thin", - "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": "Thin", - "os": "Linux", - "database_os": "Linux", - "display_name": "hanami-thin-mri", - "notes": "", - "versus": "rack-thin-mri" - }, "unicorn": { - "setup_file": "run_mri_unicorn", "json_url": "/hello_world/json", "db_url": "/hello_world/db", "query_url": "/hello_world/query?queries=", diff --git a/frameworks/Ruby/hanami/config/nginx.conf b/frameworks/Ruby/hanami/config/nginx.conf index dd4984f3256..d9858d9c303 100644 --- a/frameworks/Ruby/hanami/config/nginx.conf +++ b/frameworks/Ruby/hanami/config/nginx.conf @@ -37,7 +37,7 @@ events { http { # nginx will find this file in the config directory set at nginx build time - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; # fallback in case we can't determine a type default_type application/octet-stream; diff --git a/frameworks/Ruby/hanami/config/thin.yml b/frameworks/Ruby/hanami/config/thin.yml deleted file mode 100644 index 132f66a3135..00000000000 --- a/frameworks/Ruby/hanami/config/thin.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -timeout: 30 -wait: 30 -max_conns: 1024 -max_persistent_conns: 512 -environment: production -port: 8080 -servers: 8 -log: /tmp/thin.log -quiet: true \ No newline at end of file diff --git a/frameworks/Ruby/hanami/hanami-unicorn.dockerfile b/frameworks/Ruby/hanami/hanami-unicorn.dockerfile new file mode 100644 index 00000000000..773bbd86bcf --- /dev/null +++ b/frameworks/Ruby/hanami/hanami-unicorn.dockerfile @@ -0,0 +1,17 @@ +FROM techempower/nginx:0.1 + +FROM techempower/ruby-2.4:0.1 + +COPY --from=0 /nginx /nginx + +ENV NGINX_HOME="/nginx" +ENV PATH=/nginx/sbin:${PATH} + +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 diff --git a/frameworks/Ruby/hanami/hanami.dockerfile b/frameworks/Ruby/hanami/hanami.dockerfile new file mode 100644 index 00000000000..ff734901c68 --- /dev/null +++ b/frameworks/Ruby/hanami/hanami.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/ruby-2.4:0.1 + +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 diff --git a/frameworks/Ruby/hanami/run_mri_puma.sh b/frameworks/Ruby/hanami/run_mri_puma.sh deleted file mode 100644 index b8a32be2c03..00000000000 --- a/frameworks/Ruby/hanami/run_mri_puma.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm ruby-2.4 - -rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/hanami/bundle - -DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec puma -t 8:32 -w 8 --preload -b tcp://0.0.0.0:8080 -e production & diff --git a/frameworks/Ruby/hanami/run_mri_thin.sh b/frameworks/Ruby/hanami/run_mri_thin.sh deleted file mode 100644 index bf76af87cec..00000000000 --- a/frameworks/Ruby/hanami/run_mri_thin.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm ruby-2.4 - -rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/hanami/bundle - -DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec thin start -C config/thin.yml & diff --git a/frameworks/Ruby/hanami/run_mri_unicorn.sh b/frameworks/Ruby/hanami/run_mri_unicorn.sh deleted file mode 100644 index c59d5d1a518..00000000000 --- a/frameworks/Ruby/hanami/run_mri_unicorn.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm ruby-2.4 nginx - -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' config/nginx.conf - -rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/hanami/bundle - -nginx -c $TROOT/config/nginx.conf - -RACK_ENV=none DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec unicorn_rails -E production -c $TROOT/config/unicorn.rb & diff --git a/frameworks/Ruby/ngx_mruby/.gitignore b/frameworks/Ruby/ngx_mruby/.gitignore deleted file mode 100644 index 807edd27996..00000000000 --- a/frameworks/Ruby/ngx_mruby/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/ngx_mruby/ diff --git a/frameworks/Ruby/ngx_mruby/README.md b/frameworks/Ruby/ngx_mruby/README.md deleted file mode 100644 index ea90a7ba120..00000000000 --- a/frameworks/Ruby/ngx_mruby/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# [nginx + mruby](https://github.com/matsumoto-r/ngx_mruby) Benchmark Test - -The information below contains information specific to nginx + mruby. -For further guidance, review the -[documentation](http://frameworkbenchmarks.readthedocs.org/en/latest/). -Also note the additional information provided in the [Ruby README](../). - -This is the nginx + mruby portion of a [benchmarking test suite](../../) -comparing a variety of web platforms. - ---- - -The nginx app is distributes across a few files. most of it is in [nginx.conf](nginx.conf) -The nginx conf is inside [nginx.conf](nginx.conf) -Requires a nginx compiled with ngx_mruby module. It has been called nginx_mruby for lack of a better name - -## Infrastructure Software Versions - -The tests were run with: - -* [Ruby 2.0.0-p0](http://www.ruby-lang.org/) - -## Paths & Source for Tests - -* [JSON Serialization](nginx.conf): "/json" -* [Single Database Query](db.rb): "/db" -* [Multiple Database Query](queries.rb): "/queries?queries={#}" -* _Fortunes: N/A_ -* _Database Updates: N/A_ -* [Plaintext](nginx.conf): "/plaintext" - -## Get Help - -### Experts - -_No experts listed, yet. If you're an expert, add yourself!_ diff --git a/frameworks/Ruby/ngx_mruby/benchmark_config.json b/frameworks/Ruby/ngx_mruby/benchmark_config.json deleted file mode 100644 index db6f3e4ebc6..00000000000 --- a/frameworks/Ruby/ngx_mruby/benchmark_config.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "framework": "ngx_mruby", - "tests": [{ - "default": { - "setup_file": "setup", - "json_url": "/json", - "db_url": "/db", - "query_url": "/queries?queries=", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "MySQL", - "framework": "ngx_mruby", - "language": "Ruby", - "orm": "Raw", - "platform": "None", - "webserver": "nginx", - "os": "Linux", - "database_os": "Linux", - "display_name": "ngx_mruby", - "notes": "", - "versus": "ngx_mruby" - } - }] -} diff --git a/frameworks/Ruby/ngx_mruby/db.rb b/frameworks/Ruby/ngx_mruby/db.rb deleted file mode 100644 index 5a97c9f2011..00000000000 --- a/frameworks/Ruby/ngx_mruby/db.rb +++ /dev/null @@ -1,6 +0,0 @@ -# https://github.com/mattn/mruby-mysql/blob/master/example/example.rb -db = Userdata.new("my_#{Process.pid}").db -result_set = db.execute("select * from World where id = ?", rand(10000)) -world = Hash[result_set.fields.zip(result_set.next)] -result_set.close -Nginx.rputs JSON::stringify(world) diff --git a/frameworks/Ruby/ngx_mruby/nginx.conf b/frameworks/Ruby/ngx_mruby/nginx.conf deleted file mode 100644 index 2c7199fca65..00000000000 --- a/frameworks/Ruby/ngx_mruby/nginx.conf +++ /dev/null @@ -1,52 +0,0 @@ -pid /tmp/nginx.pid; -error_log stderr error; -worker_processes auto; - -events { - worker_connections 16384; - multi_accept on; -} - -http { - resolver 127.0.0.1; - access_log off; - mruby_init_worker_code 'Userdata.new("my_#{Process.pid}").db = MySQL::Database.new("DBHOSTNAME", "benchmarkdbuser", "benchmarkdbpass", "hello_world")'; - mruby_exit_worker_code 'db = Userdata.new("my_#{Process.pid}").db ; db.close if db'; - server { - listen 8080; - server_name localhost; - - location / { - root html; - index index.html index.htm; - } - - location /plaintext { - default_type "text/plain"; - mruby_content_handler_code 'Nginx.rputs "Hello, world!"'; - } - - location /json { - default_type "application/json"; - mruby_content_handler_code 'Nginx.rputs JSON::stringify("message" => "Hello, World!")'; - } - - location ~ /db { - default_type "application/json"; - #note: next line has cwd - mruby_content_handler 'CWD/db.rb' cache; - } - - location ~ /queries { - default_type "application/json"; - #note: next line has cwd - mruby_content_handler 'CWD/queries.rb' cache; - } - -# location ~ /fortunes { -# default_type "application/html"; -# #note: next line has cwd -# mruby_content_handler 'CWD/fortunes.rb' cache; -# } - } -} diff --git a/frameworks/Ruby/ngx_mruby/queries.rb b/frameworks/Ruby/ngx_mruby/queries.rb deleted file mode 100644 index 8f7ec292ba7..00000000000 --- a/frameworks/Ruby/ngx_mruby/queries.rb +++ /dev/null @@ -1,27 +0,0 @@ -class World - def db - @db ||= Userdata.new("my_#{Process.pid}").db - end - - def find(id) - ret = nil - db.execute("select * from World where id = ?", id) do |row, fields| - ret = Hash[fields.zip(row)] - end - ret - end - - def save(world) - db.execute("update World set randomNumber = ? where id = ?", world["randomNumber"], world["randomNumber"]) - end -end - -r = Nginx::Request.new - -num_queries = r.var.arg_queries.to_i -num_queries = 1 if num_queries < 1 -num_queries = 500 if num_queries > 500 - -world = World.new -ret = num_queries.times.map { world.find(rand(10000)) } -Nginx.rputs JSON::stringify(ret) diff --git a/frameworks/Ruby/ngx_mruby/setup.sh b/frameworks/Ruby/ngx_mruby/setup.sh deleted file mode 100755 index 8a8ffc07714..00000000000 --- a/frameworks/Ruby/ngx_mruby/setup.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm nginx libhiredis-dev - -# We assume single-user installation as -# done in our rvm.sh script and -# in Travis-CI -if [ "$TRAVIS" = "true" ] -then - rvmsudo rvm install ruby-2.0 -else - rvm install ruby-2.0 -fi - -sed -i 's|CWD|'"${TROOT}"'|g' nginx.conf -sed -i 's|DBHOSTNAME|'"${DBHOST}"'|g' nginx.conf - -rvm use ruby-2.0 - -RETCODE=$(fw_exists ${IROOT}/nginx_mruby.installed) -[ "$RETCODE" == 0 ] || { \ - git clone git://github.com/matsumoto-r/ngx_mruby.git - cd ngx_mruby - git submodule init - git submodule update - [ -d mruby/mrbgems/mruby-mysql ] || git clone git://github.com/mattn/mruby-mysql.git mruby/mrbgems/mruby-mysql - - NGINX_CONFIG_OPT_ENV="--prefix=${IROOT}/nginx_mruby --with-http_stub_status_module" sh build.sh - make install - - echo -e "export PATH=${IROOT}/nginx_mruby/sbin:\$PATH" > $IROOT/nginx_mruby.installed -} - -source $IROOT/nginx_mruby.installed - -nginx -c $TROOT/nginx.conf & diff --git a/frameworks/Ruby/ngx_mruby/source_code b/frameworks/Ruby/ngx_mruby/source_code deleted file mode 100644 index 0dca21a6eec..00000000000 --- a/frameworks/Ruby/ngx_mruby/source_code +++ /dev/null @@ -1,4 +0,0 @@ -./ngx_mruby/db.rb -./ngx_mruby/fortune.rb -./ngx_mruby/queries.rb -./ngx_mruby/updates.rb diff --git a/frameworks/Ruby/ngx_mruby/updates.rb b/frameworks/Ruby/ngx_mruby/updates.rb deleted file mode 100644 index b0da5fd9033..00000000000 --- a/frameworks/Ruby/ngx_mruby/updates.rb +++ /dev/null @@ -1,31 +0,0 @@ -r = Nginx::Request.new - -num_queries = r.var.arg_queries.to_i -num_queries = 1 if num_queries < 0 -num_queries = 500 if num_queries > 500 - -class Worlds - def db - @db ||= Userdata.new("my_#{Process.pid}").db - end - - def find(id) - db.execute("select * from World where id = ?", id) do |row, fields| - return Hash[fields.zip(row)] - end - end - - def save(world) - #TODO: consider execute_batch - db.execute("update World set randomNumber = ? where id = ?", world["randomNumber"], world["randomNumber"]) - end -end - -ret = num_queries.times.map { World.find(rand(10000)) } - -ret.each do |world| - world["randomNumber"] = rand(10000) + 1 - World.save(world) -end - -Nginx.rputs JSON::stringify(ret) diff --git a/frameworks/Ruby/padrino/.gitignore b/frameworks/Ruby/padrino/.gitignore deleted file mode 100644 index c56e2faf2f0..00000000000 --- a/frameworks/Ruby/padrino/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.bundle -vendor/bundle -/tmp/ -Gemfile.lock diff --git a/frameworks/Ruby/padrino/Gemfile b/frameworks/Ruby/padrino/Gemfile index 90b2a43e0d7..af2c5562850 100644 --- a/frameworks/Ruby/padrino/Gemfile +++ b/frameworks/Ruby/padrino/Gemfile @@ -1,21 +1,10 @@ source 'http://rubygems.org' -platforms :jruby do - gem "jdbc-mysql", '5.1.38', :require => 'jdbc/mysql' - gem 'torqbox', '0.1.7' - gem "trinidad", '1.4.6' -end - -platforms :ruby do - gem 'mysql2', '0.3.20' - gem "unicorn", '4.8.3' - gem "thin", '1.6.2' -end - -gem 'puma', "~> 3.9.1" -gem 'json', '1.8.3' - +gem 'mysql2', '0.4.10' +gem "unicorn", '5.3.0' +gem 'puma', '3.9.1' +gem 'json', '1.8.6' gem 'slim', '2.0.3' gem 'dm-mysql-adapter', '1.2.0' gem 'dm-core', '1.2.1' -gem "padrino", "~> 0.12.3" +gem 'padrino', '0.14.3' diff --git a/frameworks/Ruby/padrino/benchmark_config.json b/frameworks/Ruby/padrino/benchmark_config.json index 32c67938265..db352531224 100644 --- a/frameworks/Ruby/padrino/benchmark_config.json +++ b/frameworks/Ruby/padrino/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "padrino", "tests": [{ "default": { - "setup_file": "run_mri_puma", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -24,31 +23,7 @@ "notes": "", "versus": "rack-puma-mri" }, - "thin": { - "setup_file": "run_thin", - "json_url": "/json", - "db_url": "/db", - "query_url": "/queries?queries=", - "fortune_url": "/fortunes", - "update_url": "/updates?queries=", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "MySQL", - "framework": "padrino", - "language": "Ruby", - "orm": "Full", - "platform": "Rack", - "webserver": "Thin", - "os": "Linux", - "database_os": "Linux", - "display_name": "padrino-thin", - "notes": "", - "versus": "rack-thin" - }, "unicorn": { - "setup_file": "run_unicorn", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Ruby/padrino/config/nginx.conf b/frameworks/Ruby/padrino/config/nginx.conf index dd4984f3256..d9858d9c303 100644 --- a/frameworks/Ruby/padrino/config/nginx.conf +++ b/frameworks/Ruby/padrino/config/nginx.conf @@ -37,7 +37,7 @@ events { http { # nginx will find this file in the config directory set at nginx build time - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; # fallback in case we can't determine a type default_type application/octet-stream; diff --git a/frameworks/Ruby/padrino/config/thin.yml b/frameworks/Ruby/padrino/config/thin.yml deleted file mode 100644 index 132f66a3135..00000000000 --- a/frameworks/Ruby/padrino/config/thin.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -timeout: 30 -wait: 30 -max_conns: 1024 -max_persistent_conns: 512 -environment: production -port: 8080 -servers: 8 -log: /tmp/thin.log -quiet: true \ No newline at end of file diff --git a/frameworks/Ruby/padrino/config/trinidad.yml b/frameworks/Ruby/padrino/config/trinidad.yml deleted file mode 100644 index f56a0afd572..00000000000 --- a/frameworks/Ruby/padrino/config/trinidad.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- - port: 8080 - threadsafe: true - environment: production - http: - address: '*' - logging: - level: SEVERE diff --git a/frameworks/Ruby/padrino/padrino-unicorn.dockerfile b/frameworks/Ruby/padrino/padrino-unicorn.dockerfile new file mode 100644 index 00000000000..86c1e3ebdf7 --- /dev/null +++ b/frameworks/Ruby/padrino/padrino-unicorn.dockerfile @@ -0,0 +1,17 @@ +FROM techempower/nginx:0.1 + +FROM techempower/ruby-2.4:0.1 + +COPY --from=0 /nginx /nginx + +ENV NGINX_HOME="/nginx" +ENV PATH=/nginx/sbin:${PATH} + +ADD ./ /padrino + +WORKDIR /padrino + +RUN bundle install --jobs=4 --gemfile=/padrino/Gemfile --path=/padrino/padrino/bundle + +CMD nginx -c /padrino/config/nginx.conf && \ + DB_HOST=tfb-database bundle exec unicorn -E production -c config/unicorn.rb diff --git a/frameworks/Ruby/padrino/padrino.dockerfile b/frameworks/Ruby/padrino/padrino.dockerfile new file mode 100644 index 00000000000..00dcf1f727c --- /dev/null +++ b/frameworks/Ruby/padrino/padrino.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/ruby-2.4:0.1 + +ADD ./ /padrino + +WORKDIR /padrino + +RUN bundle install --jobs=4 --gemfile=/padrino/Gemfile --path=/padrino/padrino/bundle + +CMD DB_HOST=tfb-database bundle exec puma -C config/puma.rb -w 8 --preload diff --git a/frameworks/Ruby/padrino/public/favicon.ico b/frameworks/Ruby/padrino/public/favicon.ico deleted file mode 100644 index 4e26b198990..00000000000 Binary files a/frameworks/Ruby/padrino/public/favicon.ico and /dev/null differ diff --git a/frameworks/Ruby/padrino/run_mri_puma.sh b/frameworks/Ruby/padrino/run_mri_puma.sh deleted file mode 100755 index 56ff495970f..00000000000 --- a/frameworks/Ruby/padrino/run_mri_puma.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm ruby-2.2 - -rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/padrino/bundle - -DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec puma -C config/puma.rb -w 8 --preload & diff --git a/frameworks/Ruby/padrino/run_thin.sh b/frameworks/Ruby/padrino/run_thin.sh deleted file mode 100755 index 589add19208..00000000000 --- a/frameworks/Ruby/padrino/run_thin.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm ruby-2.2 - -rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/padrino/bundle - -DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec thin start -C config/thin.yml & diff --git a/frameworks/Ruby/padrino/run_unicorn.sh b/frameworks/Ruby/padrino/run_unicorn.sh deleted file mode 100755 index 49f483ffd1c..00000000000 --- a/frameworks/Ruby/padrino/run_unicorn.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm nginx ruby-2.2 - -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' config/nginx.conf - -rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/padrino/bundle - -nginx -c $TROOT/config/nginx.conf - -DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec unicorn -E production -c config/unicorn.rb & diff --git a/frameworks/Ruby/rack-sequel/.gitignore b/frameworks/Ruby/rack-sequel/.gitignore deleted file mode 100644 index 826b849014d..00000000000 --- a/frameworks/Ruby/rack-sequel/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.bundle -vendor/bundle -passenger.* -Gemfile.lock diff --git a/frameworks/Ruby/rack-sequel/benchmark_config.json b/frameworks/Ruby/rack-sequel/benchmark_config.json index 507add41dd9..416bc9e8bf8 100644 --- a/frameworks/Ruby/rack-sequel/benchmark_config.json +++ b/frameworks/Ruby/rack-sequel/benchmark_config.json @@ -3,7 +3,6 @@ "tests": [ { "default": { - "setup_file": "run_mri_puma", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -26,7 +25,6 @@ "notes": "" }, "postgres": { - "setup_file": "run_mri_puma", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -49,7 +47,6 @@ "notes": "" }, "passenger-mri": { - "setup_file": "run_mri_passenger", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -72,7 +69,6 @@ "notes": "" }, "postgres-passenger-mri": { - "setup_file": "run_mri_passenger", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -95,7 +91,6 @@ "notes": "" }, "unicorn-mri": { - "setup_file": "run_mri_unicorn", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -118,7 +113,6 @@ "notes": "" }, "postgres-unicorn-mri": { - "setup_file": "run_mri_unicorn", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -141,7 +135,6 @@ "notes": "" }, "torquebox-jruby": { - "setup_file": "run_jruby_torquebox", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -164,7 +157,6 @@ "notes": "" }, "postgres-torquebox-jruby": { - "setup_file": "run_jruby_torquebox", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Ruby/rack-sequel/config/bundle_install.sh b/frameworks/Ruby/rack-sequel/config/bundle_install.sh deleted file mode 100644 index 21ee5a3e325..00000000000 --- a/frameworks/Ruby/rack-sequel/config/bundle_install.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# Ensure we don't accidentally (try to) use gems for the wrong platform. -rm -f $TROOT/Gemfile.lock - -bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/rack-sequel/bundle diff --git a/frameworks/Ruby/rack-sequel/config/common_run.sh b/frameworks/Ruby/rack-sequel/config/common_run.sh deleted file mode 100644 index 3a1e9285458..00000000000 --- a/frameworks/Ruby/rack-sequel/config/common_run.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -if [[ $LOGDIR == *postgres* ]] ; then - DBTYPE=postgresql -else - DBTYPE=mysql -fi - -export DBTYPE - -if [[ $LOGDIR == *jruby* ]] ; then - . $(dirname $0)/config/java_tune.sh -fi diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-base.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-base.dockerfile new file mode 100644 index 00000000000..79a4622d0aa --- /dev/null +++ b/frameworks/Ruby/rack-sequel/rack-sequel-base.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/ruby-2.4:0.1 + +ADD ./ /rack-sequel + +WORKDIR /rack-sequel + +RUN bundle install --jobs=4 --gemfile=/rack-sequel/Gemfile --path=/rack-sequel/rack-sequel/bundle diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-jruby-base.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-jruby-base.dockerfile new file mode 100644 index 00000000000..0c329342876 --- /dev/null +++ b/frameworks/Ruby/rack-sequel/rack-sequel-jruby-base.dockerfile @@ -0,0 +1,12 @@ +FROM techempower/jruby-9.1:0.1 + +ADD ./ /rack-sequel + +WORKDIR /rack-sequel + +ENV THREAD_FACTOR=2 + +RUN bundle install --jobs=4 --gemfile=/rack-sequel/Gemfile --path=/rack-sequel/rack-sequel/bundle + +ENV DBTYPE=mysql +CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-passenger-mri.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-passenger-mri.dockerfile new file mode 100644 index 00000000000..be9878e19fe --- /dev/null +++ b/frameworks/Ruby/rack-sequel/rack-sequel-passenger-mri.dockerfile @@ -0,0 +1,12 @@ +FROM techempower/rack-sequel-base:0.1 + +# TODO: https://github.com/phusion/passenger/issues/1916 +ENV _PASSENGER_FORCE_HTTP_SESSION=true +ENV DBTYPE=mysql + +RUN ruby -r /rack-sequel/config/auto_tune -e 'puts auto_tune.first' > instances +CMD bundle exec passenger start --log-level 1 \ + --engine builtin --disable-turbocaching --disable-security-update-check \ + --spawn-method direct --max-pool-size $(cat instances) --min-instances $(cat instances) --max-request-queue-size 1024 \ + --address 0.0.0.0 --port 8080 --environment production + diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-postgres-passenger-mri.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-postgres-passenger-mri.dockerfile new file mode 100644 index 00000000000..3368d61c94c --- /dev/null +++ b/frameworks/Ruby/rack-sequel/rack-sequel-postgres-passenger-mri.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/rack-sequel-base:0.1 + +# TODO: https://github.com/phusion/passenger/issues/1916 +ENV _PASSENGER_FORCE_HTTP_SESSION=true +ENV DBTYPE=postgresql + +RUN ruby -r /rack-sequel/config/auto_tune -e 'puts auto_tune.first' > instances +CMD bundle exec passenger start --log-level 1 \ + --engine builtin --disable-turbocaching --disable-security-update-check \ + --spawn-method direct --max-pool-size $(cat instances) --min-instances $(cat instances) --max-request-queue-size 1024 \ + --address 0.0.0.0 --port 8080 --environment production diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-postgres-torquebox-jruby.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-postgres-torquebox-jruby.dockerfile new file mode 100644 index 00000000000..86042a3c02b --- /dev/null +++ b/frameworks/Ruby/rack-sequel/rack-sequel-postgres-torquebox-jruby.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/rack-sequel-jruby-base:0.1 + +ENV DBTYPE=postgresql +CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-postgres-unicorn-mri.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-postgres-unicorn-mri.dockerfile new file mode 100644 index 00000000000..cb0a14e0b53 --- /dev/null +++ b/frameworks/Ruby/rack-sequel/rack-sequel-postgres-unicorn-mri.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/rack-sequel-base:0.1 + +ENV DBTYPE=postgresql +CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-postgres.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-postgres.dockerfile new file mode 100644 index 00000000000..ae92acaf812 --- /dev/null +++ b/frameworks/Ruby/rack-sequel/rack-sequel-postgres.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/rack-sequel-base:0.1 + +ENV DBTYPE=postgresql +CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-torquebox-jruby.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-torquebox-jruby.dockerfile new file mode 100644 index 00000000000..44758c17b59 --- /dev/null +++ b/frameworks/Ruby/rack-sequel/rack-sequel-torquebox-jruby.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/rack-sequel-jruby-base:0.1 + +ENV DBTYPE=mysql +CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-unicorn-mri.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-unicorn-mri.dockerfile new file mode 100644 index 00000000000..c6070ca977a --- /dev/null +++ b/frameworks/Ruby/rack-sequel/rack-sequel-unicorn-mri.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/rack-sequel-base:0.1 + +ENV DBTYPE=mysql +CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production diff --git a/frameworks/Ruby/rack-sequel/rack-sequel.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel.dockerfile new file mode 100644 index 00000000000..dc4887cf666 --- /dev/null +++ b/frameworks/Ruby/rack-sequel/rack-sequel.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/rack-sequel-base:0.1 + +ENV DBTYPE=mysql +CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production diff --git a/frameworks/Ruby/rack-sequel/run_jruby_puma.sh b/frameworks/Ruby/rack-sequel/run_jruby_puma.sh deleted file mode 100755 index 660dca4de09..00000000000 --- a/frameworks/Ruby/rack-sequel/run_jruby_puma.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -THREAD_FACTOR=1 - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm jruby-9.1 - -rvm use jruby-$JRUBY_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec puma -t $MAX_CONCURRENCY:$MAX_CONCURRENCY -b tcp://0.0.0.0:8080 -e production & diff --git a/frameworks/Ruby/rack-sequel/run_jruby_torquebox.sh b/frameworks/Ruby/rack-sequel/run_jruby_torquebox.sh deleted file mode 100755 index a35fdba94c5..00000000000 --- a/frameworks/Ruby/rack-sequel/run_jruby_torquebox.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -THREAD_FACTOR=2 - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm jruby-9.1 - -rvm use jruby-$JRUBY_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production & diff --git a/frameworks/Ruby/rack-sequel/run_mri_passenger.sh b/frameworks/Ruby/rack-sequel/run_mri_passenger.sh deleted file mode 100755 index 93bc271f3da..00000000000 --- a/frameworks/Ruby/rack-sequel/run_mri_passenger.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm ruby-2.4 - -rvm use ruby-$MRI_VERSION - -. $(dirname $0)/config/bundle_install.sh - -# TODO: https://github.com/phusion/passenger/issues/1916 -export _PASSENGER_FORCE_HTTP_SESSION=true - -# FWBM only... Passenger will auto-tune itself in production! -instances=$(ruby -r$(dirname $0)/config/auto_tune -e 'puts auto_tune.first') - -bundle exec passenger start --log-level 1 \ - --engine builtin --disable-turbocaching --disable-security-update-check \ - --spawn-method direct --max-pool-size $instances --min-instances $instances --max-request-queue-size 1024 \ - --address 0.0.0.0 --port 8080 --environment production & diff --git a/frameworks/Ruby/rack-sequel/run_mri_puma.sh b/frameworks/Ruby/rack-sequel/run_mri_puma.sh deleted file mode 100755 index fd0900b075c..00000000000 --- a/frameworks/Ruby/rack-sequel/run_mri_puma.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm ruby-2.4 - -rvm use ruby-$MRI_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production & diff --git a/frameworks/Ruby/rack-sequel/run_mri_unicorn.sh b/frameworks/Ruby/rack-sequel/run_mri_unicorn.sh deleted file mode 100755 index a52868b8b3a..00000000000 --- a/frameworks/Ruby/rack-sequel/run_mri_unicorn.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm ruby-2.4 - -rvm use ruby-$MRI_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production & diff --git a/frameworks/Ruby/rack/.gitignore b/frameworks/Ruby/rack/.gitignore deleted file mode 100644 index a8fdfed281d..00000000000 --- a/frameworks/Ruby/rack/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.bundle -/vendor/ -/tmp/ -Gemfile.lock diff --git a/frameworks/Ruby/rack/Gemfile b/frameworks/Ruby/rack/Gemfile index df38754d74a..21e32e1163e 100644 --- a/frameworks/Ruby/rack/Gemfile +++ b/frameworks/Ruby/rack/Gemfile @@ -1,18 +1,7 @@ source 'http://rubygems.org' -platforms :jruby do - gem 'jdbc-mysql', '5.1.38', :require => 'jdbc/mysql' - gem 'torquebox', '3.2.0' - gem 'trinidad', '1.4.6' -end - -platforms :ruby do - gem 'mysql2', '0.4.5' - gem 'unicorn', '5.3.0' - gem 'thin', '1.7.0' -end - -gem 'puma', '~> 3.9.1' - +gem 'mysql2', '0.4.5' +gem 'unicorn', '5.3.0' +gem 'puma', '3.9.1' gem 'rack', '2.0.1' gem 'json', '2.1.0' diff --git a/frameworks/Ruby/rack/benchmark_config.json b/frameworks/Ruby/rack/benchmark_config.json index bba18ec832f..6b0f448b4f7 100644 --- a/frameworks/Ruby/rack/benchmark_config.json +++ b/frameworks/Ruby/rack/benchmark_config.json @@ -22,27 +22,6 @@ "display_name": "rack-puma-mri", "notes": "" }, - "thin": { - "setup_file": "run_mri_thin", - "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": "Thin", - "os": "Linux", - "database_os": "Linux", - "display_name": "rack-thin-mri", - "notes": "" - }, "unicorn": { "setup_file": "run_mri_unicorn", "json_url": "/json", diff --git a/frameworks/Ruby/rack/config/database.yml b/frameworks/Ruby/rack/config/database.yml index 42dd1820195..b3847ffe15a 100644 --- a/frameworks/Ruby/rack/config/database.yml +++ b/frameworks/Ruby/rack/config/database.yml @@ -1,6 +1,6 @@ --- :encoding: utf8 - :host: 127.0.0.1 + :host: tfb-database :database: hello_world :username: benchmarkdbuser :password: benchmarkdbpass diff --git a/frameworks/Ruby/rack/config/nginx.conf b/frameworks/Ruby/rack/config/nginx.conf index dd4984f3256..d9858d9c303 100644 --- a/frameworks/Ruby/rack/config/nginx.conf +++ b/frameworks/Ruby/rack/config/nginx.conf @@ -37,7 +37,7 @@ events { http { # nginx will find this file in the config directory set at nginx build time - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; # fallback in case we can't determine a type default_type application/octet-stream; diff --git a/frameworks/Ruby/rack/config/thin.yml b/frameworks/Ruby/rack/config/thin.yml deleted file mode 100644 index 132f66a3135..00000000000 --- a/frameworks/Ruby/rack/config/thin.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -timeout: 30 -wait: 30 -max_conns: 1024 -max_persistent_conns: 512 -environment: production -port: 8080 -servers: 8 -log: /tmp/thin.log -quiet: true \ No newline at end of file diff --git a/frameworks/Ruby/rack/config/trinidad.yml b/frameworks/Ruby/rack/config/trinidad.yml deleted file mode 100644 index f6094aa8bb3..00000000000 --- a/frameworks/Ruby/rack/config/trinidad.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- - port: 8080 - threadsafe: true - environment: production - http: - address: '*' - logging: - level: SEVERE - java_lib: lib diff --git a/frameworks/Ruby/rack/lib/mysql-connector-java-5.1.28-bin.jar b/frameworks/Ruby/rack/lib/mysql-connector-java-5.1.28-bin.jar deleted file mode 100644 index 2f1b7ab5fb9..00000000000 Binary files a/frameworks/Ruby/rack/lib/mysql-connector-java-5.1.28-bin.jar and /dev/null differ diff --git a/frameworks/Ruby/rack/public/.gitkeep b/frameworks/Ruby/rack/public/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/Ruby/rack/rack-unicorn.dockerfile b/frameworks/Ruby/rack/rack-unicorn.dockerfile new file mode 100644 index 00000000000..7e4ed462160 --- /dev/null +++ b/frameworks/Ruby/rack/rack-unicorn.dockerfile @@ -0,0 +1,16 @@ +FROM techempower/nginx:0.1 + +FROM techempower/ruby-2.4:0.1 + +COPY --from=0 /nginx /nginx + +ENV NGINX_HOME="/nginx" +ENV PATH=/nginx/sbin:${PATH} + +ADD ./ /rack + +WORKDIR /rack + +RUN bundle install --jobs=4 --gemfile=/rack/Gemfile --path=/rack/rack/bundle + +CMD nginx -c /rack/config/nginx.conf && bundle exec unicorn -E production -c config/unicorn.rb diff --git a/frameworks/Ruby/rack/rack.dockerfile b/frameworks/Ruby/rack/rack.dockerfile new file mode 100644 index 00000000000..c4be23d37de --- /dev/null +++ b/frameworks/Ruby/rack/rack.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/ruby-2.4:0.1 + +ADD ./ /rack + +WORKDIR /rack + +RUN bundle install --jobs=4 --gemfile=/rack/Gemfile --path=/rack/rack/bundle + +CMD bundle exec puma -t 8:32 -w 8 --preload -b tcp://0.0.0.0:8080 -e production diff --git a/frameworks/Ruby/rack/run_mri_puma.sh b/frameworks/Ruby/rack/run_mri_puma.sh deleted file mode 100755 index 69b1cb5ec70..00000000000 --- a/frameworks/Ruby/rack/run_mri_puma.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm ruby-2.4 - -sed -i 's|127.0.0.1|'${DBHOST}'|g' config/database.yml - -rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/rack/bundle - -rvm ruby-$MRI_VERSION do bundle exec puma -t 8:32 -w 8 --preload -b tcp://0.0.0.0:8080 -e production & diff --git a/frameworks/Ruby/rack/run_mri_thin.sh b/frameworks/Ruby/rack/run_mri_thin.sh deleted file mode 100755 index 1fd0b13e251..00000000000 --- a/frameworks/Ruby/rack/run_mri_thin.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm ruby-2.4 - -sed -i 's|127.0.0.1|'${DBHOST}'|g' config/database.yml - -rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/rack/bundle - -rvm ruby-$MRI_VERSION do bundle exec thin start -C config/thin.yml & diff --git a/frameworks/Ruby/rack/run_mri_unicorn.sh b/frameworks/Ruby/rack/run_mri_unicorn.sh deleted file mode 100755 index 2959277a821..00000000000 --- a/frameworks/Ruby/rack/run_mri_unicorn.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm nginx ruby-2.4 - -sed -i 's|127.0.0.1|'${DBHOST}'|g' config/database.yml -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' config/nginx.conf - -rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/rack/bundle - -nginx -c $TROOT/config/nginx.conf - -rvm ruby-$MRI_VERSION do bundle exec unicorn -E production -c config/unicorn.rb & diff --git a/frameworks/Ruby/rails/.gitignore b/frameworks/Ruby/rails/.gitignore deleted file mode 100644 index c56e2faf2f0..00000000000 --- a/frameworks/Ruby/rails/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.bundle -vendor/bundle -/tmp/ -Gemfile.lock diff --git a/frameworks/Ruby/rails/Gemfile b/frameworks/Ruby/rails/Gemfile index 24add362579..049a9b400d0 100644 --- a/frameworks/Ruby/rails/Gemfile +++ b/frameworks/Ruby/rails/Gemfile @@ -1,20 +1,9 @@ source 'http://rubygems.org' -platforms :jruby do - gem 'activerecord-jdbcmysql-adapter', '~> 1.3.9', :require => false - gem 'torquebox', '3.2.0' - gem 'trinidad', '1.4.6' -end - -platforms :ruby do - gem 'mysql2', '0.4.5' - gem 'unicorn', '5.3.0' - gem 'thin', '1.7.0' -end - -gem 'puma', '~> 3.9.1' - +gem 'mysql2', '0.4.10' +gem 'unicorn', '5.4.0' +gem 'puma', '3.9.1' gem 'activerecord-import', '0.18.1' -gem 'activerecord', '5.1.0', :require => 'active_record' - -gem 'rails', '~> 5.1.0' +gem 'activerecord', '5.1.5', :require => 'active_record' +gem 'rails', '5.1.5' +gem 'tzinfo-data', '1.2018.3' \ No newline at end of file diff --git a/frameworks/Ruby/rails/app/assets/images/rails.png b/frameworks/Ruby/rails/app/assets/images/rails.png deleted file mode 100644 index d5edc04e65f..00000000000 Binary files a/frameworks/Ruby/rails/app/assets/images/rails.png and /dev/null differ diff --git a/frameworks/Ruby/rails/app/assets/javascripts/application.js b/frameworks/Ruby/rails/app/assets/javascripts/application.js deleted file mode 100644 index 9097d830e2c..00000000000 --- a/frameworks/Ruby/rails/app/assets/javascripts/application.js +++ /dev/null @@ -1,15 +0,0 @@ -// This is a manifest file that'll be compiled into application.js, which will include all the files -// listed below. -// -// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, -// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. -// -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. -// -// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD -// GO AFTER THE REQUIRES BELOW. -// -//= require jquery -//= require jquery_ujs -//= require_tree . diff --git a/frameworks/Ruby/rails/app/assets/stylesheets/application.css b/frameworks/Ruby/rails/app/assets/stylesheets/application.css deleted file mode 100644 index 3b5cc6648e4..00000000000 --- a/frameworks/Ruby/rails/app/assets/stylesheets/application.css +++ /dev/null @@ -1,13 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the top of the - * compiled file, but it's generally better to create a new file per style scope. - * - *= require_self - *= require_tree . -*/ diff --git a/frameworks/Ruby/rails/app/mailers/.gitkeep b/frameworks/Ruby/rails/app/mailers/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/Ruby/rails/benchmark_config.json b/frameworks/Ruby/rails/benchmark_config.json index 946384863fd..aa14014d1ba 100644 --- a/frameworks/Ruby/rails/benchmark_config.json +++ b/frameworks/Ruby/rails/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "rails", "tests": [{ "default": { - "setup_file": "run_mri_puma", "json_url": "/hello_world/json", "db_url": "/hello_world/db", "query_url": "/hello_world/query?queries=", @@ -24,31 +23,7 @@ "notes": "", "versus": "rack-puma-mri" }, - "thin": { - "setup_file": "run_mri_thin", - "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": "rails", - "language": "Ruby", - "orm": "Full", - "platform": "Rack", - "webserver": "Thin", - "os": "Linux", - "database_os": "Linux", - "display_name": "rails-thin-mri", - "notes": "", - "versus": "rack-thin-mri" - }, "unicorn": { - "setup_file": "run_mri_unicorn", "json_url": "/hello_world/json", "db_url": "/hello_world/db", "query_url": "/hello_world/query?queries=", diff --git a/frameworks/Ruby/rails/config/database.yml b/frameworks/Ruby/rails/config/database.yml index 72a300710c5..8023930f1c5 100644 --- a/frameworks/Ruby/rails/config/database.yml +++ b/frameworks/Ruby/rails/config/database.yml @@ -1,10 +1,10 @@ --- _: &common - adapter: <%= RUBY_PLATFORM == 'java' ? 'jdbcmysql' : 'mysql2' %> + adapter: mysql2 database: hello_world username: benchmarkdbuser password: benchmarkdbpass - host: <%= ENV['DB_HOST'] %> + host: tfb-database timeout: 5000 development: diff --git a/frameworks/Ruby/rails/config/nginx.conf b/frameworks/Ruby/rails/config/nginx.conf index dd4984f3256..d9858d9c303 100644 --- a/frameworks/Ruby/rails/config/nginx.conf +++ b/frameworks/Ruby/rails/config/nginx.conf @@ -37,7 +37,7 @@ events { http { # nginx will find this file in the config directory set at nginx build time - include /usr/local/nginx/conf/mime.types; + include /nginx/conf/mime.types; # fallback in case we can't determine a type default_type application/octet-stream; diff --git a/frameworks/Ruby/rails/config/thin.yml b/frameworks/Ruby/rails/config/thin.yml deleted file mode 100644 index 132f66a3135..00000000000 --- a/frameworks/Ruby/rails/config/thin.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -timeout: 30 -wait: 30 -max_conns: 1024 -max_persistent_conns: 512 -environment: production -port: 8080 -servers: 8 -log: /tmp/thin.log -quiet: true \ No newline at end of file diff --git a/frameworks/Ruby/rails/config/trinidad.yml b/frameworks/Ruby/rails/config/trinidad.yml deleted file mode 100644 index f56a0afd572..00000000000 --- a/frameworks/Ruby/rails/config/trinidad.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- - port: 8080 - threadsafe: true - environment: production - http: - address: '*' - logging: - level: SEVERE diff --git a/frameworks/Ruby/rails/public/.keep b/frameworks/Ruby/rails/public/.keep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/Ruby/rails/rails-unicorn.dockerfile b/frameworks/Ruby/rails/rails-unicorn.dockerfile new file mode 100644 index 00000000000..b3766637189 --- /dev/null +++ b/frameworks/Ruby/rails/rails-unicorn.dockerfile @@ -0,0 +1,17 @@ +FROM techempower/nginx:0.1 + +FROM techempower/ruby-2.4:0.1 + +COPY --from=0 /nginx /nginx + +ENV NGINX_HOME="/nginx" +ENV PATH=/nginx/sbin:${PATH} + +ADD ./ /rails + +WORKDIR /rails + +RUN bundle install --jobs=4 --gemfile=/rails/Gemfile --path=/rails/rails/bundle + +CMD nginx -c /rails/config/nginx.conf && \ + DB_HOST=tfb-database bundle exec unicorn_rails -E production -c config/unicorn.rb diff --git a/frameworks/Ruby/rails/rails.dockerfile b/frameworks/Ruby/rails/rails.dockerfile new file mode 100644 index 00000000000..cfd7141bf67 --- /dev/null +++ b/frameworks/Ruby/rails/rails.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/ruby-2.4:0.1 + +ADD ./ /rails + +WORKDIR /rails + +RUN bundle install --jobs=4 --gemfile=/rails/Gemfile --path=/rails/rails/bundle + +CMD DB_HOST=tfb-database bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production diff --git a/frameworks/Ruby/rails/run_mri_puma.sh b/frameworks/Ruby/rails/run_mri_puma.sh deleted file mode 100755 index 85fd3c7fe1c..00000000000 --- a/frameworks/Ruby/rails/run_mri_puma.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm ruby-2.4 - -rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/rails/bundle - -DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production & diff --git a/frameworks/Ruby/rails/run_mri_thin.sh b/frameworks/Ruby/rails/run_mri_thin.sh deleted file mode 100755 index 07144a50a6b..00000000000 --- a/frameworks/Ruby/rails/run_mri_thin.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm ruby-2.4 - -rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/rails/bundle - -DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec thin start -C config/thin.yml & diff --git a/frameworks/Ruby/rails/run_mri_unicorn.sh b/frameworks/Ruby/rails/run_mri_unicorn.sh deleted file mode 100755 index a6759e29f25..00000000000 --- a/frameworks/Ruby/rails/run_mri_unicorn.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends mysql rvm ruby-2.4 nginx - -sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' config/nginx.conf - -rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/rails/bundle - -nginx -c $TROOT/config/nginx.conf - -DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec unicorn_rails -E production -c $TROOT/config/unicorn.rb & diff --git a/frameworks/Ruby/roda-sequel/.gitignore b/frameworks/Ruby/roda-sequel/.gitignore deleted file mode 100644 index 826b849014d..00000000000 --- a/frameworks/Ruby/roda-sequel/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.bundle -vendor/bundle -passenger.* -Gemfile.lock diff --git a/frameworks/Ruby/roda-sequel/Makefile b/frameworks/Ruby/roda-sequel/Makefile deleted file mode 100644 index 2d25e3a7583..00000000000 --- a/frameworks/Ruby/roda-sequel/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -json: benchmark_config.yaml - ruby benchmark_config.rb benchmark_config.yaml >benchmark_config.json diff --git a/frameworks/Ruby/roda-sequel/benchmark_config.json b/frameworks/Ruby/roda-sequel/benchmark_config.json index 0b36779b4f4..d1a38c0643f 100644 --- a/frameworks/Ruby/roda-sequel/benchmark_config.json +++ b/frameworks/Ruby/roda-sequel/benchmark_config.json @@ -3,7 +3,6 @@ "tests": [ { "default": { - "setup_file": "run_mri_puma", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -26,7 +25,6 @@ "notes": "" }, "postgres": { - "setup_file": "run_mri_puma", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -49,7 +47,6 @@ "notes": "" }, "passenger-mri": { - "setup_file": "run_mri_passenger", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -72,7 +69,6 @@ "notes": "" }, "postgres-passenger-mri": { - "setup_file": "run_mri_passenger", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -95,7 +91,6 @@ "notes": "" }, "unicorn-mri": { - "setup_file": "run_mri_unicorn", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -118,7 +113,6 @@ "notes": "" }, "postgres-unicorn-mri": { - "setup_file": "run_mri_unicorn", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -141,7 +135,6 @@ "notes": "" }, "torquebox-jruby": { - "setup_file": "run_jruby_torquebox", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -164,7 +157,6 @@ "notes": "" }, "postgres-torquebox-jruby": { - "setup_file": "run_jruby_torquebox", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Ruby/roda-sequel/benchmark_config.rb b/frameworks/Ruby/roda-sequel/benchmark_config.rb deleted file mode 100644 index 5aa58997825..00000000000 --- a/frameworks/Ruby/roda-sequel/benchmark_config.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -require 'json' -require 'yaml' - -yaml = YAML.load(ARGF.read) -yaml["tests"][0].delete_if { |_, v| v["disabled"] } -puts JSON.pretty_generate(yaml) diff --git a/frameworks/Ruby/roda-sequel/benchmark_config.yaml b/frameworks/Ruby/roda-sequel/benchmark_config.yaml deleted file mode 100644 index 55ee7e63e4e..00000000000 --- a/frameworks/Ruby/roda-sequel/benchmark_config.yaml +++ /dev/null @@ -1,82 +0,0 @@ ---- -framework: roda-sequel -tests: - - default: &default - setup_file: run_mri_puma - json_url: /json - db_url: /db - query_url: /queries?queries= - fortune_url: /fortunes - update_url: /updates?queries= - plaintext_url: /plaintext - port: 8080 - approach: Realistic - classification: Micro - database: MySQL - framework: roda-sequel - language: Ruby - orm: Full - platform: Rack - webserver: Puma - os: Linux - database_os: Linux - display_name: roda-sequel-puma-mri - versus: rack-sequel-puma-mri - notes: "" - postgres: - <<: *default - database: Postgres - display_name: roda-sequel-postgres-puma-mri - versus: rack-sequel-postgres-puma-mri - puma-jruby: - <<: *default - setup_file: run_jruby_puma - display_name: roda-sequel-puma-jruby - versus: rack-sequel-puma-jruby - disabled: true - postgres-puma-jruby: - <<: *default - setup_file: run_jruby_puma - database: Postgres - display_name: roda-sequel-postgres-puma-jruby - versus: rack-sequel-postgres-puma-jruby - disabled: true - passenger-mri: - <<: *default - setup_file: run_mri_passenger - webserver: Passenger - display_name: roda-sequel-passenger-mri - versus: rack-sequel-passenger-mri - postgres-passenger-mri: - <<: *default - setup_file: run_mri_passenger - database: Postgres - webserver: Passenger - display_name: roda-sequel-postgres-passenger-mri - versus: rack-sequel-postgres-passenger-mri - unicorn-mri: - <<: *default - setup_file: run_mri_unicorn - webserver: Unicorn - display_name: roda-sequel-unicorn-mri - versus: rack-sequel-unicorn-mri - postgres-unicorn-mri: - <<: *default - setup_file: run_mri_unicorn - database: Postgres - webserver: Unicorn - display_name: roda-sequel-postgres-unicorn-mri - versus: rack-sequel-postgres-unicorn-mri - torquebox-jruby: - <<: *default - setup_file: run_jruby_torquebox - webserver: TorqueBox - display_name: roda-sequel-torquebox-jruby - versus: rack-sequel-torquebox-jruby - postgres-torquebox-jruby: - <<: *default - setup_file: run_jruby_torquebox - database: Postgres - webserver: TorqueBox - display_name: roda-sequel-postgres-torquebox-jruby - versus: rack-sequel-postgres-torquebox-jruby diff --git a/frameworks/Ruby/roda-sequel/config/bundle_install.sh b/frameworks/Ruby/roda-sequel/config/bundle_install.sh deleted file mode 100644 index e7ad5c201a6..00000000000 --- a/frameworks/Ruby/roda-sequel/config/bundle_install.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# Ensure we don't accidentally (try to) use gems for the wrong platform. -rm -f $TROOT/Gemfile.lock - -bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/roda-sequel/bundle diff --git a/frameworks/Ruby/roda-sequel/config/common_run.sh b/frameworks/Ruby/roda-sequel/config/common_run.sh deleted file mode 100644 index 3a1e9285458..00000000000 --- a/frameworks/Ruby/roda-sequel/config/common_run.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -if [[ $LOGDIR == *postgres* ]] ; then - DBTYPE=postgresql -else - DBTYPE=mysql -fi - -export DBTYPE - -if [[ $LOGDIR == *jruby* ]] ; then - . $(dirname $0)/config/java_tune.sh -fi diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-base.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-base.dockerfile new file mode 100644 index 00000000000..5954b041550 --- /dev/null +++ b/frameworks/Ruby/roda-sequel/roda-sequel-base.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/ruby-2.4:0.1 + +ADD ./ /roda-sequel + +WORKDIR /roda-sequel + +RUN bundle install --jobs=4 --gemfile=/roda-sequel/Gemfile --path=/roda-sequel/roda-sequel/bundle diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-jruby-base.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-jruby-base.dockerfile new file mode 100644 index 00000000000..98ad8241a7f --- /dev/null +++ b/frameworks/Ruby/roda-sequel/roda-sequel-jruby-base.dockerfile @@ -0,0 +1,12 @@ +FROM techempower/jruby-9.1:0.1 + +ADD ./ /roda-sequel + +WORKDIR /roda-sequel + +ENV THREAD_FACTOR=2 + +RUN bundle install --jobs=4 --gemfile=/roda-sequel/Gemfile --path=/roda-sequel/roda-sequel/bundle + +ENV DBTYPE=mysql +CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-passenger-mri.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-passenger-mri.dockerfile new file mode 100644 index 00000000000..0e7221a6795 --- /dev/null +++ b/frameworks/Ruby/roda-sequel/roda-sequel-passenger-mri.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/roda-sequel-base:0.1 + +# TODO: https://github.com/phusion/passenger/issues/1916 +ENV _PASSENGER_FORCE_HTTP_SESSION=true +ENV DBTYPE=mysql + +RUN ruby -r /roda-sequel/config/auto_tune -e 'puts auto_tune.first' > instances +CMD bundle exec passenger start --log-level 1 \ + --engine builtin --disable-turbocaching --disable-security-update-check \ + --spawn-method direct --max-pool-size $(cat instances) --min-instances $(cat instances) --max-request-queue-size 1024 \ + --address 0.0.0.0 --port 8080 --environment production diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-postgres-passenger-mri.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-postgres-passenger-mri.dockerfile new file mode 100644 index 00000000000..c237a53d309 --- /dev/null +++ b/frameworks/Ruby/roda-sequel/roda-sequel-postgres-passenger-mri.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/roda-sequel-base:0.1 + +# TODO: https://github.com/phusion/passenger/issues/1916 +ENV _PASSENGER_FORCE_HTTP_SESSION=true +ENV DBTYPE=postgresql + +RUN ruby -r /roda-sequel/config/auto_tune -e 'puts auto_tune.first' > instances +CMD bundle exec passenger start --log-level 1 \ + --engine builtin --disable-turbocaching --disable-security-update-check \ + --spawn-method direct --max-pool-size $(cat instances) --min-instances $(cat instances) --max-request-queue-size 1024 \ + --address 0.0.0.0 --port 8080 --environment production diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-postgres-torquebox-jruby.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-postgres-torquebox-jruby.dockerfile new file mode 100644 index 00000000000..bffa2ee9bd8 --- /dev/null +++ b/frameworks/Ruby/roda-sequel/roda-sequel-postgres-torquebox-jruby.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/roda-sequel-jruby-base:0.1 + +ENV DBTYPE=postgresql +CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-postgres-unicorn-mri.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-postgres-unicorn-mri.dockerfile new file mode 100644 index 00000000000..80224518032 --- /dev/null +++ b/frameworks/Ruby/roda-sequel/roda-sequel-postgres-unicorn-mri.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/roda-sequel-base:0.1 + +ENV DBTYPE=postgresql +CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-postgres.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-postgres.dockerfile new file mode 100644 index 00000000000..387009ac0ba --- /dev/null +++ b/frameworks/Ruby/roda-sequel/roda-sequel-postgres.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/roda-sequel-base:0.1 + +ENV DBTYPE=postgresql +CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-torquebox-jruby.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-torquebox-jruby.dockerfile new file mode 100644 index 00000000000..c339ea743fb --- /dev/null +++ b/frameworks/Ruby/roda-sequel/roda-sequel-torquebox-jruby.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/roda-sequel-jruby-base:0.1 + +ENV DBTYPE=mysql +CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-unicorn-mri.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-unicorn-mri.dockerfile new file mode 100644 index 00000000000..26d44aedb9d --- /dev/null +++ b/frameworks/Ruby/roda-sequel/roda-sequel-unicorn-mri.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/roda-sequel-base:0.1 + +ENV DBTYPE=mysql +CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production diff --git a/frameworks/Ruby/roda-sequel/roda-sequel.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel.dockerfile new file mode 100644 index 00000000000..84865676e08 --- /dev/null +++ b/frameworks/Ruby/roda-sequel/roda-sequel.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/roda-sequel-base:0.1 + +ENV DBTYPE=mysql +CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production diff --git a/frameworks/Ruby/roda-sequel/run_jruby_puma.sh b/frameworks/Ruby/roda-sequel/run_jruby_puma.sh deleted file mode 100755 index 660dca4de09..00000000000 --- a/frameworks/Ruby/roda-sequel/run_jruby_puma.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -THREAD_FACTOR=1 - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm jruby-9.1 - -rvm use jruby-$JRUBY_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec puma -t $MAX_CONCURRENCY:$MAX_CONCURRENCY -b tcp://0.0.0.0:8080 -e production & diff --git a/frameworks/Ruby/roda-sequel/run_jruby_torquebox.sh b/frameworks/Ruby/roda-sequel/run_jruby_torquebox.sh deleted file mode 100755 index a35fdba94c5..00000000000 --- a/frameworks/Ruby/roda-sequel/run_jruby_torquebox.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -THREAD_FACTOR=2 - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm jruby-9.1 - -rvm use jruby-$JRUBY_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production & diff --git a/frameworks/Ruby/roda-sequel/run_mri_passenger.sh b/frameworks/Ruby/roda-sequel/run_mri_passenger.sh deleted file mode 100755 index 93bc271f3da..00000000000 --- a/frameworks/Ruby/roda-sequel/run_mri_passenger.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm ruby-2.4 - -rvm use ruby-$MRI_VERSION - -. $(dirname $0)/config/bundle_install.sh - -# TODO: https://github.com/phusion/passenger/issues/1916 -export _PASSENGER_FORCE_HTTP_SESSION=true - -# FWBM only... Passenger will auto-tune itself in production! -instances=$(ruby -r$(dirname $0)/config/auto_tune -e 'puts auto_tune.first') - -bundle exec passenger start --log-level 1 \ - --engine builtin --disable-turbocaching --disable-security-update-check \ - --spawn-method direct --max-pool-size $instances --min-instances $instances --max-request-queue-size 1024 \ - --address 0.0.0.0 --port 8080 --environment production & diff --git a/frameworks/Ruby/roda-sequel/run_mri_puma.sh b/frameworks/Ruby/roda-sequel/run_mri_puma.sh deleted file mode 100755 index fd0900b075c..00000000000 --- a/frameworks/Ruby/roda-sequel/run_mri_puma.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm ruby-2.4 - -rvm use ruby-$MRI_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production & diff --git a/frameworks/Ruby/roda-sequel/run_mri_unicorn.sh b/frameworks/Ruby/roda-sequel/run_mri_unicorn.sh deleted file mode 100755 index a52868b8b3a..00000000000 --- a/frameworks/Ruby/roda-sequel/run_mri_unicorn.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm ruby-2.4 - -rvm use ruby-$MRI_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production & diff --git a/frameworks/Ruby/sinatra-sequel/.gitignore b/frameworks/Ruby/sinatra-sequel/.gitignore deleted file mode 100644 index 826b849014d..00000000000 --- a/frameworks/Ruby/sinatra-sequel/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.bundle -vendor/bundle -passenger.* -Gemfile.lock diff --git a/frameworks/Ruby/sinatra-sequel/Makefile b/frameworks/Ruby/sinatra-sequel/Makefile deleted file mode 100644 index 2d25e3a7583..00000000000 --- a/frameworks/Ruby/sinatra-sequel/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -json: benchmark_config.yaml - ruby benchmark_config.rb benchmark_config.yaml >benchmark_config.json diff --git a/frameworks/Ruby/sinatra-sequel/benchmark_config.json b/frameworks/Ruby/sinatra-sequel/benchmark_config.json index 73eb6cbdb51..7162042c8f1 100644 --- a/frameworks/Ruby/sinatra-sequel/benchmark_config.json +++ b/frameworks/Ruby/sinatra-sequel/benchmark_config.json @@ -3,7 +3,6 @@ "tests": [ { "default": { - "setup_file": "run_mri_puma", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -26,7 +25,6 @@ "notes": "" }, "postgres": { - "setup_file": "run_mri_puma", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -49,7 +47,6 @@ "notes": "" }, "passenger-mri": { - "setup_file": "run_mri_passenger", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -72,7 +69,6 @@ "notes": "" }, "postgres-passenger-mri": { - "setup_file": "run_mri_passenger", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -95,7 +91,6 @@ "notes": "" }, "unicorn-mri": { - "setup_file": "run_mri_unicorn", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -118,7 +113,6 @@ "notes": "" }, "postgres-unicorn-mri": { - "setup_file": "run_mri_unicorn", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -141,7 +135,6 @@ "notes": "" }, "torquebox-jruby": { - "setup_file": "run_jruby_torquebox", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -164,7 +157,6 @@ "notes": "" }, "postgres-torquebox-jruby": { - "setup_file": "run_jruby_torquebox", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Ruby/sinatra-sequel/benchmark_config.rb b/frameworks/Ruby/sinatra-sequel/benchmark_config.rb deleted file mode 100644 index 5aa58997825..00000000000 --- a/frameworks/Ruby/sinatra-sequel/benchmark_config.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -require 'json' -require 'yaml' - -yaml = YAML.load(ARGF.read) -yaml["tests"][0].delete_if { |_, v| v["disabled"] } -puts JSON.pretty_generate(yaml) diff --git a/frameworks/Ruby/sinatra-sequel/benchmark_config.yaml b/frameworks/Ruby/sinatra-sequel/benchmark_config.yaml deleted file mode 100644 index 4257825fa6c..00000000000 --- a/frameworks/Ruby/sinatra-sequel/benchmark_config.yaml +++ /dev/null @@ -1,82 +0,0 @@ ---- -framework: sinatra-sequel -tests: - - default: &default - setup_file: run_mri_puma - json_url: /json - db_url: /db - query_url: /queries?queries= - fortune_url: /fortunes - update_url: /updates?queries= - plaintext_url: /plaintext - port: 8080 - approach: Realistic - classification: Micro - database: MySQL - framework: sinatra-sequel - language: Ruby - orm: Full - platform: Rack - webserver: Puma - os: Linux - database_os: Linux - display_name: sinatra-sequel-puma-mri - versus: rack-sequel-puma-mri - notes: "" - postgres: - <<: *default - database: Postgres - display_name: sinatra-sequel-postgres-puma-mri - versus: rack-sequel-postgres-puma-mri - puma-jruby: - <<: *default - setup_file: run_jruby_puma - display_name: sinatra-sequel-puma-jruby - versus: rack-sequel-puma-jruby - disabled: true - postgres-puma-jruby: - <<: *default - setup_file: run_jruby_puma - database: Postgres - display_name: sinatra-sequel-postgres-puma-jruby - versus: rack-sequel-postgres-puma-jruby - disabled: true - passenger-mri: - <<: *default - setup_file: run_mri_passenger - webserver: Passenger - display_name: sinatra-sequel-passenger-mri - versus: rack-sequel-passenger-mri - postgres-passenger-mri: - <<: *default - setup_file: run_mri_passenger - database: Postgres - webserver: Passenger - display_name: sinatra-sequel-postgres-passenger-mri - versus: rack-sequel-postgres-passenger-mri - unicorn-mri: - <<: *default - setup_file: run_mri_unicorn - webserver: Unicorn - display_name: sinatra-sequel-unicorn-mri - versus: rack-sequel-unicorn-mri - postgres-unicorn-mri: - <<: *default - setup_file: run_mri_unicorn - database: Postgres - webserver: Unicorn - display_name: sinatra-sequel-postgres-unicorn-mri - versus: rack-sequel-postgres-unicorn-mri - torquebox-jruby: - <<: *default - setup_file: run_jruby_torquebox - webserver: TorqueBox - display_name: sinatra-sequel-torquebox-jruby - versus: rack-sequel-torquebox-jruby - postgres-torquebox-jruby: - <<: *default - setup_file: run_jruby_torquebox - database: Postgres - webserver: TorqueBox - display_name: sinatra-sequel-postgres-torquebox-jruby - versus: rack-sequel-postgres-torquebox-jruby diff --git a/frameworks/Ruby/sinatra-sequel/config/bundle_install.sh b/frameworks/Ruby/sinatra-sequel/config/bundle_install.sh deleted file mode 100644 index df6ccb2759e..00000000000 --- a/frameworks/Ruby/sinatra-sequel/config/bundle_install.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# Ensure we don't accidentally (try to) use gems for the wrong platform. -rm -f $TROOT/Gemfile.lock - -bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/sinatra-sequel/bundle diff --git a/frameworks/Ruby/sinatra-sequel/config/common_run.sh b/frameworks/Ruby/sinatra-sequel/config/common_run.sh deleted file mode 100644 index 3a1e9285458..00000000000 --- a/frameworks/Ruby/sinatra-sequel/config/common_run.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -if [[ $LOGDIR == *postgres* ]] ; then - DBTYPE=postgresql -else - DBTYPE=mysql -fi - -export DBTYPE - -if [[ $LOGDIR == *jruby* ]] ; then - . $(dirname $0)/config/java_tune.sh -fi diff --git a/frameworks/Ruby/sinatra-sequel/run_jruby_puma.sh b/frameworks/Ruby/sinatra-sequel/run_jruby_puma.sh deleted file mode 100755 index 660dca4de09..00000000000 --- a/frameworks/Ruby/sinatra-sequel/run_jruby_puma.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -THREAD_FACTOR=1 - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm jruby-9.1 - -rvm use jruby-$JRUBY_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec puma -t $MAX_CONCURRENCY:$MAX_CONCURRENCY -b tcp://0.0.0.0:8080 -e production & diff --git a/frameworks/Ruby/sinatra-sequel/run_jruby_torquebox.sh b/frameworks/Ruby/sinatra-sequel/run_jruby_torquebox.sh deleted file mode 100755 index a35fdba94c5..00000000000 --- a/frameworks/Ruby/sinatra-sequel/run_jruby_torquebox.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -THREAD_FACTOR=2 - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm jruby-9.1 - -rvm use jruby-$JRUBY_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production & diff --git a/frameworks/Ruby/sinatra-sequel/run_mri_passenger.sh b/frameworks/Ruby/sinatra-sequel/run_mri_passenger.sh deleted file mode 100755 index 93bc271f3da..00000000000 --- a/frameworks/Ruby/sinatra-sequel/run_mri_passenger.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm ruby-2.4 - -rvm use ruby-$MRI_VERSION - -. $(dirname $0)/config/bundle_install.sh - -# TODO: https://github.com/phusion/passenger/issues/1916 -export _PASSENGER_FORCE_HTTP_SESSION=true - -# FWBM only... Passenger will auto-tune itself in production! -instances=$(ruby -r$(dirname $0)/config/auto_tune -e 'puts auto_tune.first') - -bundle exec passenger start --log-level 1 \ - --engine builtin --disable-turbocaching --disable-security-update-check \ - --spawn-method direct --max-pool-size $instances --min-instances $instances --max-request-queue-size 1024 \ - --address 0.0.0.0 --port 8080 --environment production & diff --git a/frameworks/Ruby/sinatra-sequel/run_mri_puma.sh b/frameworks/Ruby/sinatra-sequel/run_mri_puma.sh deleted file mode 100755 index fd0900b075c..00000000000 --- a/frameworks/Ruby/sinatra-sequel/run_mri_puma.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm ruby-2.4 - -rvm use ruby-$MRI_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production & diff --git a/frameworks/Ruby/sinatra-sequel/run_mri_unicorn.sh b/frameworks/Ruby/sinatra-sequel/run_mri_unicorn.sh deleted file mode 100755 index a52868b8b3a..00000000000 --- a/frameworks/Ruby/sinatra-sequel/run_mri_unicorn.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm ruby-2.4 - -rvm use ruby-$MRI_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production & diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-base.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-base.dockerfile new file mode 100644 index 00000000000..032c2b03295 --- /dev/null +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-base.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/ruby-2.4:0.1 + +ADD ./ /sinatra-sequel + +WORKDIR /sinatra-sequel + +RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile --path=/sinatra-sequel/sinatra-sequel/bundle diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-jruby-base.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-jruby-base.dockerfile new file mode 100644 index 00000000000..4671e43fced --- /dev/null +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-jruby-base.dockerfile @@ -0,0 +1,12 @@ +FROM techempower/jruby-9.1:0.1 + +ADD ./ /sinatra-sequel + +WORKDIR /sinatra-sequel + +ENV THREAD_FACTOR=2 + +RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile --path=/sinatra-sequel/sinatra-sequel/bundle + +ENV DBTYPE=mysql +CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-passenger-mri.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-passenger-mri.dockerfile new file mode 100644 index 00000000000..0c807479936 --- /dev/null +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-passenger-mri.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/sinatra-sequel-base:0.1 + +# TODO: https://github.com/phusion/passenger/issues/1916 +ENV _PASSENGER_FORCE_HTTP_SESSION=true +ENV DBTYPE=mysql + +RUN ruby -r /sinatra-sequel/config/auto_tune -e 'puts auto_tune.first' > instances +CMD bundle exec passenger start --log-level 1 \ + --engine builtin --disable-turbocaching --disable-security-update-check \ + --spawn-method direct --max-pool-size $(cat instances) --min-instances $(cat instances) --max-request-queue-size 1024 \ + --address 0.0.0.0 --port 8080 --environment production diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-passenger-mri.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-passenger-mri.dockerfile new file mode 100644 index 00000000000..fd7df2a4b1d --- /dev/null +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-passenger-mri.dockerfile @@ -0,0 +1,12 @@ +FROM techempower/sinatra-sequel-base:0.1 + +# TODO: https://github.com/phusion/passenger/issues/1916 +ENV _PASSENGER_FORCE_HTTP_SESSION=true +ENV DBTYPE=postgresql + +RUN ruby -r /sinatra-sequel/config/auto_tune -e 'puts auto_tune.first' > instances +CMD bundle exec passenger start --log-level 1 \ + --engine builtin --disable-turbocaching --disable-security-update-check \ + --spawn-method direct --max-pool-size $(cat instances) --min-instances $(cat instances) --max-request-queue-size 1024 \ + --address 0.0.0.0 --port 8080 --environment production + diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-torquebox-jruby.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-torquebox-jruby.dockerfile new file mode 100644 index 00000000000..c6d771c283a --- /dev/null +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-torquebox-jruby.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/sinatra-sequel-jruby-base:0.1 + +ENV DBTYPE=postgresql +CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-unicorn-mri.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-unicorn-mri.dockerfile new file mode 100644 index 00000000000..547b1065109 --- /dev/null +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-unicorn-mri.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/sinatra-sequel-base:0.1 + +ENV DBTYPE=postgresql +CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres.dockerfile new file mode 100644 index 00000000000..effd465d7e4 --- /dev/null +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/sinatra-sequel-base:0.1 + +ENV DBTYPE=postgresql +CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-torquebox-jruby.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-torquebox-jruby.dockerfile new file mode 100644 index 00000000000..17a8b2bce56 --- /dev/null +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-torquebox-jruby.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/sinatra-sequel-jruby-base:0.1 + +ENV DBTYPE=mysql +CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-unicorn-mri.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-unicorn-mri.dockerfile new file mode 100644 index 00000000000..d4dec37e646 --- /dev/null +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-unicorn-mri.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/sinatra-sequel-base:0.1 + +ENV DBTYPE=mysql +CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel.dockerfile new file mode 100644 index 00000000000..b18432115ff --- /dev/null +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/sinatra-sequel-base:0.1 + +ENV DBTYPE=mysql +CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production diff --git a/frameworks/Ruby/sinatra/.gitignore b/frameworks/Ruby/sinatra/.gitignore deleted file mode 100644 index 826b849014d..00000000000 --- a/frameworks/Ruby/sinatra/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.bundle -vendor/bundle -passenger.* -Gemfile.lock diff --git a/frameworks/Ruby/sinatra/Makefile b/frameworks/Ruby/sinatra/Makefile deleted file mode 100644 index 2d25e3a7583..00000000000 --- a/frameworks/Ruby/sinatra/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -json: benchmark_config.yaml - ruby benchmark_config.rb benchmark_config.yaml >benchmark_config.json diff --git a/frameworks/Ruby/sinatra/benchmark_config.json b/frameworks/Ruby/sinatra/benchmark_config.json index db72ae77580..5ebfe5d0896 100644 --- a/frameworks/Ruby/sinatra/benchmark_config.json +++ b/frameworks/Ruby/sinatra/benchmark_config.json @@ -3,7 +3,6 @@ "tests": [ { "default": { - "setup_file": "run_mri_puma", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -26,7 +25,6 @@ "notes": "" }, "postgres": { - "setup_file": "run_mri_puma", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -49,7 +47,6 @@ "notes": "" }, "passenger-mri": { - "setup_file": "run_mri_passenger", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -72,7 +69,6 @@ "notes": "" }, "postgres-passenger-mri": { - "setup_file": "run_mri_passenger", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -95,7 +91,6 @@ "notes": "" }, "unicorn-mri": { - "setup_file": "run_mri_unicorn", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -118,7 +113,6 @@ "notes": "" }, "postgres-unicorn-mri": { - "setup_file": "run_mri_unicorn", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Ruby/sinatra/benchmark_config.rb b/frameworks/Ruby/sinatra/benchmark_config.rb deleted file mode 100644 index 5aa58997825..00000000000 --- a/frameworks/Ruby/sinatra/benchmark_config.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -require 'json' -require 'yaml' - -yaml = YAML.load(ARGF.read) -yaml["tests"][0].delete_if { |_, v| v["disabled"] } -puts JSON.pretty_generate(yaml) diff --git a/frameworks/Ruby/sinatra/benchmark_config.yaml b/frameworks/Ruby/sinatra/benchmark_config.yaml deleted file mode 100644 index 5e0950b1fa8..00000000000 --- a/frameworks/Ruby/sinatra/benchmark_config.yaml +++ /dev/null @@ -1,84 +0,0 @@ ---- -framework: sinatra -tests: - - default: &default - setup_file: run_mri_puma - json_url: /json - db_url: /db - query_url: /queries?queries= - fortune_url: /fortunes - update_url: /updates?queries= - plaintext_url: /plaintext - port: 8080 - approach: Realistic - classification: Micro - database: MySQL - framework: sinatra - language: Ruby - orm: Full - platform: Rack - webserver: Puma - os: Linux - database_os: Linux - display_name: sinatra-puma-mri - versus: rack-puma-mri - notes: "" - postgres: - <<: *default - database: Postgres - display_name: sinatra-postgres-puma-mri - versus: rack-postgres-puma-mri - puma-jruby: - <<: *default - setup_file: run_jruby_puma - display_name: sinatra-puma-jruby - versus: rack-puma-jruby - disabled: true - postgres-puma-jruby: - <<: *default - setup_file: run_jruby_puma - database: Postgres - display_name: sinatra-postgres-puma-jruby - versus: rack-postgres-puma-jruby - disabled: true - passenger-mri: - <<: *default - setup_file: run_mri_passenger - webserver: Passenger - display_name: sinatra-passenger-mri - versus: rack-passenger-mri - postgres-passenger-mri: - <<: *default - setup_file: run_mri_passenger - database: Postgres - webserver: Passenger - display_name: sinatra-postgres-passenger-mri - versus: rack-postgres-passenger-mri - unicorn-mri: - <<: *default - setup_file: run_mri_unicorn - webserver: Unicorn - display_name: sinatra-unicorn-mri - versus: rack-unicorn-mri - postgres-unicorn-mri: - <<: *default - setup_file: run_mri_unicorn - database: Postgres - webserver: Unicorn - display_name: sinatra-postgres-unicorn-mri - versus: rack-postgres-unicorn-mri - torquebox-jruby: - <<: *default - setup_file: run_jruby_torquebox - webserver: TorqueBox - display_name: sinatra-torquebox-jruby - versus: rack-torquebox-jruby - disabled: true - postgres-torquebox-jruby: - <<: *default - setup_file: run_jruby_torquebox - database: Postgres - webserver: TorqueBox - display_name: sinatra-postgres-torquebox-jruby - versus: rack-postgres-torquebox-jruby - disabled: true diff --git a/frameworks/Ruby/sinatra/config/bundle_install.sh b/frameworks/Ruby/sinatra/config/bundle_install.sh deleted file mode 100644 index b0f4e21a439..00000000000 --- a/frameworks/Ruby/sinatra/config/bundle_install.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# Ensure we don't accidentally (try to) use gems for the wrong platform. -rm -f $TROOT/Gemfile.lock - -bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=$IROOT/sinatra/bundle diff --git a/frameworks/Ruby/sinatra/config/common_run.sh b/frameworks/Ruby/sinatra/config/common_run.sh deleted file mode 100644 index 3a1e9285458..00000000000 --- a/frameworks/Ruby/sinatra/config/common_run.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -if [[ $LOGDIR == *postgres* ]] ; then - DBTYPE=postgresql -else - DBTYPE=mysql -fi - -export DBTYPE - -if [[ $LOGDIR == *jruby* ]] ; then - . $(dirname $0)/config/java_tune.sh -fi diff --git a/frameworks/Ruby/sinatra/run_jruby_puma.sh b/frameworks/Ruby/sinatra/run_jruby_puma.sh deleted file mode 100755 index 660dca4de09..00000000000 --- a/frameworks/Ruby/sinatra/run_jruby_puma.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -THREAD_FACTOR=1 - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm jruby-9.1 - -rvm use jruby-$JRUBY_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec puma -t $MAX_CONCURRENCY:$MAX_CONCURRENCY -b tcp://0.0.0.0:8080 -e production & diff --git a/frameworks/Ruby/sinatra/run_jruby_torquebox.sh b/frameworks/Ruby/sinatra/run_jruby_torquebox.sh deleted file mode 100755 index a35fdba94c5..00000000000 --- a/frameworks/Ruby/sinatra/run_jruby_torquebox.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -THREAD_FACTOR=2 - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm jruby-9.1 - -rvm use jruby-$JRUBY_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production & diff --git a/frameworks/Ruby/sinatra/run_mri_passenger.sh b/frameworks/Ruby/sinatra/run_mri_passenger.sh deleted file mode 100755 index 93bc271f3da..00000000000 --- a/frameworks/Ruby/sinatra/run_mri_passenger.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm ruby-2.4 - -rvm use ruby-$MRI_VERSION - -. $(dirname $0)/config/bundle_install.sh - -# TODO: https://github.com/phusion/passenger/issues/1916 -export _PASSENGER_FORCE_HTTP_SESSION=true - -# FWBM only... Passenger will auto-tune itself in production! -instances=$(ruby -r$(dirname $0)/config/auto_tune -e 'puts auto_tune.first') - -bundle exec passenger start --log-level 1 \ - --engine builtin --disable-turbocaching --disable-security-update-check \ - --spawn-method direct --max-pool-size $instances --min-instances $instances --max-request-queue-size 1024 \ - --address 0.0.0.0 --port 8080 --environment production & diff --git a/frameworks/Ruby/sinatra/run_mri_puma.sh b/frameworks/Ruby/sinatra/run_mri_puma.sh deleted file mode 100755 index fd0900b075c..00000000000 --- a/frameworks/Ruby/sinatra/run_mri_puma.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm ruby-2.4 - -rvm use ruby-$MRI_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production & diff --git a/frameworks/Ruby/sinatra/run_mri_unicorn.sh b/frameworks/Ruby/sinatra/run_mri_unicorn.sh deleted file mode 100755 index a52868b8b3a..00000000000 --- a/frameworks/Ruby/sinatra/run_mri_unicorn.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/config/common_run.sh - -fw_depends $DBTYPE rvm ruby-2.4 - -rvm use ruby-$MRI_VERSION - -. $(dirname $0)/config/bundle_install.sh - -bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production & diff --git a/frameworks/Ruby/sinatra/sinatra-base.dockerfile b/frameworks/Ruby/sinatra/sinatra-base.dockerfile new file mode 100644 index 00000000000..faf39b1f2c6 --- /dev/null +++ b/frameworks/Ruby/sinatra/sinatra-base.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/ruby-2.4:0.1 + +ADD ./ /sinatra + +WORKDIR /sinatra + +RUN bundle install --jobs=4 --gemfile=/sinatra/Gemfile --path=/sinatra/sinatra/bundle diff --git a/frameworks/Ruby/sinatra/sinatra-passenger-mri.dockerfile b/frameworks/Ruby/sinatra/sinatra-passenger-mri.dockerfile new file mode 100644 index 00000000000..a58f172fde8 --- /dev/null +++ b/frameworks/Ruby/sinatra/sinatra-passenger-mri.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/sinatra-base:0.1 + +# TODO: https://github.com/phusion/passenger/issues/1916 +ENV _PASSENGER_FORCE_HTTP_SESSION=true +ENV DBTYPE=mysql + +RUN ruby -r /sinatra/config/auto_tune -e 'puts auto_tune.first' > instances +CMD bundle exec passenger start --log-level 1 \ + --engine builtin --disable-turbocaching --disable-security-update-check \ + --spawn-method direct --max-pool-size $(cat instances) --min-instances $(cat instances) --max-request-queue-size 1024 \ + --address 0.0.0.0 --port 8080 --environment production diff --git a/frameworks/Ruby/sinatra/sinatra-postgres-passenger-mri.dockerfile b/frameworks/Ruby/sinatra/sinatra-postgres-passenger-mri.dockerfile new file mode 100644 index 00000000000..4fa5cc82eb5 --- /dev/null +++ b/frameworks/Ruby/sinatra/sinatra-postgres-passenger-mri.dockerfile @@ -0,0 +1,12 @@ +FROM techempower/sinatra-base:0.1 + +# TODO: https://github.com/phusion/passenger/issues/1916 +ENV _PASSENGER_FORCE_HTTP_SESSION=true +ENV DBTYPE=postgresql + +RUN ruby -r /sinatra/config/auto_tune -e 'puts auto_tune.first' > instances +CMD bundle exec passenger start --log-level 1 \ + --engine builtin --disable-turbocaching --disable-security-update-check \ + --spawn-method direct --max-pool-size $(cat instances) --min-instances $(cat instances) --max-request-queue-size 1024 \ + --address 0.0.0.0 --port 8080 --environment production + diff --git a/frameworks/Ruby/sinatra/sinatra-postgres-unicorn-mri.dockerfile b/frameworks/Ruby/sinatra/sinatra-postgres-unicorn-mri.dockerfile new file mode 100644 index 00000000000..fccf6019419 --- /dev/null +++ b/frameworks/Ruby/sinatra/sinatra-postgres-unicorn-mri.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/sinatra-base:0.1 + +ENV DBTYPE=postgresql +CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production diff --git a/frameworks/Ruby/sinatra/sinatra-postgres.dockerfile b/frameworks/Ruby/sinatra/sinatra-postgres.dockerfile new file mode 100644 index 00000000000..d5ece59007d --- /dev/null +++ b/frameworks/Ruby/sinatra/sinatra-postgres.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/sinatra-base:0.1 + +ENV DBTYPE=postgresql +CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production diff --git a/frameworks/Ruby/sinatra/sinatra-unicorn-mri.dockerfile b/frameworks/Ruby/sinatra/sinatra-unicorn-mri.dockerfile new file mode 100644 index 00000000000..b2cea398be4 --- /dev/null +++ b/frameworks/Ruby/sinatra/sinatra-unicorn-mri.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/sinatra-base:0.1 + +ENV DBTYPE=mysql +CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production diff --git a/frameworks/Ruby/sinatra/sinatra.dockerfile b/frameworks/Ruby/sinatra/sinatra.dockerfile new file mode 100644 index 00000000000..65de1e3dfcc --- /dev/null +++ b/frameworks/Ruby/sinatra/sinatra.dockerfile @@ -0,0 +1,4 @@ +FROM techempower/sinatra-base:0.1 + +ENV DBTYPE=mysql +CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production diff --git a/frameworks/Rust/actix/Cargo.lock b/frameworks/Rust/actix/Cargo.lock index c575d6ac151..91df4dd6e47 100644 --- a/frameworks/Rust/actix/Cargo.lock +++ b/frameworks/Rust/actix/Cargo.lock @@ -1,24 +1,27 @@ [[package]] name = "actix" -version = "0.2.0" +version = "0.3.0" dependencies = [ - "actix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-web 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "actix 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-web 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "askama 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "diesel 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "postgres 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix" -version = "0.5.1" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "actix_derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -26,24 +29,24 @@ dependencies = [ "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-channel 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "skeptic 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-signal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-signal 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "trust-dns-resolver 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-web" -version = "0.4.4" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "actix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "brotli2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -53,23 +56,25 @@ dependencies = [ "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "http-range 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "mime_guess 1.8.4 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 2.0.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "skeptic 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -173,7 +178,7 @@ name = "backtrace-sys" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -219,7 +224,7 @@ name = "brotli-sys" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -263,14 +268,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -539,9 +544,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "futures-cpupool" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "gcc" version = "0.3.54" @@ -552,7 +566,7 @@ name = "generic-array" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "typenum 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -562,16 +576,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "h2" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "ordermap 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "string 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -629,6 +643,11 @@ dependencies = [ "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "indexmap" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "iovec" version = "0.1.2" @@ -644,7 +663,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "socket2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "widestring 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "winreg 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -652,7 +671,7 @@ dependencies = [ [[package]] name = "itoa" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -664,6 +683,11 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "language-tags" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "lazy_static" version = "0.2.11" @@ -689,14 +713,6 @@ name = "linked-hash-map" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "log" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "log" version = "0.4.1" @@ -749,14 +765,6 @@ name = "memoffset" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "mime" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "mime" version = "0.3.5" @@ -767,10 +775,10 @@ dependencies = [ [[package]] name = "mime_guess" -version = "1.8.4" +version = "2.0.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -781,13 +789,13 @@ name = "miniz-sys" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mio" -version = "0.6.13" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -796,10 +804,10 @@ dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -809,7 +817,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -848,7 +856,7 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -859,11 +867,6 @@ dependencies = [ "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "ordermap" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "owning_ref" version = "0.3.3" @@ -942,7 +945,7 @@ dependencies = [ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "postgres-protocol 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "postgres-shared 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "socket2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -982,6 +985,14 @@ dependencies = [ "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "proc-macro2" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "pulldown-cmark" version = "0.1.2" @@ -1000,6 +1011,14 @@ name = "quote" version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "quote" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand" version = "0.3.22" @@ -1047,28 +1066,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "0.2.6" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.4.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "remove_dir_all" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1127,7 +1148,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1137,37 +1158,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.27" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.27" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive_internals 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive_internals 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive_internals" -version = "0.19.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", - "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.10" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1201,16 +1223,11 @@ dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "slab" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "slab" version = "0.4.0" @@ -1223,7 +1240,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "socket2" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1260,6 +1277,16 @@ dependencies = [ "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "syn" +version = "0.12.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "synom" version = "0.11.3" @@ -1279,11 +1306,11 @@ dependencies = [ [[package]] name = "tempdir" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1311,10 +1338,10 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1326,18 +1353,18 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-signal" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1346,12 +1373,12 @@ dependencies = [ [[package]] name = "trust-dns-proto" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1367,19 +1394,24 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "ipconfig 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "resolv-conf 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "trust-dns-proto 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-proto 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "typenum" -version = "1.9.0" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "ucd-util" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1416,6 +1448,11 @@ name = "unicode-xid" version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "unreachable" version = "1.0.0" @@ -1447,9 +1484,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "uuid" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1538,8 +1576,8 @@ dependencies = [ ] [metadata] -"checksum actix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "29a1510c45d6eedd930fa045a5a30dce42ee1942ada61a0074e9a6f3c91f367a" -"checksum actix-web 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "dcb331e4a995b987e0c8684807ef5cf7c99247ee61563cf3ca5c13db65f5ff51" +"checksum actix 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "29d85dc76d055498ef65ecf556df154393f94f55d325a05be20c676432536ce7" +"checksum actix-web 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "a6477a2dd082fe35e89b3a5b154ac841d0041f786b3d119a8c89776fdca47ae1" "checksum actix_derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4b1dc922654b9aca7a8a31eab875fde804fa9fbd67f220f2e457787b23590f2" "checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4" "checksum arrayref 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0fd1479b7c29641adbd35ff3b5c293922d696a92f25c8c975da3e0acbc87258f" @@ -1562,7 +1600,7 @@ dependencies = [ "checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23" "checksum bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7db437d718977f6dc9b2e3fd6fc343c02ac6b899b73fdd2179163447bd9ce9" "checksum cargo_metadata 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1f56ec3e469bca7c276f2eea015aa05c5e381356febdbb0683c2580189604537" -"checksum cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9be26b24e988625409b19736d130f0c7d224f01d06454b5f81d8d23d6c1a618f" +"checksum cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "2b4911e4bdcb4100c7680e7e854ff38e23f1b34d4d9e079efae3da2801341ffc" "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" "checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e" "checksum cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "746858cae4eae40fff37e1998320068df317bc247dc91a67c6cfa053afdc2abb" @@ -1595,11 +1633,12 @@ dependencies = [ "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0bab5b5e94f5c31fc764ba5dd9ad16568aae5d4825538c01d6bca680c9bf94a7" +"checksum futures 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f32b9e9aaa890fe8b9453b27ebbf3d11136a5ce59032500effd0e707bbcd80" +"checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" "checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" -"checksum h2 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5617f23e03f04b44147b0dee52d1146e61b5044994659dedf71246ccd34eb48e" +"checksum h2 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "39d9ebc6de5a56567932d30d1364fc69bf6435d2d705f033f4e722e41703d3b0" "checksum hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6a22814455d41612f41161581c2883c0c6a1c41852729b17d5ed88f01e153aa" "checksum hmac 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44f3bdb08579d99d7dc761c0e266f13b5f2ab8c8c703b9fc9ef333cd8f48f55e" "checksum hostname 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "58fab6e177434b0bb4cd344a4dabaa5bd6d7a8d792b1885aebcae7af1091d1cb" @@ -1607,16 +1646,17 @@ dependencies = [ "checksum http-range 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f2e4003e6fd05ea9109db00415e670b11f511a42e567ff2d5d771cbdfa24e02" "checksum httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f407128745b78abc95c0ffbe4e5d37427fdc0d45470710cfef8c44522a2e37" "checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" +"checksum indexmap 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9378f1f3923647a9aea6af4c6b5de68cc8a71415459ad25ef191191c48f5b7" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum ipconfig 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec4e18c0a0d4340870c14284293632d8421f419008371422dd327892b88877c" -"checksum itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8324a32baf01e2ae060e9de58ed0bc2320c9a2833491ee36cd3b4c414de4db8c" +"checksum itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c069bbec61e1ca5a596166e55dfe4773ff745c3d16b700013bcaff9a6df2c682" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" "checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" "checksum libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "f54263ad99207254cf58b5f701ecb432c717445ea2ee8af387334bdd1a03fdff" "checksum linked-hash-map 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7860ec297f7008ff7a1e3382d7f7e1dcd69efc94751a2284bafc3d013c2aa939" -"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2" "checksum lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4d06ff7ff06f729ce5f4e227876cb88d10bc59cd4ae1e09fbb2bde15c850dc21" "checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" @@ -1625,19 +1665,17 @@ dependencies = [ "checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" "checksum memoffset 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e163e5baece1a039e71e75b074de17a9b4114982aa109921fc20253bdf91a53c" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" -"checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" "checksum mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e2e00e17be181010a91dbfefb01660b17311059dc8c7f48b9017677721e732bd" -"checksum mime_guess 1.8.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b7e2b09d08313f84e0fb82d13a4d859109a17543fe9af3b6d941dc1431f7de79" +"checksum mime_guess 2.0.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130ea3c9c1b65dba905ab5a4d9ac59234a9585c24d135f264e187fe7336febbd" "checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4" -"checksum mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7da01a5e23070d92d99b1ecd1cd0af36447c6fd44b0fe283c2db199fa136724f" +"checksum mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "6d771e3ef92d58a8da8df7d6976bfca9371ed1de6619d9d5a5ce5b1f29b85bfe" "checksum mio-uds 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1731a873077147b626d89cc6c2a0db6288d607496c5d10c0cfcf3adc697ec673" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "9044faf1413a1057267be51b5afba8eb1090bd2231c693664aa1db716fe1eae0" "checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" "checksum nom 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05aec50c70fd288702bcd93284a8444607f3292dbdf2a30de5ea5dcdbe72287b" -"checksum num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3c2bd9b9d21e48e956b763c9f37134dc62d9e95da6edb3f672cacb6caf3cd3" +"checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" -"checksum ordermap 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b81cf3b8cb96aa0e73bbedfcdc9708d09fec2854ba8d474be4e6f666d7379e8b" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "149d8f5b97f3c1133e3cfcd8886449959e856b557ff281e292b733d7c69e005e" "checksum parking_lot_core 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "538ef00b7317875071d5e00f603f24d16f0b474c1a5fc0ccb8b454ca72eafa79" @@ -1650,17 +1688,19 @@ dependencies = [ "checksum postgres-protocol 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2487e66455bf88a1b247bf08a3ce7fe5197ac6d67228d920b0ee6a0e97fd7312" "checksum postgres-shared 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bafecadf25b7de9a5f747e93073db444c9ddcc7b3ae37bcdf63c2508f9a17f2d" "checksum pq-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4dfb5e575ef93a1b7b2a381d47ba7c5d4e4f73bff37cee932195de769aad9a54" +"checksum proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cd07deb3c6d1d9ff827999c7f9b04cdfd66b1b17ae508e14fe47b620f2282ae0" "checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32" "checksum quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eda5fe9b71976e62bc81b781206aaa076401769b2143379d3eb2118388babac4" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" +"checksum quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eca14c727ad12702eb4b6bfb5a232287dcf8385cb8ca83a3eeaf6519c44c408" "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" "checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" "checksum rayon 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b614fe08b6665cb9a231d07ac1364b0ef3cb3698f1239ee0c4c3a88a524f54c8" "checksum rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d24ad214285a7729b174ed6d3bcfcb80177807f959d95fafd5bfc5c4f201ac8" "checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" -"checksum regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5be5347bde0c48cfd8c3fdc0766cdfe9d8a755ef84d620d6794c778c91de8b2b" -"checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e" -"checksum remove_dir_all 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b5d2f806b0fcdabd98acd380dc8daef485e22bcb7cddc811d1337967f2528cf5" +"checksum regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "aec3f58d903a7d2a9dc2bf0e41a746f4530e0cab6b615494e058f67a3ef947fb" +"checksum regex-syntax 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b2550876c31dc914696a6c2e01cbce8afba79a93c8ae979d2fe051c0230b3756" +"checksum remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" "checksum resolv-conf 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e1b086bb6a2659d6ba66e4aa21bde8a53ec03587cd5c80b83bdc3a330f35cab" "checksum ring 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6f7d28b30a72c01b458428e0ae988d4149c20d902346902be881e3edc4bb325c" "checksum rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11fb43a206a04116ffd7cfcf9bcb941f8eb6cc7ff667272246b0a1c74259a3cb" @@ -1670,43 +1710,45 @@ dependencies = [ "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum semver 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bee2bc909ab2d8d60dab26e8cad85b25d795b14603a0dcb627b78b9d30b6454b" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "db99f3919e20faa51bb2996057f5031d8685019b5a06139b1ce761da671b8526" -"checksum serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "f4ba7591cfe93755e89eeecdbcc668885624829b020050e6aec99c2a03bd3fd0" -"checksum serde_derive_internals 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6e03f1c9530c3fb0a0a5c9b826bdd9246a5921ae995d75f512ac917fc4dd55b5" -"checksum serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "57781ed845b8e742fc2bf306aba8e3b408fe8c366b900e3769fbc39f49eb8b39" +"checksum serde 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)" = "0e100d00fb985a5bf16b857a436450e404fa613de3321b2e383947a93cbd75df" +"checksum serde_derive 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)" = "86daebd995aa948b069d886f2105f2425cd66103049855e45c15c58c573f12c5" +"checksum serde_derive_internals 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6b3f714f52a41e371c5e141e9dafcead60921349bec76b44d79000c88aba3cfc" +"checksum serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "5c508584d9913df116b91505eec55610a2f5b16e9ed793c46e4d0152872b3e74" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7daca11f2fdb8559c4f6c588386bed5e2ad4b6605c1442935a7f08144a918688" "checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537" "checksum skeptic 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c8431f8fca168e2db4be547bd8329eac70d095dff1444fee4b0fa0fabc7df75a" -"checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" "checksum slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fdeff4cd9ecff59ec7e3744cbca73dfe5ac35c2aedb2cfba8a1c715a18912e9d" "checksum smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44db0ecb22921ef790d17ae13a3f6d15784183ff5f2a01aa32098c7498d2b4b9" -"checksum socket2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "78e4c1cde1adbc6bc4c394da2e7727c916b9b7d0b53d6984c890c65c1f4e6437" +"checksum socket2 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "71ebbe82fcdd697244ba7fe6e05e63b5c45910c3927e28469a04947494ff48d8" "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b" "checksum string 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "31f98b200e7caca9efca50fc0aa69cd58a5ec81d5f6e75b2f3ecaad2e998972a" "checksum stringprep 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" +"checksum syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)" = "8c5bc2d6ff27891209efa5f63e9de78648d7801f085e4653701a692ce938d6fd" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum synstructure 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a761d12e6d8dcb4dcf952a7a89b475e3a9d69e4a69307e01a470977642914bd" -"checksum tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f73eebdb68c14bcb24aef74ea96079830e7fa7b31a6106e42ea7ee887c1e134e" +"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963" "checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098" "checksum tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "52b4e32d8edbf29501aabb3570f027c6ceb00ccef6538f4bddba0200503e74e8" "checksum tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b9532748772222bf70297ec0e2ad0f17213b4a7dd0e6afb68e0a0768f69f4e4f" -"checksum tokio-signal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c4ef9836ecceb2583e0ddf25b7ca448fac74c1115461436f85e088a8e39e7904" -"checksum trust-dns-proto 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4696166b548a3240f25ed040250e32e28b4f6e64c465de4caf6cd2f927e8b412" +"checksum tokio-signal 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e8f46863230f9a05cf52d173721ec391b9c5782a2465f593029922b8782b9ffe" +"checksum trust-dns-proto 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0266cdf22b1f3904d21252e71079395bc47836513d4f3888ff85b57a6add2227" "checksum trust-dns-resolver 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "87cff716794d5ab064957bb78fc5575a38337571917ddd86fc2fed52dc48b141" -"checksum typenum 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a99dc6780ef33c78780b826cf9d2a78840b72cae9474de4bcaf9051e60ebbd" +"checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" +"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" "checksum unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284b6d3db520d67fbe88fd778c21510d1b0ba4a551e5d0fbb023d33405f6de8a" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" +"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f392d7819dbe58833e26872f5f6f0d68b7bbbe90fc3667e98731c4a15ad9a7ae" "checksum url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f808aadd8cfec6ef90e4a14eb46f24511824d1ac596b9682703c87056c8678b7" "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" -"checksum uuid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "990fb49481275abe3c8e2a91339c009cd6146d9f38fc3413e4163d892cbaffbb" +"checksum uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4670e1e935f7edd193a413f802e2ee52274aed62a09ccaab1656515c9c53a66" "checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b" "checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" diff --git a/frameworks/Rust/actix/Cargo.toml b/frameworks/Rust/actix/Cargo.toml index a3b766b2412..f8ff894212c 100755 --- a/frameworks/Rust/actix/Cargo.toml +++ b/frameworks/Rust/actix/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix" -version = "0.2.0" +version = "0.3.0" build = "build.rs" [[bin]] @@ -21,14 +21,22 @@ serde = "1.0" serde_json = "1.0" serde_derive = "1.0" rand = "0.4" +bytes = "0.4" num_cpus = "1.0" futures = "0.1" +tokio-io = "=0.1.5" +tokio-core = "=0.1.12" http = "0.1" diesel = { version = "1.1", features = ["postgres"] } postgres = "0.15" actix = "0.5" -actix-web = "0.4" +actix-web = "^0.4.10" [build-dependencies] askama = "0.5" + +[profile.release] +lto = true +opt-level = 3 +codegen-units = 1 diff --git a/frameworks/Rust/actix/actix-base.dockerfile b/frameworks/Rust/actix/actix-base.dockerfile new file mode 100644 index 00000000000..ccc37b88b7f --- /dev/null +++ b/frameworks/Rust/actix/actix-base.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/rust:0.1 + +ADD ./ /actix +WORKDIR /actix + +RUN cargo clean +RUN RUSTFLAGS="-C target-cpu=native" cargo build --release diff --git a/frameworks/Rust/actix/actix-diesel.dockerfile b/frameworks/Rust/actix/actix-diesel.dockerfile new file mode 100644 index 00000000000..230ba14c38c --- /dev/null +++ b/frameworks/Rust/actix/actix-diesel.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/actix-base:0.1 + +CMD ./target/release/actix-diesel diff --git a/frameworks/Rust/actix/actix-pg.dockerfile b/frameworks/Rust/actix/actix-pg.dockerfile new file mode 100644 index 00000000000..0dce678e01e --- /dev/null +++ b/frameworks/Rust/actix/actix-pg.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/actix-base:0.1 + +CMD ./target/release/actix-pg diff --git a/frameworks/Rust/actix/actix.dockerfile b/frameworks/Rust/actix/actix.dockerfile new file mode 100644 index 00000000000..f82021a1073 --- /dev/null +++ b/frameworks/Rust/actix/actix.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/actix-base:0.1 + +CMD ./target/release/actix diff --git a/frameworks/Rust/actix/benchmark_config.json b/frameworks/Rust/actix/benchmark_config.json index 953d71d2ba9..08c7fba8673 100755 --- a/frameworks/Rust/actix/benchmark_config.json +++ b/frameworks/Rust/actix/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "actix", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -21,7 +20,6 @@ "versus": "" }, "diesel": { - "setup_file": "setup_diesel", "db_url": "/db", "fortune_url": "/fortune", "query_url": "/queries?q=", @@ -42,7 +40,6 @@ "versus": "" }, "pg": { - "setup_file": "setup_pg", "db_url": "/db", "fortune_url": "/fortune", "query_url": "/queries?q=", diff --git a/frameworks/Rust/actix/setup.sh b/frameworks/Rust/actix/setup.sh deleted file mode 100755 index 92770ee6c8c..00000000000 --- a/frameworks/Rust/actix/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql rust - -cargo clean -RUSTFLAGS="-C target-cpu=native" cargo build --release -./target/release/actix & diff --git a/frameworks/Rust/actix/setup_diesel.sh b/frameworks/Rust/actix/setup_diesel.sh deleted file mode 100755 index 48603f346cb..00000000000 --- a/frameworks/Rust/actix/setup_diesel.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql rust - -cargo clean -RUSTFLAGS="-C target-cpu=native" cargo build --release -./target/release/actix-diesel & diff --git a/frameworks/Rust/actix/setup_pg.sh b/frameworks/Rust/actix/setup_pg.sh deleted file mode 100755 index 923f49314fc..00000000000 --- a/frameworks/Rust/actix/setup_pg.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql rust - -cargo clean -RUSTFLAGS="-C target-cpu=native" cargo build --release -./target/release/actix-pg & diff --git a/frameworks/Rust/actix/src/db.rs b/frameworks/Rust/actix/src/db.rs index c6231a0a94c..a12f497ebcb 100644 --- a/frameworks/Rust/actix/src/db.rs +++ b/frameworks/Rust/actix/src/db.rs @@ -4,6 +4,7 @@ use rand::{thread_rng, Rng, ThreadRng}; use actix::prelude::*; use diesel; use diesel::prelude::*; +use diesel::result::Error; use models; @@ -38,10 +39,10 @@ impl Handler for DbExecutor { type Result = io::Result; fn handle(&mut self, _: RandomWorld, _: &mut Self::Context) -> Self::Result { - use schema::World::dsl::*; + use schema::world::dsl::*; let random_id = self.rng.gen_range(1, 10_000); - match World.filter(id.eq(random_id)).load::(&self.conn) { + match world.filter(id.eq(random_id)).load::(&self.conn) { Ok(mut items) => Ok(items.pop().unwrap()), Err(_) => @@ -60,16 +61,16 @@ impl Handler for DbExecutor { type Result = io::Result>; fn handle(&mut self, msg: RandomWorlds, _: &mut Self::Context) -> Self::Result { - use schema::World::dsl::*; + use schema::world::dsl::*; let mut worlds = Vec::with_capacity(msg.0 as usize); for _ in 0..msg.0 { let w_id = self.rng.gen_range(1, 10_000); - let world = match World.filter(id.eq(w_id)).load::(&self.conn) { + let w = match world.filter(id.eq(w_id)).load::(&self.conn) { Ok(mut items) => items.pop().unwrap(), Err(_) => return Err(io::Error::new(io::ErrorKind::Other, "Database error")), }; - worlds.push(world) + worlds.push(w) } Ok(worlds) } @@ -85,24 +86,31 @@ impl Handler for DbExecutor { type Result = io::Result>; fn handle(&mut self, msg: UpdateWorld, _: &mut Self::Context) -> Self::Result { - use schema::World::dsl::*; + use schema::world::dsl::*; let mut worlds = Vec::with_capacity(msg.0); for _ in 0..msg.0 { let w_id = self.rng.gen_range::(1, 10_000); - let mut world = match World.filter(id.eq(w_id)).load::(&self.conn) { + let mut w = match world.filter(id.eq(w_id)).load::(&self.conn) { Ok(mut items) => items.pop().unwrap(), - Err(_) => return Err(io::Error::new(io::ErrorKind::Other, "Database error")), + Err(_) => return Err( + io::Error::new(io::ErrorKind::Other, "Database error")), }; - - world.randomnumber = self.rng.gen_range(1, 10_000); - let _ = diesel::update(World) - .filter(id.eq(world.id)) - .set(randomnumber.eq(world.randomnumber)) - .execute(&self.conn); - - worlds.push(world); + w.randomnumber = self.rng.gen_range(1, 10_000); + worlds.push(w); } + worlds.sort_by_key(|w| w.id); + + let _ = self.conn.transaction::<(), Error, _>(|| { + for w in &worlds { + let _ = diesel::update(world) + .filter(id.eq(w.id)) + .set(randomnumber.eq(w.randomnumber)) + .execute(&self.conn); + } + Ok(()) + }); + Ok(worlds) } } @@ -117,9 +125,9 @@ impl Handler for DbExecutor { type Result = io::Result>; fn handle(&mut self, _: TellFortune, _: &mut Self::Context) -> Self::Result { - use schema::Fortune::dsl::*; + use schema::fortune::dsl::*; - match Fortune.load::(&self.conn) { + match fortune.load::(&self.conn) { Ok(mut items) => { items.push(models::Fortune{ id: 0, @@ -127,8 +135,7 @@ impl Handler for DbExecutor { items.sort_by(|it, next| it.message.cmp(&next.message)); Ok(items) } - Err(_) => - Err(io::Error::new(io::ErrorKind::Other, "Databse error")) + Err(e) => Err(io::Error::new(io::ErrorKind::Other, e)) } } } diff --git a/frameworks/Rust/actix/src/main.rs b/frameworks/Rust/actix/src/main.rs index 5177680844d..9cdf431f453 100644 --- a/frameworks/Rust/actix/src/main.rs +++ b/frameworks/Rust/actix/src/main.rs @@ -1,6 +1,7 @@ extern crate actix; extern crate actix_web; extern crate http; +extern crate bytes; extern crate rand; extern crate num_cpus; extern crate futures; @@ -13,13 +14,17 @@ extern crate serde_json; use std::cmp; use actix_web::*; use actix::prelude::*; +use bytes::BytesMut; use askama::Template; use http::header; use futures::Future; +use diesel::prelude::{Connection, PgConnection}; mod db; mod schema; mod models; +mod utils; +use utils::Writer; struct State { db: Addr @@ -31,11 +36,12 @@ fn world_row(req: HttpRequest) -> Box { - let body = serde_json::to_string(&row).unwrap(); + let mut body = BytesMut::with_capacity(31); + serde_json::to_writer(Writer(&mut body), &row).unwrap(); Ok(httpcodes::HTTPOk.build() .header(header::SERVER, "Actix") .content_type("application/json") - .body(body)?) + .body(body.freeze())?) }, Err(_) => Ok(httpcodes::HTTPInternalServerError.into()), @@ -58,12 +64,12 @@ fn queries(req: HttpRequest) -> Box) -> Box) -> Box Ok(httpcodes::HTTPInternalServerError.into()) + Err(_) => { + Ok(httpcodes::HTTPInternalServerError.into()) + } } }) .responder() @@ -127,23 +135,25 @@ fn fortune(req: HttpRequest) -> Box it, - _ => "127.0.0.1" - }; - let db_url = format!( - "postgres://benchmarkdbuser:benchmarkdbpass@{}/hello_world", dbhost); + let db_url = "postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world"; + + // Avoid triggering "FATAL: the database system is starting up" error from postgres. + { + if PgConnection::establish(db_url).is_err() { + std::thread::sleep(std::time::Duration::from_secs(5)); + } + } // Start db executor actors let addr = SyncArbiter::start( - num_cpus::get() * 4, move || db::DbExecutor::new(&db_url)); + num_cpus::get() * 4, move || db::DbExecutor::new(db_url)); // start http server HttpServer::new( move || Application::with_state(State{db: addr.clone()}) .resource("/db", |r| r.route().a(world_row)) - .resource("/queries", |r| r.route().a(queries)) .resource("/fortune", |r| r.route().a(fortune)) + .resource("/queries", |r| r.route().a(queries)) .resource("/updates", |r| r.route().a(updates))) .backlog(8192) .bind("0.0.0.0:8080").unwrap() diff --git a/frameworks/Rust/actix/src/pg.rs b/frameworks/Rust/actix/src/pg.rs index 948aa4c9272..9cc729a05c7 100644 --- a/frameworks/Rust/actix/src/pg.rs +++ b/frameworks/Rust/actix/src/pg.rs @@ -1,6 +1,7 @@ extern crate actix; extern crate actix_web; extern crate http; +extern crate bytes; extern crate rand; extern crate num_cpus; extern crate futures; @@ -15,10 +16,15 @@ use actix_web::*; use actix::prelude::*; use askama::Template; use http::header; +use bytes::BytesMut; use postgres::{Connection, TlsMode}; use rand::{thread_rng, Rng, ThreadRng}; use futures::Future; +mod utils; +use utils::Writer; + + #[derive(Serialize)] pub struct World { pub id: i32, @@ -42,7 +48,8 @@ fn world_row(req: HttpRequest) -> Box { - let body = serde_json::to_string(&row).unwrap(); + let mut body = BytesMut::with_capacity(31); + serde_json::to_writer(Writer(&mut body), &row).unwrap(); Ok(httpcodes::HTTPOk.build() .header(header::SERVER, "Actix") .content_type("application/json") @@ -68,11 +75,11 @@ fn queries(req: HttpRequest) -> Box) -> Box for PgConnection { fn handle(&mut self, _: RandomWorld, _: &mut Self::Context) -> Self::Result { let random_world = self.conn.prepare_cached( - "SELECT id, randomnumber FROM World WHERE id=$1").unwrap(); + "SELECT id, randomnumber FROM world WHERE id=$1").unwrap(); let random_id = self.rng.gen_range::(1, 10_000); - for row in &random_world.query(&[&random_id]).unwrap() { - return Ok(World {id: row.get(0), randomnumber: row.get(1)}) - } - - Err(io::Error::new(io::ErrorKind::Other, "Database error")) + let rows = &random_world.query(&[&random_id]).unwrap(); + let row = rows.get(0); + Ok(World {id: row.get(0), randomnumber: row.get(1)}) } } @@ -192,15 +197,14 @@ impl Handler for PgConnection { fn handle(&mut self, msg: RandomWorlds, _: &mut Self::Context) -> Self::Result { let random_world = self.conn.prepare_cached( - "SELECT id, randomnumber FROM World WHERE id=$1").unwrap(); + "SELECT id, randomnumber FROM world WHERE id=$1").unwrap(); let mut worlds = Vec::with_capacity(msg.0 as usize); for _ in 0..msg.0 { let w_id: i32 = self.rng.gen_range(1, 10_000); - for row in &random_world.query(&[&w_id]).unwrap() { - worlds.push(World {id: row.get(0), randomnumber: row.get(1)}); - break - } + let rows = &random_world.query(&[&w_id]).unwrap(); + let row = rows.get(0); + worlds.push(World {id: row.get(0), randomnumber: row.get(1)}); } Ok(worlds) } @@ -217,21 +221,27 @@ impl Handler for PgConnection { fn handle(&mut self, msg: UpdateWorld, _: &mut Self::Context) -> Self::Result { let get_world = self.conn.prepare_cached( - "SELECT id FROM World WHERE id=$1").unwrap(); - let update_world = self.conn.prepare_cached( - "UPDATE World SET randomnumber=$1 WHERE id=$2").unwrap(); + "SELECT id FROM world WHERE id=$1").unwrap(); let mut worlds = Vec::with_capacity(msg.0 as usize); for _ in 0..msg.0 { let random_id = self.rng.gen_range::(1, 10_000); - for row in &get_world.query(&[&random_id]).unwrap() { - let w_id: i32 = row.get(0); - let new_num: i32 = self.rng.gen_range(1, 10_000); - let _ = update_world.execute(&[&new_num, &w_id]); - worlds.push(World{id: w_id, randomnumber: new_num}); - break - } + let rows = &get_world.query(&[&random_id]).unwrap(); + let row = rows.get(0); + let w_id: i32 = row.get(0); + let new_num: i32 = self.rng.gen_range(1, 10_000); + worlds.push(World{id: w_id, randomnumber: new_num}); } + worlds.sort_by_key(|w| w.id); + + let trans = self.conn.transaction().unwrap(); + let update_world = trans.prepare_cached( + "UPDATE world SET randomnumber=$1 WHERE id=$2").unwrap(); + for w in &worlds { + let _ = update_world.execute(&[&w.id, &w.randomnumber]); + } + trans.commit().unwrap(); + Ok(worlds) } } @@ -246,9 +256,9 @@ impl Handler for PgConnection { type Result = io::Result>; fn handle(&mut self, _: TellFortune, _: &mut Self::Context) -> Self::Result { - let fortune = self.conn.prepare_cached("SELECT id, message FROM Fortune").unwrap(); + let fortune = self.conn.prepare_cached("SELECT id, message FROM fortune").unwrap(); - let mut items = Vec::with_capacity(13); + let mut items = Vec::with_capacity(16); items.push( Fortune{id: 0, message: "Additional fortune added at request time.".to_string()}); @@ -264,16 +274,18 @@ impl Handler for PgConnection { fn main() { let sys = System::new("techempower"); - let dbhost = match option_env!("DBHOST") { - Some(it) => it, - _ => "127.0.0.1" - }; - let db_url = format!( - "postgres://benchmarkdbuser:benchmarkdbpass@{}/hello_world", dbhost); + let db_url = "postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world"; + + // Avoid triggering "FATAL: the database system is starting up" error from postgres. + { + if Connection::connect(db_url, TlsMode::None).is_err() { + std::thread::sleep(std::time::Duration::from_secs(5)); + } + } // Start db executor actors let addr = SyncArbiter::start( - num_cpus::get() * 4, move || PgConnection::new(&db_url)); + num_cpus::get() * 4, move || PgConnection::new(db_url)); // start http server HttpServer::new( diff --git a/frameworks/Rust/actix/src/schema.rs b/frameworks/Rust/actix/src/schema.rs index 5196b214d1e..eb14aa98a75 100644 --- a/frameworks/Rust/actix/src/schema.rs +++ b/frameworks/Rust/actix/src/schema.rs @@ -1,14 +1,14 @@ #![allow(non_snake_case)] table! { - World (id) { + world (id) { id -> Integer, randomnumber -> Integer, } } table! { - Fortune (id) { + fortune (id) { id -> Integer, message -> Text, } diff --git a/frameworks/Rust/actix/src/simple.rs b/frameworks/Rust/actix/src/simple.rs index 0f2dd2381c4..4d076af04a2 100644 --- a/frameworks/Rust/actix/src/simple.rs +++ b/frameworks/Rust/actix/src/simple.rs @@ -1,5 +1,6 @@ extern crate actix; extern crate actix_web; +extern crate bytes; extern crate http; extern crate futures; extern crate serde; @@ -8,9 +9,14 @@ extern crate serde_json; use actix_web::*; use actix::prelude::*; +use bytes::BytesMut; use http::StatusCode; use http::header::{self, HeaderValue}; +mod utils; +use utils::Writer; + +const SIZE: usize = 29; #[derive(Serialize, Deserialize)] pub struct Message { @@ -21,7 +27,8 @@ fn json(_: HttpRequest) -> HttpResponse { let message = Message { message: "Hello, World!" }; - let body = serde_json::to_string(&message).unwrap(); + let mut body = BytesMut::with_capacity(SIZE); + serde_json::to_writer(Writer(&mut body), &message).unwrap(); let mut resp = HttpResponse::new(StatusCode::OK, body.into()); resp.headers_mut().insert( @@ -46,8 +53,8 @@ fn main() { // start http server HttpServer::new( move || Application::new() - .resource("/plaintext", |r| r.f(plaintext)) - .resource("/json", |r| r.f(json))) + .resource("/json", |r| r.f(json)) + .resource("/plaintext", |r| r.f(plaintext))) .backlog(8192) .bind("0.0.0.0:8080").unwrap() .start(); diff --git a/frameworks/Rust/actix/src/utils.rs b/frameworks/Rust/actix/src/utils.rs new file mode 100644 index 00000000000..f58d713865e --- /dev/null +++ b/frameworks/Rust/actix/src/utils.rs @@ -0,0 +1,15 @@ +use std::io; +use bytes::BytesMut; + + +pub struct Writer<'a>(pub &'a mut BytesMut); + +impl<'a> io::Write for Writer<'a> { + fn write(&mut self, buf: &[u8]) -> io::Result { + self.0.extend_from_slice(buf); + Ok(buf.len()) + } + fn flush(&mut self) -> io::Result<()> { + Ok(()) + } +} diff --git a/frameworks/Rust/hyper/Cargo.toml b/frameworks/Rust/hyper/Cargo.toml index 34f021b999a..a196fd30844 100644 --- a/frameworks/Rust/hyper/Cargo.toml +++ b/frameworks/Rust/hyper/Cargo.toml @@ -1,15 +1,25 @@ [package] -name = "hello" -version = "0.3.0" -authors = ["Steve Klabnik ", "Alexander Polyakov "] +name = "hyper-techempower" +version = "0.4.0" +authors = [ + "Steve Klabnik ", + "Alexander Polyakov ", + "Sean McArthur " +] [dependencies] futures = "0.1" -hyper = "0.11.6" -tokio-proto = "0.1" -tokio-service = "0.1" +hyper = { version = "0.11.24" } #, default-features = false } num_cpus = "1.2" serde = "1.0" serde_json = "1.0" serde_derive = "1.0" -mime = "0.3" +#tokio = "0.1" +tokio-core = "=0.1.11" +tokio-io = "=0.1.4" +tokio-proto = "0.1" + +[profile.release] +opt-level = 3 +codegen-units = 1 +lto = true diff --git a/frameworks/Rust/hyper/benchmark_config.json b/frameworks/Rust/hyper/benchmark_config.json index 904c41569d4..f937679aeeb 100644 --- a/frameworks/Rust/hyper/benchmark_config.json +++ b/frameworks/Rust/hyper/benchmark_config.json @@ -2,9 +2,7 @@ "framework": "hyper", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", - "plaintext_url": "/plaintext", "port": 8080, "approach": "Realistic", "classification": "Micro", @@ -13,10 +11,26 @@ "language": "Rust", "orm": "Raw", "platform": "Rust", - "webserver": "Hyper", + "webserver": "hyper", "os": "Linux", "database_os": "Linux", - "display_name": "Hyper", + "display_name": "hyper", + "notes": "" + }, + "pipeline": { + "plaintext_url": "/plaintext", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "Postgres", + "framework": "hyper", + "language": "Rust", + "orm": "Raw", + "platform": "Rust", + "webserver": "hyper", + "os": "Linux", + "database_os": "Linux", + "display_name": "hyper-pipeline", "notes": "" } }] diff --git a/frameworks/Rust/hyper/hyper-base.dockerfile b/frameworks/Rust/hyper/hyper-base.dockerfile new file mode 100644 index 00000000000..8f10c3e2b4d --- /dev/null +++ b/frameworks/Rust/hyper/hyper-base.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/rust:0.1 + +COPY ./ ./ + +RUN cargo clean +RUN RUSTFLAGS="-C target-cpu=native" cargo build --release diff --git a/frameworks/Rust/hyper/hyper-pipeline.dockerfile b/frameworks/Rust/hyper/hyper-pipeline.dockerfile new file mode 100644 index 00000000000..e15beb078c8 --- /dev/null +++ b/frameworks/Rust/hyper/hyper-pipeline.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/hyper-base:0.1 + +CMD ["./target/release/hyper-techempower", "pipeline"] diff --git a/frameworks/Rust/hyper/hyper.dockerfile b/frameworks/Rust/hyper/hyper.dockerfile new file mode 100644 index 00000000000..cbcd1cca8cd --- /dev/null +++ b/frameworks/Rust/hyper/hyper.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/hyper-base:0.1 + +CMD ["./target/release/hyper-techempower"] diff --git a/frameworks/Rust/hyper/setup.sh b/frameworks/Rust/hyper/setup.sh deleted file mode 100644 index 34b3aff7d52..00000000000 --- a/frameworks/Rust/hyper/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql rust - -cargo clean -RUSTFLAGS="-C target-cpu=native" cargo build --release -./target/release/hello & diff --git a/frameworks/Rust/hyper/src/main.rs b/frameworks/Rust/hyper/src/main.rs index bd4fc190131..630ab478ce5 100644 --- a/frameworks/Rust/hyper/src/main.rs +++ b/frameworks/Rust/hyper/src/main.rs @@ -1,20 +1,25 @@ extern crate futures; -extern crate tokio_proto; -extern crate tokio_service; extern crate hyper; +extern crate num_cpus; #[macro_use] extern crate serde_derive; extern crate serde_json; -extern crate num_cpus; -extern crate mime; +//extern crate tokio; +extern crate tokio_proto; + +use std::env; +use std::net::SocketAddr; +use std::process; + +use futures::{future}; //, Future, Stream}; -use tokio_proto::TcpServer; -use futures::future; use hyper::Method::Get; use hyper::header::{ContentLength, ContentType, Server}; use hyper::StatusCode::NotFound; use hyper::server::{Http, Service, Request, Response}; -use std::net::SocketAddr; + +//use tokio::net::TcpListener; +use tokio_proto::TcpServer; static HELLOWORLD: &'static [u8] = b"Hello, world!"; @@ -29,14 +34,14 @@ impl Service for TechEmpower { type Request = Request; type Response = Response; type Error = hyper::Error; - type Future = ::futures::Finished; + type Future = future::FutureResult; fn call(&self, req: Request) -> Self::Future { let response = match (req.method(), req.path()) { (&Get, "/plaintext") => { Response::new() .with_header(ContentLength(HELLOWORLD.len() as u64)) - .with_header(ContentType(mime::TEXT_PLAIN)) + .with_header(ContentType::text()) .with_body(HELLOWORLD) } (&Get, "/json") => { @@ -44,7 +49,7 @@ impl Service for TechEmpower { let rep_body = serde_json::to_vec(&rep).unwrap(); Response::new() .with_header(ContentLength(rep_body.len() as u64)) - .with_header(ContentType(mime::APPLICATION_JSON)) + .with_header(ContentType::json()) .with_body(rep_body) } _ => Response::new().with_status(NotFound), @@ -53,15 +58,69 @@ impl Service for TechEmpower { } } +fn configure() -> Http { + let pipeline = { + let mut args = env::args(); + args.next().expect("first arg is this binary"); + + args.next() + .map(|arg| { + if arg == "pipeline" { + true + } else { + eprintln!("unknown second argument: {:?}", arg); + process::exit(1); + } + }) + .unwrap_or(false) + }; + + // Set our hyper options + // (pipeline is desired for the plaintext route) + let mut http = Http::::new(); + http.pipeline(pipeline); + http +} + fn main() { - let addr: SocketAddr = "0.0.0.0:8080".parse().unwrap(); - let mut http = Http::new(); - http.pipeline(true); - let mut srv = TcpServer::new(http, addr); - println!("Listening on http://{} using {} threads", - addr, - num_cpus::get()); + // Check for some runtime configuration + let http = configure(); + // Bind to 0.0.0.0:8080 + let addr = SocketAddr::from(([0, 0, 0, 0], 8080)); + + let mut srv = TcpServer::new(http, addr); srv.threads(num_cpus::get()); - srv.serve(move || Ok(TechEmpower)) + + println!("Listening on http://{}", addr); + srv.serve(|| Ok(TechEmpower)); +} + +/* This is the future, but there's still a few blockers in new tokio, + * so disable this for now while we work them out. +fn main() { + // Check for some runtime configuration + let http = configure(); + + // Bind to 0.0.0.0:8080 + let addr = SocketAddr::from(([0, 0, 0, 0], 8080)); + let tcp = TcpListener::bind(&addr) + .expect("couldn't bind to addr"); + + // For every accepted connection, spawn an HTTP task + let server = tcp.incoming() + .for_each(move |sock| { + let _ = sock.set_nodelay(true); + let conn = http.serve_connection(sock, TechEmpower) + .map_err(|e| eprintln!("connection error: {}", e)); + + tokio::spawn(conn); + + Ok(()) + }) + .map_err(|e| eprintln!("accept error: {}", e)); + + println!("Listening on http://{}", addr); + tokio::run(server); } +*/ diff --git a/frameworks/Rust/iron/benchmark_config.json b/frameworks/Rust/iron/benchmark_config.json index 2151f33d864..54bcc3eb7c3 100755 --- a/frameworks/Rust/iron/benchmark_config.json +++ b/frameworks/Rust/iron/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "iron", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "db_url": "/db", "fortune_url": "/fortune", diff --git a/frameworks/Rust/iron/iron.dockerfile b/frameworks/Rust/iron/iron.dockerfile new file mode 100644 index 00000000000..893ebdde460 --- /dev/null +++ b/frameworks/Rust/iron/iron.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/rust:0.1 + +COPY ./ ./ + +RUN cargo clean +RUN RUSTFLAGS="-C target-cpu=native" cargo build --release +CMD ./target/release/iron diff --git a/frameworks/Rust/iron/setup.sh b/frameworks/Rust/iron/setup.sh deleted file mode 100755 index a8f0fa5f68a..00000000000 --- a/frameworks/Rust/iron/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql rust - -cargo clean -RUSTFLAGS="-C target-cpu=native" cargo build --release -./target/release/iron & diff --git a/frameworks/Rust/iron/src/main.rs b/frameworks/Rust/iron/src/main.rs index 32bb1c26988..9440e819801 100755 --- a/frameworks/Rust/iron/src/main.rs +++ b/frameworks/Rust/iron/src/main.rs @@ -54,7 +54,7 @@ struct FortuneRow { fn main() { let r2d2_config = r2d2::Config::default(); let pg_conn_manager = PostgresConnectionManager::new( - "postgres://benchmarkdbuser:benchmarkdbpass@TFB-database/hello_world", + "postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world", TlsMode::None).unwrap(); let pool = r2d2::Pool::new(r2d2_config, pg_conn_manager).unwrap(); let template = mustache::compile_str(" diff --git a/frameworks/Rust/may-minihttp/benchmark_config.json b/frameworks/Rust/may-minihttp/benchmark_config.json index 6f9be088f9e..2558b3d3e21 100644 --- a/frameworks/Rust/may-minihttp/benchmark_config.json +++ b/frameworks/Rust/may-minihttp/benchmark_config.json @@ -3,7 +3,6 @@ "tests": [ { "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, @@ -21,4 +20,4 @@ } } ] -} \ No newline at end of file +} diff --git a/frameworks/Rust/may-minihttp/may-minihttp.dockerfile b/frameworks/Rust/may-minihttp/may-minihttp.dockerfile new file mode 100644 index 00000000000..3e0da14c02f --- /dev/null +++ b/frameworks/Rust/may-minihttp/may-minihttp.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/rust:0.1 + +COPY ./ ./ + +RUN cargo clean +RUN RUSTFLAGS="-C target-cpu=native" cargo build --release + +CMD ./target/release/may-minihttp diff --git a/frameworks/Rust/may-minihttp/setup.sh b/frameworks/Rust/may-minihttp/setup.sh deleted file mode 100644 index 5e74d66f8fa..00000000000 --- a/frameworks/Rust/may-minihttp/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql rust - -cargo clean -RUSTFLAGS="-C target-cpu=native" cargo build --release -./target/release/may-minihttp & diff --git a/frameworks/Rust/nickel/benchmark_config.json b/frameworks/Rust/nickel/benchmark_config.json index 3389391b2e7..73c5dd71b45 100644 --- a/frameworks/Rust/nickel/benchmark_config.json +++ b/frameworks/Rust/nickel/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "nickel", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/Rust/nickel/nickel.dockerfile b/frameworks/Rust/nickel/nickel.dockerfile new file mode 100644 index 00000000000..286ba4dcd7a --- /dev/null +++ b/frameworks/Rust/nickel/nickel.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/rust:0.1 + +COPY ./ ./ + +RUN cargo clean +RUN RUSTFLAGS="-C target-cpu=native" cargo build --release + +CMD ./target/release/nickel diff --git a/frameworks/Rust/nickel/setup.sh b/frameworks/Rust/nickel/setup.sh deleted file mode 100644 index 7b5db75ea90..00000000000 --- a/frameworks/Rust/nickel/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends rust - -cargo clean -cargo build --release -./target/release/nickel & diff --git a/frameworks/Rust/rouille/benchmark_config.json b/frameworks/Rust/rouille/benchmark_config.json index 6c197c2bc27..ffdb230dcb6 100644 --- a/frameworks/Rust/rouille/benchmark_config.json +++ b/frameworks/Rust/rouille/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "rouille", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/Rust/rouille/rouille.dockerfile b/frameworks/Rust/rouille/rouille.dockerfile new file mode 100644 index 00000000000..37c37077bc6 --- /dev/null +++ b/frameworks/Rust/rouille/rouille.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/rust:0.1 + +COPY ./ ./ + +RUN cargo clean +RUN RUSTFLAGS="-C target-cpu=native" cargo build --release + +CMD ./target/release/rouille diff --git a/frameworks/Rust/rouille/setup.sh b/frameworks/Rust/rouille/setup.sh deleted file mode 100755 index b974e082293..00000000000 --- a/frameworks/Rust/rouille/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends rust - -cargo clean -cargo build --release -./target/release/rouille & diff --git a/frameworks/Rust/tokio-minihttp/benchmark_config.json b/frameworks/Rust/tokio-minihttp/benchmark_config.json index 9d0d824c18d..c0ea7d188b9 100644 --- a/frameworks/Rust/tokio-minihttp/benchmark_config.json +++ b/frameworks/Rust/tokio-minihttp/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "tokio-minihttp", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "db_url": "/db", diff --git a/frameworks/Rust/tokio-minihttp/setup.sh b/frameworks/Rust/tokio-minihttp/setup.sh deleted file mode 100755 index f83831e961a..00000000000 --- a/frameworks/Rust/tokio-minihttp/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql rust - -cargo clean -RUSTFLAGS="-C target-cpu=native" cargo build --release -./target/release/tokio-minihttp & diff --git a/frameworks/Rust/tokio-minihttp/tokio-minihttp.dockerfile b/frameworks/Rust/tokio-minihttp/tokio-minihttp.dockerfile new file mode 100644 index 00000000000..50a8ff31179 --- /dev/null +++ b/frameworks/Rust/tokio-minihttp/tokio-minihttp.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/rust:0.1 + +COPY ./ ./ + +RUN cargo clean +RUN RUSTFLAGS="-C target-cpu=native" cargo build --release + +CMD ./target/release/tokio-minihttp diff --git a/frameworks/Scala/akka-http/.gitignore b/frameworks/Scala/akka-http/.gitignore deleted file mode 100644 index b4e6fe420e4..00000000000 --- a/frameworks/Scala/akka-http/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -target/ -project/target -bin/ -logs/ -.cache -.classpath -.project -/bin/ -.idea/ -*.iml diff --git a/frameworks/Scala/akka-http/akka-http.dockerfile b/frameworks/Scala/akka-http/akka-http.dockerfile new file mode 100644 index 00000000000..e94496bf52a --- /dev/null +++ b/frameworks/Scala/akka-http/akka-http.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/sbt:0.1 + +ADD ./ /akka-http +WORKDIR /akka-http + +RUN sbt -batch 'universal:stage' + +CMD ./target/universal/stage/bin/akka-http-benchmark \ + -Dakka.http.benchmark.mysql.dbhost=tfb-database diff --git a/frameworks/Scala/akka-http/benchmark_config.json b/frameworks/Scala/akka-http/benchmark_config.json index 3d21ba37458..c994efb0abc 100644 --- a/frameworks/Scala/akka-http/benchmark_config.json +++ b/frameworks/Scala/akka-http/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "akka-http", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "db_url": "/db", diff --git a/frameworks/Scala/akka-http/build.sbt b/frameworks/Scala/akka-http/build.sbt index fdcd9e66472..7b4ae184d12 100644 --- a/frameworks/Scala/akka-http/build.sbt +++ b/frameworks/Scala/akka-http/build.sbt @@ -9,7 +9,7 @@ name := "akka-http-benchmark" version := "0.0.1-SNAPSHOT" -scalaVersion := "2.12.4" +scalaVersion := "2.12.5" resolvers += "Akka Snapshot Repository" at "http://repo.akka.io/snapshots/" diff --git a/frameworks/Scala/akka-http/project/build.properties b/frameworks/Scala/akka-http/project/build.properties index b7dd3cb2ae8..05313438a19 100644 --- a/frameworks/Scala/akka-http/project/build.properties +++ b/frameworks/Scala/akka-http/project/build.properties @@ -1 +1 @@ -sbt.version=1.0.2 +sbt.version=1.1.2 diff --git a/frameworks/Scala/akka-http/setup.sh b/frameworks/Scala/akka-http/setup.sh deleted file mode 100755 index 20614f87656..00000000000 --- a/frameworks/Scala/akka-http/setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends mysql java sbt - -sbt -batch 'universal:stage' - -./target/universal/stage/bin/akka-http-benchmark \ - -Dakka.http.benchmark.mysql.dbhost=$DBHOST & diff --git a/frameworks/Scala/blaze/.gitignore b/frameworks/Scala/blaze/.gitignore deleted file mode 100644 index f9304f587c0..00000000000 --- a/frameworks/Scala/blaze/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -target -projet/target -.cache diff --git a/frameworks/Scala/blaze/benchmark_config.json b/frameworks/Scala/blaze/benchmark_config.json index d86b5bc1c6f..c94e31020f4 100644 --- a/frameworks/Scala/blaze/benchmark_config.json +++ b/frameworks/Scala/blaze/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "blaze", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/Scala/blaze/blaze.dockerfile b/frameworks/Scala/blaze/blaze.dockerfile new file mode 100644 index 00000000000..dff6318236a --- /dev/null +++ b/frameworks/Scala/blaze/blaze.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/sbt:0.1 + +ADD ./ /blaze +WORKDIR /blaze + +RUN sbt assembly -batch + +CMD java -jar target/scala-2.12/blaze-assembly-1.0.jar diff --git a/frameworks/Scala/blaze/build.sbt b/frameworks/Scala/blaze/build.sbt index 844ffe87f4d..b634f10e817 100644 --- a/frameworks/Scala/blaze/build.sbt +++ b/frameworks/Scala/blaze/build.sbt @@ -1,10 +1,8 @@ name := "blaze" -version := "1.0-SNAPSHOT" +version := "1.0" -scalaVersion := "2.11.8" - -com.github.retronym.SbtOneJar.oneJarSettings +scalaVersion := "2.12.5" val blazeVersion = "0.13.0" @@ -12,6 +10,3 @@ libraryDependencies ++= Seq( "org.http4s" %% "blaze-http" % blazeVersion, "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.8.4" ) - -mainClass in oneJar := Some("blaze.techempower.benchmark.Main") - diff --git a/frameworks/Scala/blaze/project/build.properties b/frameworks/Scala/blaze/project/build.properties index c091b86ca46..05313438a19 100644 --- a/frameworks/Scala/blaze/project/build.properties +++ b/frameworks/Scala/blaze/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.16 +sbt.version=1.1.2 diff --git a/frameworks/Scala/blaze/project/plugins.sbt b/frameworks/Scala/blaze/project/plugins.sbt index a8d7d32406e..652a3b93be3 100644 --- a/frameworks/Scala/blaze/project/plugins.sbt +++ b/frameworks/Scala/blaze/project/plugins.sbt @@ -1,2 +1 @@ -addSbtPlugin("org.scala-sbt.plugins" % "sbt-onejar" % "0.8") - +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") diff --git a/frameworks/Scala/blaze/setup.sh b/frameworks/Scala/blaze/setup.sh deleted file mode 100644 index 81d7e80534b..00000000000 --- a/frameworks/Scala/blaze/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends java sbt - -sbt 'oneJar' -batch - -java -jar target/scala-2.11/blaze*one-jar.jar & diff --git a/frameworks/Scala/colossus/.gitignore b/frameworks/Scala/colossus/.gitignore deleted file mode 100644 index 854eb3c7214..00000000000 --- a/frameworks/Scala/colossus/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -target/ -project/target -bin/ -logs/ -.cache -.classpath -.project -/bin/ diff --git a/frameworks/Scala/colossus/benchmark_config.json b/frameworks/Scala/colossus/benchmark_config.json index fab484aa6bf..3d31adfe363 100644 --- a/frameworks/Scala/colossus/benchmark_config.json +++ b/frameworks/Scala/colossus/benchmark_config.json @@ -4,7 +4,6 @@ "default": { "orm": "Raw", "database_os": "Linux", - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 9007, diff --git a/frameworks/Scala/colossus/build.sbt b/frameworks/Scala/colossus/build.sbt index b4567886c33..7c435c9b623 100644 --- a/frameworks/Scala/colossus/build.sbt +++ b/frameworks/Scala/colossus/build.sbt @@ -1,14 +1,10 @@ name := """colossus-example""" -version := "0.4.0" +version := "1.0" -scalaVersion := "2.12.4" - -com.github.retronym.SbtOneJar.oneJarSettings - -mainClass in oneJar := Some("example.Main") +scalaVersion := "2.12.5" libraryDependencies ++= Seq( - "com.tumblr" %% "colossus" % "0.11.0-M4", - "com.github.plokhotnyuk.jsoniter-scala" %% "macros" % "0.3.4" + "com.tumblr" %% "colossus" % "0.11.0", + "com.github.plokhotnyuk.jsoniter-scala" %% "macros" % "0.21.6" ) diff --git a/frameworks/Scala/colossus/colossus.dockerfile b/frameworks/Scala/colossus/colossus.dockerfile new file mode 100644 index 00000000000..bd3e6443b0d --- /dev/null +++ b/frameworks/Scala/colossus/colossus.dockerfile @@ -0,0 +1,19 @@ +FROM techempower/sbt:0.1 + +ADD ./ /colossus +WORKDIR /colossus + +RUN sbt assembly -batch + +CMD java \ + -server \ + -Xms1g \ + -Xmx1g \ + -XX:NewSize=512m \ + -XX:MaxNewSize=512m \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -XX:+UseNUMA \ + -XX:-UseBiasedLocking \ + -XX:+AlwaysPreTouch \ + -jar target/scala-2.12/colossus-example-assembly-1.0.jar diff --git a/frameworks/Scala/colossus/project/build.properties b/frameworks/Scala/colossus/project/build.properties index c091b86ca46..05313438a19 100644 --- a/frameworks/Scala/colossus/project/build.properties +++ b/frameworks/Scala/colossus/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.16 +sbt.version=1.1.2 diff --git a/frameworks/Scala/colossus/project/plugins.sbt b/frameworks/Scala/colossus/project/plugins.sbt index a1b8e18398d..652a3b93be3 100644 --- a/frameworks/Scala/colossus/project/plugins.sbt +++ b/frameworks/Scala/colossus/project/plugins.sbt @@ -1 +1 @@ -addSbtPlugin("org.scala-sbt.plugins" % "sbt-onejar" % "0.8") \ No newline at end of file +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") diff --git a/frameworks/Scala/colossus/setup.sh b/frameworks/Scala/colossus/setup.sh deleted file mode 100755 index d1ec83479a7..00000000000 --- a/frameworks/Scala/colossus/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends java sbt - -sbt 'oneJar' -batch - -java -server -Xms1g -Xmx1g -XX:NewSize=512m -XX:MaxNewSize=512m -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseNUMA -XX:-UseBiasedLocking -XX:+AlwaysPreTouch -jar target/scala-2.12/colossus*one-jar.jar diff --git a/frameworks/Scala/colossus/src/main/scala/example/Main.scala b/frameworks/Scala/colossus/src/main/scala/example/Main.scala index d8d63bd3768..b0ef60b026b 100644 --- a/frameworks/Scala/colossus/src/main/scala/example/Main.scala +++ b/frameworks/Scala/colossus/src/main/scala/example/Main.scala @@ -8,7 +8,6 @@ import colossus.service.Callback.Implicits._ import colossus.service.GenRequestHandler.PartialHandler import colossus.util.DataSize import com.github.plokhotnyuk.jsoniter_scala.core._ -import com.github.plokhotnyuk.jsoniter_scala.macros.JsonCodecMaker._ import com.github.plokhotnyuk.jsoniter_scala.macros._ import scala.concurrent.duration.Duration @@ -16,16 +15,12 @@ import scala.concurrent.duration.Duration case class Message(message: String) object Main extends App { - def toHttpBodyEncoder[T](codec: JsonCodec[T]): HttpBodyEncoder[T] = new HttpBodyEncoder[T] { - override def encode(data: T): HttpBody = new HttpBody(JsonWriter.write(codec, data)) - - override def contentType: String = "application/json" - } val serverConfig = ServerSettings( port = 9007, maxConnections = 16384, tcpBacklogSize = Some(1024)) + val serviceConfig = ServiceConfig( logErrors = false, requestMetrics = false, @@ -35,7 +30,13 @@ object Main extends App { implicit val actorSystem: ActorSystem = ActorSystem() implicit val ioSystem: IOSystem = IOSystem() - implicit val messageEncoder: HttpBodyEncoder[Message] = toHttpBodyEncoder(make[Message](CodecMakerConfig())) + + implicit val codec: JsonValueCodec[Message] = JsonCodecMaker.make[Message](CodecMakerConfig()) + + implicit val messageEncoder: HttpBodyEncoder[Message] = new HttpBodyEncoder[Message] { + override def encode(data: Message): HttpBody = new HttpBody(writeToArray(data)) + override def contentType: String = "application/json" + } HttpServer.start("Colossus", serverConfig)(initContext => new Initializer(initContext) { override def onConnect: RequestHandlerFactory = serverContext => new RequestHandler(serverContext, serviceConfig) { diff --git a/frameworks/Scala/finagle/.gitignore b/frameworks/Scala/finagle/.gitignore deleted file mode 100644 index 1431a9afd57..00000000000 --- a/frameworks/Scala/finagle/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/project/.* -/project/target -/target diff --git a/frameworks/Scala/finagle/benchmark_config.json b/frameworks/Scala/finagle/benchmark_config.json index 22df85ce39a..4de587251e8 100644 --- a/frameworks/Scala/finagle/benchmark_config.json +++ b/frameworks/Scala/finagle/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "finagle", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, diff --git a/frameworks/Scala/finagle/build.sbt b/frameworks/Scala/finagle/build.sbt index aa0ea1f36a9..28b71aef43b 100644 --- a/frameworks/Scala/finagle/build.sbt +++ b/frameworks/Scala/finagle/build.sbt @@ -1,12 +1,15 @@ name := "finagle" -scalaVersion := "2.11.12" +scalaVersion := "2.12.5" -version := "17.11.0" - -com.github.retronym.SbtOneJar.oneJarSettings +version := "1.0" libraryDependencies ++= Seq( - "com.twitter" %% "finagle-http" % "17.11.0", + "com.twitter" %% "finagle-http" % "18.3.0", "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.8.4" ) + +assemblyMergeStrategy in assembly := { + case PathList("META-INF", xs @ _*) => MergeStrategy.discard + case x => MergeStrategy.first +} diff --git a/frameworks/Scala/finagle/finagle.dockerfile b/frameworks/Scala/finagle/finagle.dockerfile new file mode 100644 index 00000000000..55797464e65 --- /dev/null +++ b/frameworks/Scala/finagle/finagle.dockerfile @@ -0,0 +1,15 @@ +FROM techempower/sbt:0.1 + +ADD ./ /finagle +WORKDIR /finagle + +RUN sbt assembly -batch + +CMD java \ + -server \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -Dio.netty.recycler.maxCapacityPerThread=0 \ + -Dio.netty.leakDetection.level=disabled \ + -jar target/scala-2.12/finagle-assembly-1.0.jar diff --git a/frameworks/Scala/finagle/project/build.properties b/frameworks/Scala/finagle/project/build.properties index c091b86ca46..05313438a19 100644 --- a/frameworks/Scala/finagle/project/build.properties +++ b/frameworks/Scala/finagle/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.16 +sbt.version=1.1.2 diff --git a/frameworks/Scala/finagle/project/plugins.sbt b/frameworks/Scala/finagle/project/plugins.sbt index a1b8e18398d..652a3b93be3 100644 --- a/frameworks/Scala/finagle/project/plugins.sbt +++ b/frameworks/Scala/finagle/project/plugins.sbt @@ -1 +1 @@ -addSbtPlugin("org.scala-sbt.plugins" % "sbt-onejar" % "0.8") \ No newline at end of file +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") diff --git a/frameworks/Scala/finagle/setup.sh b/frameworks/Scala/finagle/setup.sh deleted file mode 100755 index 92c138ab8e1..00000000000 --- a/frameworks/Scala/finagle/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends java sbt - -sbt 'oneJar' -batch - -java -jar target/scala-2.11/*finagle*one-jar.jar & diff --git a/frameworks/Scala/finagle/src/main/scala/Main.scala b/frameworks/Scala/finagle/src/main/scala/Main.scala index 73c84e5b393..42a45675d9b 100644 --- a/frameworks/Scala/finagle/src/main/scala/Main.scala +++ b/frameworks/Scala/finagle/src/main/scala/Main.scala @@ -43,7 +43,6 @@ object Main extends App { } Await.ready(Http.server - .configured(Http.Netty3Impl) .withCompressionLevel(0) .withStack(nilStack) .serve(":8080", serverAndDate.andThen(muxer)) diff --git a/frameworks/Scala/finatra/.gitignore b/frameworks/Scala/finatra/.gitignore deleted file mode 100644 index 836e87830a5..00000000000 --- a/frameworks/Scala/finatra/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -*.DS_Store - -# java -*.class - -# sbt -target/ -project/target - -# eclipse -.metadata -.settings -.classpath -.project - -.ensime* -*.sublime-* -.cache - -# intellij -*.iml -*.ipr -*.iws -.idea/ \ No newline at end of file diff --git a/frameworks/Scala/finatra/benchmark_config.json b/frameworks/Scala/finatra/benchmark_config.json index cfd2968f713..1387c95c20e 100644 --- a/frameworks/Scala/finatra/benchmark_config.json +++ b/frameworks/Scala/finatra/benchmark_config.json @@ -4,7 +4,6 @@ "default": { "orm": "Raw", "database_os": "Linux", - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 8888, diff --git a/frameworks/Scala/finatra/build.sbt b/frameworks/Scala/finatra/build.sbt index b96b46066f9..2446b9fcfaf 100644 --- a/frameworks/Scala/finatra/build.sbt +++ b/frameworks/Scala/finatra/build.sbt @@ -1,8 +1,8 @@ name := "techempower-benchmarks-finatra" organization := "com.twitter" -version := "2.11.0" +version := "18.3.0" -scalaVersion := "2.12.4" +scalaVersion := "2.12.5" resolvers ++= Seq( Resolver.sonatypeRepo("releases") @@ -16,7 +16,8 @@ assemblyMergeStrategy in assembly := { } libraryDependencies ++= Seq( - "com.twitter" %% "finatra-http" % "17.11.0", + "com.twitter" %% "finatra-http" % "18.3.0", "org.slf4j" % "slf4j-nop" % "1.7.25", + "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.8.4", "javax.activation" % "activation" % "1.1.1" ) diff --git a/frameworks/Scala/finatra/finatra.dockerfile b/frameworks/Scala/finatra/finatra.dockerfile new file mode 100644 index 00000000000..5f88205b657 --- /dev/null +++ b/frameworks/Scala/finatra/finatra.dockerfile @@ -0,0 +1,18 @@ +FROM techempower/sbt:0.1 + +ADD ./ /finatra +WORKDIR /finatra + +RUN sbt clean assembly -batch + +CMD java \ + -Dio.netty.recycler.maxCapacityPerThread=0 \ + -Dio.netty.leakDetection.level=disabled \ + -Dcom.twitter.util.events.sinkEnabled=false \ + -server \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -jar target/scala-2.12/finatra-benchmark.jar \ + -log.level=ERROR \ + -http.response.charset.enabled=false diff --git a/frameworks/Scala/finatra/project/build.properties b/frameworks/Scala/finatra/project/build.properties index 394cb75cfe9..05313438a19 100644 --- a/frameworks/Scala/finatra/project/build.properties +++ b/frameworks/Scala/finatra/project/build.properties @@ -1 +1 @@ -sbt.version=1.0.4 +sbt.version=1.1.2 diff --git a/frameworks/Scala/finatra/setup.sh b/frameworks/Scala/finatra/setup.sh deleted file mode 100755 index f2fd7594110..00000000000 --- a/frameworks/Scala/finatra/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends java8 sbt - -sbt clean assembly -batch - -java -Dcom.twitt.finagle.netty4.numWorkers=1 -Dcom.twitter.util.events.sinkEnabled=false -server -XX:+UseNUMA -XX:+UseParallelGC -XX:+AggressiveOpts -jar target/scala-2.12/finatra-benchmark.jar -log.level=ERROR -http.response.charset.enabled=false diff --git a/frameworks/Scala/finatra/src/main/scala/Main.scala b/frameworks/Scala/finatra/src/main/scala/Main.scala index f651c2479dd..ab1f723b8db 100644 --- a/frameworks/Scala/finatra/src/main/scala/Main.scala +++ b/frameworks/Scala/finatra/src/main/scala/Main.scala @@ -1,4 +1,4 @@ -import com.twitter.finagle.Http.{Netty3Impl, Server} +import com.twitter.finagle.Http.Server import com.twitter.finagle.http.Request import com.twitter.finagle.stack.nilStack import com.twitter.finagle.stats.NullStatsReceiver @@ -11,7 +11,6 @@ object FinatraBenchmarkServerMain extends FinatraBenchmarkServer class FinatraBenchmarkServer extends HttpServer { override def configureHttpServer(server: Server): Server = { server - .configured(Netty3Impl) .withCompressionLevel(0) .withStatsReceiver(NullStatsReceiver) .withStack(nilStack) diff --git a/frameworks/Scala/finch/.gitignore b/frameworks/Scala/finch/.gitignore deleted file mode 100644 index 854eb3c7214..00000000000 --- a/frameworks/Scala/finch/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -target/ -project/target -bin/ -logs/ -.cache -.classpath -.project -/bin/ diff --git a/frameworks/Scala/finch/benchmark_config.json b/frameworks/Scala/finch/benchmark_config.json index 2be15bd036c..c6c52ec0ec5 100644 --- a/frameworks/Scala/finch/benchmark_config.json +++ b/frameworks/Scala/finch/benchmark_config.json @@ -4,7 +4,6 @@ "default": { "orm": "Raw", "database_os": "Linux", - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "port": 9000, diff --git a/frameworks/Scala/finch/build.sbt b/frameworks/Scala/finch/build.sbt index f3737bf453a..842c47a4170 100644 --- a/frameworks/Scala/finch/build.sbt +++ b/frameworks/Scala/finch/build.sbt @@ -1,12 +1,15 @@ name := """techempower-benchmarks-finch""" -version := "0.16.0-M5" +version := "1.0" -scalaVersion := "2.11.12" - -com.github.retronym.SbtOneJar.oneJarSettings +scalaVersion := "2.12.5" libraryDependencies ++= Seq( - "com.github.finagle" %% "finch-core" % "0.16.0-M5", - "com.github.finagle" %% "finch-circe" % "0.16.0-M5" + "com.github.finagle" %% "finch-core" % "0.18.0", + "com.github.finagle" %% "finch-circe" % "0.18.0" ) + +assemblyMergeStrategy in assembly := { + case PathList("META-INF", xs @ _*) => MergeStrategy.discard + case x => MergeStrategy.first +} diff --git a/frameworks/Scala/finch/finch.dockerfile b/frameworks/Scala/finch/finch.dockerfile new file mode 100644 index 00000000000..9224fa3e8c4 --- /dev/null +++ b/frameworks/Scala/finch/finch.dockerfile @@ -0,0 +1,15 @@ +FROM techempower/sbt:0.1 + +ADD ./ /finch +WORKDIR /finch + +RUN sbt assembly -batch + +CMD java \ + -server \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -Dio.netty.recycler.maxCapacityPerThread=0 \ + -Dio.netty.leakDetection.level=disabled \ + -jar target/scala-2.12/techempower-benchmarks-finch-assembly-1.0.jar diff --git a/frameworks/Scala/finch/project/build.properties b/frameworks/Scala/finch/project/build.properties index c091b86ca46..05313438a19 100644 --- a/frameworks/Scala/finch/project/build.properties +++ b/frameworks/Scala/finch/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.16 +sbt.version=1.1.2 diff --git a/frameworks/Scala/finch/project/plugins.sbt b/frameworks/Scala/finch/project/plugins.sbt index 62fc95824ef..652a3b93be3 100644 --- a/frameworks/Scala/finch/project/plugins.sbt +++ b/frameworks/Scala/finch/project/plugins.sbt @@ -1 +1 @@ -addSbtPlugin("org.scala-sbt.plugins" % "sbt-onejar" % "0.8") +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") diff --git a/frameworks/Scala/finch/setup.sh b/frameworks/Scala/finch/setup.sh deleted file mode 100644 index 460b4265e4d..00000000000 --- a/frameworks/Scala/finch/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends java sbt - -sbt 'oneJar' -batch - -java -jar target/scala-2.11/*finch*one-jar.jar & diff --git a/frameworks/Scala/finch/src/main/scala/Main.scala b/frameworks/Scala/finch/src/main/scala/Main.scala index 22b9ed2cddf..133bb980e73 100644 --- a/frameworks/Scala/finch/src/main/scala/Main.scala +++ b/frameworks/Scala/finch/src/main/scala/Main.scala @@ -7,6 +7,7 @@ import com.twitter.util.Await import io.circe.Json import io.finch._ +import io.finch.syntax._ import io.finch.circe._ object Main extends App { @@ -27,10 +28,10 @@ object Main extends App { .serve[Text.Plain](plaintext) .toService - Await.ready(Http.server - .configured(Http.Netty3Impl) - .withCompressionLevel(0) - .withStack(nilStack) - .serve(":9000", service) + Await.ready( + Http.server + .withCompressionLevel(0) + .withStack(nilStack) + .serve(":9000", service) ) } diff --git a/frameworks/Scala/fintrospect/.gitignore b/frameworks/Scala/fintrospect/.gitignore deleted file mode 100644 index c0ebd1f2f1d..00000000000 --- a/frameworks/Scala/fintrospect/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -target/ -project/target -bin/ -logs/ -.idea/ -.cache -.classpath -.project -/bin/ -tools/ -sbt \ No newline at end of file diff --git a/frameworks/Scala/fintrospect/Dockerfile b/frameworks/Scala/fintrospect/Dockerfile deleted file mode 100644 index dc4e1db523a..00000000000 --- a/frameworks/Scala/fintrospect/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM mysql - -ADD create.sql /docker-entrypoint-initdb.d/ diff --git a/frameworks/Scala/fintrospect/benchmark_config.json b/frameworks/Scala/fintrospect/benchmark_config.json index cc698f08f1e..9a5b941d7bf 100644 --- a/frameworks/Scala/fintrospect/benchmark_config.json +++ b/frameworks/Scala/fintrospect/benchmark_config.json @@ -5,7 +5,6 @@ "default": { "orm": "Raw", "database_os": "Linux", - "setup_file": "setup", "db_url": "/db", "fortune_url": "/fortunes", "json_url": "/json", diff --git a/frameworks/Scala/fintrospect/build.sbt b/frameworks/Scala/fintrospect/build.sbt index 00a79b6ed49..605284862a1 100644 --- a/frameworks/Scala/fintrospect/build.sbt +++ b/frameworks/Scala/fintrospect/build.sbt @@ -1,8 +1,8 @@ name := """techempower-benchmarks-fintrospect""" -version := "0.3.0" +version := "1.0" -scalaVersion := "2.12.1" +scalaVersion := "2.12.5" scalacOptions += "-deprecation" @@ -12,13 +12,14 @@ resolvers += "JCenter" at "https://jcenter.bintray.com" resolvers += Resolver.sonatypeRepo("snapshots") -com.github.retronym.SbtOneJar.oneJarSettings - -mainClass in(Compile, run) := Some("FintrospectBenchmarkServer") - libraryDependencies ++= Seq( "io.fintrospect" %% "fintrospect-core" % "14.15.0", "io.fintrospect" %% "fintrospect-jackson" % "14.15.0", "io.fintrospect" %% "fintrospect-mustache" % "14.15.0", "com.twitter" %% "finagle-mysql" % "6.43.0" ) + +assemblyMergeStrategy in assembly := { + case PathList("META-INF", xs @ _*) => MergeStrategy.discard + case x => MergeStrategy.first +} diff --git a/frameworks/Scala/fintrospect/fintrospect.dockerfile b/frameworks/Scala/fintrospect/fintrospect.dockerfile new file mode 100644 index 00000000000..11d1e9e31f6 --- /dev/null +++ b/frameworks/Scala/fintrospect/fintrospect.dockerfile @@ -0,0 +1,15 @@ +FROM techempower/sbt:0.1 + +ADD ./ /fintrospect +WORKDIR /fintrospect + +RUN sbt assembly -batch + +CMD java \ + -Dcom.twitter.finagle.toggle.flag.overrides=com.twitter.http.UseNetty4=1.0 \ + -server \ + -XX:+UseNUMA \ + -XX:+UseParallelGC \ + -XX:+AggressiveOpts \ + -XX:+AlwaysPreTouch \ + -jar target/scala-2.12/techempower-benchmarks-fintrospect-assembly-1.0.jar diff --git a/frameworks/Scala/fintrospect/project/build.properties b/frameworks/Scala/fintrospect/project/build.properties index c091b86ca46..05313438a19 100644 --- a/frameworks/Scala/fintrospect/project/build.properties +++ b/frameworks/Scala/fintrospect/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.16 +sbt.version=1.1.2 diff --git a/frameworks/Scala/fintrospect/project/plugins.sbt b/frameworks/Scala/fintrospect/project/plugins.sbt index 62fc95824ef..652a3b93be3 100644 --- a/frameworks/Scala/fintrospect/project/plugins.sbt +++ b/frameworks/Scala/fintrospect/project/plugins.sbt @@ -1 +1 @@ -addSbtPlugin("org.scala-sbt.plugins" % "sbt-onejar" % "0.8") +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") diff --git a/frameworks/Scala/fintrospect/run_db.sh b/frameworks/Scala/fintrospect/run_db.sh deleted file mode 100755 index d8d726c16d9..00000000000 --- a/frameworks/Scala/fintrospect/run_db.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -cp ../../../config/create.sql . - -docker build -t dbi . - -rm create.sql - -docker run --name db -d \ - -e MYSQL_ROOT_PASSWORD=123 \ - -p 3306:3306 dbi diff --git a/frameworks/Scala/fintrospect/setup.sh b/frameworks/Scala/fintrospect/setup.sh deleted file mode 100755 index d811fea4e94..00000000000 --- a/frameworks/Scala/fintrospect/setup.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends mysql java sbt - -sbt clean - -sbt 'oneJar' -batch - -java -Dcom.twitter.finagle.toggle.flag.overrides=com.twitter.http.UseNetty4=1.0 -server -XX:+UseNUMA -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+AlwaysPreTouch -jar target/scala-2.12/*fintrospect*one-jar.jar & diff --git a/frameworks/Scala/fintrospect/src/main/scala/Database.scala b/frameworks/Scala/fintrospect/src/main/scala/Database.scala index 526eb22444a..8075fe44e31 100644 --- a/frameworks/Scala/fintrospect/src/main/scala/Database.scala +++ b/frameworks/Scala/fintrospect/src/main/scala/Database.scala @@ -8,7 +8,7 @@ import com.twitter.util.NullMonitor import io.fintrospect.configuration.Host object Database { - def apply(dbHost: Host): Client = { + def apply(): Client = { Mysql.client .withCredentials("benchmarkdbuser", "benchmarkdbpass") .withDatabase("hello_world") @@ -17,6 +17,6 @@ object Database { .withMonitor(NullMonitor) .withTracer(NullTracer) .withMaxConcurrentPrepareStatements(256) - .newRichClient(dbHost.value + ":3306") + .newRichClient("tfb-database:3306") } } diff --git a/frameworks/Scala/fintrospect/src/main/scala/FintrospectBenchmarkServer.scala b/frameworks/Scala/fintrospect/src/main/scala/FintrospectBenchmarkServer.scala index f8e0beb2751..2dfa8a32569 100644 --- a/frameworks/Scala/fintrospect/src/main/scala/FintrospectBenchmarkServer.scala +++ b/frameworks/Scala/fintrospect/src/main/scala/FintrospectBenchmarkServer.scala @@ -24,8 +24,7 @@ object FintrospectBenchmarkServer extends App { }) } - val dbHost = Properties.envOrNone("DBHOST").map(Host(_)).getOrElse(Host.localhost) - val database = Database(dbHost) + val database = Database() val module = RouteModule(Root) .withRoute(JsonRoute()) diff --git a/frameworks/Scala/http4s/benchmark_config.json b/frameworks/Scala/http4s/benchmark_config.json index 601ce3196cf..cf9d8d39e1e 100644 --- a/frameworks/Scala/http4s/benchmark_config.json +++ b/frameworks/Scala/http4s/benchmark_config.json @@ -4,7 +4,6 @@ "default": { "orm": "Raw", "database_os": "Linux", - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", "query_url": "/queries?queries=", diff --git a/frameworks/Scala/http4s/build.sbt b/frameworks/Scala/http4s/build.sbt index 77820bd664f..7d9a52e3dab 100644 --- a/frameworks/Scala/http4s/build.sbt +++ b/frameworks/Scala/http4s/build.sbt @@ -1,17 +1,15 @@ name := "http4s" -version := "1.0-SNAPSHOT" +version := "1.0" -scalaVersion := "2.12.2" +scalaVersion := "2.12.5" enablePlugins(SbtTwirl) TwirlKeys.templateImports += "http4s.techempower.benchmark._" -com.github.retronym.SbtOneJar.oneJarSettings - val http4sVersion = "0.15.9a" -val circeVersion = "0.7.1" +val circeVersion = "0.9.3" val doobieVersion = "0.4.1" libraryDependencies ++= Seq( @@ -24,10 +22,7 @@ libraryDependencies ++= Seq( "io.circe" %% "circe-parser" % circeVersion, "org.tpolecat" %% "doobie-core" % doobieVersion, "org.tpolecat" %% "doobie-hikari" % doobieVersion, - "com.zaxxer" % "HikariCP" % "2.6.1", - "org.postgresql" % "postgresql" % "42.1.4", - "ch.qos.logback" % "logback-classic" % "1.2.2" + "com.zaxxer" % "HikariCP" % "2.7.8", + "org.postgresql" % "postgresql" % "42.2.2", + "ch.qos.logback" % "logback-classic" % "1.2.3" ) - -mainClass in oneJar := Some("http4s.techempower.benchmark.WebServer") - diff --git a/frameworks/Scala/http4s/http4s.dockerfile b/frameworks/Scala/http4s/http4s.dockerfile new file mode 100644 index 00000000000..64bfa485f77 --- /dev/null +++ b/frameworks/Scala/http4s/http4s.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/sbt:0.1 + +ADD ./ /http4s +WORKDIR /http4s + +RUN sbt assembly -batch + +CMD java -jar target/scala-2.12/http4s-assembly-1.0.jar "tfb-database" diff --git a/frameworks/Scala/http4s/project/build.properties b/frameworks/Scala/http4s/project/build.properties index c091b86ca46..05313438a19 100644 --- a/frameworks/Scala/http4s/project/build.properties +++ b/frameworks/Scala/http4s/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.16 +sbt.version=1.1.2 diff --git a/frameworks/Scala/http4s/project/plugins.sbt b/frameworks/Scala/http4s/project/plugins.sbt index 30dd1ea7ae9..47058333db3 100644 --- a/frameworks/Scala/http4s/project/plugins.sbt +++ b/frameworks/Scala/http4s/project/plugins.sbt @@ -1,3 +1,3 @@ -addSbtPlugin("org.scala-sbt.plugins" % "sbt-onejar" % "0.8") +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") -addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.3.0") +addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.3.13") diff --git a/frameworks/Scala/http4s/setup.sh b/frameworks/Scala/http4s/setup.sh deleted file mode 100644 index 2adb8840c2d..00000000000 --- a/frameworks/Scala/http4s/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends postgresql java sbt - -sbt 'oneJar' -batch - -java -jar target/scala-2.12/http4s*one-jar.jar "${DBHOST}" & diff --git a/frameworks/Scala/play2-scala/benchmark_config.json b/frameworks/Scala/play2-scala/benchmark_config.json index 6afe92ef2a7..7c0097bdbc9 100644 --- a/frameworks/Scala/play2-scala/benchmark_config.json +++ b/frameworks/Scala/play2-scala/benchmark_config.json @@ -4,8 +4,7 @@ { "default": { "display_name": "play2-scala", - "setup_file": "setup_scala", - "framework": "play2", + "framework": "play2", "language": "Scala", "flavor": "None", "orm": "Raw", @@ -22,10 +21,9 @@ "json_url": "/json", "plaintext_url": "/plaintext" }, - "scala-netty": { + "netty": { "display_name": "play2-scala-netty", - "setup_file": "setup_scala_netty", - "framework": "play2", + "framework": "play2", "language": "Scala", "flavor": "None", "orm": "Raw", @@ -42,10 +40,9 @@ "json_url": "/json", "plaintext_url": "/plaintext" }, - "anorm-linux": { - "display_name": "play2-scala-anorm-linux", - "setup_file": "setup_scala_anorm", - "framework": "play2", + "anorm": { + "display_name": "play2-scala-anorm", + "framework": "play2", "language": "Scala", "flavor": "None", "orm": "Full", @@ -64,10 +61,9 @@ "fortune_url": "/fortunes", "update_url": "/update?queries=" }, - "anorm-linux-netty": { - "display_name": "play2-scala-anorm-linux-netty", - "setup_file": "setup_scala_anorm_netty", - "framework": "play2", + "anorm-netty": { + "display_name": "play2-scala-anorm-netty", + "framework": "play2", "language": "Scala", "flavor": "None", "orm": "Full", @@ -86,54 +82,9 @@ "fortune_url": "/fortunes", "update_url": "/update?queries=" }, - "anorm-windows": { - "display_name": "play2-scala-anorm-windows", - "setup_file": "setup_scala_anorm", - "framework": "play2", - "language": "Scala", - "flavor": "None", - "orm": "Full", - "os": "Windows", - "database": "MySQL", - "approach": "Realistic", - "classification": "Fullstack", - "platform": "Akka", - "webserver": "None", - "database_os": "Linux", - "notes": "", - "versus": "akka-http", - "port": "9000", - "db_url": "/db", - "query_url": "/queries?queries=", - "fortune_url": "/fortunes", - "update_url": "/update?queries=" - }, - "anorm-windows-netty": { - "display_name": "play2-scala-anorm-windows-netty", - "setup_file": "setup_scala_anorm_netty", - "framework": "play2", - "language": "Scala", - "flavor": "None", - "orm": "Full", - "os": "Windows", - "database": "MySQL", - "approach": "Realistic", - "classification": "Fullstack", - "platform": "Netty", - "webserver": "None", - "database_os": "Linux", - "notes": "", - "versus": "netty", - "port": "9000", - "db_url": "/db", - "query_url": "/queries?queries=", - "fortune_url": "/fortunes", - "update_url": "/update?queries=" - }, "reactivemongo": { "display_name": "play2-scala-reactivemongo", - "setup_file": "setup_scala_reactivemongo", - "framework": "play2", + "framework": "play2", "language": "Scala", "flavor": "None", "orm": "Full", @@ -155,8 +106,7 @@ }, "reactivemongo-netty": { "display_name": "play2-scala-reactivemongo-netty", - "setup_file": "setup_scala_reactivemongo_netty", - "framework": "play2", + "framework": "play2", "language": "Scala", "flavor": "None", "orm": "Full", @@ -178,8 +128,7 @@ }, "slick": { "display_name": "play2-scala-slick", - "setup_file": "setup_scala_slick", - "framework": "play2", + "framework": "play2", "language": "Scala", "flavor": "None", "orm": "Full", @@ -200,8 +149,7 @@ }, "slick-netty": { "display_name": "play2-scala-slick-netty", - "setup_file": "setup_scala_slick_netty", - "framework": "play2", + "framework": "play2", "language": "Scala", "flavor": "None", "orm": "Full", diff --git a/frameworks/Scala/play2-scala/play2-scala-anorm-netty.dockerfile b/frameworks/Scala/play2-scala/play2-scala-anorm-netty.dockerfile new file mode 100644 index 00000000000..36aa9b27453 --- /dev/null +++ b/frameworks/Scala/play2-scala/play2-scala-anorm-netty.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-scala-anorm /play_app +WORKDIR /play_app + +RUN sbt stage + +CMD target/universal/stage/bin/play2-scala-anorm \ + -Dplay.server.provider=play.core.server.NettyServerProvider diff --git a/frameworks/Scala/play2-scala/play2-scala-anorm.dockerfile b/frameworks/Scala/play2-scala/play2-scala-anorm.dockerfile new file mode 100644 index 00000000000..4ea08c9c77e --- /dev/null +++ b/frameworks/Scala/play2-scala/play2-scala-anorm.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-scala-anorm /play_app +WORKDIR /play_app + +RUN sbt stage + +CMD target/universal/stage/bin/play2-scala-anorm \ + -Dplay.server.provider=play.core.server.AkkaHttpServerProvider diff --git a/frameworks/Scala/play2-scala/play2-scala-anorm/.gitignore b/frameworks/Scala/play2-scala/play2-scala-anorm/.gitignore deleted file mode 100644 index 972f8f3dbd8..00000000000 --- a/frameworks/Scala/play2-scala/play2-scala-anorm/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -logs -project/project -project/target -public -target -test -tmp -.history -dist -conf/evolutions - -# Ignore all dotfiles... -.* -# except for .gitignore -!.gitignore - -# Ignore Play! working directory # -db -eclipse -lib -log -logs -modules -precompiled -project/project -project/target -target -tmp -test-result -server.pid -*.iml -*.eml - diff --git a/frameworks/Scala/play2-scala/play2-scala-anorm/build.sbt b/frameworks/Scala/play2-scala/play2-scala-anorm/build.sbt index d76e847ca51..a5b727af588 100644 --- a/frameworks/Scala/play2-scala/play2-scala-anorm/build.sbt +++ b/frameworks/Scala/play2-scala/play2-scala-anorm/build.sbt @@ -4,8 +4,7 @@ version := "1.0-SNAPSHOT" lazy val root = (project in file(".")).enablePlugins(PlayScala, PlayNettyServer) -scalaVersion := "2.12.4" - +scalaVersion := "2.12.5" libraryDependencies ++= Seq( guice, diff --git a/frameworks/Scala/play2-scala/play2-scala-anorm/conf/application.conf b/frameworks/Scala/play2-scala/play2-scala-anorm/conf/application.conf index 3e05eb52258..3ae862cc916 100755 --- a/frameworks/Scala/play2-scala/play2-scala-anorm/conf/application.conf +++ b/frameworks/Scala/play2-scala/play2-scala-anorm/conf/application.conf @@ -71,7 +71,7 @@ database.dispatcher { db { default { # https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration - url = "jdbc:mysql://TFB-database:3306/hello_world" + url = "jdbc:mysql://tfb-database:3306/hello_world" username = "benchmarkdbuser" password = "benchmarkdbpass" hikaricp { diff --git a/frameworks/Scala/play2-scala/play2-scala-anorm/project/build.properties b/frameworks/Scala/play2-scala/play2-scala-anorm/project/build.properties index 394cb75cfe9..05313438a19 100644 --- a/frameworks/Scala/play2-scala/play2-scala-anorm/project/build.properties +++ b/frameworks/Scala/play2-scala/play2-scala-anorm/project/build.properties @@ -1 +1 @@ -sbt.version=1.0.4 +sbt.version=1.1.2 diff --git a/frameworks/Scala/play2-scala/play2-scala-netty.dockerfile b/frameworks/Scala/play2-scala/play2-scala-netty.dockerfile new file mode 100644 index 00000000000..6ccc067116f --- /dev/null +++ b/frameworks/Scala/play2-scala/play2-scala-netty.dockerfile @@ -0,0 +1,17 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-scala /play_app +WORKDIR /play_app + +RUN sbt stage + +CMD target/universal/stage/bin/play2-scala \ + -Dplay.server.provider=play.core.server.NettyServerProvider \ + -J-server \ + -J-Xms1g \ + -J-Xmx1g \ + -J-XX:NewSize=512m \ + -J-XX:+UseG1GC \ + -J-XX:MaxGCPauseMillis=30 \ + -J-XX:-UseBiasedLocking \ + -J-XX:+AlwaysPreTouch diff --git a/frameworks/Scala/play2-scala/play2-scala-reactivemongo-netty.dockerfile b/frameworks/Scala/play2-scala/play2-scala-reactivemongo-netty.dockerfile new file mode 100644 index 00000000000..051bca813fe --- /dev/null +++ b/frameworks/Scala/play2-scala/play2-scala-reactivemongo-netty.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-scala-reactivemongo /play_app +WORKDIR /play_app + +RUN sbt stage + +CMD target/universal/stage/bin/play2-scala-reactivemongo \ + -Dplay.server.provider=play.core.server.NettyServerProvider diff --git a/frameworks/Scala/play2-scala/play2-scala-reactivemongo.dockerfile b/frameworks/Scala/play2-scala/play2-scala-reactivemongo.dockerfile new file mode 100644 index 00000000000..021182093e8 --- /dev/null +++ b/frameworks/Scala/play2-scala/play2-scala-reactivemongo.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-scala-reactivemongo /play_app +WORKDIR /play_app + +RUN sbt stage + +CMD target/universal/stage/bin/play2-scala-reactivemongo \ + -Dplay.server.provider=play.core.server.AkkaHttpServerProvider diff --git a/frameworks/Scala/play2-scala/play2-scala-reactivemongo/.gitignore b/frameworks/Scala/play2-scala/play2-scala-reactivemongo/.gitignore deleted file mode 100644 index 972f8f3dbd8..00000000000 --- a/frameworks/Scala/play2-scala/play2-scala-reactivemongo/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -logs -project/project -project/target -public -target -test -tmp -.history -dist -conf/evolutions - -# Ignore all dotfiles... -.* -# except for .gitignore -!.gitignore - -# Ignore Play! working directory # -db -eclipse -lib -log -logs -modules -precompiled -project/project -project/target -target -tmp -test-result -server.pid -*.iml -*.eml - diff --git a/frameworks/Scala/play2-scala/play2-scala-reactivemongo/build.sbt b/frameworks/Scala/play2-scala/play2-scala-reactivemongo/build.sbt index 80f465be40f..505aec4c7a9 100644 --- a/frameworks/Scala/play2-scala/play2-scala-reactivemongo/build.sbt +++ b/frameworks/Scala/play2-scala/play2-scala-reactivemongo/build.sbt @@ -4,7 +4,7 @@ version := "1.0-SNAPSHOT" lazy val root = (project in file(".")).enablePlugins(PlayScala, PlayNettyServer) -scalaVersion := "2.12.4" +scalaVersion := "2.12.5" libraryDependencies ++= Seq( "org.reactivemongo" %% "play2-reactivemongo" % "0.12.7-play26", diff --git a/frameworks/Scala/play2-scala/play2-scala-reactivemongo/conf/application.conf b/frameworks/Scala/play2-scala/play2-scala-reactivemongo/conf/application.conf index 6aaef02e495..7206c58f310 100755 --- a/frameworks/Scala/play2-scala/play2-scala-reactivemongo/conf/application.conf +++ b/frameworks/Scala/play2-scala/play2-scala-reactivemongo/conf/application.conf @@ -53,7 +53,7 @@ play.application.loader=AppLoader play.modules.enabled += "play.modules.reactivemongo.ReactiveMongoModule" mongodb { - servers = ["TFB-database:27017"] + servers = ["tfb-database:27017"] db = "hello_world" - uri = "mongodb://TFB-database:27017/hello_world" + uri = "mongodb://tfb-database:27017/hello_world" } diff --git a/frameworks/Scala/play2-scala/play2-scala-reactivemongo/project/build.properties b/frameworks/Scala/play2-scala/play2-scala-reactivemongo/project/build.properties index 394cb75cfe9..05313438a19 100644 --- a/frameworks/Scala/play2-scala/play2-scala-reactivemongo/project/build.properties +++ b/frameworks/Scala/play2-scala/play2-scala-reactivemongo/project/build.properties @@ -1 +1 @@ -sbt.version=1.0.4 +sbt.version=1.1.2 diff --git a/frameworks/Scala/play2-scala/play2-scala-slick-netty.dockerfile b/frameworks/Scala/play2-scala/play2-scala-slick-netty.dockerfile new file mode 100644 index 00000000000..c8b5b251dd1 --- /dev/null +++ b/frameworks/Scala/play2-scala/play2-scala-slick-netty.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-scala-slick /play_app +WORKDIR /play_app + +RUN sbt stage + +CMD target/universal/stage/bin/play2-scala-slick \ + -Dplay.server.provider=play.core.server.NettyServerProvider diff --git a/frameworks/Scala/play2-scala/play2-scala-slick.dockerfile b/frameworks/Scala/play2-scala/play2-scala-slick.dockerfile new file mode 100644 index 00000000000..43bd1f1b490 --- /dev/null +++ b/frameworks/Scala/play2-scala/play2-scala-slick.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-scala-slick /play_app +WORKDIR /play_app + +RUN sbt stage + +CMD target/universal/stage/bin/play2-scala-slick \ + -Dplay.server.provider=play.core.server.AkkaHttpServerProvider diff --git a/frameworks/Scala/play2-scala/play2-scala-slick/.gitignore b/frameworks/Scala/play2-scala/play2-scala-slick/.gitignore deleted file mode 100644 index 972f8f3dbd8..00000000000 --- a/frameworks/Scala/play2-scala/play2-scala-slick/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -logs -project/project -project/target -public -target -test -tmp -.history -dist -conf/evolutions - -# Ignore all dotfiles... -.* -# except for .gitignore -!.gitignore - -# Ignore Play! working directory # -db -eclipse -lib -log -logs -modules -precompiled -project/project -project/target -target -tmp -test-result -server.pid -*.iml -*.eml - diff --git a/frameworks/Scala/play2-scala/play2-scala-slick/build.sbt b/frameworks/Scala/play2-scala/play2-scala-slick/build.sbt index c399045cbd8..24e83bc35c9 100644 --- a/frameworks/Scala/play2-scala/play2-scala-slick/build.sbt +++ b/frameworks/Scala/play2-scala/play2-scala-slick/build.sbt @@ -4,7 +4,7 @@ version := "1.0-SNAPSHOT" lazy val root = (project in file(".")).enablePlugins(PlayScala, PlayNettyServer) -scalaVersion := "2.12.4" +scalaVersion := "2.12.5" libraryDependencies ++= Seq( guice, diff --git a/frameworks/Scala/play2-scala/play2-scala-slick/conf/application.conf b/frameworks/Scala/play2-scala/play2-scala-slick/conf/application.conf index 8e072537f0a..d616d8749c6 100755 --- a/frameworks/Scala/play2-scala/play2-scala-slick/conf/application.conf +++ b/frameworks/Scala/play2-scala/play2-scala-slick/conf/application.conf @@ -55,7 +55,7 @@ slick.dbs.default { db { connectionPool=HikariCP driver="com.mysql.jdbc.Driver" - url="jdbc:mysql://TFB-database:3306/hello_world" + url="jdbc:mysql://tfb-database:3306/hello_world" user="benchmarkdbuser" password="benchmarkdbpass" diff --git a/frameworks/Scala/play2-scala/play2-scala-slick/project/build.properties b/frameworks/Scala/play2-scala/play2-scala-slick/project/build.properties index 394cb75cfe9..05313438a19 100644 --- a/frameworks/Scala/play2-scala/play2-scala-slick/project/build.properties +++ b/frameworks/Scala/play2-scala/play2-scala-slick/project/build.properties @@ -1 +1 @@ -sbt.version=1.0.4 +sbt.version=1.1.2 diff --git a/frameworks/Scala/play2-scala/play2-scala.dockerfile b/frameworks/Scala/play2-scala/play2-scala.dockerfile new file mode 100644 index 00000000000..50533666b1a --- /dev/null +++ b/frameworks/Scala/play2-scala/play2-scala.dockerfile @@ -0,0 +1,17 @@ +FROM techempower/sbt:0.1 + +ADD ./play2-scala /play_app +WORKDIR /play_app + +RUN sbt stage + +CMD target/universal/stage/bin/play2-scala \ + -Dplay.server.provider=play.core.server.AkkaHttpServerProvider \ + -J-server \ + -J-Xms1g \ + -J-Xmx1g \ + -J-XX:NewSize=512m \ + -J-XX:+UseG1GC \ + -J-XX:MaxGCPauseMillis=30 \ + -J-XX:-UseBiasedLocking \ + -J-XX:+AlwaysPreTouch diff --git a/frameworks/Scala/play2-scala/play2-scala/.gitignore b/frameworks/Scala/play2-scala/play2-scala/.gitignore deleted file mode 100644 index 972f8f3dbd8..00000000000 --- a/frameworks/Scala/play2-scala/play2-scala/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -logs -project/project -project/target -public -target -test -tmp -.history -dist -conf/evolutions - -# Ignore all dotfiles... -.* -# except for .gitignore -!.gitignore - -# Ignore Play! working directory # -db -eclipse -lib -log -logs -modules -precompiled -project/project -project/target -target -tmp -test-result -server.pid -*.iml -*.eml - diff --git a/frameworks/Scala/play2-scala/play2-scala/build.sbt b/frameworks/Scala/play2-scala/play2-scala/build.sbt index 6b123025120..9d813600cd5 100644 --- a/frameworks/Scala/play2-scala/play2-scala/build.sbt +++ b/frameworks/Scala/play2-scala/play2-scala/build.sbt @@ -4,7 +4,7 @@ version := "1.0-SNAPSHOT" lazy val root = (project in file(".")).enablePlugins(PlayScala, PlayNettyServer) -scalaVersion := "2.12.4" +scalaVersion := "2.12.5" libraryDependencies ++= Seq( guice, diff --git a/frameworks/Scala/play2-scala/play2-scala/project/build.properties b/frameworks/Scala/play2-scala/play2-scala/project/build.properties index 394cb75cfe9..05313438a19 100644 --- a/frameworks/Scala/play2-scala/play2-scala/project/build.properties +++ b/frameworks/Scala/play2-scala/play2-scala/project/build.properties @@ -1 +1 @@ -sbt.version=1.0.4 +sbt.version=1.1.2 diff --git a/frameworks/Scala/play2-scala/setup_scala.sh b/frameworks/Scala/play2-scala/setup_scala.sh deleted file mode 100755 index 4915d6549ac..00000000000 --- a/frameworks/Scala/play2-scala/setup_scala.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -fw_depends java sbt - -cd play2-scala - - -rm -rf target/ project/target/ project/project/ - -# Stage application. -sbt stage - -# Execute Start script in background. -${TROOT}/play2-scala/target/universal/stage/bin/play2-scala -Dplay.server.provider=play.core.server.AkkaHttpServerProvider -J-server -J-Xms1g -J-Xmx1g -J-XX:NewSize=512m -J-XX:+UseG1GC -J-XX:MaxGCPauseMillis=30 -J-XX:-UseBiasedLocking -J-XX:+AlwaysPreTouch & diff --git a/frameworks/Scala/play2-scala/setup_scala_anorm.sh b/frameworks/Scala/play2-scala/setup_scala_anorm.sh deleted file mode 100755 index 82d11190437..00000000000 --- a/frameworks/Scala/play2-scala/setup_scala_anorm.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -fw_depends mysql java sbt - -cd play2-scala-anorm -sed -i "s|jdbc:mysql:\/\/.*:3306|jdbc:mysql://${DBHOST}:3306|g" ${TROOT}/play2-scala-anorm/conf/application.conf - -rm -rf target/ project/target/ project/project/ - -# Stage application. -sbt stage - -# Execute Start script in background. -${TROOT}/play2-scala-anorm/target/universal/stage/bin/play2-scala-anorm -Dplay.server.provider=play.core.server.AkkaHttpServerProvider & diff --git a/frameworks/Scala/play2-scala/setup_scala_anorm_netty.sh b/frameworks/Scala/play2-scala/setup_scala_anorm_netty.sh deleted file mode 100755 index 2bf9ee25939..00000000000 --- a/frameworks/Scala/play2-scala/setup_scala_anorm_netty.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -fw_depends mysql java sbt - -cd play2-scala-anorm -sed -i "s|jdbc:mysql:\/\/.*:3306|jdbc:mysql://${DBHOST}:3306|g" ${TROOT}/play2-scala-anorm/conf/application.conf - -rm -rf target/ project/target/ project/project/ - -# Stage application. -sbt stage - -# Execute Start script in background. -${TROOT}/play2-scala-anorm/target/universal/stage/bin/play2-scala-anorm -Dplay.server.provider=play.core.server.NettyServerProvider & diff --git a/frameworks/Scala/play2-scala/setup_scala_netty.sh b/frameworks/Scala/play2-scala/setup_scala_netty.sh deleted file mode 100755 index fe20d0db07e..00000000000 --- a/frameworks/Scala/play2-scala/setup_scala_netty.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -fw_depends java sbt - -cd play2-scala - - -rm -rf target/ project/target/ project/project/ - -# Stage application. -sbt stage - -# Execute Start script in background. -${TROOT}/play2-scala/target/universal/stage/bin/play2-scala -Dplay.server.provider=play.core.server.NettyServerProvider -J-server -J-Xms1g -J-Xmx1g -J-XX:NewSize=512m -J-XX:+UseG1GC -J-XX:MaxGCPauseMillis=30 -J-XX:-UseBiasedLocking -J-XX:+AlwaysPreTouch & diff --git a/frameworks/Scala/play2-scala/setup_scala_reactivemongo.sh b/frameworks/Scala/play2-scala/setup_scala_reactivemongo.sh deleted file mode 100755 index cc2b7da5a53..00000000000 --- a/frameworks/Scala/play2-scala/setup_scala_reactivemongo.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -fw_depends mongodb java sbt - -cd play2-scala-reactivemongo - - -rm -rf target/ project/target/ project/project/ - -# Stage application. -sbt stage - -# Execute Start script in background. -${TROOT}/play2-scala-reactivemongo/target/universal/stage/bin/play2-scala-reactivemongo -Dplay.server.provider=play.core.server.AkkaHttpServerProvider & diff --git a/frameworks/Scala/play2-scala/setup_scala_reactivemongo_netty.sh b/frameworks/Scala/play2-scala/setup_scala_reactivemongo_netty.sh deleted file mode 100755 index 6c8b5fb9fed..00000000000 --- a/frameworks/Scala/play2-scala/setup_scala_reactivemongo_netty.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -fw_depends mongodb java sbt - -cd play2-scala-reactivemongo - - -rm -rf target/ project/target/ project/project/ - -# Stage application. -sbt stage - -# Execute Start script in background. -${TROOT}/play2-scala-reactivemongo/target/universal/stage/bin/play2-scala-reactivemongo -Dplay.server.provider=play.core.server.NettyServerProvider & diff --git a/frameworks/Scala/play2-scala/setup_scala_slick.sh b/frameworks/Scala/play2-scala/setup_scala_slick.sh deleted file mode 100755 index e3381029a43..00000000000 --- a/frameworks/Scala/play2-scala/setup_scala_slick.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -fw_depends mysql java sbt - -cd play2-scala-slick -sed -i "s|jdbc:mysql:\/\/.*:3306|jdbc:mysql://${DBHOST}:3306|g" ${TROOT}/play2-scala-slick/conf/application.conf - -rm -rf target/ project/target/ project/project/ - -# Stage application. -sbt stage - -# Execute Start script in background. -${TROOT}/play2-scala-slick/target/universal/stage/bin/play2-scala-slick -Dplay.server.provider=play.core.server.AkkaHttpServerProvider & diff --git a/frameworks/Scala/play2-scala/setup_scala_slick_netty.sh b/frameworks/Scala/play2-scala/setup_scala_slick_netty.sh deleted file mode 100755 index 420f816ab24..00000000000 --- a/frameworks/Scala/play2-scala/setup_scala_slick_netty.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -fw_depends mysql java sbt - -cd play2-scala-slick -sed -i "s|jdbc:mysql:\/\/.*:3306|jdbc:mysql://${DBHOST}:3306|g" ${TROOT}/play2-scala-slick/conf/application.conf - -rm -rf target/ project/target/ project/project/ - -# Stage application. -sbt stage - -# Execute Start script in background. -${TROOT}/play2-scala-slick/target/universal/stage/bin/play2-scala-slick -Dplay.server.provider=play.core.server.NettyServerProvider & diff --git a/frameworks/Scala/s-server/.gitignore b/frameworks/Scala/s-server/.gitignore deleted file mode 100644 index 21c6a135378..00000000000 --- a/frameworks/Scala/s-server/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/.cache-main diff --git a/frameworks/Scala/s-server/README.md b/frameworks/Scala/s-server/README.md deleted file mode 100644 index 7b27e77ee6f..00000000000 --- a/frameworks/Scala/s-server/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# S-server Benchmarking Test - -This is the s-server portion of a [benchmarking test suite](../) comparing a variety of web development platforms. diff --git a/frameworks/Scala/s-server/benchmark_config.json b/frameworks/Scala/s-server/benchmark_config.json deleted file mode 100644 index e0542ac3042..00000000000 --- a/frameworks/Scala/s-server/benchmark_config.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "framework" : "s-server", - "tests" : [{ - "default" : { - "setup_file" : "setup", - "json_url" : "/json", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Platform", - "database": "None", - "framework": "s-server", - "language": "Scala", - "orm": "Raw", - "platform": "s-server", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "s-server", - "notes": "", - "versus": "s-server" - } - }] -} diff --git a/frameworks/Scala/s-server/build.sbt b/frameworks/Scala/s-server/build.sbt deleted file mode 100644 index 62bb7346463..00000000000 --- a/frameworks/Scala/s-server/build.sbt +++ /dev/null @@ -1,23 +0,0 @@ -name := "s-server-tfb" - -organization := "woshilaiceshide" - -scalaVersion := "2.11.8" - -version := "1.0" - -scalacOptions := Seq("-unchecked", "-deprecation","-optimise", "-encoding", "utf8", "-Yno-adapted-args", "-target:jvm-1.8") - -javacOptions ++= Seq("-Xlint:deprecation", "-Xlint:unchecked", "-source", "1.8", "-target", "1.8") - -enablePlugins(JavaAppPackaging) - -resolvers += "Woshilaiceshide Releases" at "http://dl.bintray.com/woshilaiceshide/maven/" - -libraryDependencies += "woshilaiceshide" %% "s-server" % "2.2" - -//libraryDependencies += "com.fasterxml.jackson.core" % "jackson-core" % "2.7.4" - -//libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-afterburner" % "2.7.4" - -libraryDependencies += "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.7.4" diff --git a/frameworks/Scala/s-server/project/.gitignore b/frameworks/Scala/s-server/project/.gitignore deleted file mode 100644 index 702c63b5591..00000000000 --- a/frameworks/Scala/s-server/project/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/project/ diff --git a/frameworks/Scala/s-server/project/build.properties b/frameworks/Scala/s-server/project/build.properties deleted file mode 100644 index c091b86ca46..00000000000 --- a/frameworks/Scala/s-server/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=0.13.16 diff --git a/frameworks/Scala/s-server/project/plugins.sbt b/frameworks/Scala/s-server/project/plugins.sbt deleted file mode 100644 index a935a5ab035..00000000000 --- a/frameworks/Scala/s-server/project/plugins.sbt +++ /dev/null @@ -1,9 +0,0 @@ -// Comment to get more information during initialization -logLevel := Level.Warn - -addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.2") - -addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.1") - -addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0") - diff --git a/frameworks/Scala/s-server/setup.sh b/frameworks/Scala/s-server/setup.sh deleted file mode 100755 index 5bb0a94873b..00000000000 --- a/frameworks/Scala/s-server/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends java scala sbt - -sbt stage - -./target/universal/stage/bin/s-server-tfb -J-XX:+UseBiasedLocking -J-XX:+UseParallelGC -J-XX:+AggressiveOpts & \ No newline at end of file diff --git a/frameworks/Scala/s-server/source_code b/frameworks/Scala/s-server/source_code deleted file mode 100644 index a63bfc55d2d..00000000000 --- a/frameworks/Scala/s-server/source_code +++ /dev/null @@ -1 +0,0 @@ -./s-server-tfb/src/main/scala/woshilaiceshide/sserver/tfb/Server.scala \ No newline at end of file diff --git a/frameworks/Scala/s-server/src/main/resources/application.conf b/frameworks/Scala/s-server/src/main/resources/application.conf deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frameworks/Scala/s-server/src/main/resources/logback.xml b/frameworks/Scala/s-server/src/main/resources/logback.xml deleted file mode 100644 index d7d2489e6e0..00000000000 --- a/frameworks/Scala/s-server/src/main/resources/logback.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - System.out - - %date{MM/dd HH:mm:ss.SSS} %-5level[%.15thread] %logger{1} - %msg%n - - - - - - - - diff --git a/frameworks/Scala/s-server/src/main/scala/woshilaiceshide/sserver/tfb/Server.scala b/frameworks/Scala/s-server/src/main/scala/woshilaiceshide/sserver/tfb/Server.scala deleted file mode 100644 index f07b3d10522..00000000000 --- a/frameworks/Scala/s-server/src/main/scala/woshilaiceshide/sserver/tfb/Server.scala +++ /dev/null @@ -1,125 +0,0 @@ -package woshilaiceshide.sserver.tfb - -import woshilaiceshide.sserver.http._ -import woshilaiceshide.sserver.nio._ -import spray.http._ -import spray.http.HttpEntity.apply -import spray.http.StatusCode.int2StatusCode - -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.module.scala._ - -object Server extends App { - - val log = org.slf4j.LoggerFactory.getLogger(Server.getClass); - - val mapper = new ObjectMapper() - mapper.registerModule(DefaultScalaModule) - final case class Message(message: String) - - import scala.concurrent._ - val executor = java.util.concurrent.Executors.newSingleThreadExecutor() - implicit val ec = ExecutionContext.fromExecutor(executor) - - val handler = new HttpChannelHandler { - - private val ping = new HttpResponse(200, HttpEntity(ContentTypes.`text/plain`, "Hello World")) - private def write_ping(channel: HttpChannel) = { - channel.writeResponse(ping) - ResponseAction.responseNormally - } - private val path_ping = Uri.Path("/ping") - - private val phelloworld = new HttpResponse(200, HttpEntity(ContentTypes.`text/plain`, "Hello, World!")) - private def write_phelloworld(channel: HttpChannel) = { - channel.writeResponse(phelloworld) - ResponseAction.responseNormally - } - private val path_plaintext = Uri.Path("/plaintext") - - //JsObject("message" -> JsString("Hello, World!")) - private val path_json = Uri.Path("/json") - private def jhelloworld = new HttpResponse(200, HttpEntity(ContentTypes.`application/json`, mapper.writeValueAsBytes(Message("Hello, World!")))) - private def write_jhelloworld(channel: HttpChannel) = { - channel.writeResponse(jhelloworld) - ResponseAction.responseNormally - } - - private def write_404(channel: HttpChannel) = { - channel.writeResponse { new HttpResponse(404) } - ResponseAction.responseNormally - } - - private def write_400(channel: HttpChannel) = { - channel.writeResponse { new HttpResponse(400) } - ResponseAction.responseNormally - } - - private val ping_asynchronously = new HttpResponse(200, HttpEntity(ContentTypes.`text/plain`, "Hello World Asynchronously")) - private def write_ping_asynchronously(channel: HttpChannel) = { - //channel.post_to_io_thread { channel.writeResponse(ping_asynchronously) } - Future { channel.writeResponse(ping_asynchronously) } - ResponseAction.responseNormally - } - - def requestReceived(request: HttpRequest, channel: HttpChannel, classifier: RequestClassifier): ResponseAction = request match { - - case HttpRequest(HttpMethods.GET, uri, _, _, _) if uri.path == path_json => write_jhelloworld(channel) - - case HttpRequest(HttpMethods.GET, uri, _, _, _) if uri.path == path_plaintext => write_phelloworld(channel) - - case HttpRequest(HttpMethods.GET, uri, _, _, _) if uri.path == path_ping => write_ping(channel) - - case HttpRequest(HttpMethods.GET, Uri.Path("/ping_asynchronously"), _, _, _) => write_ping_asynchronously(channel) - - case _: HttpRequest => write_404(channel) - } - - } - - val http_configurator = new HttpConfigurator(max_request_in_pipeline = 8, use_direct_byte_buffer_for_cached_bytes_rendering = false) - - val factory = new HttpChannelHandlerFactory(handler, http_configurator) - - val listening_channel_configurator: ServerSocketChannelWrapper => Unit = wrapper => { - wrapper.setOption[java.lang.Boolean](java.net.StandardSocketOptions.SO_REUSEADDR, true) - wrapper.setBacklog(1024 * 8) - } - - val accepted_channel_configurator: SocketChannelWrapper => Unit = wrapper => { - wrapper.setOption[java.lang.Boolean](java.net.StandardSocketOptions.TCP_NODELAY, true) - } - - /* - val threadFactory = new java.util.concurrent.ThreadFactory() { - def newThread(r: Runnable) = { - new Thread(r) - } - } - val mt = new MultipleThreadHandlerFactory(1, threadFactory, Integer.MAX_VALUE, factory) - */ - - val configurator = XNioConfigurator(count_for_reader_writers = Runtime.getRuntime().availableProcessors() - 1, //2, - listening_channel_configurator = listening_channel_configurator, - accepted_channel_configurator = accepted_channel_configurator, - //buffer_pool_factory = DefaultByteBufferPoolFactory(1, 1, true), - //buffer_pool_factory = DefaultByteBufferPoolFactory(512, 64, true), - //more i/o, more asynchronously, then make it bigger - buffer_pool_factory = DefaultByteBufferPoolFactory(512, 64, true), - io_thread_factory = new woshilaiceshide.sserver.http.AuxThreadFactory()) - - val port = 8080 - - val server = NioSocketServer( - "0.0.0.0", - port, - factory, - configurator) - - server.register_on_termination { - executor.shutdown() - } - - server.start(false) - -} \ No newline at end of file diff --git a/frameworks/Scala/scruffy/.gitignore b/frameworks/Scala/scruffy/.gitignore deleted file mode 100644 index 98d582e45dc..00000000000 --- a/frameworks/Scala/scruffy/.gitignore +++ /dev/null @@ -1,48 +0,0 @@ -## generic files to ignore -*~ -*.lock -*.DS_Store -*.swp -*.out - -# java specific -*.class - -# python specific -*.pyc - -# sbt specific -target/ -project/boot -lib_managed/* -project/build/target -project/build/lib_managed -project/build/src_managed -project/plugins/lib_managed -project/plugins/target -project/plugins/src_managed -project/plugins/project - -core/lib_managed -core/target -pubsub/lib_managed -pubsub/target - -# eclipse specific -.metadata -jrebel.lic -.settings -.classpath -.project - -.ensime* -*.sublime-* -.cache - -# intellij -*.eml -*.iml -*.ipr -*.iws -.*.sw? -.idea diff --git a/frameworks/Scala/scruffy/README.md b/frameworks/Scala/scruffy/README.md deleted file mode 100644 index c20472a454b..00000000000 --- a/frameworks/Scala/scruffy/README.md +++ /dev/null @@ -1,34 +0,0 @@ -#Scruffy Benchmarking Test - -This is the Scruffy portion of a [benchmarking test suite](../) comparing a variety of web development platforms. - -## Infrastructure Software Versions - -The tests were run with: - -* [Java OpenJDK 1.7.0_09](http://openjdk.java.net/) -* [Scruffy 1.13.0](http://scruffy-project.github.io/) - -## Test URLs - -### Test type 1: JSON serialization - -http://localhost:8080/json - -This example uses the built-in Jackson for json support. - -* [Test 1 source](src/main/scala/scruffy/examples/Test1Endpoint.scala) - -### Test type 2: Single database query - -This example uses casbah for Mongo queries. Future improvement would be to switch to a nonblocking library. - -* [Test 2 source](src/main/scala/scruffy/examples/Test2Endpoint.scala) - -http://localhost:8080/db - -### Test type 6: Plaintext - -http://localhost:8080/plaintext - -* [Test 6 source](src/main/scala/scruffy/examples/Test6Endpoint.scala) \ No newline at end of file diff --git a/frameworks/Scala/scruffy/benchmark_config.json b/frameworks/Scala/scruffy/benchmark_config.json deleted file mode 100644 index 15d20d7b8d8..00000000000 --- a/frameworks/Scala/scruffy/benchmark_config.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "framework": "scruffy", - "tests": [{ - "default": { - "setup_file": "setup", - "json_url": "/json", - "db_url": "/db", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "MongoDB", - "framework": "scruffy", - "language": "Scala", - "orm": "Raw", - "platform": "Undertow", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "scruffy", - "notes": "", - "versus": "undertow" - } - }] -} diff --git a/frameworks/Scala/scruffy/build.sbt b/frameworks/Scala/scruffy/build.sbt deleted file mode 100644 index 41ec104209a..00000000000 --- a/frameworks/Scala/scruffy/build.sbt +++ /dev/null @@ -1,14 +0,0 @@ -name := "scruffy-benchmark" - -organization := "com.sksamuel.scruffy" - -scalaVersion := "2.11.12" - -version := "11.0" // version 0 for round 11 - -libraryDependencies ++= Seq( - "com.sksamuel.scruffy" %% "scruffy-undertow" % "1.13.0", - "com.sksamuel.scruffy" %% "scruffy-jackson" % "1.13.0", - "com.sksamuel.scruffy" %% "scruffy-client" % "1.13.0" % "test", - "org.mongodb" %% "casbah-core" % "2.8.0" -) diff --git a/frameworks/Scala/scruffy/project/build.properties b/frameworks/Scala/scruffy/project/build.properties deleted file mode 100644 index 394cb75cfe9..00000000000 --- a/frameworks/Scala/scruffy/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.0.4 diff --git a/frameworks/Scala/scruffy/project/plugins.sbt b/frameworks/Scala/scruffy/project/plugins.sbt deleted file mode 100644 index 652a3b93be3..00000000000 --- a/frameworks/Scala/scruffy/project/plugins.sbt +++ /dev/null @@ -1 +0,0 @@ -addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") diff --git a/frameworks/Scala/scruffy/setup.sh b/frameworks/Scala/scruffy/setup.sh deleted file mode 100755 index 605d1075bc7..00000000000 --- a/frameworks/Scala/scruffy/setup.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends mongodb java sbt - -sed -i 's|127.0.0.1|'${DBHOST}'|g' src/main/scala/scruffy/examples/Test2Endpoint.scala - -sbt assembly - -java -jar target/scala-2.11/scruffy-benchmark-assembly-11.0.jar -Dhostname=${DBHOST} & diff --git a/frameworks/Scala/scruffy/source_code b/frameworks/Scala/scruffy/source_code deleted file mode 100644 index cbd11ed00f1..00000000000 --- a/frameworks/Scala/scruffy/source_code +++ /dev/null @@ -1,4 +0,0 @@ -./scruffy/src/main/scala/scruffy/examples/ -./scruffy/src/main/scala/scruffy/examples/Main.scala -./scruffy/src/main/scala/scruffy/examples/Test1Route.scala -./scruffy/src/main/scala/scruffy/examples/Test6Route.scala diff --git a/frameworks/Scala/scruffy/src/main/scala/scruffy/examples/Main.scala b/frameworks/Scala/scruffy/src/main/scala/scruffy/examples/Main.scala deleted file mode 100644 index 21f47f61943..00000000000 --- a/frameworks/Scala/scruffy/src/main/scala/scruffy/examples/Main.scala +++ /dev/null @@ -1,31 +0,0 @@ -package scruffy.examples - -import com.sksamuel.scruffy.ScruffyContext -import com.sksamuel.scruffy.undertow.ScruffyUndertowHttpHandler -import io.undertow.{Undertow, UndertowOptions} - -/** @author Stephen Samuel */ -object Main extends App { - - import scala.concurrent.ExecutionContext.Implicits.global - - val port = 8080 - - val context = ScruffyContext(Test1Endpoint, Test2Endpoint, Test6Endpoint) - val handler = new ScruffyUndertowHttpHandler(context) - - val server = Undertow - .builder() - .addHttpListener(port, "0.0.0.0") - .setHandler(handler) - .setServerOption(UndertowOptions.ALWAYS_SET_KEEP_ALIVE, java.lang.Boolean.FALSE) - .setServerOption(UndertowOptions.ALWAYS_SET_DATE, java.lang.Boolean.TRUE) - .setServerOption(UndertowOptions.ENABLE_CONNECTOR_STATISTICS, java.lang.Boolean.FALSE) - .setServerOption(UndertowOptions.MAX_CONCURRENT_REQUESTS_PER_CONNECTION, Integer.valueOf(8)) - - .build() - - println("Starting Scruffy on Undertow...") - server.start() - println(s"Started on port [$port]. Interrupt to exit.") -} diff --git a/frameworks/Scala/scruffy/src/main/scala/scruffy/examples/Test1Endpoint.scala b/frameworks/Scala/scruffy/src/main/scala/scruffy/examples/Test1Endpoint.scala deleted file mode 100644 index 337ebb5ed0e..00000000000 --- a/frameworks/Scala/scruffy/src/main/scala/scruffy/examples/Test1Endpoint.scala +++ /dev/null @@ -1,15 +0,0 @@ -package scruffy.examples - -import com.sksamuel.scruffy.HttpModule - -/** @author Stephen Samuel */ -object Test1Endpoint extends HttpModule { - - import com.sksamuel.scruffy.jackson.ScruffyJackson.Implicits._ - - get("json") { req => - Message("Hello, World!").json - } -} - -case class Message(message: String) \ No newline at end of file diff --git a/frameworks/Scala/scruffy/src/main/scala/scruffy/examples/Test2Endpoint.scala b/frameworks/Scala/scruffy/src/main/scala/scruffy/examples/Test2Endpoint.scala deleted file mode 100755 index 8169e4ee2cd..00000000000 --- a/frameworks/Scala/scruffy/src/main/scala/scruffy/examples/Test2Endpoint.scala +++ /dev/null @@ -1,31 +0,0 @@ -package scruffy.examples - -import java.util.concurrent.ThreadLocalRandom - -import com.mongodb.casbah.Imports._ -import com.sksamuel.scruffy.HttpModule - -/** @author Stephen Samuel */ -object Test2Endpoint extends HttpModule { - - import com.sksamuel.scruffy.jackson.ScruffyJackson.Implicits._ - - val hostname = "127.0.0.1" - val connection = MongoConnection(hostname, 27017) - val collection = connection.getDB("hello_world").getCollection("world") - - val fields = DBObject("_id" -> true, "randomNumber" -> true) - - //uncomment to populate - //for ( k <- 1 to 10000 ) - // collection.save(DBObject("_id" -> k, "id" -> k, "randomNumber" -> random.nextInt(10000).toDouble)) - - get("db") { req => - val id = 1 + ThreadLocalRandom.current.nextInt(10000) - val dbo = collection.findOne(DBObject("_id" -> id), fields) - val randomNumber = Math.round(dbo.get("randomNumber").toString.toFloat) - Output(id, randomNumber).json - } -} - -case class Output(id: Int, randomNumber: Int) diff --git a/frameworks/Scala/scruffy/src/main/scala/scruffy/examples/Test6Endpoint.scala b/frameworks/Scala/scruffy/src/main/scala/scruffy/examples/Test6Endpoint.scala deleted file mode 100644 index e391f0a8625..00000000000 --- a/frameworks/Scala/scruffy/src/main/scala/scruffy/examples/Test6Endpoint.scala +++ /dev/null @@ -1,12 +0,0 @@ -package scruffy.examples - -import com.sksamuel.scruffy.HttpModule -import com.sksamuel.scruffy.http.MediaType - -/** @author Stephen Samuel */ -object Test6Endpoint extends HttpModule { - - get("plaintext") { req => - ok("Hello, World!", MediaType.TextPlain) - } -} diff --git a/frameworks/Scala/scruffy/src/test/scala/BenchmarkVerify.scala b/frameworks/Scala/scruffy/src/test/scala/BenchmarkVerify.scala deleted file mode 100644 index 1066fe54f7b..00000000000 --- a/frameworks/Scala/scruffy/src/test/scala/BenchmarkVerify.scala +++ /dev/null @@ -1,39 +0,0 @@ -import com.sksamuel.scruffy.client.ScruffyClient - -import scala.concurrent.duration._ -import scala.concurrent.{Await, Future} - -object BenchmarkVerify extends App { - - import scala.concurrent.ExecutionContext.Implicits.global - - val client = ScruffyClient() - - val sw = Stopwatch() - - val futures = for ( k <- 1 to 30000 ) yield { - client.get("http://localhost:8080/json").execute - } - - val f = Future.sequence(futures) - Await.result(f, 1.minute) - - sw.printMillis() - - client.close() -} - -case class Stopwatch() { - - val start = System.currentTimeMillis - - def duration: FiniteDuration = { - val end = System.currentTimeMillis - (end - start).millis - } - - def seconds: Long = duration.toSeconds - def millis: Long = duration.toMillis - - def printMillis(): Unit = println(s"Time ${millis}ms") -} \ No newline at end of file diff --git a/frameworks/Scala/spray/.gitignore b/frameworks/Scala/spray/.gitignore deleted file mode 100644 index 678870cd34c..00000000000 --- a/frameworks/Scala/spray/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/project/.* -/project/target -/target -/.project -/.classpath -/.cache diff --git a/frameworks/Scala/spray/benchmark_config.json b/frameworks/Scala/spray/benchmark_config.json deleted file mode 100644 index e9978d41df8..00000000000 --- a/frameworks/Scala/spray/benchmark_config.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "framework" : "spray", - "tests" : [{ - "default" : { - "setup_file" : "setup", - "json_url" : "/json", - "plaintext_url": "/plaintext", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "None", - "framework": "spray", - "language": "Scala", - "orm": "Raw", - "platform": "Akka", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "spray", - "notes": "", - "versus": "" - } - }] -} diff --git a/frameworks/Scala/spray/build.sbt b/frameworks/Scala/spray/build.sbt deleted file mode 100644 index ebc92111537..00000000000 --- a/frameworks/Scala/spray/build.sbt +++ /dev/null @@ -1,19 +0,0 @@ -name := "spray-benchmark" - -organization := "io.spray" - -scalaVersion := "2.11.12" - -version := "1.0" - -resolvers ++= Seq( - "spray repo" at "http://repo.spray.io/" -) - -libraryDependencies ++= Seq( - "io.spray" %% "spray-json" % "1.3.1", - "io.spray" %% "spray-can" % "1.3.1", - "com.typesafe.akka" %% "akka-actor" % "2.4.7", - "com.typesafe.akka" %% "akka-slf4j" % "2.4.7", - "ch.qos.logback"% "logback-classic" % "1.0.12" % "runtime" -) diff --git a/frameworks/Scala/spray/project/build.properties b/frameworks/Scala/spray/project/build.properties deleted file mode 100644 index 394cb75cfe9..00000000000 --- a/frameworks/Scala/spray/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.0.4 diff --git a/frameworks/Scala/spray/project/plugins.sbt b/frameworks/Scala/spray/project/plugins.sbt deleted file mode 100644 index 652a3b93be3..00000000000 --- a/frameworks/Scala/spray/project/plugins.sbt +++ /dev/null @@ -1 +0,0 @@ -addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") diff --git a/frameworks/Scala/spray/setup.sh b/frameworks/Scala/spray/setup.sh deleted file mode 100755 index 7832797c1ef..00000000000 --- a/frameworks/Scala/spray/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends java scala sbt - -sbt assembly -batch - -java -jar target/scala-2.11/spray-benchmark-assembly-1.0.jar & diff --git a/frameworks/Scala/spray/source_code b/frameworks/Scala/spray/source_code deleted file mode 100644 index d89f2a0b7d6..00000000000 --- a/frameworks/Scala/spray/source_code +++ /dev/null @@ -1,3 +0,0 @@ -./spray/src/main/scala/spray/examples/ -./spray/src/main/scala/spray/examples/Main.scala -./spray/src/main/scala/spray/examples/BenchmarkService.scala diff --git a/frameworks/Scala/spray/src/main/resources/application.conf b/frameworks/Scala/spray/src/main/resources/application.conf deleted file mode 100644 index ca36824d3d9..00000000000 --- a/frameworks/Scala/spray/src/main/resources/application.conf +++ /dev/null @@ -1,28 +0,0 @@ -akka { - loglevel = INFO - event-handlers = ["akka.event.slf4j.Slf4jEventHandler"] - - actor { - default-dispatcher { - fork-join-executor { - # Min number of threads to cap factor-based parallelism number to - parallelism-min = 1 - parallelism-factor = 1 - } - } - } -} - -# check the reference.conf in spray-can/src/main/resources for all defined settings -spray.can.server { - pipelining-limit = disabled - reaping-cycle = infinite - request-chunk-aggregation-limit = 0 - stats-support = off - response-size-hint = 192 -} - -app { - interface = "0.0.0.0" - port = 8080 -} diff --git a/frameworks/Scala/spray/src/main/resources/logback.xml b/frameworks/Scala/spray/src/main/resources/logback.xml deleted file mode 100644 index d7d2489e6e0..00000000000 --- a/frameworks/Scala/spray/src/main/resources/logback.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - System.out - - %date{MM/dd HH:mm:ss.SSS} %-5level[%.15thread] %logger{1} - %msg%n - - - - - - - - diff --git a/frameworks/Scala/spray/src/main/scala/spray/examples/BenchmarkService.scala b/frameworks/Scala/spray/src/main/scala/spray/examples/BenchmarkService.scala deleted file mode 100644 index 58f7e30b213..00000000000 --- a/frameworks/Scala/spray/src/main/scala/spray/examples/BenchmarkService.scala +++ /dev/null @@ -1,56 +0,0 @@ -package spray.examples - -import akka.actor._ -import scala.concurrent.duration._ -import spray.can.Http -import spray.json._ -import spray.http._ -import spray.util._ -import MediaTypes._ -import HttpMethods._ -import StatusCodes._ - -class BenchmarkService extends Actor { - import context.dispatcher - import Uri._ - import Uri.Path._ - val message = "Hello, World!".getAsciiBytes - val unknownResource = HttpResponse(NotFound, entity = "Unknown resource!") - - def fastPath: Http.FastPath = { - case HttpRequest(GET, Uri(_, _, Slash(Segment(x, Path.Empty)), _, _), _, _, _) => - x match { - case "json" => - val json = JsObject("message" -> JsString("Hello, World!")) - HttpResponse(entity = HttpEntity(ContentTypes.`application/json`, json.compactPrint)) - case "plaintext" => HttpResponse(entity = HttpEntity(ContentTypes.`text/plain`, message)) - case "stop" => - context.system.scheduler.scheduleOnce(1.second) { context.system.shutdown() } - HttpResponse(entity = "Shutting down in 1 second ...") - case _ => unknownResource - } - } - - def receive = { - // when a new connection comes in we register ourselves as the connection handler - case _: Http.Connected => sender ! Http.Register(self, fastPath = fastPath) - - // case HttpRequest(GET, Path("/"), _, _, _) => sender ! HttpResponse( - // entity = HttpEntity(MediaTypes.`text/html`, - // - // - //

Tiny spray-can benchmark server

- //

Defined resources:

- // - // - // .toString() - // ) - // ) - - case _: HttpRequest => sender ! unknownResource - } -} diff --git a/frameworks/Scala/spray/src/main/scala/spray/examples/Main.scala b/frameworks/Scala/spray/src/main/scala/spray/examples/Main.scala deleted file mode 100644 index 2fe30e729ed..00000000000 --- a/frameworks/Scala/spray/src/main/scala/spray/examples/Main.scala +++ /dev/null @@ -1,17 +0,0 @@ -package spray.examples - -import akka.actor._ -import akka.io.IO -import spray.can.Http - -object Main extends App { - - implicit val system = ActorSystem() - - // the handler actor replies to incoming HttpRequests - val handler = system.actorOf(Props[BenchmarkService], name = "handler") - - val interface = system.settings.config.getString("app.interface") - val port = system.settings.config.getInt("app.port") - IO(Http) ! Http.Bind(handler, interface, port) -} diff --git a/frameworks/Swift/vapor/Config/secrets/mongo.json b/frameworks/Swift/vapor/Config/secrets/mongo.json index e13d8a77e10..043950486a0 100644 --- a/frameworks/Swift/vapor/Config/secrets/mongo.json +++ b/frameworks/Swift/vapor/Config/secrets/mongo.json @@ -1,3 +1,3 @@ { - "url": "mongodb://TFB-database:27017/hello_world" -} + "url": "mongodb://tfb-database:27017/hello_world" +} \ No newline at end of file diff --git a/frameworks/Swift/vapor/Config/secrets/mysql.json b/frameworks/Swift/vapor/Config/secrets/mysql.json index 18c1223b1a0..2d5ea2555f5 100644 --- a/frameworks/Swift/vapor/Config/secrets/mysql.json +++ b/frameworks/Swift/vapor/Config/secrets/mysql.json @@ -1,3 +1,3 @@ { - "url": "mysql://benchmarkdbuser:benchmarkdbpass@TFB-database:3306/hello_world" -} + "url": "mysql://benchmarkdbuser:benchmarkdbpass@tfb-database:3306/hello_world" +} \ No newline at end of file diff --git a/frameworks/Swift/vapor/Config/secrets/postgresql.json b/frameworks/Swift/vapor/Config/secrets/postgresql.json index a1c1a116a25..ae3c3b152a9 100644 --- a/frameworks/Swift/vapor/Config/secrets/postgresql.json +++ b/frameworks/Swift/vapor/Config/secrets/postgresql.json @@ -1,3 +1,3 @@ { - "url": "psql://benchmarkdbuser:benchmarkdbpass@TFB-database:5432/hello_world" -} + "url": "psql://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world" +} \ No newline at end of file diff --git a/frameworks/Swift/vapor/benchmark_config.json b/frameworks/Swift/vapor/benchmark_config.json index 24530290d23..9325514443f 100644 --- a/frameworks/Swift/vapor/benchmark_config.json +++ b/frameworks/Swift/vapor/benchmark_config.json @@ -2,7 +2,6 @@ "framework": "vapor", "tests": [{ "default": { - "setup_file": "setup-mysql", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -26,7 +25,6 @@ "versus": "" }, "postgresql": { - "setup_file": "setup-postgresql", "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -50,7 +48,6 @@ "versus": "" }, "mongodb": { - "setup_file": "setup-mongodb", "json_url": "/json", "db_url": "/db", "fortune_url": "/fortunes", diff --git a/frameworks/Swift/vapor/setup-mongodb.sh b/frameworks/Swift/vapor/setup-mongodb.sh deleted file mode 100644 index d45251425a8..00000000000 --- a/frameworks/Swift/vapor/setup-mongodb.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends swift ctls cmysql mongodb - -swift build -Xswiftc -DNOJSON -c release - -.build/release/vapor-tfb-mongodb --env=production & diff --git a/frameworks/Swift/vapor/setup-mysql.sh b/frameworks/Swift/vapor/setup-mysql.sh deleted file mode 100644 index 55611422730..00000000000 --- a/frameworks/Swift/vapor/setup-mysql.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends swift ctls cmysql mysql - -swift build -Xswiftc -DNOJSON -c release - -.build/release/vapor-tfb-mysql --env=production & diff --git a/frameworks/Swift/vapor/setup-postgresql.sh b/frameworks/Swift/vapor/setup-postgresql.sh deleted file mode 100644 index 2d0d92f6a31..00000000000 --- a/frameworks/Swift/vapor/setup-postgresql.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -fw_depends swift ctls cmysql postgresql - -swift build -Xswiftc -DNOJSON -c release - -.build/release/vapor-tfb-postgresql --env=production & diff --git a/frameworks/Swift/vapor/vapor-base.dockerfile b/frameworks/Swift/vapor/vapor-base.dockerfile new file mode 100644 index 00000000000..7b63879761e --- /dev/null +++ b/frameworks/Swift/vapor/vapor-base.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/swift:0.1 + +ADD ./ /vapor +WORKDIR /vapor +RUN curl -sL -o apt.vapor.sh https://apt.vapor.sh +RUN bash apt.vapor.sh +RUN apt-get install -y ctls cmysql +RUN swift build -Xswiftc -DNOJSON -c release diff --git a/frameworks/Swift/vapor/vapor-mongodb.dockerfile b/frameworks/Swift/vapor/vapor-mongodb.dockerfile new file mode 100644 index 00000000000..ff1e10f8305 --- /dev/null +++ b/frameworks/Swift/vapor/vapor-mongodb.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/vapor-base:0.1 + +CMD .build/release/vapor-tfb-mongodb --env=production diff --git a/frameworks/Swift/vapor/vapor-postgresql.dockerfile b/frameworks/Swift/vapor/vapor-postgresql.dockerfile new file mode 100644 index 00000000000..2c1cebc19a9 --- /dev/null +++ b/frameworks/Swift/vapor/vapor-postgresql.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/vapor-base:0.1 + +CMD .build/release/vapor-tfb-postgresql --env=production diff --git a/frameworks/Swift/vapor/vapor.dockerfile b/frameworks/Swift/vapor/vapor.dockerfile new file mode 100644 index 00000000000..bdf09665342 --- /dev/null +++ b/frameworks/Swift/vapor/vapor.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/vapor-base:0.1 + +CMD .build/release/vapor-tfb-mysql --env=production diff --git a/frameworks/Ur/urweb/setup-postgresql.sh b/frameworks/Ur/urweb/setup-postgresql.sh deleted file mode 100644 index af9ca304e8a..00000000000 --- a/frameworks/Ur/urweb/setup-postgresql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -fw_depends postgresql - -source ./setup.sh diff --git a/frameworks/Ur/urweb/setup.sh b/frameworks/Ur/urweb/setup.sh deleted file mode 100755 index 883e8cfe56a..00000000000 --- a/frameworks/Ur/urweb/setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -fw_depends urweb - -urweb -db "dbname=hello_world user=benchmarkdbuser password=benchmarkdbpass host=${DBHOST}" bench - -MAX_THREADS=$((2 * $CPU_COUNT)) -./bench.exe -q -k -t ${MAX_THREADS} & diff --git a/frameworks/Ur/urweb/setup_mysql.sh b/frameworks/Ur/urweb/setup_mysql.sh deleted file mode 100755 index fdc59a152f8..00000000000 --- a/frameworks/Ur/urweb/setup_mysql.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_depends urweb mysql - -export URWEB_HOME=${IROOT}/urweb -export LD_LIBRARY_PATH=${URWEB_HOME}/lib - -${URWEB_HOME}/bin/urweb -dbms mysql -db "dbname=hello_world user=benchmarkdbuser password=benchmarkdbpass host=${DBHOST}" bench - -MAX_THREADS=$((2 * $CPU_COUNT)) -./bench.exe -q -k -t ${MAX_THREADS} & diff --git a/frameworks/Ur/urweb/urweb-base.dockerfile b/frameworks/Ur/urweb/urweb-base.dockerfile new file mode 100644 index 00000000000..0281afa5165 --- /dev/null +++ b/frameworks/Ur/urweb/urweb-base.dockerfile @@ -0,0 +1,19 @@ +FROM techempower/base:0.1 + +COPY ./ ./ + +ENV URWEB_VERSION=20160621 +ENV COMPILER=/urweb-build + +RUN apt install -yqq mlton libssl-dev libpq-dev libmysqlclient-dev +RUN mkdir -p $COMPILER && \ + wget -q http://www.impredicative.com/ur/urweb-$URWEB_VERSION.tgz && \ + tar xf urweb-$URWEB_VERSION.tgz && \ + cd urweb-$URWEB_VERSION && \ + ./configure --prefix=$COMPILER && \ + make && \ + make install + +ENV URWEB_HOME=${COMPILER} +ENV LD_LIBRARY_PATH=${COMPILER}/lib +ENV PATH=${COMPILER}/bin:${PATH} diff --git a/frameworks/Ur/urweb/urweb-mysql.dockerfile b/frameworks/Ur/urweb/urweb-mysql.dockerfile new file mode 100644 index 00000000000..5a400c62ed7 --- /dev/null +++ b/frameworks/Ur/urweb/urweb-mysql.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/urweb-base:0.1 + +RUN urweb -dbms mysql -db "dbname=hello_world user=benchmarkdbuser password=benchmarkdbpass host=tfb-database" bench + +CMD ./bench.exe -q -k -t $((2 * $(nproc))) diff --git a/frameworks/Ur/urweb/urweb.dockerfile b/frameworks/Ur/urweb/urweb.dockerfile new file mode 100644 index 00000000000..b26680e935c --- /dev/null +++ b/frameworks/Ur/urweb/urweb.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/urweb-base:0.1 + +RUN urweb -db "dbname=hello_world user=benchmarkdbuser password=benchmarkdbpass host=tfb-database" bench + +CMD ./bench.exe -q -k -t $((2 * $(nproc))) diff --git a/frameworks/Vala/valum/app.vala b/frameworks/Vala/valum/app.vala index 080d88a2f16..f6618730042 100644 --- a/frameworks/Vala/valum/app.vala +++ b/frameworks/Vala/valum/app.vala @@ -28,4 +28,4 @@ app.get ("/json", accept ("application/json", (req, res, next, stack) => { return res.expand (gen.to_data (null).data); })); -Server.@new ("http", handler: app).run (); +Server.@new ("http", handler: app).run ({"app", "--address=0.0.0.0:8080"}); diff --git a/frameworks/Vala/valum/benchmark_config.json b/frameworks/Vala/valum/benchmark_config.json index 7eabcda70d4..eaf266823a0 100644 --- a/frameworks/Vala/valum/benchmark_config.json +++ b/frameworks/Vala/valum/benchmark_config.json @@ -2,10 +2,9 @@ "framework": "valum", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", - "port": 3003, + "port": 8080, "approach": "Realistic", "classification": "Micro", "database": "MySQL", diff --git a/frameworks/Vala/valum/run.sh b/frameworks/Vala/valum/run.sh new file mode 100644 index 00000000000..33ec49496db --- /dev/null +++ b/frameworks/Vala/valum/run.sh @@ -0,0 +1,2 @@ +#!/bin/bash +build/app --forks=$(nproc --ignore 1) diff --git a/frameworks/Vala/valum/setup.sh b/frameworks/Vala/valum/setup.sh deleted file mode 100755 index 9de3cc99762..00000000000 --- a/frameworks/Vala/valum/setup.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends meson vala valum libjson-glib-dev - -rm -rf build -meson --buildtype=release build -ninja -C build - -build/app --forks=$(nproc --ignore 1) & diff --git a/frameworks/Vala/valum/valum.dockerfile b/frameworks/Vala/valum/valum.dockerfile new file mode 100644 index 00000000000..97465846d68 --- /dev/null +++ b/frameworks/Vala/valum/valum.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/vala:0.1 + +ADD ./ /valum_app +WORKDIR /valum_app + +RUN meson --buildtype=release build +RUN ninja -C build + +CMD bash run.sh diff --git a/frameworks/Vala/vsgi/app.vala b/frameworks/Vala/vsgi/app.vala index c78b4b02d3a..75f7b5d384a 100644 --- a/frameworks/Vala/vsgi/app.vala +++ b/frameworks/Vala/vsgi/app.vala @@ -30,4 +30,4 @@ public class App : Handler } } -Server.new ("http", handler: new App ()).run (); +Server.new ("http", handler: new App ()).run ({"app", "--address=0.0.0.0:8080"}); diff --git a/frameworks/Vala/vsgi/benchmark_config.json b/frameworks/Vala/vsgi/benchmark_config.json index 1baeceb048e..27a671fd1a9 100644 --- a/frameworks/Vala/vsgi/benchmark_config.json +++ b/frameworks/Vala/vsgi/benchmark_config.json @@ -2,10 +2,9 @@ "framework": "vsgi", "tests": [{ "default": { - "setup_file": "setup", "json_url": "/json", "plaintext_url": "/plaintext", - "port": 3003, + "port": 8080, "approach": "Realistic", "classification": "Platform", "database": "MySQL", diff --git a/frameworks/Vala/vsgi/run.sh b/frameworks/Vala/vsgi/run.sh new file mode 100644 index 00000000000..33ec49496db --- /dev/null +++ b/frameworks/Vala/vsgi/run.sh @@ -0,0 +1,2 @@ +#!/bin/bash +build/app --forks=$(nproc --ignore 1) diff --git a/frameworks/Vala/vsgi/setup.sh b/frameworks/Vala/vsgi/setup.sh deleted file mode 100644 index 5e033d80a06..00000000000 --- a/frameworks/Vala/vsgi/setup.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_depends meson vala valum libjson-glib-dev - -rm -rf build -meson --buildtype=release build -ninja -C build - -build/app --forks=$(nproc --ignore=1) & diff --git a/frameworks/Vala/vsgi/vsgi.dockerfile b/frameworks/Vala/vsgi/vsgi.dockerfile new file mode 100644 index 00000000000..d9ed5befd3c --- /dev/null +++ b/frameworks/Vala/vsgi/vsgi.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/vala:0.1 + +ADD ./ /vsgi_app +WORKDIR /vsgi_app + +RUN meson --buildtype=release build +RUN ninja -C build + +CMD bash run.sh diff --git a/toolset/benchmark/benchmarker.py b/toolset/benchmark/benchmarker.py index 6a7c22c1a02..fcbeffee81c 100644 --- a/toolset/benchmark/benchmarker.py +++ b/toolset/benchmark/benchmarker.py @@ -1,702 +1,309 @@ -from setup.linux import setup_util - -from benchmark import framework_test -from benchmark.test_types import * -from utils import header -from utils import gather_tests -from utils import gather_frameworks -from utils import verify_database_connections +from toolset.utils.output_helper import log, FNULL +from toolset.utils.metadata_helper import gather_tests, gather_remaining_tests +from toolset.utils import docker_helper import os -import uuid -import shutil -import stat -import json -import requests import subprocess import traceback -import time -import pprint -import csv -import sys -import logging import socket -import threading -import textwrap +import time +import json +import shlex from pprint import pprint -from contextlib import contextmanager +from colorama import Fore -from multiprocessing import Process - -from datetime import datetime - -# Cross-platform colored text -from colorama import Fore, Back, Style - -# Text-based progress indicators -import progressbar class Benchmarker: + def __init__(self, config, results): + ''' + Initialize the benchmarker. + ''' + self.config = config + self.results = results ########################################################################################## # Public methods ########################################################################################## - ############################################################ - # Prints all the available tests - ############################################################ - def run_list_tests(self): - all_tests = self.__gather_tests - - for test in all_tests: - print(test.name) - - self.__finish() - ############################################################ - # End run_list_tests - ############################################################ - - ############################################################ - # Prints the metadata for all the available tests - ############################################################ - def run_list_test_metadata(self): - all_tests = self.__gather_tests - all_tests_json = json.dumps(map(lambda test: { - "name": test.name, - "approach": test.approach, - "classification": test.classification, - "database": test.database, - "framework": test.framework, - "language": test.language, - "orm": test.orm, - "platform": test.platform, - "webserver": test.webserver, - "os": test.os, - "database_os": test.database_os, - "display_name": test.display_name, - "notes": test.notes, - "versus": test.versus - }, all_tests)) - - with open(os.path.join(self.full_results_directory(), "test_metadata.json"), "w") as f: - f.write(all_tests_json) - - ############################################################ - # End run_list_test_metadata - ############################################################ - - ############################################################ - # parse_timestamp - # Re-parses the raw data for a given timestamp - ############################################################ - def parse_timestamp(self): - all_tests = self.__gather_tests - - for test in all_tests: - test.parse_all() - - self.__parse_results(all_tests) - - self.__finish() - - ############################################################ - # End parse_timestamp - ############################################################ - - ############################################################ - # Run the tests: - # This process involves setting up the client/server machines - # with any necessary change. Then going through each test, - # running their setup script, verifying the URLs, and - # running benchmarks against them. - ############################################################ def run(self): - ########################## + ''' + This process involves setting up the client/server machines + with any necessary change. Then going through each test, + running their setup script, verifying the URLs, and + running benchmarks against them. + ''' # Generate metadata - ########################## - self.run_list_test_metadata() - ########################## - # Get a list of all known - # tests that we can run. - ########################## - all_tests = self.__gather_tests - ########################## - # Setup client/server - ########################## - print(header("Preparing Server, Database, and Client ...", top='=', bottom='=')) - with self.quiet_out.enable(): - self.__setup_server() - self.__setup_database() - self.__setup_client() + self.__run_list_test_metadata() - ## Check if wrk (and wrk-pipeline) is installed and executable, if not, raise an exception - #if not (os.access("/usr/local/bin/wrk", os.X_OK) and os.access("/usr/local/bin/wrk-pipeline", os.X_OK)): - # raise Exception("wrk and/or wrk-pipeline are not properly installed. Not running tests.") + # Get a list of all known tests that we can run. + all_tests = gather_remaining_tests(self.config, self.results) - ########################## # Run tests - ########################## - print(header("Running Tests...", top='=', bottom='=')) - result = self.__run_tests(all_tests) + success = True + log("Running Tests...", border='=') + with open(os.path.join(self.results.directory, 'benchmark.log'), + 'w') as benchmark_log: + for test in all_tests: + log("Running Test: %s" % test.name, border='-') + with self.config.quiet_out.enable(): + success = self.__run_test(test, benchmark_log) and success + # Load intermediate result from child process + self.results.load() - ########################## # Parse results - ########################## - if self.mode == "benchmark": - print(header("Parsing Results ...", top='=', bottom='=')) - self.__parse_results(all_tests) - - - self.__set_completion_time() - self.__upload_results() - self.__finish() - return result - - ############################################################ - # End run - ############################################################ - - ############################################################ - # database_sftp_string(batch_file) - # generates a fully qualified URL for sftp to database - ############################################################ - def database_sftp_string(self, batch_file): - sftp_string = "sftp -oStrictHostKeyChecking=no " - if batch_file != None: sftp_string += " -b " + batch_file + " " - - if self.database_identity_file != None: - sftp_string += " -i " + self.database_identity_file + " " - - return sftp_string + self.database_user + "@" + self.database_host - ############################################################ - # End database_sftp_string - ############################################################ - - ############################################################ - # client_sftp_string(batch_file) - # generates a fully qualified URL for sftp to client - ############################################################ - def client_sftp_string(self, batch_file): - sftp_string = "sftp -oStrictHostKeyChecking=no " - if batch_file != None: sftp_string += " -b " + batch_file + " " - - if self.client_identity_file != None: - sftp_string += " -i " + self.client_identity_file + " " - - return sftp_string + self.client_user + "@" + self.client_host - ############################################################ - # End client_sftp_string - ############################################################ - - ############################################################ - # generate_url(url, port) - # generates a fully qualified URL for accessing a test url - ############################################################ - def generate_url(self, url, port): - return self.server_host + ":" + str(port) + url - ############################################################ - # End generate_url - ############################################################ - - ############################################################ - # get_output_file(test_name, test_type) - # returns the output file name for this test_name and - # test_type timestamp/test_type/test_name/raw.txt - ############################################################ - def get_output_file(self, test_name, test_type): - return os.path.join(self.result_directory, self.timestamp, test_name, test_type, "raw.txt") - ############################################################ - # End get_output_file - ############################################################ - - ############################################################ - # output_file(test_name, test_type) - # returns the output file for this test_name and test_type - # timestamp/test_type/test_name/raw.txt - ############################################################ - def output_file(self, test_name, test_type): - path = self.get_output_file(test_name, test_type) - try: - os.makedirs(os.path.dirname(path)) - except OSError: - pass - return path - ############################################################ - # End output_file - ############################################################ - - - ############################################################ - # get_stats_file(test_name, test_type) - # returns the stats file name for this test_name and - # test_type timestamp/test_type/test_name/stats.txt - ############################################################ - def get_stats_file(self, test_name, test_type): - return os.path.join(self.result_directory, self.timestamp, test_name, test_type, "stats.txt") - ############################################################ - # End get_stats_file - ############################################################ - - - ############################################################ - # stats_file(test_name, test_type) - # returns the stats file for this test_name and test_type - # timestamp/test_type/test_name/stats.txt - ############################################################ - def stats_file(self, test_name, test_type): - path = self.get_stats_file(test_name, test_type) - try: - os.makedirs(os.path.dirname(path)) - except OSError: - pass - return path - ############################################################ - # End stats_file - ############################################################ - - - ############################################################ - # full_results_directory - ############################################################ - def full_results_directory(self): - path = os.path.join(self.fwroot, self.result_directory, self.timestamp) - try: - os.makedirs(path) - except OSError: - pass - return path - ############################################################ - # End full_results_directory - ############################################################ - - ############################################################ - # report_verify_results - # Used by FrameworkTest to add verification details to our results - # - # TODO: Technically this is an IPC violation - we are accessing - # the parent process' memory from the child process - ############################################################ - def report_verify_results(self, framework, test, result): - if framework.name not in self.results['verify'].keys(): - self.results['verify'][framework.name] = dict() - self.results['verify'][framework.name][test] = result + if self.config.mode == "benchmark": + log("Parsing Results ...", border='=') + self.results.parse(all_tests) - ############################################################ - # report_benchmark_results - # Used by FrameworkTest to add benchmark data to this - # - # TODO: Technically this is an IPC violation - we are accessing - # the parent process' memory from the child process - ############################################################ - def report_benchmark_results(self, framework, test, results): - if test not in self.results['rawData'].keys(): - self.results['rawData'][test] = dict() + self.results.set_completion_time() + self.results.upload() + self.results.finish() - # If results has a size from the parse, then it succeeded. - if results: - self.results['rawData'][test][framework.name] = results - - # This may already be set for single-tests - if framework.name not in self.results['succeeded'][test]: - self.results['succeeded'][test].append(framework.name) - else: - # This may already be set for single-tests - if framework.name not in self.results['failed'][test]: - self.results['failed'][test].append(framework.name) - - ############################################################ - # End report_results - ############################################################ + return success ########################################################################################## # Private methods ########################################################################################## - ############################################################ - # Gathers all the tests - ############################################################ - @property - def __gather_tests(self): - tests = gather_tests(include=self.test, - exclude=self.exclude, - benchmarker=self) - - # If the tests have been interrupted somehow, then we want to resume them where we left - # off, rather than starting from the beginning - if os.path.isfile(self.current_benchmark): - with open(self.current_benchmark, 'r') as interrupted_benchmark: - interrupt_bench = interrupted_benchmark.read().strip() - for index, atest in enumerate(tests): - if atest.name == interrupt_bench: - tests = tests[index:] - break - return tests - ############################################################ - # End __gather_tests - ############################################################ + def __run_list_test_metadata(self): + ''' + Prints the metadata for all the available tests + ''' + all_tests = gather_tests(benchmarker_config=self.config) + all_tests_json = json.dumps(map(lambda test: { + "name": test.name, + "approach": test.approach, + "classification": test.classification, + "database": test.database, + "framework": test.framework, + "language": test.language, + "orm": test.orm, + "platform": test.platform, + "webserver": test.webserver, + "os": test.os, + "database_os": test.database_os, + "display_name": test.display_name, + "notes": test.notes, + "versus": test.versus + }, all_tests)) - ############################################################ - # Makes any necessary changes to the server that should be - # made before running the tests. This involves setting kernal - # settings to allow for more connections, or more file - # descriptiors - # - # http://redmine.lighttpd.net/projects/weighttp/wiki#Troubleshooting - ############################################################ - def __setup_server(self): - try: - if os.name == 'nt': - return True - subprocess.call(['sudo', 'sysctl', '-w', 'net.ipv4.tcp_max_syn_backlog=65535'], stdout=self.quiet_out, stderr=subprocess.STDOUT) - subprocess.call(['sudo', 'sysctl', '-w', 'net.core.somaxconn=65535'], stdout=self.quiet_out, stderr=subprocess.STDOUT) - subprocess.call(['sudo', 'sysctl', 'net.ipv4.tcp_tw_reuse=1'], stdout=self.quiet_out, stderr=subprocess.STDOUT) - subprocess.call(['sudo', 'sysctl', 'net.ipv4.tcp_tw_recycle=1'], stdout=self.quiet_out, stderr=subprocess.STDOUT) - subprocess.call(['sudo', 'sysctl', '-w', 'kernel.shmmax=134217728'], stdout=self.quiet_out, stderr=subprocess.STDOUT) - subprocess.call(['sudo', 'sysctl', '-w', 'kernel.shmall=2097152'], stdout=self.quiet_out, stderr=subprocess.STDOUT) + with open( + os.path.join(self.results.directory, "test_metadata.json"), + "w") as f: + f.write(all_tests_json) - with open(os.path.join(self.full_results_directory(), 'sysctl.txt'), 'w') as f: - f.write(subprocess.check_output(['sudo','sysctl','-a'])) - except subprocess.CalledProcessError: + def __run_test(self, test, benchmark_log): + ''' + Runs the given test, verifies that the webapp is accepting requests, + optionally benchmarks the webapp, and ultimately stops all services + started for this test. + ''' + log_prefix = "%s: " % test.name + + # If the test is in the excludes list, we skip it + if self.config.exclude != None and test.name in self.config.exclude: + log("Test {name} has been added to the excludes list. Skipping.". + format(name=test.name), + prefix=log_prefix, + file=benchmark_log) return False - ############################################################ - # End __setup_server - ############################################################ - - ############################################################ - # Clean up any processes that run with root privileges - ############################################################ - def __cleanup_leftover_processes_before_test(self): - p = subprocess.Popen(self.database_ssh_string, stdin=subprocess.PIPE, shell=True, stdout=self.quiet_out, stderr=subprocess.STDOUT) - p.communicate(""" - sudo service mysql stop - sudo service mongod stop - sudo kill -9 $(pgrep postgres) - sudo kill -9 $(pgrep mysql) - sudo kill -9 $(pgrep mongo) - """) - - ############################################################ - # Makes any necessary changes to the database machine that - # should be made before running the tests. Is very similar - # to the server setup, but may also include database specific - # changes. - ############################################################ - def __setup_database(self): - p = subprocess.Popen(self.database_ssh_string, stdin=subprocess.PIPE, shell=True, stdout=self.quiet_out, stderr=subprocess.STDOUT) - p.communicate(""" - sudo sysctl -w net.ipv4.tcp_max_syn_backlog=65535 - sudo sysctl -w net.core.somaxconn=65535 - sudo sysctl -w kernel.sched_autogroup_enabled=0 - sudo -s ulimit -n 65535 - sudo sysctl net.ipv4.tcp_tw_reuse=1 - sudo sysctl net.ipv4.tcp_tw_recycle=1 - sudo sysctl -w kernel.shmmax=2147483648 - sudo sysctl -w kernel.shmall=2097152 - sudo sysctl -w kernel.sem="250 32000 256 512" - """) - # TODO - print kernel configuration to file - # echo "Printing kernel configuration:" && sudo sysctl -a - - # Explanations: - # net.ipv4.tcp_max_syn_backlog, net.core.somaxconn, kernel.sched_autogroup_enabled: http://tweaked.io/guide/kernel/ - # ulimit -n: http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/ - # net.ipv4.tcp_tw_*: http://www.linuxbrigade.com/reduce-time_wait-socket-connections/ - # kernel.shm*: http://seriousbirder.com/blogs/linux-understanding-shmmax-and-shmall-settings/ - # For kernel.sem: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Tuning_and_Optimizing_Red_Hat_Enterprise_Linux_for_Oracle_9i_and_10g_Databases/chap-Oracle_9i_and_10g_Tuning_Guide-Setting_Semaphores.html - ############################################################ - # End __setup_database - ############################################################ - - ############################################################ - # Makes any necessary changes to the client machine that - # should be made before running the tests. Is very similar - # to the server setup, but may also include client specific - # changes. - ############################################################ - def __setup_client(self): - p = subprocess.Popen(self.client_ssh_string, stdin=subprocess.PIPE, shell=True, stdout=self.quiet_out, stderr=subprocess.STDOUT) - p.communicate(""" - sudo sysctl -w net.ipv4.tcp_max_syn_backlog=65535 - sudo sysctl -w net.core.somaxconn=65535 - sudo -s ulimit -n 65535 - sudo sysctl net.ipv4.tcp_tw_reuse=1 - sudo sysctl net.ipv4.tcp_tw_recycle=1 - sudo sysctl -w kernel.shmmax=2147483648 - sudo sysctl -w kernel.shmall=2097152 - """) - ############################################################ - # End __setup_client - ############################################################ - - ############################################################ - # __run_tests - # - # 2013-10-02 ASB Calls each test passed in tests to - # __run_test in a separate process. Each - # test is given a set amount of time and if - # kills the child process (and subsequently - # all of its child processes). Uses - # multiprocessing module. - ############################################################ - - def __run_tests(self, tests): - if len(tests) == 0: - return 0 - - logging.debug("Start __run_tests.") - logging.debug("__name__ = %s",__name__) - error_happened = False - if self.os.lower() == 'windows': - logging.debug("Executing __run_tests on Windows") - for test in tests: - with open(self.current_benchmark, 'w') as benchmark_resume_file: - benchmark_resume_file.write(test.name) - with self.quiet_out.enable(): - if self.__run_test(test) != 0: - error_happened = True - else: - logging.debug("Executing __run_tests on Linux") - - # Setup a nice progressbar and ETA indicator - widgets = [self.mode, ': ', progressbar.Percentage(), - ' ', progressbar.Bar(), - ' Rough ', progressbar.ETA()] - pbar = progressbar.ProgressBar(widgets=widgets, maxval=len(tests)).start() - pbar_test = 0 - - # These features do not work on Windows - for test in tests: - pbar.update(pbar_test) - pbar_test = pbar_test + 1 - if __name__ == 'benchmark.benchmarker': - print(header("Running Test: %s" % test.name)) - with open(self.current_benchmark, 'w') as benchmark_resume_file: - benchmark_resume_file.write(test.name) - with self.quiet_out.enable(): - test_process = Process(target=self.__run_test, name="Test Runner (%s)" % test.name, args=(test,)) - test_process.start() - test_process.join(self.run_test_timeout_seconds) - self.__load_results() # Load intermediate result from child process - if(test_process.is_alive()): - logging.debug("Child process for {name} is still alive. Terminating.".format(name=test.name)) - self.__write_intermediate_results(test.name,"__run_test timeout (="+ str(self.run_test_timeout_seconds) + " seconds)") - test_process.terminate() - test_process.join() - if test_process.exitcode != 0: - error_happened = True - pbar.finish() - - if os.path.isfile(self.current_benchmark): - os.remove(self.current_benchmark) - logging.debug("End __run_tests.") - - if error_happened: - return 1 - return 0 - ############################################################ - # End __run_tests - ############################################################ - - ############################################################ - # __run_test - # 2013-10-02 ASB Previously __run_tests. This code now only - # processes a single test. - # - # Ensures that the system has all necessary software to run - # the tests. This does not include that software for the individual - # test, but covers software such as curl and weighttp that - # are needed. - ############################################################ - def __run_test(self, test): - - # Used to capture return values - def exit_with_code(code): - if self.os.lower() == 'windows': - return code - else: - sys.exit(code) - - logDir = os.path.join(self.full_results_directory(), test.name.lower()) + database_container = None try: - os.makedirs(logDir) - except Exception: - pass - with open(os.path.join(logDir, 'out.txt'), 'w') as out: - - if test.os.lower() != self.os.lower() or test.database_os.lower() != self.database_os.lower(): - out.write("OS or Database OS specified in benchmark_config.json does not match the current environment. Skipping.\n") - return exit_with_code(0) - - # If the test is in the excludes list, we skip it - if self.exclude != None and test.name in self.exclude: - out.write("Test {name} has been added to the excludes list. Skipping.\n".format(name=test.name)) - return exit_with_code(0) - - out.write("test.os.lower() = {os} test.database_os.lower() = {dbos}\n".format(os=test.os.lower(),dbos=test.database_os.lower())) - out.write("self.results['frameworks'] != None: {val}\n".format(val=str(self.results['frameworks'] != None))) - out.write("test.name: {name}\n".format(name=str(test.name))) - out.write("self.results['completed']: {completed}\n".format(completed=str(self.results['completed']))) - if self.results['frameworks'] != None and test.name in self.results['completed']: - out.write('Framework {name} found in latest saved data. Skipping.\n'.format(name=str(test.name))) - print('WARNING: Test {test} exists in the results directory; this must be removed before running a new test.\n'.format(test=str(test.name))) - return exit_with_code(1) - out.flush() - - out.write(header("Beginning %s" % test.name, top='=')) - out.flush() - - ########################## - # Start this test - ########################## - out.write(header("Starting %s" % test.name)) - out.flush() - try: - self.__cleanup_leftover_processes_before_test() - - if self.__is_port_bound(test.port): - time.sleep(60) - - if self.__is_port_bound(test.port): - # We gave it our all - self.__write_intermediate_results(test.name, "port " + str(test.port) + " is not available before start") - out.write(header("Error: Port %s is not available, cannot start %s" % (test.port, test.name))) - out.flush() - print("Error: Unable to recover port, cannot start test") - return exit_with_code(1) - - result, process = test.start(out) - self.__process = process - if result != 0: - self.__process.terminate() - time.sleep(5) - out.write( "ERROR: Problem starting {name}\n".format(name=test.name) ) - out.flush() - self.__write_intermediate_results(test.name,"#start() returned non-zero") - return exit_with_code(1) - - logging.info("Sleeping %s seconds to ensure framework is ready" % self.sleep) - time.sleep(self.sleep) - - ########################## - # Verify URLs - ########################## - if self.mode == "debug": - logging.info("Entering debug mode. Server has started. CTRL-c to stop.") - while True: - time.sleep(1) - else: - logging.info("Verifying framework URLs") - passed_verify = test.verify_urls(logDir) - - ########################## - # Benchmark this test - ########################## - if self.mode == "benchmark": - logging.info("Benchmarking") - out.write(header("Benchmarking %s" % test.name)) - out.flush() - test.benchmark(logDir) + if self.__is_port_bound(test.port): + time.sleep(60) + + if self.__is_port_bound(test.port): + # We gave it our all + self.results.write_intermediate(test.name, "port " + str( + test.port) + " is not available before start") + log("Error: Port %s is not available, cannot start %s" % + (test.port, test.name), + prefix=log_prefix, + file=benchmark_log, + color=Fore.RED) + return False + + # Start database container + if test.database.lower() != "none": + database_container = docker_helper.start_database( + self.config, test, test.database.lower()) + if database_container is None: + self.results.write_intermediate(test.name, + "ERROR: Problem starting") + log("ERROR: Problem building/running database container", + prefix=log_prefix, + file=benchmark_log, + color=Fore.RED) + return False + + # Start webapp + containers = test.start() + if containers is None: + docker_helper.stop(self.config, containers, database_container, + test) + self.results.write_intermediate(test.name, + "ERROR: Problem starting") + log("ERROR: Problem starting {name}".format(name=test.name), + prefix=log_prefix, + file=benchmark_log, + color=Fore.RED) + return False - ########################## - # Stop this test - ########################## - self.__stop_test(test, out) - - out.write(header("Stopped %s" % test.name)) - out.flush() - - ########################################################## - # Remove contents of /tmp folder - ########################################################## - try: - subprocess.check_call('sudo rm -rf /tmp/*', shell=True, stderr=out, stdout=out) - except Exception: - out.write(header("Error: Could not empty /tmp")) - - - ########################################################## - # Remove apt sources to avoid pkg errors and collisions - ########################################################## - os.system("sudo rm -rf /etc/apt/sources.list.d/*") - - ########################################################## - # Save results thus far into the latest results directory - ########################################################## - - out.write(header("Saving results through %s" % test.name)) - out.flush() - self.__write_intermediate_results(test.name,time.strftime("%Y%m%d%H%M%S", time.localtime())) - - ########################################################## - # Upload the results thus far to another server (optional) - ########################################################## - - self.__upload_results() - - if self.mode == "verify" and not passed_verify: - print("Failed verify!") - return exit_with_code(1) - except KeyboardInterrupt: - self.__stop_test(test, out) - except (OSError, IOError, subprocess.CalledProcessError) as e: - self.__write_intermediate_results(test.name," raised an exception") - out.write(header("Subprocess Error %s" % test.name)) - traceback.print_exc(file=out) - out.flush() - out.close() - return exit_with_code(1) - - out.close() - return exit_with_code(0) - - ############################################################ - # End __run_tests - ############################################################ - - ############################################################ - # __stop_test - # Attempts to stop the running test. - ############################################################ - def __stop_test(self, test, out): - # self.__process may not be set if the user hit ctrl+c prior to the test - # starting properly. - if self.__process is not None: - out.write(header("Stopping %s" % test.name)) - out.flush() - # Ask TFBReaper to nicely terminate itself - self.__process.terminate() slept = 0 - returnCode = None - # Check once a second to see if TFBReaper has exited - while(slept < 300 and returnCode is None): + max_sleep = 60 + accepting_requests = False + while not accepting_requests and slept < max_sleep: + accepting_requests = test.is_accepting_requests() + if not docker_helper.successfully_running_containers( + self.config, test.get_docker_files(), benchmark_log): + docker_helper.stop(self.config, containers, + database_container, test) + log("ERROR: One or more expected docker container exited early", + prefix=log_prefix, + file=benchmark_log, + color=Fore.RED) + return False time.sleep(1) slept += 1 - returnCode = self.__process.poll() - - # If TFBReaper has not exited at this point, we have a problem - if returnCode is None: - self.__write_intermediate_results(test.name, "port " + str(test.port) + " was not released by stop") - out.write(header("Error: Port %s was not released by stop - %s" % (test.port, test.name))) - out.write(header("Running Processes")) - out.write(subprocess.check_output(['ps -aux'], shell=True)) - out.flush() - return exit_with_code(1) - ############################################################ - # End __stop_test - ############################################################ - def is_port_bound(self, port): - return self.__is_port_bound(port) + if not accepting_requests: + docker_helper.stop(self.config, containers, database_container, + test) + log("ERROR: Framework is not accepting requests from client machine", + prefix=log_prefix, + file=benchmark_log, + color=Fore.RED) + return False + + # Debug mode blocks execution here until ctrl+c + if self.config.mode == "debug": + log("Entering debug mode. Server has started. CTRL-c to stop.", + prefix=log_prefix, + file=benchmark_log, + color=Fore.YELLOW) + while True: + time.sleep(1) + + # Verify URLs + log("Verifying framework URLs", prefix=log_prefix) + passed_verify = test.verify_urls() + + # Benchmark this test + if self.config.mode == "benchmark": + log("Benchmarking %s" % test.name, + file=benchmark_log, + border='-') + self.__benchmark(test, benchmark_log) + + # Stop this test + docker_helper.stop(self.config, containers, database_container, + test) + + # Save results thus far into the latest results directory + self.results.write_intermediate(test.name, + time.strftime( + "%Y%m%d%H%M%S", + time.localtime())) + + # Upload the results thus far to another server (optional) + self.results.upload() + + if self.config.mode == "verify" and not passed_verify: + log("Failed verify!", + prefix=log_prefix, + file=benchmark_log, + color=Fore.RED) + return False + except (OSError, IOError, subprocess.CalledProcessError) as e: + tb = traceback.format_exc() + self.results.write_intermediate( + test.name, "error during test setup: " + str(e)) + log("Subprocess Error %s" % test.name, + file=benchmark_log, + border='-', + color=Fore.RED) + log(tb, prefix=log_prefix, file=benchmark_log) + return False + + return True + + def __benchmark(self, framework_test, benchmark_log): + ''' + Runs the benchmark for each type of test that it implements + ''' + + def benchmark_type(test_type): + log("BENCHMARKING %s ... " % test_type.upper(), file=benchmark_log) + + test = framework_test.runTests[test_type] + test.setup_out(benchmark_log) + raw_file = self.results.get_raw_file(framework_test.name, + test_type) + if not os.path.exists(raw_file): + # Open to create the empty file + with open(raw_file, 'w'): + pass + + if not test.failed: + # Begin resource usage metrics collection + self.__begin_logging(framework_test, test_type) + + script = self.config.types[test_type].get_script_name() + script_variables = self.config.types[ + test_type].get_script_variables( + test.name, "http://%s:%s%s" % (self.config.server_host, + framework_test.port, + test.get_url())) + + docker_helper.benchmark(self.config, script, script_variables, + raw_file) + + # End resource usage metrics collection + self.__end_logging() + + results = self.results.parse_test(framework_test, test_type) + log("Benchmark results:", file=benchmark_log) + # TODO move into log somehow + pprint(results) + + self.results.report_benchmark_results(framework_test, test_type, + results['results']) + log("Complete", file=benchmark_log) + + for test_type in framework_test.runTests: + benchmark_type(test_type) + + def __begin_logging(self, framework_test, test_type): + ''' + Starts a thread to monitor the resource usage, to be synced with the + client's time. + TODO: MySQL and InnoDB are possible. Figure out how to implement them. + ''' + output_file = "{file_name}".format( + file_name=self.results.get_stats_file(framework_test.name, + test_type)) + dstat_string = "dstat -Tafilmprs --aio --fs --ipc --lock --raw --socket --tcp \ + --raw --socket --tcp --udp --unix --vm --disk-util \ + --rpc --rpcd --output {output_file}".format( + output_file=output_file) + cmd = shlex.split(dstat_string) + self.subprocess_handle = subprocess.Popen( + cmd, stdout=FNULL, stderr=subprocess.STDOUT) + + def __end_logging(self): + ''' + Stops the logger thread and blocks until shutdown is complete. + ''' + self.subprocess_handle.terminate() + self.subprocess_handle.communicate() - ############################################################ - # __is_port_bound - # Check if the requested port is available. If it - # isn't available, then a previous test probably didn't - # shutdown properly. - ############################################################ def __is_port_bound(self, port): + ''' + Check if the requested port is available. If it isn't available, then a + previous test probably didn't shutdown properly. + ''' port = int(port) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: @@ -723,366 +330,3 @@ def __is_port_bound(self, port): s.close() return False - - ############################################################ - # End __is_port_bound - ############################################################ - - ############################################################ - # __parse_results - # Ensures that the system has all necessary software to run - # the tests. This does not include that software for the individual - # test, but covers software such as curl and weighttp that - # are needed. - ############################################################ - def __parse_results(self, tests): - # Run the method to get the commmit count of each framework. - self.__count_commits() - # Call the method which counts the sloc for each framework - self.__count_sloc() - - # Time to create parsed files - # Aggregate JSON file - with open(os.path.join(self.full_results_directory(), "results.json"), "w") as f: - f.write(json.dumps(self.results, indent=2)) - - ############################################################ - # End __parse_results - ############################################################ - - - ############################################################# - # __count_sloc - ############################################################# - def __count_sloc(self): - frameworks = gather_frameworks(include=self.test, - exclude=self.exclude, benchmarker=self) - - jsonResult = {} - for framework, testlist in frameworks.iteritems(): - if not os.path.exists(os.path.join(testlist[0].directory, "source_code")): - logging.warn("Cannot count lines of code for %s - no 'source_code' file", framework) - continue - - # Unfortunately the source_code files use lines like - # ./cpoll_cppsp/www/fortune_old instead of - # ./www/fortune_old - # so we have to back our working dir up one level - wd = os.path.dirname(testlist[0].directory) - - try: - command = "cloc --list-file=%s/source_code --yaml" % testlist[0].directory - - if os.path.exists(os.path.join(testlist[0].directory, "cloc_defs.txt")): - command += " --read-lang-def %s" % os.path.join(testlist[0].directory, "cloc_defs.txt") - logging.info("Using custom cloc definitions for %s", framework) - - # Find the last instance of the word 'code' in the yaml output. This should - # be the line count for the sum of all listed files or just the line count - # for the last file in the case where there's only one file listed. - command = command + "| grep code | tail -1 | cut -d: -f 2" - logging.debug("Running \"%s\" (cwd=%s)", command, wd) - lineCount = subprocess.check_output(command, cwd=wd, shell=True) - jsonResult[framework] = int(lineCount) - except subprocess.CalledProcessError: - continue - except ValueError as ve: - logging.warn("Unable to get linecount for %s due to error '%s'", framework, ve) - self.results['rawData']['slocCounts'] = jsonResult - ############################################################ - # End __count_sloc - ############################################################ - - ############################################################ - # __count_commits - # - ############################################################ - def __count_commits(self): - frameworks = gather_frameworks(include=self.test, - exclude=self.exclude, benchmarker=self) - - def count_commit(directory, jsonResult): - command = "git rev-list HEAD -- " + directory + " | sort -u | wc -l" - try: - commitCount = subprocess.check_output(command, shell=True) - jsonResult[framework] = int(commitCount) - except subprocess.CalledProcessError: - pass - - # Because git can be slow when run in large batches, this - # calls git up to 4 times in parallel. Normal improvement is ~3-4x - # in my trials, or ~100 seconds down to ~25 - # This is safe to parallelize as long as each thread only - # accesses one key in the dictionary - threads = [] - jsonResult = {} - t1 = datetime.now() - for framework, testlist in frameworks.iteritems(): - directory = testlist[0].directory - t = threading.Thread(target=count_commit, args=(directory,jsonResult)) - t.start() - threads.append(t) - # Git has internal locks, full parallel will just cause contention - # and slowness, so we rate-limit a bit - if len(threads) >= 4: - threads[0].join() - threads.remove(threads[0]) - - # Wait for remaining threads - for t in threads: - t.join() - t2 = datetime.now() - # print "Took %s seconds " % (t2 - t1).seconds - - self.results['rawData']['commitCounts'] = jsonResult - self.commits = jsonResult - ############################################################ - # End __count_commits - ############################################################ - - def __write_intermediate_results(self,test_name,status_message): - self.results["completed"][test_name] = status_message - self.__write_results() - - def __write_results(self): - try: - with open(os.path.join(self.full_results_directory(), 'results.json'), 'w') as f: - f.write(json.dumps(self.results, indent=2)) - except (IOError): - logging.error("Error writing results.json") - - def __set_completion_time(self): - self.results['completionTime'] = int(round(time.time() * 1000)) - self.__write_results() - - def __upload_results(self): - if self.results_upload_uri != None: - try: - requests.post(self.results_upload_uri, headers={ 'Content-Type': 'application/json' }, data=json.dumps(self.results, indent=2)) - except (Exception): - logging.error("Error uploading results.json") - - def __load_results(self): - try: - with open(os.path.join(self.full_results_directory(), 'results.json')) as f: - self.results = json.load(f) - except (ValueError, IOError): - pass - - def __get_git_commit_id(self): - return subprocess.check_output('git rev-parse HEAD', shell=True).strip() - - def __get_git_repository_url(self): - return subprocess.check_output('git config --get remote.origin.url', shell=True).strip() - - def __get_git_branch_name(self): - return subprocess.check_output('git rev-parse --abbrev-ref HEAD', shell=True).strip() - - ############################################################ - # __finish - ############################################################ - def __finish(self): - if not self.list_tests and not self.parse: - tests = self.__gather_tests - # Normally you don't have to use Fore.BLUE before each line, but - # Travis-CI seems to reset color codes on newline (see travis-ci/travis-ci#2692) - # or stream flush, so we have to ensure that the color code is printed repeatedly - prefix = Fore.CYAN - for line in header("Verification Summary", top='=', bottom='').split('\n'): - print(prefix + line) - for test in tests: - print(prefix + "| Test: {!s}".format(test.name)) - if test.name in self.results['verify'].keys(): - for test_type, result in self.results['verify'][test.name].iteritems(): - if result.upper() == "PASS": - color = Fore.GREEN - elif result.upper() == "WARN": - color = Fore.YELLOW - else: - color = Fore.RED - print(prefix + "| " + test_type.ljust(13) + ' : ' + color + result.upper()) - else: - print(prefix + "| " + Fore.RED + "NO RESULTS (Did framework launch?)") - print(prefix + header('', top='', bottom='=') + Style.RESET_ALL) - - print("Time to complete: " + str(int(time.time() - self.start_time)) + " seconds") - print("Results are saved in " + os.path.join(self.result_directory, self.timestamp)) - - ############################################################ - # End __finish - ############################################################ - - ########################################################################################## - # Constructor - ########################################################################################## - - ############################################################ - # Initialize the benchmarker. The args are the arguments - # parsed via argparser. - ############################################################ - def __init__(self, args): - - # Map type strings to their objects - types = dict() - types['json'] = JsonTestType() - types['db'] = DBTestType() - types['query'] = QueryTestType() - types['fortune'] = FortuneTestType() - types['update'] = UpdateTestType() - types['plaintext'] = PlaintextTestType() - types['cached_query'] = CachedQueryTestType() - - # Turn type into a map instead of a string - if args['type'] == 'all': - args['types'] = types - else: - args['types'] = { args['type'] : types[args['type']] } - del args['type'] - - args['max_concurrency'] = max(args['concurrency_levels']) - if 'pipeline_concurrency_levels' not in args: - args['pipeline_concurrency_levels'] = [256,1024,4096,16384] - - self.__dict__.update(args) - # pprint(self.__dict__) - - self.quiet_out = QuietOutputStream(self.quiet) - - self.start_time = time.time() - self.run_test_timeout_seconds = 7200 - - # setup logging - logging.basicConfig(stream=self.quiet_out, level=logging.INFO) - - # setup some additional variables - if self.database_user == None: self.database_user = self.client_user - if self.database_host == None: self.database_host = self.client_host - if self.database_identity_file == None: self.database_identity_file = self.client_identity_file - - # Remember root directory - self.fwroot = setup_util.get_fwroot() - - # setup current_benchmark.txt location - self.current_benchmark = "/tmp/current_benchmark.txt" - - if hasattr(self, 'parse') and self.parse != None: - self.timestamp = self.parse - else: - self.timestamp = time.strftime("%Y%m%d%H%M%S", time.localtime()) - - # setup results and latest_results directories - self.result_directory = os.path.join(self.fwroot, "results") - if (args['clean'] or args['clean_all']) and os.path.exists(os.path.join(self.fwroot, "results")): - os.system("sudo rm -rf " + self.result_directory + "/*") - - # remove installs directories if --clean-all provided - self.install_root = "%s/%s" % (self.fwroot, "installs") - if args['clean_all']: - os.system("sudo rm -rf " + self.install_root) - os.mkdir(self.install_root) - - self.results = None - try: - with open(os.path.join(self.full_results_directory(), 'results.json'), 'r') as f: - #Load json file into results object - self.results = json.load(f) - except IOError: - logging.warn("results.json for test not found.") - - if self.results == None: - self.results = dict() - self.results['uuid'] = str(uuid.uuid4()) - self.results['name'] = datetime.now().strftime(self.results_name) - self.results['environmentDescription'] = self.results_environment - try: - self.results['git'] = dict() - self.results['git']['commitId'] = self.__get_git_commit_id() - self.results['git']['repositoryUrl'] = self.__get_git_repository_url() - self.results['git']['branchName'] = self.__get_git_branch_name() - except Exception as e: - logging.debug('Could not read local git repository, which is fine. The error was: %s', e) - self.results['git'] = None - self.results['startTime'] = int(round(time.time() * 1000)) - self.results['completionTime'] = None - self.results['concurrencyLevels'] = self.concurrency_levels - self.results['pipelineConcurrencyLevels'] = self.pipeline_concurrency_levels - self.results['queryIntervals'] = self.query_levels - self.results['cachedQueryIntervals'] = self.cached_query_levels - self.results['frameworks'] = [t.name for t in self.__gather_tests] - self.results['duration'] = self.duration - self.results['rawData'] = dict() - self.results['rawData']['json'] = dict() - self.results['rawData']['db'] = dict() - self.results['rawData']['query'] = dict() - self.results['rawData']['fortune'] = dict() - self.results['rawData']['update'] = dict() - self.results['rawData']['plaintext'] = dict() - self.results['rawData']['cached_query'] = dict() - self.results['completed'] = dict() - self.results['succeeded'] = dict() - self.results['succeeded']['json'] = [] - self.results['succeeded']['db'] = [] - self.results['succeeded']['query'] = [] - self.results['succeeded']['fortune'] = [] - self.results['succeeded']['update'] = [] - self.results['succeeded']['plaintext'] = [] - self.results['succeeded']['cached_query'] = [] - self.results['failed'] = dict() - self.results['failed']['json'] = [] - self.results['failed']['db'] = [] - self.results['failed']['query'] = [] - self.results['failed']['fortune'] = [] - self.results['failed']['update'] = [] - self.results['failed']['plaintext'] = [] - self.results['failed']['cached_query'] = [] - self.results['verify'] = dict() - else: - #for x in self.__gather_tests(): - # if x.name not in self.results['frameworks']: - # self.results['frameworks'] = self.results['frameworks'] + [x.name] - # Always overwrite framework list - self.results['frameworks'] = [t.name for t in self.__gather_tests] - - # Setup the ssh command string - self.database_ssh_string = "ssh -T -o StrictHostKeyChecking=no " + self.database_user + "@" + self.database_host - self.client_ssh_string = "ssh -T -o StrictHostKeyChecking=no " + self.client_user + "@" + self.client_host - if self.database_identity_file != None: - self.database_ssh_string = self.database_ssh_string + " -i " + self.database_identity_file - if self.client_identity_file != None: - self.client_ssh_string = self.client_ssh_string + " -i " + self.client_identity_file - - self.__process = None - - ############################################################ - # End __init__ - ############################################################ - - -class QuietOutputStream: - - def __init__(self, is_quiet): - self.is_quiet = is_quiet - self.null_out = open(os.devnull, 'w') - - def fileno(self): - with self.enable(): - return sys.stdout.fileno() - - def write(self, message): - with self.enable(): - sys.stdout.write(message) - - @contextmanager - def enable(self): - if self.is_quiet: - old_out = sys.stdout - old_err = sys.stderr - try: - sys.stdout = self.null_out - sys.stderr = self.null_out - yield - finally: - sys.stdout = old_out - sys.stderr = old_err - else: - yield diff --git a/toolset/benchmark/fortune_html_parser.py b/toolset/benchmark/fortune_html_parser.py index 46df3a57433..8847f7bf070 100755 --- a/toolset/benchmark/fortune_html_parser.py +++ b/toolset/benchmark/fortune_html_parser.py @@ -1,12 +1,19 @@ # -*- coding: utf-8 -import re +import os + from HTMLParser import HTMLParser from difflib import unified_diff +from toolset.utils.output_helper import log + + class FortuneHTMLParser(HTMLParser): - body = [] - valid_fortune = ''' + def __init__(self): + HTMLParser.__init__(self) + self.body = [] + + valid_fortune = ''' Fortunes @@ -25,140 +32,159 @@ class FortuneHTMLParser(HTMLParser):
idmessage
12フレームワークのベンチマーク
''' - # Is called when a doctype or other such tag is read in. - # For our purposes, we assume this is only going to be - # "DOCTYPE html", so we will surround it with "". - def handle_decl(self, decl): - # The spec says that for HTML this is case insensitive, - # and since we did not specify xml compliance (where - # incorrect casing would throw a syntax error), we must - # allow all casings. We will lower for our normalization. - self.body.append("".format(d=decl.lower())) - - # This is called when an HTML character is parsed (i.e. - # "). There are a number of issues to be resolved - # here. For instance, some tests choose to leave the - # "+" character as-is, which should be fine as far as - # character escaping goes, but others choose to use the - # character reference of "+", which is also fine. - # Therefore, this method looks for all possible character - # references and normalizes them so that we can - # validate the input against a single valid spec string. - # Another example problem: """ is valid, but so is - # """ - def handle_charref(self, name): - val = name.lower() - # """ is a valid escaping, but we are normalizing - # it so that our final parse can just be checked for - # equality. - if val == "34" or val == "034" or val == "x22": - # Append our normalized entity reference to our body. - self.body.append(""") - # "'" is a valid escaping of "-", but it is not - # required, so we normalize for equality checking. - if val == "39" or val == "039" or val == "x27": - self.body.append("'") - # Again, "+" is a valid escaping of the "+", but - # it is not required, so we need to normalize for out - # final parse and equality check. - if val == "43" or val == "043" or val == "x2b": - self.body.append("+") - # Again, ">" is a valid escaping of ">", but we - # need to normalize to ">" for equality checking. - if val == "62" or val == "062" or val == "x3e": - self.body.append(">") - # Again, "<" is a valid escaping of "<", but we - # need to normalize to "<" for equality checking. - if val == "60" or val == "060" or val == "x3c": - self.body.append("<") - # Not sure why some are escaping '/' - if val == "47" or val == "047" or val == "x2f": - self.body.append("/") - # "(" is a valid escaping of "(", but - # it is not required, so we need to normalize for out - # final parse and equality check. - if val == "40" or val == "040" or val == "x28": - self.body.append("(") - # ")" is a valid escaping of ")", but - # it is not required, so we need to normalize for out - # final parse and equality check. - if val == "41" or val == "041" or val == "x29": - self.body.append(")") - - def handle_entityref(self, name): - # Again, "—" is a valid escaping of "—", but we - # need to normalize to "—" for equality checking. - if name == "mdash": - self.body.append("—") - else: - self.body.append("&{n};".format(n=name)) - - # This is called every time a tag is opened. We append - # each one wrapped in "<" and ">". - def handle_starttag(self, tag, attrs): - self.body.append("<{t}>".format(t=tag)) - - # Append a newline after the and - if tag.lower() == 'table' or tag.lower() == 'html': - self.body.append("\n") - - # This is called whenever data is presented inside of a - # start and end tag. Generally, this will only ever be - # the contents inside of "", but there - # are also the "" and "" tags. - def handle_data (self, data): - if data.strip() != '': - # After a LOT of debate, these are now considered - # valid in data. The reason for this approach is - # because a few tests use tools which determine - # at compile time whether or not a string needs - # a given type of html escaping, and our fortune - # test has apostrophes and quotes in html data - # rather than as an html attribute etc. - # example: - # - # Semanticly, that apostrophe does not NEED to - # be escaped. The same is currently true for our - # quotes. - # In fact, in data (read: between two html tags) - # even the '>' need not be replaced as long as - # the '<' are all escaped. - # We replace them with their escapings here in - # order to have a noramlized string for equality - # comparison at the end. - data = data.replace('\'', ''') - data = data.replace('"', '"') - data = data.replace('>', '>') - - self.body.append("{d}".format(d=data)) - - # This is called every time a tag is closed. We append - # each one wrapped in "". - def handle_endtag(self, tag): - self.body.append("".format(t=tag)) - - # Append a newline after each and - if tag.lower() == 'tr' or tag.lower() == 'head': - self.body.append("\n") - - # Returns whether the HTML input parsed by this parser - # is valid against our known "fortune" spec. - # The parsed data in 'body' is joined on empty strings - # and checked for equality against our spec. - def isValidFortune(self, out): - body = ''.join(self.body) - same = self.valid_fortune == body - diff_lines = [] - if not same: - output = "Oh no! I compared {!s}\n\n\nto.....{!s}\n".format(self.valid_fortune, body) - output += "Fortune invalid. Diff following:\n" - headers_left = 3 - for line in unified_diff(self.valid_fortune.split('\n'), body.split('\n'), fromfile='Valid', tofile='Response', n=0): - diff_lines.append(line) - output += line - headers_left -= 1 - if headers_left <= 0: - output += "\n" - print(output) - out.write(output) - return (same, diff_lines) + def handle_decl(self, decl): + ''' + Is called when a doctype or other such tag is read in. + For our purposes, we assume this is only going to be + "DOCTYPE html", so we will surround it with "". + ''' + # The spec says that for HTML this is case insensitive, + # and since we did not specify xml compliance (where + # incorrect casing would throw a syntax error), we must + # allow all casings. We will lower for our normalization. + self.body.append("".format(d=decl.lower())) + + def handle_charref(self, name): + ''' + This is called when an HTML character is parsed (i.e. + "). There are a number of issues to be resolved + here. For instance, some tests choose to leave the + "+" character as-is, which should be fine as far as + character escaping goes, but others choose to use the + character reference of "+", which is also fine. + Therefore, this method looks for all possible character + references and normalizes them so that we can + validate the input against a single valid spec string. + Another example problem: """ is valid, but so is + """ + ''' + val = name.lower() + # """ is a valid escaping, but we are normalizing + # it so that our final parse can just be checked for + # equality. + if val == "34" or val == "034" or val == "x22": + # Append our normalized entity reference to our body. + self.body.append(""") + # "'" is a valid escaping of "-", but it is not + # required, so we normalize for equality checking. + if val == "39" or val == "039" or val == "x27": + self.body.append("'") + # Again, "+" is a valid escaping of the "+", but + # it is not required, so we need to normalize for out + # final parse and equality check. + if val == "43" or val == "043" or val == "x2b": + self.body.append("+") + # Again, ">" is a valid escaping of ">", but we + # need to normalize to ">" for equality checking. + if val == "62" or val == "062" or val == "x3e": + self.body.append(">") + # Again, "<" is a valid escaping of "<", but we + # need to normalize to "<" for equality checking. + if val == "60" or val == "060" or val == "x3c": + self.body.append("<") + # Not sure why some are escaping '/' + if val == "47" or val == "047" or val == "x2f": + self.body.append("/") + # "(" is a valid escaping of "(", but + # it is not required, so we need to normalize for out + # final parse and equality check. + if val == "40" or val == "040" or val == "x28": + self.body.append("(") + # ")" is a valid escaping of ")", but + # it is not required, so we need to normalize for out + # final parse and equality check. + if val == "41" or val == "041" or val == "x29": + self.body.append(")") + + def handle_entityref(self, name): + ''' + Again, "—" is a valid escaping of "—", but we + need to normalize to "—" for equality checking. + ''' + if name == "mdash": + self.body.append("—") + else: + self.body.append("&{n};".format(n=name)) + + def handle_starttag(self, tag, attrs): + ''' + This is called every time a tag is opened. We append + each one wrapped in "<" and ">". + ''' + self.body.append("<{t}>".format(t=tag)) + + # Append a newline after the
" and "A computer scientist is someone who fixes things that aren't broken.
and + if tag.lower() == 'table' or tag.lower() == 'html': + self.body.append(os.linesep) + + def handle_data(self, data): + ''' + This is called whenever data is presented inside of a + start and end tag. Generally, this will only ever be + the contents inside of "", but there + are also the "" and "" tags. + ''' + if data.strip() != '': + # After a LOT of debate, these are now considered + # valid in data. The reason for this approach is + # because a few tests use tools which determine + # at compile time whether or not a string needs + # a given type of html escaping, and our fortune + # test has apostrophes and quotes in html data + # rather than as an html attribute etc. + # example: + # + # Semanticly, that apostrophe does not NEED to + # be escaped. The same is currently true for our + # quotes. + # In fact, in data (read: between two html tags) + # even the '>' need not be replaced as long as + # the '<' are all escaped. + # We replace them with their escapings here in + # order to have a noramlized string for equality + # comparison at the end. + data = data.replace('\'', ''') + data = data.replace('"', '"') + data = data.replace('>', '>') + + self.body.append("{d}".format(d=data)) + + def handle_endtag(self, tag): + ''' + This is called every time a tag is closed. We append + each one wrapped in "". + ''' + self.body.append("".format(t=tag)) + + # Append a newline after each and + if tag.lower() == 'tr' or tag.lower() == 'head': + self.body.append(os.linesep) + + def isValidFortune(self, name, out): + ''' + Returns whether the HTML input parsed by this parser + is valid against our known "fortune" spec. + The parsed data in 'body' is joined on empty strings + and checked for equality against our spec. + ''' + body = ''.join(self.body) + same = self.valid_fortune == body + diff_lines = [] + if not same: + output = "Oh no! I compared {!s}".format(self.valid_fortune) + output += os.linesep + os.linesep + "to" + os.linesep + os.linesep + body + os.linesep + output += "Fortune invalid. Diff following:" + os.linesep + headers_left = 3 + for line in unified_diff( + self.valid_fortune.split(os.linesep), + body.split(os.linesep), + fromfile='Valid', + tofile='Response', + n=0): + diff_lines.append(line) + output += line + headers_left -= 1 + if headers_left <= 0: + output += os.linesep + log(output, prefix="%s: " % name) + return (same, diff_lines) diff --git a/toolset/benchmark/framework_test.py b/toolset/benchmark/framework_test.py index 8ccf8179c3b..9ff860ee176 100644 --- a/toolset/benchmark/framework_test.py +++ b/toolset/benchmark/framework_test.py @@ -1,1072 +1,207 @@ -from benchmark.fortune_html_parser import FortuneHTMLParser -from setup.linux import setup_util -from benchmark.test_types import * - -import importlib import os -import subprocess -import socket -import time -import re -from pprint import pprint -import sys import traceback -import json -import logging -import csv -import shlex -import math -from collections import OrderedDict from requests import ConnectionError -from threading import Thread -from threading import Event -from utils import header +from toolset.utils.output_helper import log +from toolset.utils import docker_helper # Cross-platform colored text -from colorama import Fore, Back, Style -from datetime import datetime -from datetime import timedelta - -class FrameworkTest: - headers_template = "-H 'Host: {server_host}' -H 'Accept: {accept}' -H 'Connection: keep-alive'" - - # Used for test types that require no pipelining or query string params. - concurrency_template = """ - - let max_threads=$(cat /proc/cpuinfo | grep processor | wc -l) - echo "" - echo "---------------------------------------------------------" - echo " Running Primer {name}" - echo " {wrk} {headers} --latency -d 5 -c 8 --timeout 8 -t 8 \"http://{server_host}:{port}{url}\"" - echo "---------------------------------------------------------" - echo "" - {wrk} {headers} --latency -d 5 -c 8 --timeout 8 -t 8 "http://{server_host}:{port}{url}" - sleep 5 - - echo "" - echo "---------------------------------------------------------" - echo " Running Warmup {name}" - echo " {wrk} {headers} --latency -d {duration} -c {max_concurrency} --timeout 8 -t $max_threads \"http://{server_host}:{port}{url}\"" - echo "---------------------------------------------------------" - echo "" - {wrk} {headers} --latency -d {duration} -c {max_concurrency} --timeout 8 -t $max_threads "http://{server_host}:{port}{url}" - sleep 5 - - echo "" - echo "---------------------------------------------------------" - echo " Synchronizing time" - echo "---------------------------------------------------------" - echo "" - ntpdate -s pool.ntp.org - - for c in {levels} - do - echo "" - echo "---------------------------------------------------------" - echo " Concurrency: $c for {name}" - echo " {wrk} {headers} --latency -d {duration} -c $c --timeout 8 -t $(($c>$max_threads?$max_threads:$c)) \"http://{server_host}:{port}{url}\"" - echo "---------------------------------------------------------" - echo "" - STARTTIME=$(date +"%s") - {wrk} {headers} --latency -d {duration} -c $c --timeout 8 -t "$(($c>$max_threads?$max_threads:$c))" http://{server_host}:{port}{url} - echo "STARTTIME $STARTTIME" - echo "ENDTIME $(date +"%s")" - sleep 2 - done - """ - # Used for test types that require pipelining. - pipeline_template = """ - - let max_threads=$(cat /proc/cpuinfo | grep processor | wc -l) - echo "" - echo "---------------------------------------------------------" - echo " Running Primer {name}" - echo " {wrk} {headers} --latency -d 5 -c 8 --timeout 8 -t 8 \"http://{server_host}:{port}{url}\"" - echo "---------------------------------------------------------" - echo "" - {wrk} {headers} --latency -d 5 -c 8 --timeout 8 -t 8 "http://{server_host}:{port}{url}" - sleep 5 - - echo "" - echo "---------------------------------------------------------" - echo " Running Warmup {name}" - echo " {wrk} {headers} --latency -d {duration} -c {max_concurrency} --timeout 8 -t $max_threads \"http://{server_host}:{port}{url}\"" - echo "---------------------------------------------------------" - echo "" - {wrk} {headers} --latency -d {duration} -c {max_concurrency} --timeout 8 -t $max_threads "http://{server_host}:{port}{url}" - sleep 5 - - echo "" - echo "---------------------------------------------------------" - echo " Synchronizing time" - echo "---------------------------------------------------------" - echo "" - ntpdate -s pool.ntp.org - - for c in {levels} - do - echo "" - echo "---------------------------------------------------------" - echo " Concurrency: $c for {name}" - echo " {wrk} {headers} --latency -d {duration} -c $c --timeout 8 -t $(($c>$max_threads?$max_threads:$c)) \"http://{server_host}:{port}{url}\" -s ~/pipeline.lua -- {pipeline}" - echo "---------------------------------------------------------" - echo "" - STARTTIME=$(date +"%s") - {wrk} {headers} --latency -d {duration} -c $c --timeout 8 -t "$(($c>$max_threads?$max_threads:$c))" http://{server_host}:{port}{url} -s ~/pipeline.lua -- {pipeline} - echo "STARTTIME $STARTTIME" - echo "ENDTIME $(date +"%s")" - sleep 2 - done - """ - # Used for test types that require a database - - # These tests run at a static concurrency level and vary the size of - # the query sent with each request - query_template = """ - let max_threads=$(cat /proc/cpuinfo | grep processor | wc -l) - echo "" - echo "---------------------------------------------------------" - echo " Running Primer {name}" - echo " wrk {headers} --latency -d 5 -c 8 --timeout 8 -t 8 \"http://{server_host}:{port}{url}2\"" - echo "---------------------------------------------------------" - echo "" - wrk {headers} --latency -d 5 -c 8 --timeout 8 -t 8 "http://{server_host}:{port}{url}2" - sleep 5 - - echo "" - echo "---------------------------------------------------------" - echo " Running Warmup {name}" - echo " wrk {headers} --latency -d {duration} -c {max_concurrency} --timeout 8 -t $max_threads \"http://{server_host}:{port}{url}2\"" - echo "---------------------------------------------------------" - echo "" - wrk {headers} --latency -d {duration} -c {max_concurrency} --timeout 8 -t $max_threads "http://{server_host}:{port}{url}2" - sleep 5 - - echo "" - echo "---------------------------------------------------------" - echo " Synchronizing time" - echo "---------------------------------------------------------" - echo "" - ntpdate -s pool.ntp.org - - for c in {levels} - do - echo "" - echo "---------------------------------------------------------" - echo " Queries: $c for {name}" - echo " wrk {headers} --latency -d {duration} -c {max_concurrency} --timeout 8 -t $max_threads \"http://{server_host}:{port}{url}$c\"" - echo "---------------------------------------------------------" - echo "" - STARTTIME=$(date +"%s") - wrk {headers} --latency -d {duration} -c {max_concurrency} --timeout 8 -t $max_threads "http://{server_host}:{port}{url}$c" - echo "STARTTIME $STARTTIME" - echo "ENDTIME $(date +"%s")" - sleep 2 - done - """ - - ############################################################ - # start(benchmarker) - # Start the test using its setup file - ############################################################ - def start(self, out): - - # Setup environment variables - logDir = os.path.join(self.fwroot, self.benchmarker.full_results_directory(), 'logs', self.name.lower()) - bash_functions_path= os.path.join(self.fwroot, 'toolset/setup/linux/bash_functions.sh') - - os.environ['TROOT'] = self.directory - os.environ['IROOT'] = self.install_root - os.environ['DBHOST'] = socket.gethostbyname(self.database_host) - os.environ['LOGDIR'] = logDir - os.environ['MAX_CONCURRENCY'] = str(max(self.benchmarker.concurrency_levels)) - - # Always ensure that IROOT exists - if not os.path.exists(self.install_root): - os.mkdir(self.install_root) - - if not os.path.exists(os.path.join(self.install_root,"TFBReaper")): - subprocess.check_call(['gcc', - '-std=c99', - '-o%s/TFBReaper' % self.install_root, - os.path.join(self.fwroot,'toolset/setup/linux/TFBReaper.c')], - stderr=out, stdout=out) - - # Check that the client is setup - if not os.path.exists(os.path.join(self.install_root, 'client.installed')): - print("\nINSTALL: Installing client software\n") - # TODO: hax; should dynamically know where this file is - with open (self.fwroot + "/toolset/setup/linux/client.sh", "r") as myfile: - remote_script=myfile.read() - print("\nINSTALL: {!s}".format(self.benchmarker.client_ssh_string)) - p = subprocess.Popen(self.benchmarker.client_ssh_string.split(" ") + ["bash"], stdin=subprocess.PIPE) - p.communicate(remote_script) - returncode = p.returncode - if returncode != 0: - self.__install_error("status code %s running subprocess '%s'." % (returncode, self.benchmarker.client_ssh_string)) - print("\nINSTALL: Finished installing client software\n") - subprocess.check_call('touch client.installed', shell=True, cwd=self.install_root, executable='/bin/bash') - - # Run the module start inside parent of TROOT - # - we use the parent as a historical accident, a number of tests - # refer to their TROOT maually still - previousDir = os.getcwd() - os.chdir(os.path.dirname(self.troot)) - logging.info("Running setup module start (cwd=%s)", self.directory) - - command = 'bash -exc "source %s && source %s.sh"' % ( - bash_functions_path, - os.path.join(self.troot, self.setup_file)) - - debug_command = '''\ - export FWROOT=%s && \\ - export TROOT=%s && \\ - export IROOT=%s && \\ - export DBHOST=%s && \\ - export LOGDIR=%s && \\ - export MAX_CONCURRENCY=%s && \\ - cd %s && \\ - %s/TFBReaper "bash -exc \\\"source %s && source %s.sh\\\"''' % (self.fwroot, - self.directory, - self.install_root, - socket.gethostbyname(self.database_host), - logDir, - max(self.benchmarker.concurrency_levels), - self.directory, - self.install_root, - bash_functions_path, - os.path.join(self.troot, self.setup_file)) - logging.info("To run %s manually, copy/paste this:\n%s", self.name, debug_command) - - - def tee_output(prefix, line): - # Needs to be one atomic write - # Explicitly use UTF-8 as it's the most common framework output - # TODO improve encoding handling - line = prefix.encode('utf-8') + line - - # Log to current terminal - sys.stdout.write(line) - sys.stdout.flush() - # logging.error("".join([prefix, line])) - - out.write(line) - out.flush() - - # Start the setup.sh command - p = subprocess.Popen(["%s/TFBReaper" % self.install_root,command], - cwd=self.directory, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) - nbsr = setup_util.NonBlockingStreamReader(p.stdout, - "%s: %s.sh and framework processes have terminated" % (self.name, self.setup_file)) - - # Set a limit on total execution time of setup.sh - timeout = datetime.now() + timedelta(minutes = 105) - time_remaining = timeout - datetime.now() - - # Need to print to stdout once every 10 minutes or Travis-CI will abort - travis_timeout = datetime.now() + timedelta(minutes = 5) +from colorama import Fore, Style - # Flush output until setup.sh work is finished. This is - # either a) when setup.sh exits b) when the port is bound - # c) when we run out of time. Note that 'finished' doesn't - # guarantee setup.sh process is dead - the OS may choose to make - # setup.sh a zombie process if it still has living children - # - # Note: child processes forked (using &) will remain alive - # after setup.sh has exited. The will have inherited the - # stdout/stderr descriptors and will be directing their - # output to the pipes. - # - prefix = "Setup %s: " % self.name - while (p.poll() is None - and not self.benchmarker.is_port_bound(self.port) - and not time_remaining.total_seconds() < 0): - # The conditions above are slow to check, so - # we will delay output substantially if we only - # print one line per condition check. - # Adding a tight loop here mitigates the effect, - # ensuring that most of the output directly from - # setup.sh is sent to tee_output before the outer - # loop exits and prints things like "setup.sh exited" - # - for i in xrange(10): - try: - line = nbsr.readline(0.05) - if line: - tee_output(prefix, line) - - # Reset Travis-CI timer - travis_timeout = datetime.now() + timedelta(minutes = 5) - except setup_util.EndOfStream: - tee_output(prefix, "Setup has terminated\n") - break - time_remaining = timeout - datetime.now() - - if (travis_timeout - datetime.now()).total_seconds() < 0: - sys.stdout.write(prefix + 'Printing so Travis-CI does not time out\n') - sys.stdout.write(prefix + "Status: Poll: %s, Port %s bound: %s, Time Left: %s\n" % ( - p.poll(), self.port, self.benchmarker.is_port_bound(self.port), time_remaining)) - sys.stdout.flush() - travis_timeout = datetime.now() + timedelta(minutes = 5) - - # Did we time out? - if time_remaining.total_seconds() < 0: - tee_output(prefix, "%s.sh timed out!! Aborting...\n" % self.setup_file) - p.kill() - return 1 - - # What's our return code? - # If setup.sh has terminated, use that code - # Otherwise, detect if the port was bound - tee_output(prefix, "Status: Poll: %s, Port %s bound: %s, Time Left: %s\n" % ( - p.poll(), self.port, self.benchmarker.is_port_bound(self.port), time_remaining)) - retcode = (p.poll() if p.poll() is not None else 0 if self.benchmarker.is_port_bound(self.port) else 1) - if p.poll() is not None: - tee_output(prefix, "%s.sh process exited naturally with %s\n" % (self.setup_file, p.poll())) - elif self.benchmarker.is_port_bound(self.port): - tee_output(prefix, "Bound port detected on %s\n" % self.port) +class FrameworkTest: + def __init__(self, name, directory, benchmarker_config, results, runTests, + args): + ''' + Constructor + ''' + self.name = name + self.directory = directory + self.benchmarker_config = benchmarker_config + self.results = results + self.runTests = runTests + self.fwroot = benchmarker_config.fwroot + self.approach = "" + self.classification = "" + self.database = "" + self.framework = "" + self.language = "" + self.orm = "" + self.platform = "" + self.webserver = "" + self.os = "" + self.database_os = "" + self.display_name = "" + self.notes = "" + self.port = "" + self.versus = "" + self.docker_files = None + + # Used in setup.sh scripts for consistency with + # the bash environment variables + self.troot = self.directory + + self.__dict__.update(args) + + ########################################################################################## + # Public Methods + ########################################################################################## + + def start(self): + ''' + Start the test implementation + ''' + test_docker_files = self.get_docker_files() + test_log_dir = os.path.join(self.results.directory, self.name.lower()) + build_log_dir = os.path.join(test_log_dir, 'build') + run_log_dir = os.path.join(test_log_dir, 'run') - # Before we return control to the benchmarker, spin up a - # thread to keep an eye on the pipes in case the running - # framework uses stdout/stderr. Once all processes accessing - # the subprocess.PIPEs are dead, this thread will terminate. - # Use a different prefix to indicate this is the framework - # speaking - prefix = "Server %s: " % self.name - def watch_child_pipes(nbsr, prefix): - while True: try: - line = nbsr.readline(60) - if line: - tee_output(prefix, line) - except setup_util.EndOfStream: - tee_output(prefix, "Framework processes have terminated\n") - return - - watch_thread = Thread(target = watch_child_pipes, - args = (nbsr, prefix)) - watch_thread.daemon = True - watch_thread.start() - - logging.info("Executed %s.sh, returning %s", self.setup_file, retcode) - os.chdir(previousDir) - - return retcode, p - ############################################################ - # End start - ############################################################ - - ############################################################ - # verify_urls - # Verifys each of the URLs for this test. THis will sinply - # curl the URL and check for it's return status. - # For each url, a flag will be set on this object for whether - # or not it passed - # Returns True if all verifications succeeded - ############################################################ - def verify_urls(self, logPath): - result = True - - def verify_type(test_type): - verificationPath = os.path.join(logPath, test_type) - try: - os.makedirs(verificationPath) - except OSError: - pass - with open(os.path.join(verificationPath, 'verification.txt'), 'w') as verification: - test = self.runTests[test_type] - test.setup_out(verification) - verification.write(header("VERIFYING %s" % test_type.upper())) - - base_url = "http://%s:%s" % (self.benchmarker.server_host, self.port) - + os.makedirs(build_log_dir) + except OSError: + pass try: - # Verifies headers from the server. This check is made from the - # App Server using Pythons requests module. Will do a second check from - # the client to make sure the server isn't only accepting connections - # from localhost on a multi-machine setup. - results = test.verify(base_url) + os.makedirs(run_log_dir) + except OSError: + pass - # Now verify that the url is reachable from the client machine, unless - # we're already failing - if not any(result == 'fail' for (result, reason, url) in results): - p = subprocess.call(["ssh", "TFB-client", "curl -sSf %s" % base_url + test.get_url()], shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - if p is not 0: - results = [('fail', "Server did not respond to request from client machine.", base_url)] - logging.warning("""This error usually means your server is only accepting - requests from localhost.""") - except ConnectionError as e: - results = [('fail',"Server did not respond to request", base_url)] - logging.warning("Verifying test %s for %s caused an exception: %s", test_type, self.name, e) - except Exception as e: - results = [('fail',"""Caused Exception in TFB + result = docker_helper.build(self.benchmarker_config, [self.name], + build_log_dir) + if result != 0: + return None + + return docker_helper.run(self.benchmarker_config, test_docker_files, + run_log_dir) + + def is_accepting_requests(self): + ''' + Determines whether this test implementation is up and accepting + requests. + ''' + test_type = None + for any_type in self.runTests: + test_type = any_type + break + + url = "http://%s:%s%s" % (self.benchmarker_config.server_host, + self.port, + self.runTests[test_type].get_url()) + + return docker_helper.test_client_connection(self.benchmarker_config, + url) + + def get_docker_files(self): + ''' + Returns all the docker_files for this test. + ''' + test_docker_files = ["%s.dockerfile" % self.name] + if self.docker_files is not None: + if type(self.docker_files) is list: + test_docker_files.extend(self.docker_files) + else: + raise Exception( + "docker_files in benchmark_config.json must be an array") + + return test_docker_files + + def verify_urls(self): + ''' + Verifys each of the URLs for this test. This will simply curl the URL and + check for it's return status. For each url, a flag will be set on this + object for whether or not it passed. + Returns True if all verifications succeeded + ''' + log_path = os.path.join(self.results.directory, self.name.lower()) + result = True + + def verify_type(test_type): + verificationPath = os.path.join(log_path, test_type) + try: + os.makedirs(verificationPath) + except OSError: + pass + with open(os.path.join(verificationPath, 'verification.txt'), + 'w') as verification: + test = self.runTests[test_type] + log("VERIFYING %s" % test_type.upper(), + file=verification, + border='-', + color=Fore.WHITE + Style.BRIGHT) + + base_url = "http://%s:%s" % ( + self.benchmarker_config.server_host, self.port) + + try: + # Verifies headers from the server. This check is made from the + # App Server using Pythons requests module. Will do a second check from + # the client to make sure the server isn't only accepting connections + # from localhost on a multi-machine setup. + results = test.verify(base_url) + + # Now verify that the url is reachable from the client machine, unless + # we're already failing + if not any(result == 'fail' + for (result, reason, url) in results): + docker_helper.test_client_connection( + self.benchmarker_config, base_url + test.get_url()) + except ConnectionError as e: + results = [('fail', "Server did not respond to request", + base_url)] + log("Verifying test %s for %s caused an exception: %s" % + (test_type, self.name, e), + color=Fore.RED) + except Exception as e: + results = [('fail', """Caused Exception in TFB This almost certainly means your return value is incorrect, but also that you have found a bug. Please submit an issue including this message: %s\n%s""" % (e, traceback.format_exc()), - base_url)] - logging.warning("Verifying test %s for %s caused an exception: %s", test_type, self.name, e) - traceback.format_exc() - - test.failed = any(result == 'fail' for (result, reason, url) in results) - test.warned = any(result == 'warn' for (result, reason, url) in results) - test.passed = all(result == 'pass' for (result, reason, url) in results) - - def output_result(result, reason, url): - specific_rules_url = "http://frameworkbenchmarks.readthedocs.org/en/latest/Project-Information/Framework-Tests/#specific-test-requirements" - color = Fore.GREEN - if result.upper() == "WARN": - color = Fore.YELLOW - elif result.upper() == "FAIL": - color = Fore.RED - - verification.write((" " + color + "%s" + Style.RESET_ALL + " for %s\n") % (result.upper(), url)) - print(" {!s}{!s}{!s} for {!s}\n".format(color, result.upper(), Style.RESET_ALL, url)) - if reason is not None and len(reason) != 0: - for line in reason.splitlines(): - verification.write(" " + line + '\n') - print(" " + line) - if not test.passed: - verification.write(" See %s\n" % specific_rules_url) - print(" See {!s}\n".format(specific_rules_url)) - - [output_result(r1,r2,url) for (r1, r2, url) in results] - - if test.failed: - self.benchmarker.report_verify_results(self, test_type, 'fail') - elif test.warned: - self.benchmarker.report_verify_results(self, test_type, 'warn') - elif test.passed: - self.benchmarker.report_verify_results(self, test_type, 'pass') - else: - raise Exception("Unknown error - test did not pass,warn,or fail") - - verification.flush() - - result = True - for test_type in self.runTests: - verify_type(test_type) - if self.runTests[test_type].failed: - result = False - - return result - ############################################################ - # End verify_urls - ############################################################ - - ############################################################ - # benchmark - # Runs the benchmark for each type of test that it implements - # JSON/DB/Query. - ############################################################ - def benchmark(self, logPath): - - def benchmark_type(test_type): - benchmarkPath = os.path.join(logPath, test_type) - try: - os.makedirs(benchmarkPath) - except OSError: - pass - with open(os.path.join(benchmarkPath, 'benchmark.txt'), 'w') as out: - out.write("BENCHMARKING %s ... " % test_type.upper()) - - test = self.runTests[test_type] - test.setup_out(out) - output_file = self.benchmarker.output_file(self.name, test_type) - if not os.path.exists(output_file): - # Open to create the empty file - with open(output_file, 'w'): - pass - - if not test.failed: - if test_type == 'plaintext': # One special case - remote_script = self.__generate_pipeline_script(test.get_url(), self.port, test.accept_header) - elif test_type == 'query' or test_type == 'update': - remote_script = self.__generate_query_script(test.get_url(), self.port, test.accept_header, self.benchmarker.query_levels) - elif test_type == 'cached_query': - remote_script = self.__generate_query_script(test.get_url(), self.port, test.accept_header, self.benchmarker.cached_query_levels) - else: - remote_script = self.__generate_concurrency_script(test.get_url(), self.port, test.accept_header) - - # Begin resource usage metrics collection - self.__begin_logging(test_type) - - # Run the benchmark - with open(output_file, 'w') as raw_file: - p = subprocess.Popen(self.benchmarker.client_ssh_string.split(" "), stdin=subprocess.PIPE, stdout=raw_file, stderr=raw_file) - p.communicate(remote_script) - out.flush() - - # End resource usage metrics collection - self.__end_logging() - - results = self.__parse_test(test_type) - print("Benchmark results:") - pprint(results) - - self.benchmarker.report_benchmark_results(framework=self, test=test_type, results=results['results']) - out.write( "Complete\n" ) - out.flush() - - for test_type in self.runTests: - benchmark_type(test_type) - ############################################################ - # End benchmark - ############################################################ - - ############################################################ - # parse_all - # Method meant to be run for a given timestamp - ############################################################ - def parse_all(self): - for test_type in self.runTests: - if os.path.exists(self.benchmarker.get_output_file(self.name, test_type)): - results = self.__parse_test(test_type) - self.benchmarker.report_benchmark_results(framework=self, test=test_type, results=results['results']) - - ########################################################################################## - # Private Methods - ########################################################################################## - - ############################################################ - # __parse_test(test_type) - ############################################################ - def __parse_test(self, test_type): - try: - results = dict() - results['results'] = [] - stats = [] - - if os.path.exists(self.benchmarker.get_output_file(self.name, test_type)): - with open(self.benchmarker.output_file(self.name, test_type)) as raw_data: - is_warmup = True - rawData = None - for line in raw_data: - - if "Queries:" in line or "Concurrency:" in line: - is_warmup = False - rawData = None - continue - if "Warmup" in line or "Primer" in line: - is_warmup = True - continue - - if not is_warmup: - if rawData == None: - rawData = dict() - results['results'].append(rawData) - - #if "Requests/sec:" in line: - # m = re.search("Requests/sec:\s+([0-9]+)", line) - # rawData['reportedResults'] = m.group(1) - - # search for weighttp data such as succeeded and failed. - if "Latency" in line: - m = re.findall("([0-9]+\.*[0-9]*[us|ms|s|m|%]+)", line) - if len(m) == 4: - rawData['latencyAvg'] = m[0] - rawData['latencyStdev'] = m[1] - rawData['latencyMax'] = m[2] - # rawData['latencyStdevPercent'] = m[3] - - #if "Req/Sec" in line: - # m = re.findall("([0-9]+\.*[0-9]*[k|%]*)", line) - # if len(m) == 4: - # rawData['requestsAvg'] = m[0] - # rawData['requestsStdev'] = m[1] - # rawData['requestsMax'] = m[2] - # rawData['requestsStdevPercent'] = m[3] - - #if "requests in" in line: - # m = re.search("requests in ([0-9]+\.*[0-9]*[ms|s|m|h]+)", line) - # if m != None: - # # parse out the raw time, which may be in minutes or seconds - # raw_time = m.group(1) - # if "ms" in raw_time: - # rawData['total_time'] = float(raw_time[:len(raw_time)-2]) / 1000.0 - # elif "s" in raw_time: - # rawData['total_time'] = float(raw_time[:len(raw_time)-1]) - # elif "m" in raw_time: - # rawData['total_time'] = float(raw_time[:len(raw_time)-1]) * 60.0 - # elif "h" in raw_time: - # rawData['total_time'] = float(raw_time[:len(raw_time)-1]) * 3600.0 - - if "requests in" in line: - m = re.search("([0-9]+) requests in", line) - if m != None: - rawData['totalRequests'] = int(m.group(1)) - - if "Socket errors" in line: - if "connect" in line: - m = re.search("connect ([0-9]+)", line) - rawData['connect'] = int(m.group(1)) - if "read" in line: - m = re.search("read ([0-9]+)", line) - rawData['read'] = int(m.group(1)) - if "write" in line: - m = re.search("write ([0-9]+)", line) - rawData['write'] = int(m.group(1)) - if "timeout" in line: - m = re.search("timeout ([0-9]+)", line) - rawData['timeout'] = int(m.group(1)) - - if "Non-2xx" in line: - m = re.search("Non-2xx or 3xx responses: ([0-9]+)", line) - if m != None: - rawData['5xx'] = int(m.group(1)) - if "STARTTIME" in line: - m = re.search("[0-9]+", line) - rawData["startTime"] = int(m.group(0)) - if "ENDTIME" in line: - m = re.search("[0-9]+", line) - rawData["endTime"] = int(m.group(0)) - test_stats = self.__parse_stats(test_type, rawData["startTime"], rawData["endTime"], 1) - # rawData["averageStats"] = self.__calculate_average_stats(test_stats) - stats.append(test_stats) - with open(self.benchmarker.stats_file(self.name, test_type) + ".json", "w") as stats_file: - json.dump(stats, stats_file, indent=2) - - - return results - except IOError: - return None - ############################################################ - # End benchmark - ############################################################ - - ############################################################ - # __generate_concurrency_script(url, port) - # Generates the string containing the bash script that will - # be run on the client to benchmark a single test. This - # specifically works for the variable concurrency tests (JSON - # and DB) - ############################################################ - def __generate_concurrency_script(self, url, port, accept_header, wrk_command="wrk"): - headers = self.headers_template.format(server_host=self.benchmarker.server_host, accept=accept_header) - return self.concurrency_template.format(max_concurrency=max(self.benchmarker.concurrency_levels), - name=self.name, duration=self.benchmarker.duration, - levels=" ".join("{}".format(item) for item in self.benchmarker.concurrency_levels), - server_host=self.benchmarker.server_host, port=port, url=url, headers=headers, wrk=wrk_command) - - ############################################################ - # __generate_pipeline_script(url, port) - # Generates the string containing the bash script that will - # be run on the client to benchmark a single pipeline test. - ############################################################ - def __generate_pipeline_script(self, url, port, accept_header, wrk_command="wrk"): - headers = self.headers_template.format(server_host=self.benchmarker.server_host, accept=accept_header) - return self.pipeline_template.format(max_concurrency=max(self.benchmarker.pipeline_concurrency_levels), - name=self.name, duration=self.benchmarker.duration, - levels=" ".join("{}".format(item) for item in self.benchmarker.pipeline_concurrency_levels), - server_host=self.benchmarker.server_host, port=port, url=url, headers=headers, wrk=wrk_command, - pipeline=16) - - ############################################################ - # __generate_query_script(url, port) - # Generates the string containing the bash script that will - # be run on the client to benchmark a single test. This - # specifically works for the variable query tests (Query) - ############################################################ - def __generate_query_script(self, url, port, accept_header, query_levels): - headers = self.headers_template.format(server_host=self.benchmarker.server_host, accept=accept_header) - return self.query_template.format(max_concurrency=max(self.benchmarker.concurrency_levels), - name=self.name, duration=self.benchmarker.duration, - levels=" ".join("{}".format(item) for item in query_levels), - server_host=self.benchmarker.server_host, port=port, url=url, headers=headers) - - ############################################################ - # Returns True if any test type this this framework test will use a DB - ############################################################ - def requires_database(self): - '''Returns True/False if this test requires a database''' - return any(tobj.requires_db for (ttype,tobj) in self.runTests.iteritems()) - - ############################################################ - # __begin_logging - # Starts a thread to monitor the resource usage, to be synced with the client's time - # TODO: MySQL and InnoDB are possible. Figure out how to implement them. - ############################################################ - def __begin_logging(self, test_type): - output_file = "{file_name}".format(file_name=self.benchmarker.get_stats_file(self.name, test_type)) - dstat_string = "dstat -Tafilmprs --aio --fs --ipc --lock --raw --socket --tcp \ - --raw --socket --tcp --udp --unix --vm --disk-util \ - --rpc --rpcd --output {output_file}".format(output_file=output_file) - cmd = shlex.split(dstat_string) - dev_null = open(os.devnull, "w") - self.subprocess_handle = subprocess.Popen(cmd, stdout=dev_null, stderr=subprocess.STDOUT) - - ############################################################## - # Begin __end_logging - # Stops the logger thread and blocks until shutdown is complete. - ############################################################## - def __end_logging(self): - self.subprocess_handle.terminate() - self.subprocess_handle.communicate() - - ############################################################## - # Begin __parse_stats - # For each test type, process all the statistics, and return a multi-layered dictionary - # that has a structure as follows: - # (timestamp) - # | (main header) - group that the stat is in - # | | (sub header) - title of the stat - # | | | (stat) - the stat itself, usually a floating point number - ############################################################## - def __parse_stats(self, test_type, start_time, end_time, interval): - stats_dict = dict() - stats_file = self.benchmarker.stats_file(self.name, test_type) - with open(stats_file) as stats: - while(stats.next() != "\n"): # dstat doesn't output a completely compliant CSV file - we need to strip the header - pass - stats_reader = csv.reader(stats) - main_header = stats_reader.next() - sub_header = stats_reader.next() - time_row = sub_header.index("epoch") - int_counter = 0 - for row in stats_reader: - time = float(row[time_row]) - int_counter+=1 - if time < start_time: - continue - elif time > end_time: - return stats_dict - if int_counter % interval != 0: - continue - row_dict = dict() - for nextheader in main_header: - if nextheader != "": - row_dict[nextheader] = dict() - header = "" - for item_num, column in enumerate(row): - if(len(main_header[item_num]) != 0): - header = main_header[item_num] - row_dict[header][sub_header[item_num]] = float(column) # all the stats are numbers, so we want to make sure that they stay that way in json - stats_dict[time] = row_dict - return stats_dict - ############################################################## - # End __parse_stats - ############################################################## - - def __getattr__(self, name): - """For backwards compatibility, we used to pass benchmarker - as the argument to the setup.sh files""" - try: - x = getattr(self.benchmarker, name) - except AttributeError: - print("AttributeError: {!s} not a member of FrameworkTest or Benchmarker".format(name)) - print("This is probably a bug") - raise - return x - - ############################################################## - # Begin __calculate_average_stats - # We have a large amount of raw data for the statistics that - # may be useful for the stats nerds, but most people care about - # a couple of numbers. For now, we're only going to supply: - # * Average CPU - # * Average Memory - # * Total network use - # * Total disk use - # More may be added in the future. If they are, please update - # the above list. - # Note: raw_stats is directly from the __parse_stats method. - # Recall that this consists of a dictionary of timestamps, - # each of which contain a dictionary of stat categories which - # contain a dictionary of stats - ############################################################## - def __calculate_average_stats(self, raw_stats): - raw_stat_collection = dict() - - for timestamp, time_dict in raw_stats.items(): - for main_header, sub_headers in time_dict.items(): - item_to_append = None - if 'cpu' in main_header: - # We want to take the idl stat and subtract it from 100 - # to get the time that the CPU is NOT idle. - item_to_append = sub_headers['idl'] - 100.0 - elif main_header == 'memory usage': - item_to_append = sub_headers['used'] - elif 'net' in main_header: - # Network stats have two parts - recieve and send. We'll use a tuple of - # style (recieve, send) - item_to_append = (sub_headers['recv'], sub_headers['send']) - elif 'dsk' or 'io' in main_header: - # Similar for network, except our tuple looks like (read, write) - item_to_append = (sub_headers['read'], sub_headers['writ']) - if item_to_append is not None: - if main_header not in raw_stat_collection: - raw_stat_collection[main_header] = list() - raw_stat_collection[main_header].append(item_to_append) - - # Simple function to determine human readable size - # http://stackoverflow.com/questions/1094841/reusable-library-to-get-human-readable-version-of-file-size - def sizeof_fmt(num): - # We'll assume that any number we get is convertable to a float, just in case - num = float(num) - for x in ['bytes','KB','MB','GB']: - if num < 1024.0 and num > -1024.0: - return "%3.1f%s" % (num, x) - num /= 1024.0 - return "%3.1f%s" % (num, 'TB') - - # Now we have our raw stats in a readable format - we need to format it for display - # We need a floating point sum, so the built in sum doesn't cut it - display_stat_collection = dict() - for header, values in raw_stat_collection.items(): - display_stat = None - if 'cpu' in header: - display_stat = sizeof_fmt(math.fsum(values) / len(values)) - elif main_header == 'memory usage': - display_stat = sizeof_fmt(math.fsum(values) / len(values)) - elif 'net' in main_header: - receive, send = zip(*values) # unzip - display_stat = {'receive': sizeof_fmt(math.fsum(receive)), 'send': sizeof_fmt(math.fsum(send))} - else: # if 'dsk' or 'io' in header: - read, write = zip(*values) # unzip - display_stat = {'read': sizeof_fmt(math.fsum(read)), 'write': sizeof_fmt(math.fsum(write))} - display_stat_collection[header] = display_stat - return display_stat - ########################################################################################### - # End __calculate_average_stats - ######################################################################################### - - - ########################################################################################## - # Constructor - ########################################################################################## - def __init__(self, name, directory, benchmarker, runTests, args): - self.name = name - self.directory = directory - self.benchmarker = benchmarker - self.runTests = runTests - self.fwroot = benchmarker.fwroot - self.approach = "" - self.classification = "" - self.database = "" - self.framework = "" - self.language = "" - self.orm = "" - self.platform = "" - self.webserver = "" - self.os = "" - self.database_os = "" - self.display_name = "" - self.notes = "" - self.versus = "" - - # setup logging - logging.basicConfig(stream=sys.stderr, level=logging.INFO) - - self.install_root="%s/%s" % (self.fwroot, "installs") - - # Used in setup.sh scripts for consistency with - # the bash environment variables - self.troot = self.directory - self.iroot = self.install_root - - self.__dict__.update(args) - ############################################################ - # End __init__ - ############################################################ -############################################################ -# End FrameworkTest -############################################################ - - -# Static methods - -def test_order(type_name): - """ - This sort ordering is set up specifically to return the length - of the test name. There were SO many problems involved with - 'plaintext' being run first (rather, just not last) that we - needed to ensure that it was run last for every framework. - """ - return len(type_name) - - -def validate_urls(test_name, test_keys): - """ - Separated from validate_test because urls are not required anywhere. We know a url is incorrect if it is - empty or does not start with a "/" character. There is no validation done to ensure the url conforms to - the suggested url specifications, although those suggestions are presented if a url fails validation here. - """ - example_urls = { - "json_url": "/json", - "db_url": "/mysql/db", - "query_url": "/mysql/queries?queries= or /mysql/queries/", - "fortune_url": "/mysql/fortunes", - "update_url": "/mysql/updates?queries= or /mysql/updates/", - "plaintext_url": "/plaintext", - "cached_query_url": "/mysql/cached_queries?queries= or /mysql/cached_queries" - } - - for test_url in ["json_url","db_url","query_url","fortune_url","update_url","plaintext_url","cached_query_url"]: - key_value = test_keys.get(test_url, None) - if key_value != None and not key_value.startswith('/'): - errmsg = """`%s` field in test \"%s\" does not appear to be a valid url: \"%s\"\n - Example `%s` url: \"%s\" - """ % (test_url, test_name, key_value, test_url, example_urls[test_url]) - raise Exception(errmsg) - - -def validate_test(test_name, test_keys, directory): - """ - Validate benchmark config values for this test based on a schema - """ - # Ensure that each FrameworkTest has a framework property, inheriting from top-level if not - if not test_keys['framework']: - test_keys['framework'] = config['framework'] - - recommended_lang = directory.split('/')[-2] - windows_url = "https://github.com/TechEmpower/FrameworkBenchmarks/issues/1038" - schema = { - 'language': { - 'help': ('language', 'The language of the framework used, suggestion: %s' % recommended_lang) - }, - 'webserver': { - 'help': ('webserver', 'Name of the webserver also referred to as the "front-end server"') - }, - 'classification': { - 'allowed': [ - ('Fullstack', '...'), - ('Micro', '...'), - ('Platform', '...') - ] - }, - 'database': { - 'allowed': [ - ('MySQL', 'One of the most popular databases around the web and in TFB'), - ('Postgres', 'An advanced SQL database with a larger feature set than MySQL'), - ('MongoDB', 'A popular document-store database'), - ('Cassandra', 'A highly performant and scalable NoSQL database'), - ('Elasticsearch', 'A distributed RESTful search engine that is used as a database for TFB tests'), - ('Redis', 'An open-sourced, BSD licensed, advanced key-value cache and store'), - ('SQLite', 'A network-less database, still supported for backwards compatibility'), - ('SQLServer', 'Microsoft\'s SQL implementation'), - ('None', 'No database was used for these tests, as is the case with Json Serialization and Plaintext') - ] - }, - 'approach': { - 'allowed': [ - ('Realistic', '...'), - ('Stripped', '...') - ] - }, - 'orm': { - 'allowed': [ - ('Full', 'Has a full suite of features like lazy loading, caching, multiple language support, sometimes pre-configured with scripts.'), - ('Micro', 'Has basic database driver capabilities such as establishing a connection and sending queries.'), - ('Raw', 'Tests that do not use an ORM will be classified as "raw" meaning they use the platform\'s raw database connectivity.') - ] - }, - 'platform': { - 'help': ('platform', 'Name of the platform this framework runs on, e.g. Node.js, PyPy, hhvm, JRuby ...') - }, - 'framework': { - # Guranteed to be here and correct at this point - # key is left here to produce the set of required keys - }, - 'os': { - 'allowed': [ - ('Linux', 'Our best-supported host OS, it is recommended that you build your tests for Linux hosts'), - ('Windows', 'TFB is not fully-compatible on windows, contribute towards our work on compatibility: %s' % windows_url) - ] - }, - 'database_os': { - 'allowed': [ - ('Linux', 'Our best-supported host OS, it is recommended that you build your tests for Linux hosts'), - ('Windows', 'TFB is not fully-compatible on windows, contribute towards our work on compatibility: %s' % windows_url) - ] - } - } - - # Confirm required keys are present - required_keys = schema.keys() - missing = list(set(required_keys) - set(test_keys)) - - if len(missing) > 0: - missingstr = (", ").join(map(str, missing)) - raise Exception("benchmark_config.json for test %s is invalid, please amend by adding the following required keys: [%s]" - % (test_name, missingstr)) - - # Check the (all optional) test urls - validate_urls(test_name, test_keys) - - # Check values of keys against schema - for key in required_keys: - val = test_keys.get(key, "").lower() - has_predefined_acceptables = 'allowed' in schema[key] - - if has_predefined_acceptables: - allowed = schema[key].get('allowed', []) - acceptable_values, descriptors = zip(*allowed) - acceptable_values = [a.lower() for a in acceptable_values] - - if val not in acceptable_values: - msg = ("Invalid `%s` value specified for test \"%s\" in framework \"%s\"; suggestions:\n" - % (key, test_name, test_keys['framework'])) - helpinfo = ('\n').join([" `%s` -- %s" % (v, desc) for (v, desc) in zip(acceptable_values, descriptors)]) - fullerr = msg + helpinfo + "\n" - raise Exception(fullerr) - - elif not has_predefined_acceptables and val == "": - msg = ("Value for `%s` in test \"%s\" in framework \"%s\" was missing:\n" - % (key, test_name, test_keys['framework'])) - helpinfo = " %s -- %s" % schema[key]['help'] - fullerr = msg + helpinfo + '\n' - raise Exception(fullerr) - -def parse_config(config, directory, benchmarker): - """ - Parses a config file into a list of FrameworkTest objects - """ - tests = [] - - # The config object can specify multiple tests - # Loop over them and parse each into a FrameworkTest - for test in config['tests']: - - tests_to_run = [name for (name,keys) in test.iteritems()] - if "default" not in tests_to_run: - logging.warn("Framework %s does not define a default test in benchmark_config.json", config['framework']) - - # Check that each test configuration is acceptable - # Throw exceptions if a field is missing, or how to improve the field - for test_name, test_keys in test.iteritems(): - # Validates the benchmark_config entry - validate_test(test_name, test_keys, directory) - - # Map test type to a parsed FrameworkTestType object - runTests = dict() - for type_name, type_obj in benchmarker.types.iteritems(): - try: - # Makes a FrameWorkTestType object using some of the keys in config - # e.g. JsonTestType uses "json_url" - runTests[type_name] = type_obj.copy().parse(test_keys) - except AttributeError as ae: - # This is quite common - most tests don't support all types - # Quitely log it and move on (debug logging is on in travis and this causes - # ~1500 lines of debug, so I'm totally ignoring it for now - # logging.debug("Missing arguments for test type %s for framework test %s", type_name, test_name) - pass - - # We need to sort by test_type to run - sortedTestKeys = sorted(runTests.keys(), key=test_order) - sortedRunTests = OrderedDict() - for sortedTestKey in sortedTestKeys: - sortedRunTests[sortedTestKey] = runTests[sortedTestKey] - - # Prefix all test names with framework except 'default' test - # Done at the end so we may still refer to the primary test as `default` in benchmark config error messages - if test_name == 'default': - test_name = config['framework'] - else: - test_name = "%s-%s" % (config['framework'], test_name) - - # By passing the entire set of keys, each FrameworkTest will have a member for each key - tests.append(FrameworkTest(test_name, directory, benchmarker, sortedRunTests, test_keys)) - - return tests + base_url)] + log("Verifying test %s for %s caused an exception: %s" % + (test_type, self.name, e), + color=Fore.RED) + traceback.format_exc() + + test.failed = any( + result == 'fail' for (result, reason, url) in results) + test.warned = any( + result == 'warn' for (result, reason, url) in results) + test.passed = all( + result == 'pass' for (result, reason, url) in results) + + def output_result(result, reason, url): + specific_rules_url = "http://frameworkbenchmarks.readthedocs.org/en/latest/Project-Information/Framework-Tests/#specific-test-requirements" + color = Fore.GREEN + if result.upper() == "WARN": + color = Fore.YELLOW + elif result.upper() == "FAIL": + color = Fore.RED + + log(" {!s}{!s}{!s} for {!s}".format( + color, result.upper(), Style.RESET_ALL, url), + file=verification) + if reason is not None and len(reason) != 0: + for line in reason.splitlines(): + log(" " + line, file=verification) + if not test.passed: + log(" See {!s}".format(specific_rules_url), + file=verification) + + [output_result(r1, r2, url) for (r1, r2, url) in results] + + if test.failed: + self.results.report_verify_results(self, test_type, 'fail') + elif test.warned: + self.results.report_verify_results(self, test_type, 'warn') + elif test.passed: + self.results.report_verify_results(self, test_type, 'pass') + else: + raise Exception( + "Unknown error - test did not pass,warn,or fail") + + result = True + for test_type in self.runTests: + verify_type(test_type) + if self.runTests[test_type].failed: + result = False + + return result \ No newline at end of file diff --git a/toolset/benchmark/test_types/cached_query_type.py b/toolset/benchmark/test_types/cached_query_type.py index cd3c6f8a5dc..6918e8c47f5 100644 --- a/toolset/benchmark/test_types/cached_query_type.py +++ b/toolset/benchmark/test_types/cached_query_type.py @@ -1,21 +1,17 @@ -from benchmark.test_types.framework_test_type import FrameworkTestType -from benchmark.test_types.verifications import ( - verify_headers, - verify_randomnumber_list, - verify_query_cases -) +from toolset.benchmark.test_types.framework_test_type import FrameworkTestType +from toolset.benchmark.test_types.verifications import verify_query_cases class CachedQueryTestType(FrameworkTestType): - - def __init__(self): + def __init__(self, config): + self.cached_query_url = "" kwargs = { 'name': 'cached_query', 'accept_header': self.accept('json'), 'requires_db': True, 'args': ['cached_query_url'] } - FrameworkTestType.__init__(self, **kwargs) + FrameworkTestType.__init__(self, config, **kwargs) def get_url(self): return self.cached_query_url @@ -30,13 +26,8 @@ def verify(self, base_url): ''' url = base_url + self.cached_query_url - cases = [ - ('2', 'fail'), - ('0', 'fail'), - ('foo', 'fail'), - ('501', 'warn'), - ('', 'fail') - ] + cases = [('2', 'fail'), ('0', 'fail'), ('foo', 'fail'), + ('501', 'warn'), ('', 'fail')] problems = verify_query_cases(self, cases, url) @@ -44,3 +35,25 @@ def verify(self, base_url): return [('pass', '', url + case) for case, _ in cases] else: return problems + + def get_script_name(self): + return 'concurrency.sh' + + def get_script_variables(self, name, url): + return { + 'max_concurrency': + max(self.config.concurrency_levels), + 'name': + name, + 'duration': + self.config.duration, + 'levels': + " ".join( + "{}".format(item) for item in self.config.concurrency_levels), + 'server_host': + self.config.server_host, + 'url': + url, + 'accept': + "application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7" + } diff --git a/toolset/benchmark/test_types/db_type.py b/toolset/benchmark/test_types/db_type.py index 0561a70d7dc..18c516d7eaa 100644 --- a/toolset/benchmark/test_types/db_type.py +++ b/toolset/benchmark/test_types/db_type.py @@ -1,25 +1,24 @@ -from benchmark.test_types.framework_test_type import FrameworkTestType -from benchmark.test_types.verifications import basic_body_verification, verify_headers, verify_randomnumber_object - -import json +from toolset.benchmark.test_types.framework_test_type import FrameworkTestType +from toolset.benchmark.test_types.verifications import basic_body_verification, verify_headers, verify_randomnumber_object class DBTestType(FrameworkTestType): - - def __init__(self): + def __init__(self, config): + self.db_url = "" kwargs = { 'name': 'db', 'accept_header': self.accept('json'), 'requires_db': True, 'args': ['db_url'] } - FrameworkTestType.__init__(self, **kwargs) + FrameworkTestType.__init__(self, config, **kwargs) def get_url(self): return self.db_url def verify(self, base_url): - '''Ensures body is valid JSON with a key 'id' and a key + ''' + Ensures body is valid JSON with a key 'id' and a key 'randomNumber', both of which must map to integers ''' @@ -29,20 +28,24 @@ def verify(self, base_url): response, problems = basic_body_verification(body, url) if len(problems) > 0: - return problems + return problems # We are allowing the single-object array # e.g. [{'id':5, 'randomNumber':10}] for now, # but will likely make this fail at some point if type(response) == list: response = response[0] - problems.append( - ('warn', 'Response is a JSON array. Expected JSON object (e.g. [] vs {})', url)) + problems.append(( + 'warn', + 'Response is a JSON array. Expected JSON object (e.g. [] vs {})', + url)) # Make sure there was a JSON object inside the array if type(response) != dict: - problems.append( - ('fail', 'Response is not a JSON object or an array of JSON objects', url)) + problems.append(( + 'fail', + 'Response is not a JSON object or an array of JSON objects', + url)) return problems # Verify response content @@ -53,3 +56,25 @@ def verify(self, base_url): return [('pass', '', url)] else: return problems + + def get_script_name(self): + return 'concurrency.sh' + + def get_script_variables(self, name, url): + return { + 'max_concurrency': + max(self.config.concurrency_levels), + 'name': + name, + 'duration': + self.config.duration, + 'levels': + " ".join( + "{}".format(item) for item in self.config.concurrency_levels), + 'server_host': + self.config.server_host, + 'url': + url, + 'accept': + "application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7" + } diff --git a/toolset/benchmark/test_types/fortune_type.py b/toolset/benchmark/test_types/fortune_type.py index 023d40231a1..fb1bc05d284 100644 --- a/toolset/benchmark/test_types/fortune_type.py +++ b/toolset/benchmark/test_types/fortune_type.py @@ -1,24 +1,25 @@ -from benchmark.test_types.framework_test_type import FrameworkTestType -from benchmark.fortune_html_parser import FortuneHTMLParser -from benchmark.test_types.verifications import basic_body_verification, verify_headers +from toolset.benchmark.test_types.framework_test_type import FrameworkTestType +from toolset.benchmark.fortune_html_parser import FortuneHTMLParser +from toolset.benchmark.test_types.verifications import basic_body_verification, verify_headers class FortuneTestType(FrameworkTestType): - - def __init__(self): + def __init__(self, config): + self.fortune_url = "" kwargs = { 'name': 'fortune', 'accept_header': self.accept('html'), 'requires_db': True, 'args': ['fortune_url'] } - FrameworkTestType.__init__(self, **kwargs) + FrameworkTestType.__init__(self, config, **kwargs) def get_url(self): return self.fortune_url def verify(self, base_url): - '''Parses the given HTML string and asks the + ''' + Parses the given HTML string and asks the FortuneHTMLParser whether the parsed string is a valid fortune response ''' @@ -33,7 +34,7 @@ def verify(self, base_url): parser = FortuneHTMLParser() parser.feed(body) - (valid, diff) = parser.isValidFortune(self.out) + (valid, diff) = parser.isValidFortune(self.name, self.out) if valid: problems += verify_headers(headers, url, should_be='html') @@ -44,13 +45,14 @@ def verify(self, base_url): return problems else: failures = [] - failures.append( - ('fail', 'Invalid according to FortuneHTMLParser', url)) + failures.append(('fail', 'Invalid according to FortuneHTMLParser', + url)) failures += self._parseDiffForFailure(diff, failures, url) return failures def _parseDiffForFailure(self, diff, failures, url): - '''Example diff: + ''' + Example diff: --- Valid +++ Response @@ -73,17 +75,36 @@ def _parseDiffForFailure(self, diff, failures, url): elif line[0] == '-': current_pos.append(line[1:]) elif line[0] == '@': - problems.append(('fail', - "`%s` should be `%s`" % ( - ''.join(current_neg), ''.join(current_pos)), - url)) + problems.append(('fail', "`%s` should be `%s`" % + (''.join(current_neg), + ''.join(current_pos)), url)) if len(current_pos) != 0: - problems.append( - ('fail', - "`%s` should be `%s`" % ( - ''.join(current_neg), ''.join(current_pos)), - url)) + problems.append(('fail', "`%s` should be `%s`" % + (''.join(current_neg), + ''.join(current_pos)), url)) except: # If there were errors reading the diff, then no diff information pass return problems + + def get_script_name(self): + return 'concurrency.sh' + + def get_script_variables(self, name, url): + return { + 'max_concurrency': + max(self.config.concurrency_levels), + 'name': + name, + 'duration': + self.config.duration, + 'levels': + " ".join( + "{}".format(item) for item in self.config.concurrency_levels), + 'server_host': + self.config.server_host, + 'url': + url, + 'accept': + "application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7" + } diff --git a/toolset/benchmark/test_types/framework_test_type.py b/toolset/benchmark/test_types/framework_test_type.py index c557d7d6412..a9b82588e37 100644 --- a/toolset/benchmark/test_types/framework_test_type.py +++ b/toolset/benchmark/test_types/framework_test_type.py @@ -1,24 +1,17 @@ import copy import sys -import os import json -import subprocess -from subprocess import PIPE import requests import MySQLdb import psycopg2 import pymongo +import traceback -# Requests is built ontop of urllib3, -# here we prevent general request logging -import logging -logging.getLogger('urllib3').setLevel(logging.CRITICAL) - -from pprint import pprint +from colorama import Fore +from toolset.utils.output_helper import log class FrameworkTestType: - ''' Interface between a test type (json, query, plaintext, etc) and the rest of TFB. A test type defines a number of keys it expects @@ -29,7 +22,13 @@ class FrameworkTestType: exist a member `X.spam = 'foobar'`. ''' - def __init__(self, name, requires_db=False, accept_header=None, args=[]): + def __init__(self, + config, + name, + requires_db=False, + accept_header=None, + args=[]): + self.config = config self.name = name self.requires_db = requires_db self.args = args @@ -47,9 +46,12 @@ def __init__(self, name, requires_db=False, accept_header=None, args=[]): def accept(self, content_type): return { - 'json': 'application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7', - 'html': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', - 'plaintext': 'text/plain,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' + 'json': + 'application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7', + 'html': + 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', + 'plaintext': + 'text/plain,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' }[content_type] def setup_out(self, out): @@ -76,25 +78,23 @@ def parse(self, test_keys): return self else: # This is quite common - most tests don't support all types raise AttributeError( - "A %s requires the benchmark_config.json to contain %s" % (self.name, self.args)) + "A %s requires the benchmark_config.json to contain %s" % + (self.name, self.args)) def request_headers_and_body(self, url): ''' Downloads a URL and returns the HTTP response headers and body content as a tuple ''' - print("Accessing URL {!s}:".format(url)) - self.out.write("Accessing URL %s \n" % url) + log("Accessing URL {!s}: ".format(url), color=Fore.CYAN) headers = {'Accept': self.accept_header} r = requests.get(url, timeout=15, headers=headers) headers = r.headers body = r.content - self.out.write(str(headers)) - self.out.write(body) - b = 40 - print(" Response (trimmed to {:d} bytes): \"{!s}\"".format(b, body.strip()[:b])) + log(str(headers)) + log(body) return headers, body def verify(self, base_url): @@ -119,11 +119,26 @@ def verify(self, base_url): raise NotImplementedError("Subclasses must provide verify") def get_url(self): - '''Returns the URL for this test, like '/json''' + ''' + Returns the URL for this test, like '/json' + ''' # This is a method because each test type uses a different key # for their URL so the base class can't know which arg is the URL raise NotImplementedError("Subclasses must provide get_url") + def get_script_name(self): + ''' + Returns the remote script name for running the benchmarking process. + ''' + raise NotImplementedError("Subclasses must provide get_script_name") + + def get_script_variables(self, name, url, port): + ''' + Returns the remote script variables for running the benchmarking process. + ''' + raise NotImplementedError( + "Subclasses must provide get_script_variables") + def copy(self): ''' Returns a copy that can be safely modified. @@ -146,22 +161,27 @@ def get_current_world_table(self): if database_name == "mysql": try: - db = MySQLdb.connect(os.environ.get("DBHOST"), "benchmarkdbuser", "benchmarkdbpass", "hello_world") + db = MySQLdb.connect(self.config.database_host, + "benchmarkdbuser", "benchmarkdbpass", + "hello_world") cursor = db.cursor() cursor.execute("SELECT * FROM World") results = cursor.fetchall() results_json.append(json.loads(json.dumps(dict(results)))) db.close() - except Exception as e: - print("ERROR: Unable to load current MySQL World table.") - print(e) + except Exception: + tb = traceback.format_exc() + log("ERROR: Unable to load current MySQL World table.", + color=Fore.RED) + log(tb) elif database_name == "postgres": try: - db = psycopg2.connect(host=os.environ.get("DBHOST"), - port="5432", - user="benchmarkdbuser", - password="benchmarkdbpass", - database="hello_world") + db = psycopg2.connect( + host=self.config.database_host, + port="5432", + user="benchmarkdbuser", + password="benchmarkdbpass", + database="hello_world") cursor = db.cursor() cursor.execute("SELECT * FROM \"World\"") results = cursor.fetchall() @@ -171,26 +191,35 @@ def get_current_world_table(self): results = cursor.fetchall() results_json.append(json.loads(json.dumps(dict(results)))) db.close() - except Exception as e: - print("ERROR: Unable to load current Postgres World table.") - print(e) + except Exception: + tb = traceback.format_exc() + log("ERROR: Unable to load current Postgres World table.", + color=Fore.RED) + log(tb) elif database_name == "mongodb": try: worlds_json = {} - connection = pymongo.MongoClient(host=os.environ.get("DBHOST")) + print("DATABASE_HOST: %s" % self.config.database_host) + connection = pymongo.MongoClient( + host=self.config.database_host) db = connection.hello_world for world in db.world.find(): if "randomNumber" in world: if "id" in world: - worlds_json[str(int(world["id"]))] = int(world["randomNumber"]) + worlds_json[str(int(world["id"]))] = int( + world["randomNumber"]) elif "_id" in world: - worlds_json[str(int(world["_id"]))] = int(world["randomNumber"]) + worlds_json[str(int(world["_id"]))] = int( + world["randomNumber"]) results_json.append(worlds_json) connection.close() - except Exception as e: - print("ERROR: Unable to load current MongoDB World table.") - print(e) + except Exception: + tb = traceback.format_exc() + log("ERROR: Unable to load current MongoDB World table.", + color=Fore.RED) + log(tb) else: - raise ValueError("Database: {!s} does not exist".format(database_name)) + raise ValueError( + "Database: {!s} does not exist".format(database_name)) return results_json diff --git a/toolset/benchmark/test_types/json_type.py b/toolset/benchmark/test_types/json_type.py index c4b137e8579..cddafa1a3aa 100644 --- a/toolset/benchmark/test_types/json_type.py +++ b/toolset/benchmark/test_types/json_type.py @@ -1,29 +1,24 @@ -from benchmark.test_types.framework_test_type import FrameworkTestType -from benchmark.test_types.verifications import ( - basic_body_verification, - verify_headers, - verify_helloworld_object -) - -import json +from toolset.benchmark.test_types.framework_test_type import FrameworkTestType +from toolset.benchmark.test_types.verifications import basic_body_verification, verify_headers, verify_helloworld_object class JsonTestType(FrameworkTestType): - - def __init__(self): + def __init__(self, config): + self.json_url = "" kwargs = { 'name': 'json', 'accept_header': self.accept('json'), 'requires_db': False, 'args': ['json_url'] } - FrameworkTestType.__init__(self, **kwargs) + FrameworkTestType.__init__(self, config, **kwargs) def get_url(self): return self.json_url def verify(self, base_url): - '''Validates the response is a JSON object of + ''' + Validates the response is a JSON object of { 'message' : 'hello, world!' }. Case insensitive and quoting style is ignored ''' @@ -43,3 +38,25 @@ def verify(self, base_url): return problems else: return [('pass', '', url)] + + def get_script_name(self): + return 'concurrency.sh' + + def get_script_variables(self, name, url): + return { + 'max_concurrency': + max(self.config.concurrency_levels), + 'name': + name, + 'duration': + self.config.duration, + 'levels': + " ".join( + "{}".format(item) for item in self.config.concurrency_levels), + 'server_host': + self.config.server_host, + 'url': + url, + 'accept': + "application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7" + } diff --git a/toolset/benchmark/test_types/plaintext_type.py b/toolset/benchmark/test_types/plaintext_type.py index ed41077417f..571e73671ae 100644 --- a/toolset/benchmark/test_types/plaintext_type.py +++ b/toolset/benchmark/test_types/plaintext_type.py @@ -1,17 +1,17 @@ -from benchmark.test_types.framework_test_type import FrameworkTestType -from benchmark.test_types.verifications import basic_body_verification, verify_headers +from toolset.benchmark.test_types.framework_test_type import FrameworkTestType +from toolset.benchmark.test_types.verifications import basic_body_verification, verify_headers class PlaintextTestType(FrameworkTestType): - - def __init__(self): + def __init__(self, config): + self.plaintext_url = "" kwargs = { 'name': 'plaintext', 'requires_db': False, 'accept_header': self.accept('plaintext'), 'args': ['plaintext_url'] } - FrameworkTestType.__init__(self, **kwargs) + FrameworkTestType.__init__(self, config, **kwargs) def verify(self, base_url): url = base_url + self.plaintext_url @@ -23,21 +23,20 @@ def verify(self, base_url): return problems # Case insensitive - orig = body body = body.lower() expected = "hello, world!" extra_bytes = len(body) - len(expected) if expected not in body: - return [('fail', "Could not find 'Hello, World!' in response.", url)] + return [('fail', "Could not find 'Hello, World!' in response.", + url)] if extra_bytes > 0: problems.append( ('warn', ("Server is returning %s more bytes than are required. " - "This may negatively affect benchmark performance." - % (extra_bytes)), - url)) + "This may negatively affect benchmark performance." % + (extra_bytes)), url)) problems += verify_headers(headers, url, should_be='plaintext') @@ -48,3 +47,27 @@ def verify(self, base_url): def get_url(self): return self.plaintext_url + + def get_script_name(self): + return 'pipeline.sh' + + def get_script_variables(self, name, url): + return { + 'max_concurrency': + max(self.config.concurrency_levels), + 'name': + name, + 'duration': + self.config.duration, + 'levels': + " ".join("{}".format(item) + for item in self.config.pipeline_concurrency_levels), + 'server_host': + self.config.server_host, + 'url': + url, + 'pipeline': + 16, + 'accept': + "text/plain,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7" + } diff --git a/toolset/benchmark/test_types/query_type.py b/toolset/benchmark/test_types/query_type.py index 4c52f315e41..da1e075c3d4 100644 --- a/toolset/benchmark/test_types/query_type.py +++ b/toolset/benchmark/test_types/query_type.py @@ -1,23 +1,17 @@ -from benchmark.test_types.framework_test_type import FrameworkTestType -from benchmark.test_types.verifications import ( - verify_headers, - verify_randomnumber_list, - verify_query_cases -) - -import json +from toolset.benchmark.test_types.framework_test_type import FrameworkTestType +from toolset.benchmark.test_types.verifications import verify_query_cases class QueryTestType(FrameworkTestType): - - def __init__(self): + def __init__(self, config): + self.query_url = "" kwargs = { 'name': 'query', 'accept_header': self.accept('json'), 'requires_db': True, 'args': ['query_url'] } - FrameworkTestType.__init__(self, **kwargs) + FrameworkTestType.__init__(self, config, **kwargs) def get_url(self): return self.query_url @@ -32,13 +26,8 @@ def verify(self, base_url): ''' url = base_url + self.query_url - cases = [ - ('2', 'fail'), - ('0', 'fail'), - ('foo', 'fail'), - ('501', 'warn'), - ('', 'fail') - ] + cases = [('2', 'fail'), ('0', 'fail'), ('foo', 'fail'), + ('501', 'warn'), ('', 'fail')] problems = verify_query_cases(self, cases, url) @@ -46,3 +35,24 @@ def verify(self, base_url): return [('pass', '', url + case) for case, _ in cases] else: return problems + + def get_script_name(self): + return 'query.sh' + + def get_script_variables(self, name, url): + return { + 'max_concurrency': + max(self.config.concurrency_levels), + 'name': + name, + 'duration': + self.config.duration, + 'levels': + " ".join("{}".format(item) for item in self.config.query_levels), + 'server_host': + self.config.server_host, + 'url': + url, + 'accept': + "application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7" + } diff --git a/toolset/benchmark/test_types/update_type.py b/toolset/benchmark/test_types/update_type.py index 69389077922..79aa2a1a803 100644 --- a/toolset/benchmark/test_types/update_type.py +++ b/toolset/benchmark/test_types/update_type.py @@ -1,23 +1,24 @@ -from benchmark.test_types.framework_test_type import FrameworkTestType -from benchmark.test_types.verifications import verify_query_cases +from toolset.benchmark.test_types.framework_test_type import FrameworkTestType +from toolset.benchmark.test_types.verifications import verify_query_cases class UpdateTestType(FrameworkTestType): - - def __init__(self): + def __init__(self, config): + self.update_url = "" kwargs = { 'name': 'update', 'accept_header': self.accept('json'), 'requires_db': True, 'args': ['update_url', 'database'] } - FrameworkTestType.__init__(self, **kwargs) + FrameworkTestType.__init__(self, config, **kwargs) def get_url(self): return self.update_url def verify(self, base_url): - '''Validates the response is a JSON array of + ''' + Validates the response is a JSON array of the proper length, each JSON Object in the array has keys 'id' and 'randomNumber', and these keys map to integers. Case insensitive and @@ -25,16 +26,32 @@ def verify(self, base_url): ''' url = base_url + self.update_url - cases = [ - ('2', 'fail'), - ('0', 'fail'), - ('foo', 'fail'), - ('501', 'warn'), - ('', 'fail') - ] + cases = [('2', 'fail'), ('0', 'fail'), ('foo', 'fail'), + ('501', 'warn'), ('', 'fail')] problems = verify_query_cases(self, cases, url, True) if len(problems) == 0: return [('pass', '', url + case) for (case, _) in cases] else: return problems + + def get_script_name(self): + return 'query.sh' + + def get_script_variables(self, name, url): + return { + 'max_concurrency': + max(self.config.concurrency_levels), + 'name': + name, + 'duration': + self.config.duration, + 'levels': + " ".join("{}".format(item) for item in self.config.query_levels), + 'server_host': + self.config.server_host, + 'url': + url, + 'accept': + "application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7" + } diff --git a/toolset/benchmark/test_types/verifications.py b/toolset/benchmark/test_types/verifications.py index 95b74e12d11..13e3e2e87b2 100644 --- a/toolset/benchmark/test_types/verifications.py +++ b/toolset/benchmark/test_types/verifications.py @@ -1,6 +1,8 @@ import json import re -import math +import traceback + +from toolset.utils.output_helper import log def basic_body_verification(body, url, is_json_check=True): @@ -48,24 +50,23 @@ def verify_headers(headers, url, should_be='json'): problems = [] - for v in (v for v in ('Server', 'Date', 'Content-Type') if v.lower() not in headers): - problems.append( - ('warn', 'Required response header missing: %s' % v, url)) + for v in (v for v in ('Server', 'Date', 'Content-Type') + if v.lower() not in headers): + problems.append(('warn', 'Required response header missing: %s' % v, + url)) - if all(v.lower() not in headers for v in ('Content-Length', 'Transfer-Encoding')): - problems.append( - ('warn', - 'Required response size header missing, please include either "Content-Length" or "Transfer-Encoding"', - url)) + if all(v.lower() not in headers + for v in ('Content-Length', 'Transfer-Encoding')): + problems.append(( + 'warn', + 'Required response size header missing, please include either "Content-Length" or "Transfer-Encoding"', + url)) content_type = headers.get('Content-Type', None) if content_type is None: - problems.append( - ('warn', - 'No content encoding found, expected \"%s\"' % ( - expected_type), - url)) + problems.append(('warn', 'No content encoding found, expected \"%s\"' % + (expected_type), url)) else: # Split out "charset=utf-8" if it's included content_type_list = re.split('; *', content_type.lower()) @@ -73,31 +74,25 @@ def verify_headers(headers, url, should_be='json'): # "text/html" requires charset to be set. The others do not if expected_type == types['html']: if expected_type not in content_type_list: - problems.append( - ('warn', - 'Unexpected content encoding, found \"%s\", expected \"%s\".' % ( - content_type, expected_type + '; ' + charset), - url)) + problems.append(( + 'warn', + 'Unexpected content encoding, found \"%s\", expected \"%s\".' + % (content_type, expected_type + '; ' + charset), url)) elif charset not in content_type_list: - problems.append( - ('warn', - ('The \"%s\" content type requires \"charset=utf-8\" to be specified.' - % expected_type), - url)) + problems.append(('warn', ( + 'The \"%s\" content type requires \"charset=utf-8\" to be specified.' + % expected_type), url)) else: if expected_type not in content_type_list: - problems.append( - ('warn', - 'Unexpected content encoding, found \"%s\", expected \"%s\"' % ( - content_type, expected_type), - url)) + problems.append(( + 'warn', + 'Unexpected content encoding, found \"%s\", expected \"%s\"' + % (content_type, expected_type), url)) elif charset in content_type_list: - problems.append( - ('warn', - ("Content encoding found in \"%s\" where \"%s\" is acceptable.\n" - "Additional response bytes may negatively affect benchmark performance." - % (content_type, expected_type)), - url)) + problems.append(('warn', ( + "Content encoding found in \"%s\" where \"%s\" is acceptable.\n" + "Additional response bytes may negatively affect benchmark performance." + % (content_type, expected_type)), url)) return problems @@ -110,8 +105,7 @@ def verify_helloworld_object(json_object, url): problems = [] # Make everything case insensitive - json_object = {k.lower(): v.lower() - for k, v in json_object.iteritems()} + json_object = {k.lower(): v.lower() for k, v in json_object.iteritems()} if 'message' not in json_object: return [('fail', "Missing required key 'message'", url)] @@ -121,14 +115,19 @@ def verify_helloworld_object(json_object, url): additional = (', ').join( [k for k in json_object.keys() if k != 'message']) problems.append( - ('warn', "Too many JSON key/value pairs, consider removing: %s" % additional, url)) + ('warn', "Too many JSON key/value pairs, consider removing: %s" + % additional, url)) if json_len > 27: problems.append( - 'warn', "%s additional response byte(s) found. Consider removing unnecessary whitespace." % (json_len - 26)) + 'warn', + "%s additional response byte(s) found. Consider removing unnecessary whitespace." + % (json_len - 26)) message = json_object['message'] if message != 'hello, world!': - return [('fail', "Expected message of 'hello, world!', got '%s'" % message, url)] + return [('fail', + "Expected message of 'hello, world!', got '%s'" % message, + url)] return problems @@ -148,7 +147,8 @@ def verify_randomnumber_object(db_object, url, max_infraction='fail'): got = str(db_object)[:20] if len(str(db_object)) > 20: got = str(db_object)[:17] + '...' - return [(max_infraction, "Expected a JSON object, got '%s' instead" % got, url)] + return [(max_infraction, + "Expected a JSON object, got '%s' instead" % got, url)] # Make keys case insensitive db_object = {k.lower(): v for k, v in db_object.iteritems()} @@ -156,15 +156,14 @@ def verify_randomnumber_object(db_object, url, max_infraction='fail'): for v in (v for v in required_keys if v not in db_object): problems.append( - (max_infraction, 'Response object was missing required key: %s' % v, url)) + (max_infraction, + 'Response object was missing required key: %s' % v, url)) if len(db_object) > len(required_keys): extras = set(db_object.keys()) - required_keys problems.append( - ('warn', - 'An extra key(s) is being included with the db object: %s' % ', '.join( - extras), - url)) + ('warn', 'An extra key(s) is being included with the db object: %s' + % ', '.join(extras), url)) # All required keys must be present if len(problems) > 0: @@ -175,31 +174,37 @@ def verify_randomnumber_object(db_object, url, max_infraction='fail'): o_id = int(db_object['id']) if o_id > 10000 or o_id < 1: - problems.append( - ('warn', - 'Response key id should be between 1 and 10,000: ' + - str(o_id), - url)) + problems.append(( + 'warn', + 'Response key id should be between 1 and 10,000: ' + str(o_id), + url)) except TypeError as e: problems.append( - (max_infraction, "Response key 'id' does not map to an integer - %s" % e, url)) + (max_infraction, + "Response key 'id' does not map to an integer - %s" % e, url)) try: o_rn = int(db_object['randomnumber']) if o_rn > 10000: - problems.append( - ('warn', - 'Response key `randomNumber` is over 10,000. This may negatively affect performance by sending extra bytes', - url)) + problems.append(( + 'warn', + 'Response key `randomNumber` is over 10,000. This may negatively affect performance by sending extra bytes', + url)) except TypeError as e: problems.append( - (max_infraction, "Response key 'randomnumber' does not map to an integer - %s" % e, url)) + (max_infraction, + "Response key 'randomnumber' does not map to an integer - %s" % e, + url)) return problems -def verify_randomnumber_list(expected_len, headers, body, url, max_infraction='fail'): +def verify_randomnumber_list(expected_len, + headers, + body, + url, + max_infraction='fail'): ''' Validates that the object is a list containing a number of randomnumber object. Should closely resemble: @@ -215,21 +220,20 @@ def verify_randomnumber_list(expected_len, headers, body, url, max_infraction='f # rather than a list containing one element. We allow this with a warn, # then verify the supplied object if type(response) is not list: - problems.append( - ('warn', 'Top-level JSON is an object, not an array', url)) + problems.append(('warn', 'Top-level JSON is an object, not an array', + url)) problems += verify_randomnumber_object(response, url, max_infraction) return problems if any(type(item) is not dict for item in response): problems.append( - (max_infraction, 'Not all items in the JSON array were JSON objects', url)) + (max_infraction, + 'Not all items in the JSON array were JSON objects', url)) if len(response) != expected_len: - problems.append( - (max_infraction, - "JSON array length of %s != expected length of %s" % ( - len(response), expected_len), - url)) + problems.append((max_infraction, + "JSON array length of %s != expected length of %s" % + (len(response), expected_len), url)) # Verify individual objects, arbitrarily stop after 5 bad ones are found # i.e. to not look at all 500 @@ -249,11 +253,12 @@ def verify_randomnumber_list(expected_len, headers, body, url, max_infraction='f return problems + def verify_updates(old_worlds, new_worlds, updates_expected, url): ''' Validates that the /updates requests actually updated values in the database and didn't just return a JSON list of the correct number of World items. -sz + old_worlds a JSON object containing the state of the Worlds table BEFORE the /updates requests new_worlds a JSON object containing the state of the Worlds table AFTER the /updates requests If no items were updated, this validation test returns a "fail." @@ -267,32 +272,34 @@ def verify_updates(old_worlds, new_worlds, updates_expected, url): n = 0 while n < len(old_worlds) and successful_updates == 0: - print(old_worlds[n]['1']) for i in range(1, 10001): try: entry_id = str(i) - if entry_id in old_worlds[n] and entry_id in new_worlds[n]: + if entry_id in old_worlds[n] and entry_id in new_worlds[n]: if old_worlds[n][entry_id] != new_worlds[n][entry_id]: successful_updates += 1 - except Exception as e: - print e + except Exception: + tb = traceback.format_exc() + log(tb) n += 1 if successful_updates == 0: - problems.append( - ("fail", "No items were updated in the database.", url)) + problems.append(("fail", "No items were updated in the database.", + url)) elif successful_updates <= (updates_expected * 0.90): - problems.append( - ("fail", "Only %s items were updated in the database out of roughly %s expected." % (successful_updates, updates_expected), url)) + problems.append(( + "fail", + "Only %s items were updated in the database out of roughly %s expected." + % (successful_updates, updates_expected), url)) elif successful_updates <= (updates_expected * 0.95): - problems.append( - ("warn", - "There may have been an error updating the database. Only %s items were updated in the database out of the roughly %s expected." % ( - successful_updates, updates_expected), - url)) + problems.append(( + "warn", + "There may have been an error updating the database. Only %s items were updated in the database out of the roughly %s expected." + % (successful_updates, updates_expected), url)) return problems + def verify_query_cases(self, cases, url, check_updates=False): ''' The /updates and /queries tests accept a `queries` parameter @@ -337,8 +344,8 @@ def verify_query_cases(self, cases, url, check_updates=False): else: expected_len = queries - problems += verify_randomnumber_list( - expected_len, headers, body, case_url, max_infraction) + problems += verify_randomnumber_list(expected_len, headers, body, + case_url, max_infraction) problems += verify_headers(headers, case_url) # Only check update changes if we are doing an Update verification and if we're testing @@ -347,7 +354,8 @@ def verify_query_cases(self, cases, url, check_updates=False): # previously held if check_updates and queries >= MAX: world_db_after = self.get_current_world_table() - problems += verify_updates(world_db_before, world_db_after, MAX, case_url) + problems += verify_updates(world_db_before, world_db_after, + MAX, case_url) except ValueError: warning = ( @@ -356,15 +364,11 @@ def verify_query_cases(self, cases, url, check_updates=False): '(this will be a failure in future rounds, please fix)') if body is None: - problems.append( - (max_infraction, - warning % ('No response', q), - case_url)) + problems.append((max_infraction, warning % ('No response', q), + case_url)) elif len(body) == 0: - problems.append( - (max_infraction, - warning % ('Empty response', q), - case_url)) + problems.append((max_infraction, warning % ('Empty response', + q), case_url)) else: expected_len = 1 # Strictness will be upped in a future round, i.e. Frameworks currently do not have diff --git a/toolset/benchmark/utils.py b/toolset/benchmark/utils.py deleted file mode 100644 index 1af7fbb5a73..00000000000 --- a/toolset/benchmark/utils.py +++ /dev/null @@ -1,197 +0,0 @@ -import ConfigParser -import os -import glob -import json -import socket - -from ast import literal_eval - -def gather_langauges(): - ''' - Gathers all the known languages in the suite via the folder names - beneath FWROOT. - ''' - # Avoid setting up a circular import - from setup.linux import setup_util - - lang_dir = os.path.join(setup_util.get_fwroot(), "frameworks") - langs = [] - for dir in glob.glob(os.path.join(lang_dir, "*")): - langs.append(dir.replace(lang_dir,"")[1:]) - return langs - - -def gather_tests(include = [], exclude=[], benchmarker=None): - ''' - Given test names as strings, returns a list of FrameworkTest objects. - For example, 'aspnet-mysql-raw' turns into a FrameworkTest object with - variables for checking the test directory, the test database os, and - other useful items. - - With no arguments, every test in this framework will be returned. - With include, only tests with this exact name will be returned. - With exclude, all tests but those excluded will be returned. - - A benchmarker is needed to construct full FrameworkTest objects. If - one is not provided, a default Benchmarker will be created. - ''' - - # Avoid setting up a circular import - from benchmark import framework_test - from benchmark.benchmarker import Benchmarker - from setup.linux import setup_util - - # Help callers out a bit - if include is None: - include = [] - if exclude is None: - exclude = [] - - # Old, hacky method to exclude all tests was to - # request a test known to not exist, such as ''. - # If test '' was requested, short-circuit and return - # nothing immediately - if len(include) == 1 and '' in include: - return [] - - # Setup default Benchmarker using example configuration - if benchmarker is None: - default_config = setup_util.get_fwroot() + "/benchmark.cfg" - config = ConfigParser.SafeConfigParser() - config.readfp(open(default_config)) - defaults = dict(config.items("Defaults")) - - # Convert strings into proper python types - for k,v in defaults.iteritems(): - try: - defaults[k] = literal_eval(v) - except Exception: - pass - - # Ensure we only run the __init__ method of Benchmarker - defaults['install'] = None - defaults['results_name'] = "(unspecified, datetime = %Y-%m-%d %H:%M:%S)" - defaults['results_environment'] = "My Server Environment" - defaults['test_dir'] = None - defaults['quiet'] = True - - benchmarker = Benchmarker(defaults) - - - # Search for configuration files - fwroot = setup_util.get_fwroot() - config_files = [] - if benchmarker.test_dir: - for test_dir in benchmarker.test_dir: - dir_config_files = glob.glob("{!s}/frameworks/{!s}/benchmark_config.json".format(fwroot, test_dir)) - if len(dir_config_files): - config_files.extend(dir_config_files) - else: - raise Exception("Unable to locate tests in test-dir: {!s}".format(test_dir)) - else: - config_files.extend(glob.glob("{!s}/frameworks/*/*/benchmark_config.json".format(fwroot))) - - tests = [] - for config_file_name in config_files: - config = None - with open(config_file_name, 'r') as config_file: - try: - config = json.load(config_file) - except ValueError: - # User-friendly errors - print("Error loading '{!s}'.".format(config_file_name)) - raise - - # Find all tests in the config file - config_tests = framework_test.parse_config(config, - os.path.dirname(config_file_name), benchmarker) - - # Filter - for test in config_tests: - if len(include) is 0 and len(exclude) is 0: - # No filters, we are running everything - tests.append(test) - elif test.name in exclude: - continue - elif test.name in include: - tests.append(test) - else: - # An include list exists, but this test is - # not listed there, so we ignore it - pass - - # Ensure we were able to locate everything that was - # explicitly included - if 0 != len(include): - names = {test.name for test in tests} - if 0 != len(set(include) - set(names)): - missing = list(set(include) - set(names)) - raise Exception("Unable to locate tests %s" % missing) - - tests.sort(key=lambda x: x.name) - return tests - -def gather_frameworks(include = [], exclude=[], benchmarker=None): - '''Return a dictionary mapping frameworks->[test1,test2,test3] - for quickly grabbing all tests in a grouped manner. - Args have the same meaning as gather_tests''' - - tests = gather_tests(include, exclude, benchmarker) - frameworks = dict() - - for test in tests: - if test.framework not in frameworks: - frameworks[test.framework] = [] - frameworks[test.framework].append(test) - return frameworks - -def header(message, top='-', bottom='-'): - ''' - Generates a clean header - ''' - topheader = (top * 80)[:80] - bottomheader = (bottom * 80)[:80] - result = "" - if topheader != "": - result += "%s" % topheader - if message != "": - if result == "": - result = " %s" % message - else: - result += "\n %s" % message - if bottomheader != "": - if result == "": - result = "%s" % bottomheader - else: - result += "\n%s" % bottomheader - return result + '\n' - -def check_services(services): - - def check_service(address, port): - try: - s = socket.socket() - s.settimeout(20) - s.connect((address, port)) - return (True, "") - except Exception as ex: - return (False, ex) - finally: - s.close - - res = [] - for s in services: - r = check_service(s[1], s[2]) - res.append((s[0], r[0], str(r[1]))) - return res - -def verify_database_connections(services): - allGo = True - messages = [] - for r in check_services(services): - if r[1]: - messages.append(r[0] + ": is GO!") - else: - messages.append(r[0] + ": is _NO_ GO!: ERROR: " + r[2]) - allGo = False - return (allGo, messages) diff --git a/toolset/continuous/run-continuously.sh b/toolset/continuous/run-continuously.sh index c569df04625..6b312c7657a 100755 --- a/toolset/continuous/run-continuously.sh +++ b/toolset/continuous/run-continuously.sh @@ -33,6 +33,10 @@ do git clone -b $TFB_REPOBRANCH $TFB_REPOURI $TFB_REPOPARENT/$TFB_REPONAME # Replace the benchmark.cfg cp $TFB_REPOPARENT/benchmark.cfg $TFB_REPOPARENT/$TFB_REPONAME/benchmark.cfg 2>/dev/null + # Set the hosts correctly in the benchmark.cfg + sed -i 's|server_host=.*|server_host='"$TFB_SERVER"'|g' $TFB_REPOPARENT/$TFB_REPONAME/benchmark.cfg 2>/dev/null + sed -i 's|database_host=.*|database_host='"$TFB_DATABASE"'|g' $TFB_REPOPARENT/$TFB_REPONAME/benchmark.cfg 2>/dev/null + sed -i 's|client_host=.*|client_host='"$TFB_CLIENT"'|g' $TFB_REPOPARENT/$TFB_REPONAME/benchmark.cfg 2>/dev/null echo Running continuous tasks $TFB_REPOPARENT/$TFB_REPONAME/toolset/continuous/tasks/run-tasks.sh diff --git a/toolset/continuous/tasks/keep-logs.py b/toolset/continuous/tasks/keep-logs.py index 6bb8a652c40..1a2f0ac319a 100755 --- a/toolset/continuous/tasks/keep-logs.py +++ b/toolset/continuous/tasks/keep-logs.py @@ -1,18 +1,16 @@ -#!/usr/bin/python # -# Archives, to the specified folder, the logged output generated by a benchmark -# run. +# Archives, to the specified folder, the logged output generated by a benchmark +# run. # # @author A. Shawn Bandy import os import zipfile import datetime import requests -import shutil # Follows closely from: # http://stackoverflow.com/a/34153816 # -# Paths to the log folders are generated by TFB and where those files +# Paths to the log folders are generated by TFB and where those files # should be archived. # path_in = os.path.abspath(os.path.normpath(os.path.expanduser(os.path.join( \ @@ -24,15 +22,15 @@ dt_folder)) if not os.path.exists(path_out): - os.makedirs(path_out) + os.makedirs(path_out) zip_path = path_out + '/results.zip' zip_file = zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) for root, dirs, files in os.walk(path_in): - for file in files: - zip_file.write(os.path.join(root, file)) + for file in files: + zip_file.write(os.path.join(root, file)) zip_file.close() @@ -40,4 +38,7 @@ if results_upload_uri != None: with open(zip_path, 'rb') as file_to_upload: - requests.post(results_upload_uri, headers={ 'Content-Type': 'application/zip' }, data=file_to_upload) + requests.post( + results_upload_uri, + headers={'Content-Type': 'application/zip'}, + data=file_to_upload) diff --git a/toolset/continuous/tasks/run-benchmarks.sh b/toolset/continuous/tasks/run-benchmarks.sh index 40bd14d36da..77e79017c3a 100755 --- a/toolset/continuous/tasks/run-benchmarks.sh +++ b/toolset/continuous/tasks/run-benchmarks.sh @@ -4,5 +4,7 @@ echo Change to benchmark root cd $TFB_REPOPARENT/$TFB_REPONAME +echo Cleaning +FWROOT=$TFB_REPOPARENT/$TFB_REPONAME PYTHONPATH=$TFB_REPOPARENT/$TFB_REPONAME python toolset/run-tests.py --clean echo Running tests -toolset/run-tests.py \ No newline at end of file +FWROOT=$TFB_REPOPARENT/$TFB_REPONAME PYTHONPATH=$TFB_REPOPARENT/$TFB_REPONAME python toolset/run-tests.py \ No newline at end of file diff --git a/toolset/continuous/tasks/run-tasks.sh b/toolset/continuous/tasks/run-tasks.sh index 950f845d34f..eeef509a27e 100755 --- a/toolset/continuous/tasks/run-tasks.sh +++ b/toolset/continuous/tasks/run-tasks.sh @@ -20,4 +20,4 @@ $TFB_REPOPARENT/$TFB_REPONAME/toolset/continuous/tasks/run-benchmarks.sh # Tasks after the run # ########################## -$TFB_REPOPARENT/$TFB_REPONAME/toolset/continuous/tasks/keep-logs.py +FWROOT=$TFB_REPOPARENT/$TFB_REPONAME PYTHONPATH=$TFB_REPOPARENT/$TFB_REPONAME python $TFB_REPOPARENT/$TFB_REPONAME/toolset/continuous/tasks/keep-logs.py diff --git a/toolset/run-tests.py b/toolset/run-tests.py index 99847b75039..5c10e6e1655 100755 --- a/toolset/run-tests.py +++ b/toolset/run-tests.py @@ -1,184 +1,253 @@ -#!/usr/bin/env python import argparse -import ConfigParser import socket import sys -import time -import os -import platform -import multiprocessing -import itertools -import copy -from benchmark.benchmarker import Benchmarker -from setup.linux.unbuffered import Unbuffered -from setup.linux import setup_util -from scaffolding import Scaffolding -from ast import literal_eval +import signal +from toolset.benchmark.benchmarker import Benchmarker +from toolset.utils.scaffolding import Scaffolding +from toolset.utils import cleaner +from toolset.utils.results_helper import Results +from toolset.utils.benchmark_config import BenchmarkConfig +from toolset.utils import docker_helper +from toolset.utils.metadata_helper import gather_tests +from toolset.utils.output_helper import log # Enable cross-platform colored output -from colorama import init +from colorama import init, Fore init() +# Required to be globally known +config = None + + class StoreSeqAction(argparse.Action): - '''Helper class for parsing a sequence from the command line''' + ''' + Helper class for parsing a sequence from the command line + ''' + def __init__(self, option_strings, dest, nargs=None, **kwargs): - super(StoreSeqAction, self).__init__(option_strings, dest, type=str, **kwargs) + super(StoreSeqAction, self).__init__( + option_strings, dest, type=str, **kwargs) + def __call__(self, parser, namespace, values, option_string=None): setattr(namespace, self.dest, self.parse_seq(values)) + def parse_seq(self, argument): result = argument.split(',') sequences = [x for x in result if ":" in x] for sequence in sequences: try: - (start,step,end) = sequence.split(':') + (start, step, end) = sequence.split(':') except ValueError: - print(" Invalid: {!s}".format(sequence)) - print(" Requires start:step:end, e.g. 1:2:10") + log(" Invalid: {!s}".format(sequence), color=Fore.RED) + log(" Requires start:step:end, e.g. 1:2:10", color=Fore.RED) raise result.remove(sequence) result = result + range(int(start), int(end), int(step)) return [abs(int(item)) for item in result] +def __stop(signal, frame): + log("Shutting down (may take a moment)") + docker_helper.stop(config) + sys.exit(0) + + +signal.signal(signal.SIGTERM, __stop) +signal.signal(signal.SIGINT, __stop) + + ################################################################################################### # Main ################################################################################################### def main(argv=None): - ''' Runs the program. There are three ways to pass arguments - 1) environment variables TFB_* - 2) configuration file benchmark.cfg - 3) command line flags - In terms of precedence, 3 > 2 > 1, so config file trumps environment variables - but command line flags have the final say + ''' + Runs the toolset. ''' # Do argv default this way, as doing it in the functional declaration sets it at compile time if argv is None: argv = sys.argv - # Enable unbuffered output so messages will appear in the proper order with subprocess output. - sys.stdout=Unbuffered(sys.stdout) - - # Update python environment - # 1) Ensure the current directory (which should be the benchmark home directory) is in the path so that the tests can be imported. - sys.path.append('.') - # 2) Ensure toolset/setup/linux is in the path so that the tests can "import setup_util". - sys.path.append('toolset/setup/linux') - - # Update environment for shell scripts - os.environ['FWROOT'] = setup_util.get_fwroot() - os.environ['IROOT'] = os.environ['FWROOT'] + '/installs' - # 'Ubuntu', '14.04', 'trusty' respectively - os.environ['TFB_DISTRIB_ID'], os.environ['TFB_DISTRIB_RELEASE'], os.environ['TFB_DISTRIB_CODENAME'] = platform.linux_distribution() - # App server cpu count - os.environ['CPU_COUNT'] = str(multiprocessing.cpu_count()) - - print("FWROOT is {!s}.".format(os.environ['FWROOT'])) - - conf_parser = argparse.ArgumentParser( - description=__doc__, - formatter_class=argparse.RawDescriptionHelpFormatter, - add_help=False) - conf_parser.add_argument( - '--conf_file', default='benchmark.cfg', metavar='FILE', - help='Optional configuration file to provide argument defaults. All config options can be overridden using the command line.') - args, remaining_argv = conf_parser.parse_known_args() - - defaults = {} - try: - if not os.path.exists(os.path.join(os.environ['FWROOT'], args.conf_file)) and not os.path.exists(os.path.join(os.environ['FWROOT'] + 'benchmark.cfg')): - print("No config file found. Aborting!") - exit(1) - with open (os.path.join(os.environ['FWROOT'], args.conf_file)): - config = ConfigParser.SafeConfigParser() - config.read([os.path.join(os.environ['FWROOT'], args.conf_file)]) - defaults.update(dict(config.items("Defaults"))) - # Convert strings into proper python types - for k, v in defaults.iteritems(): - try: - defaults[k] = literal_eval(v) - except Exception: - pass - except IOError: - print("Configuration file not found!") - exit(1) - - ########################################################## - # Set up default values - ########################################################## - - # Verify and massage options - if defaults['client_user'] is None or defaults['client_host'] is None: - print("client_user and client_host are required!") - print("Please check your configuration file.") - print("Aborting!") - exit(1) - - if defaults['database_user'] is None: - defaults['database_user'] = defaults['client_user'] - if defaults['database_host'] is None: - defaults['database_host'] = defaults['client_host'] - if defaults['server_host'] is None: - defaults['server_host'] = defaults['client_host'] - if defaults['ulimit'] is None: - defaults['ulimit'] = 200000 - - os.environ['ULIMIT'] = str(defaults['ulimit']) - ########################################################## # Set up argument parser ########################################################## - parser = argparse.ArgumentParser(description="Install or run the Framework Benchmarks test suite.", - parents=[conf_parser], - formatter_class=argparse.ArgumentDefaultsHelpFormatter, - epilog='''If an argument includes (type int-sequence), then it accepts integer lists in multiple forms. + parser = argparse.ArgumentParser( + description="Install or run the Framework Benchmarks test suite.", + formatter_class=argparse.ArgumentDefaultsHelpFormatter, + epilog= + '''If an argument includes (type int-sequence), then it accepts integer lists in multiple forms. Using a single number e.g. 5 will create a list [5]. Using commas will create a list containing those values e.g. 1,3,6 creates [1, 3, 6]. Using three colon-separated numbers of start:step:end will create a list, using the semantics of python's range function, e.g. 1:3:15 creates [1, 4, 7, 10, 13] while 0:1:5 creates [0, 1, 2, 3, 4] ''') - # Install options - parser.add_argument('--clean', action='store_true', default=False, help='Removes the results directory') - parser.add_argument('--clean-all', action='store_true', dest='clean_all', default=False, help='Removes the results and installs directories') - parser.add_argument('--new', action='store_true', default=False, help='Initialize a new framework test') + # Suite options + parser.add_argument( + '--publish', + action='store_true', + default=False, + help='Builds and publishes all the docker images in the suite') + parser.add_argument( + '--build', + nargs='+', + help='Builds the dockerfile(s) for the given test(s)') + parser.add_argument( + '--clean', + action='store_true', + default=False, + help='Removes the results directory') + parser.add_argument( + '--new', + action='store_true', + default=False, + help='Initialize a new framework test') + parser.add_argument( + '--quiet', + action='store_true', + default=False, + help= + 'Only print a limited set of messages to stdout, keep the bulk of messages in log files only' + ) + parser.add_argument( + '--results-name', + help='Gives a name to this set of results, formatted as a date', + default='(unspecified, datetime = %Y-%m-%d %H:%M:%S)') + parser.add_argument( + '--results-environment', + help='Describes the environment in which these results were gathered', + default='(unspecified, hostname = %s)' % socket.gethostname()) + parser.add_argument( + '--results-upload-uri', + default=None, + help= + 'A URI where the in-progress results.json file will be POSTed periodically' + ) + parser.add_argument( + '--parse', + help= + 'Parses the results of the given timestamp and merges that with the latest results' + ) # Test options - parser.add_argument('--test', nargs='+', help='names of tests to run') - parser.add_argument('--test-dir', nargs='+', dest='test_dir', help='name of framework directory containing all tests to run') - parser.add_argument('--exclude', nargs='+', help='names of tests to exclude') - parser.add_argument('--type', choices=['all', 'json', 'db', 'query', 'cached_query', 'fortune', 'update', 'plaintext'], default='all', help='which type of test to run') - parser.add_argument('-m', '--mode', choices=['benchmark', 'verify', 'debug'], default='benchmark', help='verify mode will only start up the tests, curl the urls and shutdown. debug mode will skip verification and leave the server running.') - parser.add_argument('--list-tests', action='store_true', default=False, help='lists all the known tests that can run') + parser.add_argument( + '--test', default=None, nargs='+', help='names of tests to run') + parser.add_argument( + '--test-dir', + nargs='+', + dest='test_dir', + help='name of framework directory containing all tests to run') + parser.add_argument( + '--test-lang', + nargs='+', + dest='test_lang', + help='name of language directory containing all tests to run') + parser.add_argument( + '--exclude', default=None, nargs='+', help='names of tests to exclude') + parser.add_argument( + '--type', + choices=[ + 'all', 'json', 'db', 'query', 'cached_query', 'fortune', 'update', + 'plaintext' + ], + default='all', + help='which type of test to run') + parser.add_argument( + '-m', + '--mode', + choices=['benchmark', 'verify', 'debug'], + default='benchmark', + help= + 'verify mode will only start up the tests, curl the urls and shutdown. debug mode will skip verification and leave the server running.' + ) + parser.add_argument( + '--list-tests', + action='store_true', + default=False, + help='lists all the known tests that can run') # Benchmark options - parser.add_argument('--duration', default=15, help='Time in seconds that each test should run for.') - parser.add_argument('--sleep', type=int, default=60, help='the amount of time to sleep after starting each test to allow the server to start up.') - - # Misc Options - parser.add_argument('--results-name', help='Gives a name to this set of results, formatted as a date', default='(unspecified, datetime = %Y-%m-%d %H:%M:%S)') - parser.add_argument('--results-environment', help='Describes the environment in which these results were gathered', default='(unspecified, hostname = %s)' % socket.gethostname()) - parser.add_argument('--results-upload-uri', default=None, help='A URI where the in-progress results.json file will be POSTed periodically') - parser.add_argument('--parse', help='Parses the results of the given timestamp and merges that with the latest results') - parser.add_argument('-v', '--verbose', action='store_true', default=False, help='Causes the configuration to print before any other commands are executed.') - parser.add_argument('--quiet', action='store_true', default=False, help='Only print a limited set of messages to stdout, keep the bulk of messages in log files only') - parser.set_defaults(**defaults) # Must do this after add, or each option's default will override the configuration file default - args = parser.parse_args(remaining_argv) - - if args.new: + parser.add_argument( + '--duration', + default=15, + help='Time in seconds that each test should run for.') + parser.add_argument( + '--server-host', + default='tfb-server', + help='Hostname/IP for application server') + parser.add_argument( + '--database-host', + default='tfb-database', + help='Hostname/IP for database server') + parser.add_argument( + '--client-host', default='', help='Hostname/IP for client server') + parser.add_argument( + '--concurrency-levels', + nargs='+', + default=[16, 32, 64, 128, 256, 512], + help='List of concurrencies to benchmark') + parser.add_argument( + '--pipeline-concurrency-levels', + nargs='+', + default=[256, 1024, 4096, 16384], + help='List of pipeline concurrencies to benchmark') + parser.add_argument( + '--query-levels', + nargs='+', + default=[1, 5, 10, 15, 20], + help='List of query levels to benchmark') + parser.add_argument( + '--cached-query-levels', + nargs='+', + default=[1, 10, 20, 50, 100], + help='List of cached query levels to benchmark') + + # Network options + parser.add_argument( + '--network-mode', + default=None, + help='The network mode to run docker in') + + args = parser.parse_args() + + global config + config = BenchmarkConfig(args) + results = Results(config) + + if config.new: Scaffolding() - return 0 - benchmarker = Benchmarker(vars(args)) + elif config.publish: + docker_helper.publish(config) + + elif config.build: + docker_helper.build(config, config.build) + + elif config.clean: + cleaner.clean(results) + docker_helper.clean(config) + + elif config.list_tests: + all_tests = gather_tests(benchmarker_config=config) + + for test in all_tests: + log(test.name) + + elif config.parse != None: + # TODO: broken + all_tests = gather_tests(benchmarker_config=config) + + for test in all_tests: + test.parse_all() + + results.parse(all_tests) - # Run the benchmarker in the specified mode - # Do not use benchmarker variables for these checks, - # they are either str or bool based on the python version - if args.list_tests: - benchmarker.run_list_tests() - elif args.parse != None: - benchmarker.parse_timestamp() else: - return benchmarker.run() + benchmarker = Benchmarker(config, results) + if not benchmarker.run(): + return 1 + + return 0 + if __name__ == "__main__": sys.exit(main()) diff --git a/toolset/scaffolding.py b/toolset/scaffolding.py deleted file mode 100755 index 397fefc7485..00000000000 --- a/toolset/scaffolding.py +++ /dev/null @@ -1,348 +0,0 @@ -# -*- coding: utf-8 -*- - -import sys -import os -import imp -from shutil import copytree -from setup.linux.setup_util import replace_text -from benchmark.utils import gather_frameworks, gather_langauges - -class Scaffolding: - def __init__(self): - print(""" -------------------------------------------------------------------------------- - This wizard is intended to help build the scaffolding required for a new - test to be benchmarked. - - From here, you will be prompted for values related to the test you - wish to add. --------------------------------------------------------------------------------""") - - try: - self.__gather_display_name() - self.__gather_language() - self.__gather_approach() - self.__gather_classification() - self.__gather_orm() - self.__gather_webserver() - self.__gather_versus() - self.__confirm_values() - self.__print_success() - except: - print("") - - def __gather_display_name(self): - print(""" - The name of your test as you wish it to be displayed on the results page. - - Example: Gemini, Gin, Express - """) - self.__prompt_display_name() - while not self.display_name: - self.__prompt_display_name() - self.name = self.display_name.lower() - - def __prompt_display_name(self): - self.display_name = raw_input("Name: ").strip() - - found = False - for framework in gather_frameworks(): - if framework.lower() == self.display_name.lower(): - found = True - - if found: - print(""" - It appears that there is already a '%s' framework in the test suite. You will - have to pick a different name. - """ % self.display_name) - self.display_name = None - - def __gather_language(self): - print(""" - The language in which your test implementation is written. - - Example: Java, Go, PHP - """) - self.language = None - while not self.language: - self.__prompt_language() - - def __prompt_language(self): - self.language = raw_input("Language: ").strip() - - known_languages = gather_langauges() - language = None - for lang in known_languages: - if lang.lower() == self.language.lower(): - language = lang - - if not language: - similar = [] - for lang in known_languages: - if lang.lower()[:1] == self.language.lower()[:1]: - similar.append(lang) - similar = ', '.join(similar) - - print(""" - That language is not currently in our list of known languages. - - Here is a list of similar languages present in our benchmark suite that you - may have meant: - - %s - - Did you mean to add the new language, '%s', to the benchmark suite? - """ % (similar, self.language)) - valid = self.__prompt_confirm_new_language(known_languages) - while not valid: - valid = self.__prompt_confirm_new_language(known_languages) - - if self.confirm_new_lang == 'n': - self.language = None - else: - self.language = self.language.title() - - return self.language - - def __prompt_confirm_new_language(self, known_languages): - self.confirm_new_lang = raw_input("Create New Language '%s' (y/n): " % self.language).strip().lower() - return self.confirm_new_lang == 'y' or self.confirm_new_lang == 'n' - - def __gather_approach(self): - print(""" - The approach of your test implementation. - - 1) Realistic: Uses the framework with most out-of-the-box functionality - enabled. We consider this realistic because most applications - built with the framework will leave these features enabled. - 2) Stripped: Removes or outright avoids implementing features that are - unnecessary for the particulars of the benchmark exercise. This - might illuminate the marginal improvement available in fine- - tuning a framework to your application's use-case. - - Note: If you are unsure, then your approach is probably Realistic. The - Stripped approach is seldom used and will not have results displayed - by default on the results website. - """) - valid = self.__prompt_approach() - while not valid: - valid = self.__prompt_approach() - - def __prompt_approach(self): - self.approach = raw_input("Approach [1/2]: ").strip() - if self.approach == '1': - self.approach = 'Realistic' - if self.approach == '2': - self.approach = 'Stripped' - return self.approach == 'Realistic' or self.approach == 'Stripped' - - def __gather_classification(self): - print(""" - The classification of your test implementation. - - 1) Fullstack: Robust framework expected to provide high-level functionality - for serving as a web application; for example, ability to - compose views, provide functions for responding with several - data types (json, html, etc), connecting to a database, form - processing, etc. - 2) Micro: Simple framework expected to provide enough middleware to build - a robust web application such as request routing and some - simple plumbing, but may not include built-in functionality - such as, for example, server-composed views. - 3) Platform: Barebones infrastructure for servicing HTTP requests, but does - not include a framework at all. - """) - valid = self.__prompt_classification() - while not valid: - valid = self.__prompt_classification() - if self.classification == 'Platform': - self.platform = 'None' - self.framework = 'None' - else: - self.framework = self.display_name - self.__gather_platform() - - def __prompt_classification(self): - self.classification = raw_input("Classification [1/2/3]: ").strip() - if self.classification == '1': - self.classification = 'Fullstack' - if self.classification == '2': - self.classification = 'Micro' - if self.classification == '3': - self.classification = 'Platform' - return self.classification == 'Fullstack' or \ - self.classification == 'Micro' or \ - self.classification == 'Platform' - - def __gather_platform(self): - print(""" - The platform of your test implementation. - - The platform is the low-level software or API used to host web applications - for the framework; the platform provides an implementation of the HTTP - fundamentals. - - Not all frameworks have a platform and if your programming language provides - much of that by which we define a platform, leave black. - - Example: Servlet, Wai, .NET - """) - self.__prompt_platform() - - def __prompt_platform(self): - self.platform = raw_input("Platform (optional): ").strip() - if self.platform == '': - self.platform = 'None' - - def __gather_orm(self): - print(""" - How you would classify the ORM (object relational mapper) of your test? - - 1) Full: A feature-rich ORM which provides functionality for interacting - with a database without writing a query in all but the most edge - cases. - 2) Micro: An ORM which provides functionality for interacting with a database - for many trivial operations (querying, updating), but not more - robust cases (for example, gathering relations). - 3) Raw: No ORM; raw database access. - """) - valid = self.__prompt_orm() - while not valid: - valid = self.__prompt_orm() - - def __prompt_orm(self): - self.orm = raw_input("ORM [1/2/3]: ").strip() - if self.orm == '1': - self.orm = 'Full' - if self.orm == '2': - self.orm = 'Micro' - if self.orm == '3': - self.orm = 'Raw' - return self.orm == 'Full' or \ - self.orm == 'Micro' or \ - self.orm == 'Raw' - - def __gather_webserver(self): - print(""" - Name of the front-end webserver sitting in front of your test implementation. - - Your test implementation may not use a web-server and may act as its own; you - can leave this blank in this case. - - Example: nginx, Meinheld, httplight - """) - self.__prompt_webserver() - - def __prompt_webserver(self): - self.webserver = raw_input("Webserver (optional): ").strip() - if self.webserver == '': - self.webserver = 'None' - - def __gather_versus(self): - print(""" - The name of another test (elsewhere in this project) that is a subset of this - framework. - This allows for the generation of the framework efficiency chart in the - results web site. - For example, Compojure is compared to "servlet" since Compojure is built on - the Servlet platform. - - Example: Servlet, Wai, Undertow - """) - self.__prompt_versus() - - def __prompt_versus(self): - self.versus = raw_input("Versus (optional): ").strip() - if self.versus == '': - self.versus = 'None' - - def __confirm_values(self): - print(""" - Name: %s - Language: %s - Approach: %s - Classification: %s - Platform: %s - ORM: %s - Webserver: %s - Versus: %s - - Finalize the initialization of your test given the above values? - - Note: once you have initialized your test, you can change these values later. - """ % (self.display_name, - self.language, - self.approach, - self.classification, - self.platform, - self.orm, - self.webserver, - self.versus)) - - valid = self.__prompt_confirmation() - while not valid: - valid = self.__prompt_confirmation() - - if self.confirmation == 'y': - self.__build_scaffolding() - else: - print('Aborting') - - def __prompt_confirmation(self): - self.confirmation = raw_input("Initialize [y/n]: ").strip().lower() - return self.confirmation == 'y' or self.confirmation == 'n' - - def __build_scaffolding(self): - if self.__create_test_folder(): - self.__copy_scaffold_files() - self.__edit_scaffold_files() - - def __create_test_folder(self): - self.language_dir = os.path.join("frameworks", self.language) - self.test_dir = os.path.join(self.language_dir, self.name) - - if os.path.exists(self.test_dir): - print("Test '%s' already exists; aborting." % self.name) - return False - - return True - - def __copy_scaffold_files(self): - self.scaffold_dir = os.path.join("toolset","setup","scaffolding") - copytree(self.scaffold_dir, self.test_dir) - - def __edit_scaffold_files(self): - for file in os.listdir(os.path.join(self.test_dir)): - replace_text(os.path.join(self.test_dir, file), "\$NAME", self.name) - replace_text(os.path.join(self.test_dir, file), "\$DISPLAY_NAME", self.display_name) - replace_text(os.path.join(self.test_dir, file), "\$APPROACH", self.approach) - replace_text(os.path.join(self.test_dir, file), "\$CLASSIFICATION", self.classification) - replace_text(os.path.join(self.test_dir, file), "\$FRAMEWORK", self.framework) - replace_text(os.path.join(self.test_dir, file), "\$LANGUAGE", self.language) - replace_text(os.path.join(self.test_dir, file), "\$ORM", self.orm) - replace_text(os.path.join(self.test_dir, file), "\$PLATFORM", self.platform) - replace_text(os.path.join(self.test_dir, file), "\$WEBSERVER", self.webserver) - replace_text(os.path.join(self.test_dir, file), "\$VERSUS", self.versus) - - def __print_success(self): - print(""" -------------------------------------------------------------------------------- - Success! - - Your new test structure has been built to the sepcifications of the suite. - Here is a brief run-down of what has been built: - - frameworks - └─── %s - └─── %s - ├─── .gitignore - ├─── benchmark_config.json - ├─── README.md - ├─── setup.sh - ├─── setup_mysql.sh - └─── source_code - - The next step is to read through your README.md and follow the instructions - provided therein. --------------------------------------------------------------------------------""" - % (self.language, self.name)) \ No newline at end of file diff --git a/toolset/setup/__init__.py b/toolset/setup/__init__.py deleted file mode 100644 index feae8cb576c..00000000000 --- a/toolset/setup/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Setup diff --git a/toolset/setup/docker/base.dockerfile b/toolset/setup/docker/base.dockerfile new file mode 100755 index 00000000000..ce548c28147 --- /dev/null +++ b/toolset/setup/docker/base.dockerfile @@ -0,0 +1,30 @@ +FROM ubuntu:16.04 + +RUN apt-get update + +# Install some common development tools +RUN apt-get install -y software-properties-common build-essential curl locales wget unzip git \ + libmysqlclient-dev libpq-dev \ + libpcre3 libpcre3-dev \ + libssl-dev libcurl4-openssl-dev \ + zlib1g-dev \ + libreadline6-dev \ + libbz2-dev \ + libxslt-dev libgdbm-dev ncurses-dev \ + libffi-dev libtool bison libevent-dev \ + libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 \ + liborc-0.4-0 libgnutls-dev \ + libjson0-dev libmcrypt-dev libicu-dev \ + re2c libnuma-dev + +RUN locale-gen en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 +ENV DEBIAN_FRONTEND noninteractive + +ARG MAX_CONCURRENCY +ARG TFB_DATABASE + +ENV MAX_CONCURRENCY=$MAX_CONCURRENCY +ENV DBHOST=$TFB_DATABASE diff --git a/toolset/setup/linux/databases/mongodb/create.js b/toolset/setup/docker/databases/mongodb/create.js similarity index 100% rename from toolset/setup/linux/databases/mongodb/create.js rename to toolset/setup/docker/databases/mongodb/create.js diff --git a/toolset/setup/docker/databases/mongodb/mongodb.dockerfile b/toolset/setup/docker/databases/mongodb/mongodb.dockerfile new file mode 100644 index 00000000000..da06d44adbd --- /dev/null +++ b/toolset/setup/docker/databases/mongodb/mongodb.dockerfile @@ -0,0 +1,15 @@ +FROM ubuntu:16.04 + +COPY ./ ./ + +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 +RUN echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.6.list +RUN apt-get -y update +RUN apt-get -y install mongodb-org + +RUN mkdir -p /data/db +RUN chmod 777 /data/db + +RUN mongod --fork --logpath /var/log/mongodb.log --bind_ip_all && sleep 10 && mongo < create.js && sleep 10 + +CMD ["mongod", "--bind_ip_all"] diff --git a/toolset/setup/linux/databases/mysql/create.sql b/toolset/setup/docker/databases/mysql/create.sql old mode 100644 new mode 100755 similarity index 95% rename from toolset/setup/linux/databases/mysql/create.sql rename to toolset/setup/docker/databases/mysql/create.sql index 21b509a48ec..79678769f63 --- a/toolset/setup/linux/databases/mysql/create.sql +++ b/toolset/setup/docker/databases/mysql/create.sql @@ -3,11 +3,9 @@ SET GLOBAL time_zone = '+00:00'; # modified from SO answer http://stackoverflow.com/questions/5125096/for-loop-in-mysql -DROP DATABASE IF EXISTS hello_world; CREATE DATABASE hello_world; USE hello_world; -DROP TABLE IF EXISTS world; CREATE TABLE world ( id int(10) unsigned NOT NULL auto_increment, randomNumber int NOT NULL default 0, @@ -17,8 +15,6 @@ ENGINE=INNODB; GRANT SELECT, UPDATE ON hello_world.world TO 'benchmarkdbuser'@'%' IDENTIFIED BY 'benchmarkdbpass'; GRANT SELECT, UPDATE ON hello_world.world TO 'benchmarkdbuser'@'localhost' IDENTIFIED BY 'benchmarkdbpass'; -DROP PROCEDURE IF EXISTS load_data; - DELIMITER # CREATE PROCEDURE load_data() BEGIN @@ -39,7 +35,6 @@ DELIMITER ; CALL load_data(); -DROP TABLE IF EXISTS fortune; CREATE TABLE fortune ( id int(10) unsigned NOT NULL auto_increment, message varchar(2048) CHARACTER SET 'utf8' NOT NULL, diff --git a/toolset/setup/linux/databases/mysql/my.cnf b/toolset/setup/docker/databases/mysql/my.cnf old mode 100644 new mode 100755 similarity index 96% rename from toolset/setup/linux/databases/mysql/my.cnf rename to toolset/setup/docker/databases/mysql/my.cnf index 025fc3ae82b..a1a1920f411 --- a/toolset/setup/linux/databases/mysql/my.cnf +++ b/toolset/setup/docker/databases/mysql/my.cnf @@ -42,12 +42,6 @@ table_definition_cache = 800 max_heap_table_size = 128M tmp_table_size = 128M -# -# monitoring off -# - -performance-schema = false - # # innodb settings # diff --git a/toolset/setup/docker/databases/mysql/mysql.dockerfile b/toolset/setup/docker/databases/mysql/mysql.dockerfile new file mode 100755 index 00000000000..5c9dc9445dd --- /dev/null +++ b/toolset/setup/docker/databases/mysql/mysql.dockerfile @@ -0,0 +1,42 @@ +FROM ubuntu:16.04 + +RUN apt-get update +RUN apt-get install -qqy locales + +RUN locale-gen en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 + +ADD create.sql create.sql +ADD my.cnf my.cnf +ADD mysql.list mysql.list + +RUN cp mysql.list /etc/apt/sources.list.d/ +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8C718D3B5072E1F5 +RUN apt-get update +RUN ["/bin/bash", "-c", "debconf-set-selections <<< \"mysql-community-server mysql-community-server/data-dir select 'Y'\""] +RUN ["/bin/bash", "-c", "debconf-set-selections <<< \"mysql-community-server mysql-community-server/root-pass password secret\""] +RUN ["/bin/bash", "-c", "debconf-set-selections <<< \"mysql-community-server mysql-community-server/re-root-pass password secret\""] +RUN DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-server + +RUN mv /etc/mysql/my.cnf /etc/mysql/my.cnf.orig +RUN cp my.cnf /etc/mysql/my.cnf + +RUN rm -rf /ssd/mysql +RUN rm -rf /ssd/log/mysql +RUN cp -R -p /var/lib/mysql /ssd/ +RUN cp -R -p /var/log/mysql /ssd/log + +# It may seem weird that we call `service mysql start` several times, but the RUN +# directive is a 1-time operation for building this image. Subsequent RUN calls +# do not see running processes from prior RUN calls; therefor, each command here +# that relies on the mysql server running will explicitly start the server and +# perform the work required. +RUN chown -R mysql:mysql /var/lib/mysql /var/log/mysql /var/run/mysqld /ssd && \ + service mysql start & \ + until mysql -uroot -psecret -e "exit"; do sleep 1; done && \ + mysqladmin -uroot -psecret flush-hosts && \ + mysql -uroot -psecret < create.sql + +CMD chown -R mysql:mysql /var/lib/mysql /var/log/mysql /var/run/mysqld /ssd && mysqld \ No newline at end of file diff --git a/toolset/setup/docker/databases/mysql/mysql.list b/toolset/setup/docker/databases/mysql/mysql.list new file mode 100755 index 00000000000..6fefd8dd241 --- /dev/null +++ b/toolset/setup/docker/databases/mysql/mysql.list @@ -0,0 +1,7 @@ +# You may comment out entries below, but any other modifications may be lost. +# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications. +deb http://repo.mysql.com/apt/ubuntu/ xenial mysql-apt-config +deb http://repo.mysql.com/apt/ubuntu/ xenial mysql-5.7 +deb http://repo.mysql.com/apt/ubuntu/ xenial mysql-tools +#deb http://repo.mysql.com/apt/ubuntu/ xenial mysql-tools-preview +deb-src http://repo.mysql.com/apt/ubuntu/ xenial mysql-5.7 diff --git a/toolset/setup/linux/databases/postgresql/60-postgresql-shm.conf b/toolset/setup/docker/databases/postgres/60-postgresql-shm.conf old mode 100644 new mode 100755 similarity index 100% rename from toolset/setup/linux/databases/postgresql/60-postgresql-shm.conf rename to toolset/setup/docker/databases/postgres/60-postgresql-shm.conf diff --git a/toolset/setup/docker/databases/postgres/create-postgres-database.sql b/toolset/setup/docker/databases/postgres/create-postgres-database.sql new file mode 100755 index 00000000000..093e9bdbab1 --- /dev/null +++ b/toolset/setup/docker/databases/postgres/create-postgres-database.sql @@ -0,0 +1,3 @@ +CREATE USER benchmarkdbuser WITH PASSWORD 'benchmarkdbpass'; + +CREATE DATABASE hello_world WITH TEMPLATE = template0 ENCODING 'UTF8'; diff --git a/toolset/setup/linux/databases/postgresql/create-postgres.sql b/toolset/setup/docker/databases/postgres/create-postgres.sql old mode 100644 new mode 100755 similarity index 96% rename from toolset/setup/linux/databases/postgresql/create-postgres.sql rename to toolset/setup/docker/databases/postgres/create-postgres.sql index c0757d4f716..a878d0485b9 --- a/toolset/setup/linux/databases/postgresql/create-postgres.sql +++ b/toolset/setup/docker/databases/postgres/create-postgres.sql @@ -1,5 +1,5 @@ +BEGIN; -DROP TABLE IF EXISTS World; CREATE TABLE World ( id integer NOT NULL, randomNumber integer NOT NULL default 0, @@ -10,7 +10,6 @@ GRANT SELECT, UPDATE ON World to benchmarkdbuser; INSERT INTO World (id, randomnumber) SELECT x.id, random() * 10000 + 1 FROM generate_series(1,10000) as x(id); -DROP TABLE IF EXISTS Fortune; CREATE TABLE Fortune ( id integer NOT NULL, message varchar(2048) NOT NULL, @@ -31,8 +30,6 @@ INSERT INTO Fortune (id, message) VALUES (10, 'Computers make very fast, very ac INSERT INTO Fortune (id, message) VALUES (11, ''); INSERT INTO Fortune (id, message) VALUES (12, 'フレームワークのベンチマーク'); - -DROP TABLE IF EXISTS "World"; CREATE TABLE "World" ( id integer NOT NULL, randomNumber integer NOT NULL default 0, @@ -43,7 +40,6 @@ GRANT SELECT, UPDATE ON "World" to benchmarkdbuser; INSERT INTO "World" (id, randomnumber) SELECT x.id, random() * 10000 + 1 FROM generate_series(1,10000) as x(id); -DROP TABLE IF EXISTS "Fortune"; CREATE TABLE "Fortune" ( id integer NOT NULL, message varchar(2048) NOT NULL, @@ -63,3 +59,5 @@ INSERT INTO "Fortune" (id, message) VALUES (9, 'Feature: A bug with seniority.') INSERT INTO "Fortune" (id, message) VALUES (10, 'Computers make very fast, very accurate mistakes.'); INSERT INTO "Fortune" (id, message) VALUES (11, ''); INSERT INTO "Fortune" (id, message) VALUES (12, 'フレームワークのベンチマーク'); + +COMMIT; diff --git a/toolset/setup/linux/databases/postgresql/pg_hba.conf b/toolset/setup/docker/databases/postgres/pg_hba.conf old mode 100644 new mode 100755 similarity index 100% rename from toolset/setup/linux/databases/postgresql/pg_hba.conf rename to toolset/setup/docker/databases/postgres/pg_hba.conf diff --git a/toolset/setup/docker/databases/postgres/postgres.dockerfile b/toolset/setup/docker/databases/postgres/postgres.dockerfile new file mode 100755 index 00000000000..ead20a116a8 --- /dev/null +++ b/toolset/setup/docker/databases/postgres/postgres.dockerfile @@ -0,0 +1,53 @@ +FROM ubuntu:16.04 + +RUN apt-get update +RUN apt-get install -qqy locales + +RUN locale-gen en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 + +ADD postgresql.conf postgresql.conf +ADD pg_hba.conf pg_hba.conf +ADD 60-postgresql-shm.conf 60-postgresql-shm.conf +ADD create-postgres-database.sql create-postgres-database.sql +ADD create-postgres.sql create-postgres.sql + +# install postgresql on database machine +RUN apt-get -y update +RUN apt-get -y install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" postgresql + +ENV PG_VERSION 9.5 + +# Make sure all the configuration files in main belong to postgres +RUN mv postgresql.conf /etc/postgresql/${PG_VERSION}/main/postgresql.conf +RUN mv pg_hba.conf /etc/postgresql/${PG_VERSION}/main/pg_hba.conf + +RUN chown -Rf postgres:postgres /etc/postgresql/${PG_VERSION}/main + +RUN mkdir /ssd +RUN cp -R -p /var/lib/postgresql/${PG_VERSION}/main /ssd/postgresql +RUN cp /etc/postgresql/${PG_VERSION}/main/postgresql.conf /ssd/postgresql +RUN mv 60-postgresql-shm.conf /etc/sysctl.d/60-postgresql-shm.conf + +RUN chown -Rf postgres:postgres /var/run/postgresql +RUN chmod 2777 /var/run/postgresql +RUN chown postgres:postgres /etc/sysctl.d/60-postgresql-shm.conf +RUN chown postgres:postgres create-postgres* +RUN chown -Rf postgres:postgres /ssd + +ENV PGDATA=/ssd/postgresql + +USER postgres + +# We have to wait for postgres to start before we can use the cli +RUN service postgresql start && \ + until psql -c "\q"; do sleep 1; done && \ + psql < create-postgres-database.sql && \ + psql -a hello_world < create-postgres.sql && \ + service postgresql stop + +ENV PATH $PATH:/usr/lib/postgresql/$PG_VERSION/bin + +CMD ["postgres"] \ No newline at end of file diff --git a/toolset/setup/linux/databases/postgresql/postgresql.conf b/toolset/setup/docker/databases/postgres/postgresql.conf old mode 100644 new mode 100755 similarity index 98% rename from toolset/setup/linux/databases/postgresql/postgresql.conf rename to toolset/setup/docker/databases/postgres/postgresql.conf index 56b7ed7c999..c79b7aac6ee --- a/toolset/setup/linux/databases/postgresql/postgresql.conf +++ b/toolset/setup/docker/databases/postgres/postgresql.conf @@ -40,13 +40,13 @@ data_directory = '/ssd/postgresql' # use data in another directory # (change requires restart) -hba_file = '/etc/postgresql/9.3/main/pg_hba.conf' # host-based authentication file +hba_file = '/etc/postgresql/9.5/main/pg_hba.conf' # host-based authentication file # (change requires restart) -ident_file = '/etc/postgresql/9.3/main/pg_ident.conf' # ident configuration file +ident_file = '/etc/postgresql/9.5/main/pg_ident.conf' # ident configuration file # (change requires restart) # If external_pid_file is not explicitly set, no extra PID file is written. -external_pid_file = '/var/run/postgresql/9.3-main.pid' # write an extra PID file +external_pid_file = '/var/run/postgresql/9.5-main.pid' # write an extra PID file # (change requires restart) @@ -112,7 +112,7 @@ ssl = false # (change requires restart) shared_buffers = 256MB # min 128kB work_mem = 64MB # min 64kB maintenance_work_mem = 512MB # min 1MB -checkpoint_segments = 64 +# checkpoint_segments = 64 checkpoint_completion_target = 0.9 effective_cache_size = 8GB diff --git a/toolset/setup/docker/languages/crystal-lang.dockerfile b/toolset/setup/docker/languages/crystal-lang.dockerfile new file mode 100644 index 00000000000..7dee6bab84d --- /dev/null +++ b/toolset/setup/docker/languages/crystal-lang.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/base:0.1 + +RUN mkdir /crystal-lang +WORKDIR /crystal-lang +RUN curl -sL https://github.com/crystal-lang/crystal/releases/download/v0.24.1/crystal-0.24.1-2-linux-x86_64.tar.gz | tar xz +ENV CRYSTAL_HOME=/crystal-lang/crystal-0.24.1 +ENV PATH="${CRYSTAL_HOME}/bin:${PATH}" diff --git a/toolset/setup/docker/languages/d-lang.dockerfile b/toolset/setup/docker/languages/d-lang.dockerfile new file mode 100644 index 00000000000..469c3326225 --- /dev/null +++ b/toolset/setup/docker/languages/d-lang.dockerfile @@ -0,0 +1,28 @@ +FROM techempower/base:0.1 + +RUN apt install -yqq xdg-utils + +ENV DLANG=/dlang +ENV DMDVER="2.078.1" +ENV LDCVER="1.7.0" + +RUN mkdir -p $DLANG && \ + wget http://downloads.dlang.org/releases/2.x/$DMDVER/dmd_$DMDVER-0_amd64.deb && \ + dpkg-deb -x dmd_$DMDVER-0_amd64.deb $DLANG && \ + cd $DLANG && \ + wget https://github.com/ldc-developers/ldc/releases/download/v$LDCVER/ldc2-$LDCVER-linux-x86_64.tar.xz && \ + tar xf ldc2-$LDCVER-linux-x86_64.tar.xz && \ + ln -s $DLANG/ldc2-$LDCVER-linux-x86_64/bin/ldc2 $DLANG/usr/bin/ldc2 + +# According to this file (dmd.conf) dmd will, upon execution, look for +# a dmd.conf in 1) the current working directory [bad], 2) the directory +# specified by the HOME environment variable [bad], 3) the directory in +# which dmd resides [less bad], and 4) the /etc directory. +# We are trying to maintain as little global presence as possible, so +# we need to change the DFLAGS in the dmd.conf to be correctly sandboxed +# to the $DLANG folder. +RUN cp $DLANG/etc/dmd.conf $DLANG/usr/bin && \ + sed -i "s|-I/usr/|-I${DLANG}/usr/|g" $DLANG/usr/bin/dmd.conf && \ + sed -i "s|-L/usr/|-L${DLANG}/usr/|g" $DLANG/usr/bin/dmd.conf + +ENV PATH=${DLANG}/usr/bin:${PATH} diff --git a/toolset/setup/docker/languages/dart-lang.dockerfile b/toolset/setup/docker/languages/dart-lang.dockerfile new file mode 100644 index 00000000000..0769c3b9646 --- /dev/null +++ b/toolset/setup/docker/languages/dart-lang.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/base:0.1 + +# Dart version 1.10.0 +RUN wget http://storage.googleapis.com/dart-archive/channels/stable/release/45396/sdk/dartsdk-linux-x64-release.zip +RUN unzip dartsdk-linux-x64-release.zip + +ENV PUB_CACHE=/.pubcache +ENV PATH=/dart-sdk/bin:${PATH} diff --git a/toolset/setup/docker/languages/elixir.dockerfile b/toolset/setup/docker/languages/elixir.dockerfile new file mode 100644 index 00000000000..c1f956e7e28 --- /dev/null +++ b/toolset/setup/docker/languages/elixir.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/erlang:0.1 + +ENV ELIXIR_VERSION="1.5.2-1" +ENV RELEASE="xenial" +ENV ARCH="amd64" + +RUN wget http://packages.erlang-solutions.com/erlang/elixir/FLAVOUR_2_download/elixir_${ELIXIR_VERSION}~ubuntu~${RELEASE}_${ARCH}.deb +RUN dpkg -x elixir_${ELIXIR_VERSION}~ubuntu~${RELEASE}_${ARCH}.deb /elixir +RUN /erlang/usr/lib/erlang/Install -minimal /erlang/usr/lib/erlang + +ENV PATH=elixir/usr/local/bin:${PATH} diff --git a/toolset/setup/docker/languages/erlang.dockerfile b/toolset/setup/docker/languages/erlang.dockerfile new file mode 100644 index 00000000000..f10ec4e30d6 --- /dev/null +++ b/toolset/setup/docker/languages/erlang.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/base:0.1 + +ENV ERLANG_VERSION="18.2-1" +ENV RELEASE="xenial" +ENV ARCH="amd64" + +RUN wget https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_${ERLANG_VERSION}~ubuntu~${RELEASE}_${ARCH}.deb +RUN dpkg -x esl-erlang_${ERLANG_VERSION}~ubuntu~${RELEASE}_${ARCH}.deb /erlang +RUN /erlang/usr/lib/erlang/Install -minimal /erlang/usr/lib/erlang + +RUN apt install -yqq rebar + +ENV PATH=/erlang/usr/bin:${PATH} diff --git a/toolset/setup/docker/languages/go-lang.dockerfile b/toolset/setup/docker/languages/go-lang.dockerfile new file mode 100644 index 00000000000..60f4cc35484 --- /dev/null +++ b/toolset/setup/docker/languages/go-lang.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/base:0.1 + +RUN mkdir /go-lang +WORKDIR /go-lang +RUN curl -sL https://storage.googleapis.com/golang/go1.10.linux-amd64.tar.gz | tar xz + +ENV GOROOT /go-lang/go +ENV PATH ${GOROOT}/bin:${PATH} + +ENV GOGC 1000 diff --git a/toolset/setup/docker/languages/haskell.dockerfile b/toolset/setup/docker/languages/haskell.dockerfile new file mode 100644 index 00000000000..58b720019bd --- /dev/null +++ b/toolset/setup/docker/languages/haskell.dockerfile @@ -0,0 +1,3 @@ +FROM techempower/base:0.1 + +RUN curl -sSL https://get.haskellstack.org/ | sh diff --git a/toolset/setup/docker/languages/hhvm-php5.dockerfile b/toolset/setup/docker/languages/hhvm-php5.dockerfile new file mode 100644 index 00000000000..1e635d87be9 --- /dev/null +++ b/toolset/setup/docker/languages/hhvm-php5.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/php5:0.1 + +RUN apt-get install -y apt-transport-https +RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xB4112585D386EB94 +RUN add-apt-repository https://dl.hhvm.com/ubuntu +RUN apt-get update +RUN apt-get install -y hhvm diff --git a/toolset/setup/docker/languages/hhvm-php7.dockerfile b/toolset/setup/docker/languages/hhvm-php7.dockerfile new file mode 100644 index 00000000000..098b21bb8ee --- /dev/null +++ b/toolset/setup/docker/languages/hhvm-php7.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/php7:0.1 + +RUN apt-get install -y apt-transport-https +RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xB4112585D386EB94 +RUN add-apt-repository https://dl.hhvm.com/ubuntu +RUN apt-get update +RUN apt-get install -y hhvm diff --git a/toolset/setup/docker/languages/java.dockerfile b/toolset/setup/docker/languages/java.dockerfile new file mode 100755 index 00000000000..38bf30e3dfa --- /dev/null +++ b/toolset/setup/docker/languages/java.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/base:0.1 + +RUN mkdir /java +WORKDIR /java +RUN curl -sL https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz | tar xz +ENV JAVA_HOME=/java/jdk-9.0.4 +ENV PATH="${JAVA_HOME}/bin:${PATH}" diff --git a/toolset/setup/docker/languages/java8.dockerfile b/toolset/setup/docker/languages/java8.dockerfile new file mode 100644 index 00000000000..1bcd390e78c --- /dev/null +++ b/toolset/setup/docker/languages/java8.dockerfile @@ -0,0 +1,12 @@ +FROM techempower/base:0.1 + +RUN add-apt-repository -y ppa:openjdk-r/ppa +RUN apt-get update +RUN apt-get install -qqy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ + openjdk-8-jdk + +# https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/1396760 +RUN /var/lib/dpkg/info/ca-certificates-java.postinst configure + +ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 +ENV PATH="/usr/lib/jvm/java-8-openjdk-amd64/bin:${PATH}" diff --git a/toolset/setup/docker/languages/jruby-9.1.dockerfile b/toolset/setup/docker/languages/jruby-9.1.dockerfile new file mode 100644 index 00000000000..b4fbf41537d --- /dev/null +++ b/toolset/setup/docker/languages/jruby-9.1.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/java:0.1 + +WORKDIR / + +RUN wget -q https://repo1.maven.org/maven2/org/jruby/jruby-dist/9.1.16.0/jruby-dist-9.1.16.0-bin.tar.gz +RUN tar xf jruby-dist-9.1.16.0-bin.tar.gz + +ENV PATH=/jruby-9.1.16.0/bin:${PATH} + +RUN jruby -S gem install bundler -v 1.15.4 diff --git a/toolset/setup/docker/languages/lua.dockerfile b/toolset/setup/docker/languages/lua.dockerfile new file mode 100644 index 00000000000..90f2ca2d8ee --- /dev/null +++ b/toolset/setup/docker/languages/lua.dockerfile @@ -0,0 +1,25 @@ +FROM techempower/base:0.1 + +ENV LUA_VERSION="5.1" +ENV LUA_MICRO="5" + +RUN apt install -yqq libreadline-dev lib32ncurses5-dev + +RUN wget https://github.com/LuaDist/lua/archive/$LUA_VERSION.$LUA_MICRO.tar.gz +RUN tar xf $LUA_VERSION.$LUA_MICRO.tar.gz + +ENV LUA_HOME=/lua-$LUA_VERSION.$LUA_MICRO + +RUN cd $LUA_HOME && \ + cp src/luaconf.h.orig src/luaconf.h && \ + make linux && \ + cd src && \ + mkdir ../bin ../include ../lib && \ + install -p -m 0755 lua luac ../bin && \ + install -p -m 0644 lua.h luaconf.h lualib.h lauxlib.h ../include && \ + install -p -m 0644 liblua.a ../lib + +ENV LUA=/lua${LUA_VERSION}.${LUA_MICRO} +ENV PATH=${LUA_HOME}/bin:${PATH} +ENV LUA_PATH="./?.lua;./?.lc;$LUA_HOME/share/lua/5.1/?/init.lua;$LUA_HOME/share/lua/5.1/?.lua;$LUA_HOME/lib/lua/5.1/?/init.lua;$LUA_HOME/lib/lua/5.1/?.lua" +ENV LUA_CPATH="./?.lua;./?.lc;$LUA_HOME/share/lua/5.1/?/init.so;$LUA_HOME/share/lua/5.1/?.so;$LUA_HOME/lib/lua/5.1/?/init.so;$LUA_HOME/lib/lua/5.1/?.so" diff --git a/toolset/setup/docker/languages/nim.dockerfile b/toolset/setup/docker/languages/nim.dockerfile new file mode 100644 index 00000000000..614d77195a7 --- /dev/null +++ b/toolset/setup/docker/languages/nim.dockerfile @@ -0,0 +1,21 @@ +FROM techempower/nginx:0.1 + +ENV NIM_VERSION="0.11.2" +ENV NIM_CSOURCES="6bf2282" + +RUN wget https://github.com/nim-lang/Nim/archive/v$NIM_VERSION.tar.gz +RUN tar xf v$NIM_VERSION.tar.gz +RUN mv Nim-$NIM_VERSION nim + +RUN cd nim && \ + git clone git://github.com/nim-lang/csources.git && \ + cd csources && \ + git checkout $NIM_CSOURCES && \ + sh build.sh && \ + cd .. && \ + + bin/nim c koch && \ + ./koch boot -d:release + +ENV NIM_HOME=/nim +ENV PATH=${NIM_HOME}/bin:${PATH} diff --git a/toolset/setup/docker/languages/perl.dockerfile b/toolset/setup/docker/languages/perl.dockerfile new file mode 100644 index 00000000000..6b3425720db --- /dev/null +++ b/toolset/setup/docker/languages/perl.dockerfile @@ -0,0 +1,20 @@ +FROM techempower/base:0.1 + +ENV PERL_VERSION="5.18" +ENV PERL=/perl-${PERL_VERSION} + +RUN wget -q -O perl-build.pl https://raw.github.com/tokuhirom/Perl-Build/master/perl-build +# compile with optimizations, n.b. this does not turn on debugging +RUN perl perl-build.pl -DDEBUGGING=-g 5.18.2 perl-${PERL_VERSION} 2>&1 | tee /perl-install.log | awk '{ if (NR%100 == 0) printf "."}' + +RUN wget -O cpanminus.pl http://cpanmin.us +RUN perl-${PERL_VERSION}/bin/perl cpanminus.pl --notest --no-man-page App::cpanminus +# Install only a bare-bones of Perl modules +# Install others in the per-framework install script or cpanfile +RUN perl-${PERL_VERSION}/bin/cpanm -f --notest --no-man-page Carton JSON JSON::XS IO::Socket::IP IO::Socket::SSL + +ENV PERL_HOME=${PERL} + +#ENV PERL_CARTON_PATH=$TROOT/local +#ENV PERL5LIB=${PERL_CARTON_PATH}/lib/perl5 +#ENV PATH=${PERL_CARTON_PATH}/bin:${PERL_HOME}/bin:${PATH} diff --git a/toolset/setup/docker/languages/php5.dockerfile b/toolset/setup/docker/languages/php5.dockerfile new file mode 100644 index 00000000000..b5fec0969b7 --- /dev/null +++ b/toolset/setup/docker/languages/php5.dockerfile @@ -0,0 +1,15 @@ +FROM techempower/nginx:0.1 + +RUN add-apt-repository ppa:ondrej/php +RUN apt-get update +RUN apt-get install -y php5.6 php5.6-common php5.6-cli php5.6-fpm php5.6-mysql php5.6-xml php5.6-mbstring php5.6-mcrypt + +RUN mkdir /composer +WORKDIR /composer + +RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" +RUN php composer-setup.php +RUN php -r "unlink('composer-setup.php');" + +ENV PATH /composer:${PATH} diff --git a/toolset/setup/docker/languages/php7.dockerfile b/toolset/setup/docker/languages/php7.dockerfile new file mode 100644 index 00000000000..09f6dc3e58b --- /dev/null +++ b/toolset/setup/docker/languages/php7.dockerfile @@ -0,0 +1,15 @@ +FROM techempower/nginx:0.1 + +RUN add-apt-repository ppa:ondrej/php +RUN apt-get update +RUN apt-get install -y php7.2 php7.2-common php7.2-cli php7.2-fpm php7.2-mysql php7.2-xml php7.2-mbstring php7.2-mongodb + +RUN mkdir /composer +WORKDIR /composer + +RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" +RUN php composer-setup.php +RUN php -r "unlink('composer-setup.php');" + +ENV PATH /composer:${PATH} diff --git a/toolset/setup/docker/languages/pypy2.dockerfile b/toolset/setup/docker/languages/pypy2.dockerfile new file mode 100644 index 00000000000..7b8a0c303b2 --- /dev/null +++ b/toolset/setup/docker/languages/pypy2.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/base:0.1 + +ENV PYPY2_ROOT=/pypy2 +ENV PYTHONHOME=${PYPY2_ROOT} +ENV PYPY2_VERSION=5.10.0 +ENV PATH=${PYPY2_ROOT}/bin:${PATH} + +RUN wget -q https://bitbucket.org/pypy/pypy/downloads/pypy2-v${PYPY2_VERSION}-linux64.tar.bz2 +RUN tar xf pypy2-v${PYPY2_VERSION}-linux64.tar.bz2 +RUN mv pypy2-v${PYPY2_VERSION}-linux64 $PYPY2_ROOT + +RUN pypy -m ensurepip +RUN pip install -U pip setuptools wheel diff --git a/toolset/setup/docker/languages/python2.dockerfile b/toolset/setup/docker/languages/python2.dockerfile new file mode 100644 index 00000000000..6566ee8e34a --- /dev/null +++ b/toolset/setup/docker/languages/python2.dockerfile @@ -0,0 +1,22 @@ +FROM techempower/base:0.1 + +ENV PY2_ROOT=/py2 +ENV PYTHONHOME=${PY2_ROOT} +ENV PY2_VERSION=2.7.14 +ENV PATH=${PY2_ROOT}/bin:${PATH} + +RUN mkdir $PY2_ROOT + +RUN wget -q http://www.python.org/ftp/python/${PY2_VERSION}/Python-${PY2_VERSION}.tar.xz +RUN tar xf Python-${PY2_VERSION}.tar.xz + +WORKDIR Python-${PY2_VERSION} + +RUN ./configure --prefix=$PY2_ROOT --disable-shared --with-computed-gotos --quiet +RUN make -j4 --quiet 2>&1 | tee python2-install.log | awk '{ if (NR%100 == 0) printf "."}' +RUN make install --quiet 2>&1 | tee -a python2-install.log | awk '{ if (NR%100 == 0) printf "."}' + +WORKDIR /py2 + +RUN python -m ensurepip -U +RUN pip install -U setuptools pip wheel diff --git a/toolset/setup/docker/languages/python3.dockerfile b/toolset/setup/docker/languages/python3.dockerfile new file mode 100644 index 00000000000..36c2b7b67af --- /dev/null +++ b/toolset/setup/docker/languages/python3.dockerfile @@ -0,0 +1,23 @@ +FROM techempower/base:0.1 + +ENV PY3_ROOT=/py3 +ENV PYTHONHOME=${PY3_ROOT} +ENV PY3_VERSION=3.6.4 +ENV PATH=${PY3_ROOT}/bin:${PATH} + +RUN mkdir py3 + +RUN wget -q http://www.python.org/ftp/python/${PY3_VERSION}/Python-${PY3_VERSION}.tar.xz +RUN tar xf Python-${PY3_VERSION}.tar.xz + +WORKDIR Python-${PY3_VERSION} + +RUN ./configure --prefix=$PY3_ROOT --disable-shared --with-computed-gotos --quiet +RUN make -j4 --quiet 2>&1 | tee python3-install.log | awk '{ if (NR%100 == 0) printf "."}' +RUN make install --quiet 2>&1 | tee -a python3-install.log | awk '{ if (NR%100 == 0) printf "."}' + +WORKDIR /py3 + + +RUN python3 -m ensurepip -U +RUN pip3 install -U setuptools pip wheel diff --git a/toolset/setup/docker/languages/ruby-2.4.dockerfile b/toolset/setup/docker/languages/ruby-2.4.dockerfile new file mode 100644 index 00000000000..8b474f8763d --- /dev/null +++ b/toolset/setup/docker/languages/ruby-2.4.dockerfile @@ -0,0 +1,21 @@ +FROM techempower/base:0.1 + +RUN apt install -yqq llvm-dev libjemalloc-dev zlib1g-dev libssl-dev libcurl4-openssl-dev bison + +ENV RUBY_VERSION 2.4.2 +ENV RUBY_GEMS 2.6.12 + +RUN cd /usr/local/src && \ + wget https://cache.ruby-lang.org/pub/ruby/2.4/ruby-${RUBY_VERSION}.tar.gz && \ + tar zxvf ruby-${RUBY_VERSION}.tar.gz && \ + cd ruby-${RUBY_VERSION} && \ + ./configure && \ + make && \ + make install + +RUN wget https://rubygems.org/rubygems/rubygems-${RUBY_GEMS}.tgz && \ + tar zxvf rubygems-${RUBY_GEMS}.tgz && \ + cd rubygems-${RUBY_GEMS} && \ + /usr/local/bin/ruby setup.rb + +RUN gem install bundler --no-ri --no-rdoc diff --git a/toolset/setup/docker/languages/rust.dockerfile b/toolset/setup/docker/languages/rust.dockerfile new file mode 100644 index 00000000000..6231a8c02f9 --- /dev/null +++ b/toolset/setup/docker/languages/rust.dockerfile @@ -0,0 +1,12 @@ +FROM techempower/base:0.1 + +ENV RUST_VERSION="1.24.1" + +RUN wget https://static.rust-lang.org/dist/rust-${RUST_VERSION}-x86_64-unknown-linux-gnu.tar.gz +RUN tar xf rust-${RUST_VERSION}-x86_64-unknown-linux-gnu.tar.gz + +RUN cd rust-${RUST_VERSION}-x86_64-unknown-linux-gnu && \ + ./install.sh --prefix=/rust + +ENV LD_LIBRARY_PATH=/rust/lib:${LD_LIBRARY_PATH} +ENV PATH=/rust/bin:${PATH} diff --git a/toolset/setup/docker/languages/swift.dockerfile b/toolset/setup/docker/languages/swift.dockerfile new file mode 100644 index 00000000000..06e242c2744 --- /dev/null +++ b/toolset/setup/docker/languages/swift.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/base:0.1 + +RUN apt-get install -y clang + +RUN mkdir /swift +WORKDIR /swift +RUN curl -sL https://swift.org/builds/swift-4.0.3-release/ubuntu1604/swift-4.0.3-RELEASE/swift-4.0.3-RELEASE-ubuntu16.04.tar.gz | tar xz + +ENV SWIFT_HOME /swift/swift-4.0.3-RELEASE-ubuntu16.04 +ENV PATH ${SWIFT_HOME}/usr/bin:${PATH} diff --git a/toolset/setup/docker/languages/vala.dockerfile b/toolset/setup/docker/languages/vala.dockerfile new file mode 100644 index 00000000000..c4f8be80a09 --- /dev/null +++ b/toolset/setup/docker/languages/vala.dockerfile @@ -0,0 +1,62 @@ +FROM techempower/base:0.1 + +RUN apt-get install -y flex libglib2.0-dev libsoup2.4-dev libjson-glib-dev python3-pip + +#-------------------------------------- +# vala +# + +ENV VALA_API_VERSION 0.36 +ENV VALA_VERSION 0.36.3 + +RUN mkdir /vala +WORKDIR /vala + +RUN curl -sL -O https://download.gnome.org/sources/vala/${VALA_API_VERSION}/vala-${VALA_VERSION}.tar.xz +RUN tar xf vala-${VALA_VERSION}.tar.xz +WORKDIR vala-${VALA_VERSION} +RUN ./configure --prefix=/vala +RUN make +RUN make install +RUN ln -s /vala/share/vala-${VALA_API_VERSION}/vapi /vala/share/vala/vapi + +ENV LD_LIBRARY_PATH /vala/lib:${LD_LIBRARY_PATH} +ENV PKG_CONFIG_PATH /vala/lib/pkgconfig:${PKG_CONFIG_PATH} +ENV PATH /vala/bin:${PATH} + +#-------------------------------------- +# meson +# + +ENV MESON_VERSION 0.40.1 + +RUN pip3 install meson==${MESON_VERSION} + +#-------------------------------------- +# ninja +# + +ENV NINJA_VERSION 1.7.2 + +RUN mkdir /ninja +WORKDIR /ninja + +RUN curl -sL -O https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-linux.zip +RUN unzip ninja-linux.zip -d /ninja/bin +ENV PATH /ninja/bin:${PATH} + +#-------------------------------------- +# valum framework +# + +ENV VALUM_VERSION 0.3.12 + +RUN mkdir /valum_framework +WORKDIR /valum_framework + +RUN curl -sL https://github.com/valum-framework/valum/archive/v${VALUM_VERSION}.tar.gz | tar xz +WORKDIR valum-${VALUM_VERSION} +RUN rm -rf build +RUN meson --prefix=/vala --buildtype=release --libdir=lib build +RUN ninja -C build +RUN ninja -C build install diff --git a/toolset/setup/docker/systools/ant.dockerfile b/toolset/setup/docker/systools/ant.dockerfile new file mode 100755 index 00000000000..415e1524d38 --- /dev/null +++ b/toolset/setup/docker/systools/ant.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/java:0.1 + +RUN add-apt-repository -y ppa:openjdk-r/ppa +RUN apt-get update +RUN apt-get install -qqy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ + ant \ No newline at end of file diff --git a/toolset/setup/docker/systools/clang-3.9.dockerfile b/toolset/setup/docker/systools/clang-3.9.dockerfile new file mode 100644 index 00000000000..fb072254345 --- /dev/null +++ b/toolset/setup/docker/systools/clang-3.9.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/base:0.1 + +RUN add-apt-repository -s "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-3.9 main" +RUN wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add - +RUN apt -yq update +RUN apt install -qqy clang-3.9 lldb-3.9 diff --git a/toolset/setup/docker/systools/gcc-4.8.dockerfile b/toolset/setup/docker/systools/gcc-4.8.dockerfile new file mode 100644 index 00000000000..60455904f8d --- /dev/null +++ b/toolset/setup/docker/systools/gcc-4.8.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/base:0.1 + +RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test +RUN apt update -y +RUN apt install -y g++-4.8 +RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50 diff --git a/toolset/setup/docker/systools/gcc-4.9.dockerfile b/toolset/setup/docker/systools/gcc-4.9.dockerfile new file mode 100644 index 00000000000..885dcaacf0c --- /dev/null +++ b/toolset/setup/docker/systools/gcc-4.9.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/base:0.1 + +RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test +RUN apt update -y +RUN apt install -y g++-4.9 +RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 50 diff --git a/toolset/setup/docker/systools/gcc-6.dockerfile b/toolset/setup/docker/systools/gcc-6.dockerfile new file mode 100644 index 00000000000..e4f6dfbbeee --- /dev/null +++ b/toolset/setup/docker/systools/gcc-6.dockerfile @@ -0,0 +1,5 @@ +FROM techempower/base:0.1 + +RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ + apt-get -yq update && \ + apt-get install -qqy gcc-6 g++-6 diff --git a/toolset/setup/docker/systools/gradle-java8.dockerfile b/toolset/setup/docker/systools/gradle-java8.dockerfile new file mode 100644 index 00000000000..44d46ac0244 --- /dev/null +++ b/toolset/setup/docker/systools/gradle-java8.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/java8:0.1 + +RUN mkdir /gradle +WORKDIR /gradle +RUN curl -sL -O https://services.gradle.org/distributions/gradle-4.6-bin.zip +RUN unzip gradle-4.6-bin.zip +ENV GRADLE_HOME /gradle/gradle-4.6 +ENV PATH ${GRADLE_HOME}/bin:${PATH} diff --git a/toolset/setup/docker/systools/gradle.dockerfile b/toolset/setup/docker/systools/gradle.dockerfile new file mode 100644 index 00000000000..20e73e7863f --- /dev/null +++ b/toolset/setup/docker/systools/gradle.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/java:0.1 + +RUN mkdir /gradle +WORKDIR /gradle +RUN curl -sL -O https://services.gradle.org/distributions/gradle-4.6-bin.zip +RUN unzip gradle-4.6-bin.zip +ENV GRADLE_HOME /gradle/gradle-4.6 +ENV PATH ${GRADLE_HOME}/bin:${PATH} diff --git a/toolset/setup/docker/systools/leiningen-java8.dockerfile b/toolset/setup/docker/systools/leiningen-java8.dockerfile new file mode 100644 index 00000000000..ab19d420e49 --- /dev/null +++ b/toolset/setup/docker/systools/leiningen-java8.dockerfile @@ -0,0 +1,8 @@ +FROM techempower/java8:0.1 + +ENV LEIN_HOME=/lein +RUN mkdir ${LEIN_HOME} +RUN mkdir ${LEIN_HOME}/bin +RUN wget -nv -O ${LEIN_HOME}/bin/lein https://raw.github.com/technomancy/leiningen/stable/bin/lein +RUN chmod +x ${LEIN_HOME}/bin/lein +ENV PATH=${LEIN_HOME}/bin:${PATH} diff --git a/toolset/setup/docker/systools/luarocks.dockerfile b/toolset/setup/docker/systools/luarocks.dockerfile new file mode 100644 index 00000000000..f30900a3090 --- /dev/null +++ b/toolset/setup/docker/systools/luarocks.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/lua:0.1 + +ENV LUAROCKS_VERSION="2.2.1" +ENV LUAROCKS=/luarocks-$LUAROCKS_VERSION + +RUN wget http://luarocks.org/releases/luarocks-$LUAROCKS_VERSION.tar.gz +RUN tar xf luarocks-$LUAROCKS_VERSION.tar.gz + +RUN cd $LUAROCKS && \ + ./configure --prefix=$LUA_HOME --with-lua=$LUA_HOME && \ + make --quiet bootstrap diff --git a/toolset/setup/docker/systools/maven-java8.dockerfile b/toolset/setup/docker/systools/maven-java8.dockerfile new file mode 100644 index 00000000000..6d4249a6221 --- /dev/null +++ b/toolset/setup/docker/systools/maven-java8.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/java8:0.1 + +RUN mkdir /maven +WORKDIR /maven +RUN curl -sL http://mirrors.advancedhosters.com/apache/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz | tar xz +ENV MAVEN_HOME=/maven/apache-maven-3.5.2 +ENV PATH="${MAVEN_HOME}/bin:${PATH}" + +ADD maven-settings.xml /root/.m2/settings.xml diff --git a/toolset/setup/docker/systools/maven-settings.xml b/toolset/setup/docker/systools/maven-settings.xml new file mode 100644 index 00000000000..0ac3b742a10 --- /dev/null +++ b/toolset/setup/docker/systools/maven-settings.xml @@ -0,0 +1,8 @@ + + + false + + diff --git a/toolset/setup/docker/systools/maven.dockerfile b/toolset/setup/docker/systools/maven.dockerfile new file mode 100644 index 00000000000..da0694c3c9b --- /dev/null +++ b/toolset/setup/docker/systools/maven.dockerfile @@ -0,0 +1,9 @@ +FROM techempower/java:0.1 + +RUN mkdir /maven +WORKDIR /maven +RUN curl -sL http://mirrors.advancedhosters.com/apache/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz | tar xz +ENV MAVEN_HOME=/maven/apache-maven-3.5.2 +ENV PATH="${MAVEN_HOME}/bin:${PATH}" + +ADD maven-settings.xml /root/.m2/settings.xml diff --git a/toolset/setup/docker/systools/mono.dockerfile b/toolset/setup/docker/systools/mono.dockerfile new file mode 100644 index 00000000000..f62ee0861b4 --- /dev/null +++ b/toolset/setup/docker/systools/mono.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/nginx:0.1 + +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +RUN echo "deb http://download.mono-project.com/repo/ubuntu stable-xenial main" | tee /etc/apt/sources.list.d/mono-official-stable.list +RUN apt-get update +RUN apt-get install -y mono-complete mono-fastcgi-server diff --git a/toolset/setup/docker/systools/nimble.dockerfile b/toolset/setup/docker/systools/nimble.dockerfile new file mode 100644 index 00000000000..45291696036 --- /dev/null +++ b/toolset/setup/docker/systools/nimble.dockerfile @@ -0,0 +1,11 @@ +FROM techempower/nim:0.1 + +ENV NIMBLE_VERSION="0.6.2" + +RUN cd $NIM_HOME && \ + wget https://github.com/nim-lang/nimble/archive/v$NIMBLE_VERSION.tar.gz && \ + tar xf v$NIMBLE_VERSION.tar.gz && \ + mv nimble-$NIMBLE_VERSION nimble && \ + cd nimble && \ + ../bin/nim c src/nimble && \ + mv src/nimble ../bin/ diff --git a/toolset/setup/docker/systools/sbt.dockerfile b/toolset/setup/docker/systools/sbt.dockerfile new file mode 100644 index 00000000000..3a7e10da134 --- /dev/null +++ b/toolset/setup/docker/systools/sbt.dockerfile @@ -0,0 +1,7 @@ +FROM techempower/java8:0.1 + +RUN mkdir /sbt +WORKDIR /sbt +RUN curl -sL https://github.com/sbt/sbt/releases/download/v1.1.2/sbt-1.1.2.tgz | tar xz +ENV SBT_HOME /sbt/sbt +ENV PATH ${SBT_HOME}/bin:${PATH} diff --git a/toolset/setup/docker/webservers/h2o.dockerfile b/toolset/setup/docker/webservers/h2o.dockerfile new file mode 100644 index 00000000000..64a912b41c6 --- /dev/null +++ b/toolset/setup/docker/webservers/h2o.dockerfile @@ -0,0 +1,22 @@ +FROM techempower/ruby-2.4:0.1 + +ENV H2O_HOME=/h2o +ENV VERSION="2.2.4" +ENV ARCHIVE=v${VERSION}.tar.gz +ENV BUILD_DIR=h2o-${VERSION} + +RUN mkdir /h2o + +WORKDIR /h2o + +RUN wget -q https://github.com/h2o/h2o/archive/$ARCHIVE +RUN tar xf $ARCHIVE + +WORKDIR /h2o/h2o-2.2.4 + +RUN apt install -yqq cmake +RUN cmake -DCMAKE_INSTALL_PREFIX="$H2O_HOME" -DCMAKE_C_FLAGS="-flto -march=native" \ + -DCMAKE_AR=/usr/bin/gcc-ar -DCMAKE_RANLIB=/usr/bin/gcc-ranlib -DWITH_MRUBY=on +RUN make -j "$(nproc)" install + +ENV PATH=/h2o/bin:${PATH} diff --git a/toolset/setup/docker/webservers/microhttpd.dockerfile b/toolset/setup/docker/webservers/microhttpd.dockerfile new file mode 100644 index 00000000000..1dd12901a16 --- /dev/null +++ b/toolset/setup/docker/webservers/microhttpd.dockerfile @@ -0,0 +1,13 @@ +FROM techempower/clang-3.9:0.1 + +ENV MICROHTTPD_VERSION=0.9.39 +ENV MICROHTTPD=/libmicrohttpd +ENV MICROHTTPD_HOME=$MICROHTTPD-$VERSION + +RUN wget http://mirror.ibcp.fr/pub/gnu/libmicrohttpd/libmicrohttpd-$MICROHTTPD_VERSION.tar.gz +RUN tar xf libmicrohttpd-$MICROHTTPD_VERSION.tar.gz +RUN cd libmicrohttpd-$MICROHTTPD_VERSION && \ + ./configure --prefix=$MICROHTTPD_HOME && \ + make install + +ENV PATH=${MICROHTTPD_HOME}/bin:${PATH} diff --git a/toolset/setup/docker/webservers/nginx.dockerfile b/toolset/setup/docker/webservers/nginx.dockerfile new file mode 100644 index 00000000000..3734cd32f16 --- /dev/null +++ b/toolset/setup/docker/webservers/nginx.dockerfile @@ -0,0 +1,17 @@ +FROM techempower/base:0.1 + +RUN apt install -yqq libpcre3 libpcre3-dev zlib1g-dev + +ENV NGINX_HOME="/nginx" +ENV NGINX_VERSION="1.12.2" + +RUN wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ + tar xf nginx-${NGINX_VERSION}.tar.gz && \ + cd nginx-${NGINX_VERSION} && \ + echo "Configuring nginx..." && \ + ./configure --prefix=/nginx && \ + echo "Compiling and installing nginx..." && \ + make --quiet && \ + make --quiet install + +ENV PATH=/nginx/sbin:${PATH} diff --git a/toolset/setup/docker/webservers/nodejs8.dockerfile b/toolset/setup/docker/webservers/nodejs8.dockerfile new file mode 100644 index 00000000000..34d7dc5a8b0 --- /dev/null +++ b/toolset/setup/docker/webservers/nodejs8.dockerfile @@ -0,0 +1,6 @@ +FROM techempower/base:0.1 + +ENV NODE_ENV=production + +RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - +RUN apt install -y nodejs diff --git a/toolset/setup/docker/webservers/openresty-server.dockerfile b/toolset/setup/docker/webservers/openresty-server.dockerfile new file mode 100644 index 00000000000..9ace8c272db --- /dev/null +++ b/toolset/setup/docker/webservers/openresty-server.dockerfile @@ -0,0 +1,18 @@ +FROM techempower/luarocks:0.1 + +RUN apt install -yqq libpq-dev libpcre3 libpcre3-dev + +ENV OPENRESTY_VERSION="1.11.2.1" +ENV OPENRESTY=/openresty +ENV OPENRESTY_HOME=$OPENRESTY-$OPENRESTY_VERSION + +RUN wget http://openresty.org/download/openresty-$OPENRESTY_VERSION.tar.gz +RUN tar xf openresty-$OPENRESTY_VERSION.tar.gz + +RUN cd openresty-$OPENRESTY_VERSION && \ + ./configure --with-http_postgres_module --prefix=$OPENRESTY_HOME --with-luajit-xcflags="-DLUAJIT_NUMMODE=2 -O3" --with-cc-opt="-O3" -j4 && \ + make -j4 --quiet && \ + make --quiet install + +ENV OPENRESTY_HOME=${OPENRESTY_HOME} +ENV PATH=${OPENRESTY_HOME}/nginx/sbin:${PATH} diff --git a/toolset/setup/docker/webservers/resin-java8.dockerfile b/toolset/setup/docker/webservers/resin-java8.dockerfile new file mode 100644 index 00000000000..4828a73e04e --- /dev/null +++ b/toolset/setup/docker/webservers/resin-java8.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/java8:0.1 + +RUN mkdir /resin +WORKDIR /resin +RUN curl -sL http://www.caucho.com/download/resin-4.0.55.tar.gz | tar xz + +ENV RESIN_HOME=/resin/resin-4.0.55 + +# Remove the default app so that frameworks using Resin don't have to. +RUN rm -rf ${RESIN_HOME}/webapps/* diff --git a/toolset/setup/docker/webservers/resin.dockerfile b/toolset/setup/docker/webservers/resin.dockerfile new file mode 100755 index 00000000000..910579081a6 --- /dev/null +++ b/toolset/setup/docker/webservers/resin.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/java:0.1 + +RUN mkdir /resin +WORKDIR /resin +RUN curl -sL http://www.caucho.com/download/resin-4.0.55.tar.gz | tar xz + +ENV RESIN_HOME=/resin/resin-4.0.55 + +# Remove the default app so that frameworks using Resin don't have to. +RUN rm -rf ${RESIN_HOME}/webapps/* diff --git a/toolset/setup/docker/webservers/tomcat.dockerfile b/toolset/setup/docker/webservers/tomcat.dockerfile new file mode 100644 index 00000000000..83eb255df3b --- /dev/null +++ b/toolset/setup/docker/webservers/tomcat.dockerfile @@ -0,0 +1,10 @@ +FROM techempower/java:0.1 + +RUN mkdir /tomcat +WORKDIR /tomcat +RUN curl -sL http://mirror.stjschools.org/public/apache/tomcat/tomcat-9/v9.0.6/bin/apache-tomcat-9.0.6.tar.gz | tar xz + +# Remove the default app so that frameworks using Tomcat don't have to. +RUN rm -rf /tomcat/apache-tomcat-9.0.6/webapps/* + +ENV CATALINA_HOME=/tomcat/apache-tomcat-9.0.6 diff --git a/toolset/setup/docker/wrk/concurrency.sh b/toolset/setup/docker/wrk/concurrency.sh new file mode 100755 index 00000000000..35ab00af93b --- /dev/null +++ b/toolset/setup/docker/wrk/concurrency.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +let max_threads=$(cat /proc/cpuinfo | grep processor | wc -l) +echo "" +echo "---------------------------------------------------------" +echo " Running Primer $name" +echo " wrk \"-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'\" --latency -d 5 -c 8 --timeout 8 -t 8 \"$url\"" +echo "---------------------------------------------------------" +echo "" +wrk "-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'" --latency -d 5 -c 8 --timeout 8 -t 8 $url +sleep 5 + +echo "" +echo "---------------------------------------------------------" +echo " Running Warmup $name" +echo " wrk \"-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'\" --latency -d $duration -c $max_concurrency --timeout 8 -t $max_threads \"$url\"" +echo "---------------------------------------------------------" +echo "" +wrk "-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'" --latency -d $duration -c $max_concurrency --timeout 8 -t $max_threads $url +sleep 5 + +for c in $levels +do +echo "" +echo "---------------------------------------------------------" +echo " Concurrency: $c for $name" +echo " wrk \"-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'\" --latency -d %duration -c $c --timeout 8 -t $(($c>$max_threads?$max_threads:$c)) \"$url\"" +echo "---------------------------------------------------------" +echo "" +STARTTIME=$(date +"%s") +wrk "-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'" --latency -d $duration -c $c --timeout 8 -t "$(($c>$max_threads?$max_threads:$c))" $url +echo "STARTTIME $STARTTIME" +echo "ENDTIME $(date +"%s")" +sleep 2 +done diff --git a/toolset/setup/docker/wrk/pipeline.lua b/toolset/setup/docker/wrk/pipeline.lua new file mode 100755 index 00000000000..850e5a717b2 --- /dev/null +++ b/toolset/setup/docker/wrk/pipeline.lua @@ -0,0 +1,12 @@ +init = function(args) + local r = {} + local depth = tonumber(args[1]) or 1 + for i=1,depth do + r[i] = wrk.format() + end + req = table.concat(r) +end + +request = function() + return req +end \ No newline at end of file diff --git a/toolset/setup/docker/wrk/pipeline.sh b/toolset/setup/docker/wrk/pipeline.sh new file mode 100755 index 00000000000..a6689d0ecd2 --- /dev/null +++ b/toolset/setup/docker/wrk/pipeline.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +let max_threads=$(cat /proc/cpuinfo | grep processor | wc -l) +echo "" +echo "---------------------------------------------------------" +echo " Running Primer $name" +echo " wrk \"-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'\" --latency -d 5 -c 8 --timeout 8 -t 8 $url" +echo "---------------------------------------------------------" +echo "" +wrk "-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'" --latency -d 5 -c 8 --timeout 8 -t 8 $url +sleep 5 + +echo "" +echo "---------------------------------------------------------" +echo " Running Warmup $name" +echo " wrk \"-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'\" --latency -d $duration -c $max_concurrency --timeout 8 -t $max_threads $url" +echo "---------------------------------------------------------" +echo "" +wrk "-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'" --latency -d $duration -c $max_concurrency --timeout 8 -t $max_threads $url +sleep 5 + +for c in $levels +do +echo "" +echo "---------------------------------------------------------" +echo " Concurrency: $c for $name" +echo " wrk \"-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'\" --latency -d $duration -c $c --timeout 8 -t $(($c>$max_threads?$max_threads:$c)) $url -s /pipeline.lua -- $pipeline" +echo "---------------------------------------------------------" +echo "" +STARTTIME=$(date +"%s") +wrk "-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'" --latency -d $duration -c $c --timeout 8 -t "$(($c>$max_threads?$max_threads:$c))" $url -s /pipeline.lua -- $pipeline +echo "STARTTIME $STARTTIME" +echo "ENDTIME $(date +"%s")" +sleep 2 +done \ No newline at end of file diff --git a/toolset/setup/docker/wrk/query.sh b/toolset/setup/docker/wrk/query.sh new file mode 100755 index 00000000000..7c001edd722 --- /dev/null +++ b/toolset/setup/docker/wrk/query.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +let max_threads=$(cat /proc/cpuinfo | grep processor | wc -l) +echo "" +echo "---------------------------------------------------------" +echo " Running Primer $name" +echo " wrk \"-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'\" --latency -d 5 -c 8 --timeout 8 -t 8 \"${url}2\"" +echo "---------------------------------------------------------" +echo "" +wrk "-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'" --latency -d 5 -c 8 --timeout 8 -t 8 "${url}2" +sleep 5 + +echo "" +echo "---------------------------------------------------------" +echo " Running Warmup $name" +echo " wrk \"-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'\" --latency -d $duration -c $max_concurrency --timeout 8 -t $max_threads \"${url}2\"" +echo "---------------------------------------------------------" +echo "" +wrk "-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'" --latency -d $duration -c $max_concurrency --timeout 8 -t $max_threads "${url}2" +sleep 5 + +for c in $levels +do +echo "" +echo "---------------------------------------------------------" +echo " Queries: $c for $name" +echo " wrk \"-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'\" --latency -d $duration -c $max_concurrency --timeout 8 -t $max_threads \"$url$c\"" +echo "---------------------------------------------------------" +echo "" +STARTTIME=$(date +"%s") +wrk "-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'" --latency -d $duration -c $max_concurrency --timeout 8 -t $max_threads "$url$c" +echo "STARTTIME $STARTTIME" +echo "ENDTIME $(date +"%s")" +sleep 2 +done \ No newline at end of file diff --git a/toolset/setup/docker/wrk/wrk.dockerfile b/toolset/setup/docker/wrk/wrk.dockerfile new file mode 100755 index 00000000000..e9c42f2a6c3 --- /dev/null +++ b/toolset/setup/docker/wrk/wrk.dockerfile @@ -0,0 +1,32 @@ +FROM ubuntu:16.04 + +# One -q produces output suitable for logging (mostly hides +# progress indicators) +RUN apt-get -yq update + +RUN apt-get -y install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ + build-essential git libev-dev libpq-dev libreadline6-dev curl + +# wrk +RUN curl -sL -o wrk-4.0.1.tar.gz https://github.com/wg/wrk/archive/4.0.1.tar.gz +RUN tar xzf wrk-4.0.1.tar.gz +RUN cd wrk-4.0.1 && make +RUN cp wrk-4.0.1/wrk /usr/local/bin + +# Required scripts for benchmarking +ADD pipeline.lua pipeline.lua +ADD concurrency.sh concurrency.sh +ADD pipeline.sh pipeline.sh +ADD query.sh query.sh + +RUN chmod 777 pipeline.lua concurrency.sh pipeline.sh query.sh + +# Environment vars required by the wrk scripts with nonsense defaults +ENV name name +ENV server_host server_host +ENV levels levels +ENV duration duration +ENV max_concurrency max_concurrency +ENV max_threads max_threads +ENV pipeline pipeline +ENV accept accept \ No newline at end of file diff --git a/toolset/setup/linux/TFBReaper.c b/toolset/setup/linux/TFBReaper.c deleted file mode 100755 index 94da98e9ea5..00000000000 --- a/toolset/setup/linux/TFBReaper.c +++ /dev/null @@ -1,155 +0,0 @@ -#define _DEFAULT_SOURCE - -#include -#include -#include -#include -#include -#include -#include - -typedef struct Node Node; - -/** - * Simple linked-list struct. - */ -struct Node -{ - char *str; - Node *next; -}; - -/** - * References to the head and tail of the linked-list. - */ -Node *head = NULL; -Node *tail = NULL; - -/** - * Reap will recursively find all processes with this process - * as an ancestor, and kill them. - */ -void reap(int signum) -{ - int pid = getpid(); - - FILE *fp; - char buf[256]; - - char command[256]; - sprintf(command, "findChilds() { for child in $(ps --ppid $1 ho pid); do echo $child; findChilds $child; done } && findChilds %d", pid); - - int count; - - do - { - count = 0; - char *pids[256]; - fp = popen(command, "r"); - while(fgets(buf, sizeof(buf), fp) != 0) - { - Node *newNode = malloc(sizeof(Node)); - newNode->str = malloc(strlen(buf)+1); - strcpy(newNode->str, buf); - newNode->next = NULL; - - if(tail == NULL) - { - tail = newNode; - head = newNode; - } - else - { - if(head->next == NULL) - { - head->next = newNode; - } - tail->next = newNode; - tail = newNode; - } - count ++; - } - - Node *curr = head; - while(curr != NULL) - { - kill(atoi(curr->str), SIGKILL); - waitpid(atoi(curr->str), NULL, 0); - curr = curr->next; - } - } - // This may seem magical, but that command from above always results in two - // additionally PIDs: one for `ps` and one for `sh`. Therefore, all of the - // lineage of this TFBReaper have been successfully killed once there are - // only two PIDs counted in the loop. - // This loop is necessary for edge cases where there is a master->slave - // lineage and TFBReaper kills a slave first, which is observed and fixed - // by the master by spawning a NEW slave in the original's place, and then - // killing the master (thus orphaning the newly spawned slave, but that PID - // is not in our master list). - while(count > 2); - - exit(0); -} - -int main(int argc, char *argv[]) -{ - // Interrupt SIGTERM and SIGINT and pass to our handler. - struct sigaction action; - memset(&action, 0, sizeof(action)); - action.sa_handler = reap; - sigaction(SIGTERM, &action, NULL); - sigaction(SIGINT, &action, NULL); - - // Gather the command line arguments for the pass-through. - int count = argc - 1; - int *sizes = malloc(sizeof(int) * count); - int total_size = 0; - for( int i = 1; i < argc; i++ ) { - sizes[i - 1] = strlen(argv[i]); - total_size += sizes[i - 1]; - } - char *result = malloc(sizeof(char) * total_size + count); - char *ptr = result; - for( int i = 1; i < argc; i++ ) { - memcpy(ptr, argv[i], sizes[i - 1]); - ptr[sizes[i - 1]] = ' '; - ptr += sizes[i - 1] + 1; - } - *ptr = '\0'; - free(sizes); - - // Here is the magic. This sets any child processes to - // use THIS process as a 'subreaper'. What that means is - // even if the process uses the fork-exit technicque for - // running a daemon (which normally orphans the process - // and causes init(1) to adopt it, which is problematic - // for TFB because we cannot then generally kill the - // process since it has lost all context available to us) - // the child process will have the parent id of THIS - // process, allowing us to kill all the processes started - // by the suite in this way generally. - // - // See: http://man7.org/linux/man-pages/man2/prctl.2.html - prctl(PR_SET_CHILD_SUBREAPER,1); - - // This invokes whatever was passed as arguments to TFBReaper - // on the system. This program is merely a pass-through to - // a shell with the subreaper stuff enabled. - int ret = system(result); - - // We need to wait forever; the suite will clean this - // process up later. - if (ret == 0) { - for(;;) { - // Pause to keep us from spiking CPU; whenever a signal - // occurs (except SIGTERM etc which will kill this process) - // just iterate and pause again. - pause(); - } - } - - // If the scripts failed, we should return that code. - return ret; -} - diff --git a/toolset/setup/linux/__init__.py b/toolset/setup/linux/__init__.py deleted file mode 100644 index 64b54b2aaf5..00000000000 --- a/toolset/setup/linux/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Linux server and client setup diff --git a/toolset/setup/linux/client.sh b/toolset/setup/linux/client.sh index c0dde17e0a6..ff31208ef92 100755 --- a/toolset/setup/linux/client.sh +++ b/toolset/setup/linux/client.sh @@ -1,8 +1,5 @@ #!/bin/bash -export DB_HOST={database_host} - -set -x export DEBIAN_FRONTEND=noninteractive ############################## @@ -15,6 +12,7 @@ sudo apt-get -y update sudo apt-get -y install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ build-essential git libev-dev libpq-dev libreadline6-dev +# TODO: this is likely going away with docker implementation (docker provides a ulimit cli arg) sudo sh -c "echo '* - nofile 65535' >> /etc/security/limits.conf" ############################## @@ -47,3 +45,5 @@ request = function() return req end EOF + +echo "Successfully installed software on client machine!" \ No newline at end of file diff --git a/toolset/setup/linux/database.sh b/toolset/setup/linux/database.sh new file mode 100755 index 00000000000..d1e5872c5ae --- /dev/null +++ b/toolset/setup/linux/database.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +export DEBIAN_FRONTEND=noninteractive + +############################# +# Prerequisites +############################# +sudo apt-get -y update + +# WARNING: DON'T PUT A SPACE AFTER ANY BACKSLASH OR APT WILL BREAK +# Dpkg::Options avoid hangs on Travis-CI, doesn't affect clean systems +sudo apt-get -y install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ + linux-image-extra-$(uname -r) `# Needed for Docker on Ubuntu 14` \ + linux-image-extra-virtual `# Needed for Docker on Ubuntu 14` \ + apt-transport-https `# Needed for Docker on Ubuntu 14` \ + ca-certificates `# Needed for Docker on Ubuntu 14` \ + curl `# Needed for Docker on Ubuntu 14` \ + software-properties-common `# Needed for Docker on Ubuntu 14` + +# TODO: this is likely going away with docker implementation (docker provides a ulimit cli arg) +sudo sh -c "echo '* - nofile 65535' >> /etc/security/limits.conf" + +# +# Install Docker +# +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - +sudo add-apt-repository \ + "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ + $(lsb_release -cs) \ + stable" +sudo apt-get update +# TODO: this doesn't work on real machines; only single-server setups which conveniently have docker already +sudo apt-get -qqy install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" docker-ce +if ! sudo grep -q -E "^docker:" /etc/group; then + sudo groupadd docker + sudo usermod -aG docker $USER +fi diff --git a/toolset/setup/linux/databases/databases.sh b/toolset/setup/linux/databases/databases.sh deleted file mode 100755 index 38cf0ea2c08..00000000000 --- a/toolset/setup/linux/databases/databases.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -RETCODE=$(fw_exists ${IROOT}/databases.installed) -[ ! "$RETCODE" == 0 ] || { \ - source $IROOT/databases.installed - return 0; } - -# Create a user-owned directory for our databases -ssh $DBHOST 'bash' < /dev/null || sudo useradd benchmarkdbuser -p benchmarkdbpass -EOF - -echo -e "" > $IROOT/databases.installed - -source $IROOT/databases.installed diff --git a/toolset/setup/linux/databases/mongodb/mongodb.conf b/toolset/setup/linux/databases/mongodb/mongodb.conf deleted file mode 100644 index 8370591a433..00000000000 --- a/toolset/setup/linux/databases/mongodb/mongodb.conf +++ /dev/null @@ -1,24 +0,0 @@ -# mongod.conf - -# for documentation of all options, see: -# http://docs.mongodb.org/manual/reference/configuration-options/ - -# Where and how to store data. -storage: - dbPath: "/ssd/mongodb" - journal: - enabled: true -# engine: -# mmapv1: -# wiredTiger: - -# where to write logging data. -systemLog: - destination: file - logAppend: true - path: "/ssd/log/mongodb/mongod.log" - -# network interfaces -net: - port: 27017 - bindIpAll: true diff --git a/toolset/setup/linux/databases/mongodb/mongodb.sh b/toolset/setup/linux/databases/mongodb/mongodb.sh deleted file mode 100755 index f0e474c7bdb..00000000000 --- a/toolset/setup/linux/databases/mongodb/mongodb.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -fw_depends databases - -fw_installed mongodb && return 0 - -# send over the required files -scp $FWROOT/toolset/setup/linux/databases/mongodb/mongodb.conf $DBHOST:~/ -scp $FWROOT/toolset/setup/linux/databases/mongodb/create.js $DBHOST:~/ - -# install mongo on database machine -ssh $DBHOST 'bash' <<"EOF" -echo "Setting up MongoDB database" - -if service --status-all | grep -Fq 'mongod'; then - sudo service mongod stop -fi -sudo apt-get -y remove --purge mongodb-org -sudo apt-get -y autoremove -sudo find /etc/apt/sources.list.d -type f -name 'mongodb-org-*.list' -delete -maxdepth 1 -sudo find /etc -type f -name 'mongo*.conf*' -delete -maxdepth 1 -sudo rm -rf /var/lib/mongodb -sudo rm -rf /var/log/mongodb - -sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 -echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list -sudo apt-get -y update -sudo apt-get -y install mongodb-org - -sudo service mongod stop -sudo mv mongodb.conf /etc/mongod.conf -sudo rm -rf /ssd/mongodb -sudo rm -rf /ssd/log/mongodb -sudo mkdir -p /ssd/mongodb -sudo mkdir -p /ssd/log/mongodb -sudo chown -R mongodb:mongodb /ssd/mongodb -sudo chown -R mongodb:mongodb /ssd/log/mongodb -sudo service mongod start - -for i in {1..15}; do - nc -z localhost 27017 && break || sleep 1; - echo "Waiting for MongoDB ($i/15)" -done -nc -z localhost 27017 -if [ $? -eq 0 ]; then - mongo < create.js - mongod --version -else - >&2 echo "MongoDB did not start, skipping" -fi -EOF - -echo -e "ssh \$DBHOST 'bash' <<\"EOF\"" > $IROOT/mongodb.installed -echo -e "sudo service mongod start || echo 'mongod service already started'" >> $IROOT/mongodb.installed -echo -e "for i in {1..15}; do" >> $IROOT/mongodb.installed -echo -e " nc -z localhost 27017 && break || sleep 1;" >> $IROOT/mongodb.installed -echo -e " echo \"Waiting for MongoDB (\$i/15)\"" >> $IROOT/mongodb.installed -echo -e "done" >> $IROOT/mongodb.installed -echo -e "mongo < create.js" >> $IROOT/mongodb.installed -echo -e "EOF" >> $IROOT/mongodb.installed - -source $IROOT/mongodb.installed diff --git a/toolset/setup/linux/databases/mysql/mysql.list b/toolset/setup/linux/databases/mysql/mysql.list deleted file mode 100644 index 5a02e729d5f..00000000000 --- a/toolset/setup/linux/databases/mysql/mysql.list +++ /dev/null @@ -1,7 +0,0 @@ -# You may comment out entries below, but any other modifications may be lost. -# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications. -deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-apt-config -deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-5.7 -deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-tools -#deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-tools-preview -deb-src http://repo.mysql.com/apt/ubuntu/ trusty mysql-5.7 diff --git a/toolset/setup/linux/databases/mysql/mysql.sh b/toolset/setup/linux/databases/mysql/mysql.sh deleted file mode 100644 index dfafc3b10e6..00000000000 --- a/toolset/setup/linux/databases/mysql/mysql.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -fw_depends databases - -fw_installed mysql && return 0 - -# send over the required files -scp $FWROOT/toolset/setup/linux/databases/mysql/create.sql $DBHOST:~/ -scp $FWROOT/toolset/setup/linux/databases/mysql/my.cnf $DBHOST:~/ -scp $FWROOT/toolset/setup/linux/databases/mysql/mysql.list $DBHOST:~/ - -# install mysql on database machine -ssh $DBHOST 'bash' < $IROOT/mysql.installed -echo -e "sudo service mysql start || echo 'mysql service already started'" >> $IROOT/mysql.installed -echo -e "mysqladmin -uroot -psecret flush-hosts" >> $IROOT/mysql.installed -echo -e "mysql -uroot -psecret < create.sql" >> $IROOT/mysql.installed -echo -e "EOF" >> $IROOT/mysql.installed - -source $IROOT/mysql.installed diff --git a/toolset/setup/linux/databases/postgresql/create-postgres-database.sql b/toolset/setup/linux/databases/postgresql/create-postgres-database.sql deleted file mode 100644 index 40ef5fee1d6..00000000000 --- a/toolset/setup/linux/databases/postgresql/create-postgres-database.sql +++ /dev/null @@ -1,4 +0,0 @@ -CREATE USER benchmarkdbuser WITH PASSWORD 'benchmarkdbpass'; - -DROP DATABASE IF EXISTS hello_world; -CREATE DATABASE hello_world WITH ENCODING 'UTF8'; diff --git a/toolset/setup/linux/databases/postgresql/postgresql.sh b/toolset/setup/linux/databases/postgresql/postgresql.sh deleted file mode 100644 index e9c46990a2c..00000000000 --- a/toolset/setup/linux/databases/postgresql/postgresql.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -fw_depends databases - -fw_installed postgresql && return 0 - -# delete any old required files that do not belong to us as -# scp will fail otherwise -ssh $DBHOST 'bash' < /dev/null && sudo service postgresql stop -# Because postgresql... -sudo killall -9 -u postgres - -# Make sure all the configuration files in main belong to postgres -PG_VERSION=`pg_config --version | grep -oP '\d\.\d'` -sudo mv postgresql.conf /etc/postgresql/\${PG_VERSION}/main/postgresql.conf -sudo mv pg_hba.conf /etc/postgresql/\${PG_VERSION}/main/pg_hba.conf - -sudo chown -Rf postgres:postgres /etc/postgresql/\${PG_VERSION}/main - -sudo rm -rf /ssd/postgresql -sudo cp -R -p /var/lib/postgresql/\${PG_VERSION}/main /ssd/postgresql -sudo mv 60-postgresql-shm.conf /etc/sysctl.d/60-postgresql-shm.conf - -sudo chown postgres:postgres /etc/sysctl.d/60-postgresql-shm.conf -sudo chown postgres:postgres create-postgres* -EOF - -echo -e "ssh \$DBHOST < $IROOT/postgresql.installed -echo "service postgresql status &> /dev/null || sudo service postgresql start" >> $IROOT/postgresql.installed -echo "sudo -u postgres psql -q template1 < create-postgres-database.sql" >> $IROOT/postgresql.installed -echo "sudo -u postgres psql -q hello_world < create-postgres.sql" >> $IROOT/postgresql.installed -echo "EOF" >> $IROOT/postgresql.installed - -source $IROOT/postgresql.installed diff --git a/toolset/setup/linux/frameworks/cppcms-cppdb.sh b/toolset/setup/linux/frameworks/cppcms-cppdb.sh deleted file mode 100755 index 1e00307c180..00000000000 --- a/toolset/setup/linux/frameworks/cppcms-cppdb.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -fw_installed cppcms-cppdb && return 0 -fw_depends cppcms -#libmysqld-dev -fw_depends cmake libpq-dev - -#http://cppcms.com/sql/cppdb/build.html - -VERSION=0.3.1 -BACKNAME=cppdb -CPPDB_HOME=$IROOT/$BACKNAME-$VERSION -CPPDBROOT=${CPPDB_HOME}-install - -fw_get -o $BACKNAME-$VERSION.tar.bz2 https://download.sourceforge.net/project/cppcms/$BACKNAME/$VERSION/$BACKNAME-$VERSION.tar.bz2 -fw_untar $BACKNAME-$VERSION.tar.bz2 - -cd $BACKNAME-$VERSION -rm -rf build -mkdir build -cd build -cmake -DCMAKE_INSTALL_PREFIX=${CPPDBROOT} .. - -make -#make test -make install -#make clean - - -echo "export CPPDB_HOME=${CPPDBROOT}" > $IROOT/cppcms-cppdb.installed -source $IROOT/cppcms-cppdb.installed diff --git a/toolset/setup/linux/frameworks/cppcms.sh b/toolset/setup/linux/frameworks/cppcms.sh deleted file mode 100755 index d9009d2a8c3..00000000000 --- a/toolset/setup/linux/frameworks/cppcms.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -fw_installed cppcms && return 0 -fw_depends cmake libpcre3-dev zlib1g-dev libgcrypt11-dev libicu-dev - -#http://cppcms.com/wikipp/en/page/cppcms_1x_build - -#note '-rc1' in the url -VERSION=1.1.1 -BACKNAME=cppcms -CPPCMS_HOME=$IROOT/$BACKNAME-$VERSION -CPPCMSROOT=${CPPCMS_HOME}-install - - -fw_get -o $BACKNAME-$VERSION.tar.bz2 https://download.sourceforge.net/project/cppcms/$BACKNAME/$VERSION-rc1/$BACKNAME-$VERSION.tar.bz2 -fw_untar $BACKNAME-$VERSION.tar.bz2 - -cd $BACKNAME-$VERSION -rm -rf build -mkdir build -cd build -cmake -DCMAKE_INSTALL_PREFIX=${CPPCMSROOT} .. - -make -#make test -make install -#make clean - -echo "export CPPCMS_HOME=${CPPCMSROOT}" > $IROOT/cppcms.installed -source $IROOT/cppcms.installed diff --git a/toolset/setup/linux/frameworks/cppsp.sh b/toolset/setup/linux/frameworks/cppsp.sh deleted file mode 100755 index fdd6dd452c1..00000000000 --- a/toolset/setup/linux/frameworks/cppsp.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -fw_installed cppsp && return 0 - -VERSION=0.2.3 -CPPSP_HOME=$IROOT/cppsp_$VERSION - -fw_get -o cppsp_$VERSION.tar.xz http://downloads.sourceforge.net/project/cpollcppsp/CPPSP%200.2%20%28testing%29/cppsp_$VERSION.tar.xz -fw_untar cppsp_$VERSION.tar.xz - -# Using cp+rm over mv intentionally, because apparently this download -# causes oddball issues when mv'ed around inside a folder mounted -# inside of VirtualBox (may have something to do with case-sensitive -# filesystems) -cp -R cppsp_rel$VERSION/ $CPPSP_HOME -rm -rf cppsp_rel$VERSION/ - -sed -i 's|CXX := .*|CXX := g++-4.8|g' $CPPSP_HOME/makefile -sed -i 's|-Wall|-w|g' $CPPSP_HOME/makefile - -echo "export CPPSP_HOME=${CPPSP_HOME}" > $IROOT/cppsp.installed -echo -e "export CPLUS_INCLUDE_PATH=/usr/include/postgresql:/usr/include/postgresql/9.3/server:\$CPLUS_INCLUDE_PATH" >> $IROOT/cppsp.installed - -source $IROOT/cppsp.installed diff --git a/toolset/setup/linux/frameworks/cutelyst.sh b/toolset/setup/linux/frameworks/cutelyst.sh deleted file mode 100755 index b49c319d5a8..00000000000 --- a/toolset/setup/linux/frameworks/cutelyst.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -fw_installed cutelyst && return 0 - -CUTELYST_VER=1.12.0 -QT_VERSION_MM=59 -QT_VERSION_FULL=591-trusty -CROOT=${IROOT}/cutelyst - -sudo apt-add-repository --yes ppa:george-edison55/cmake-3.x -sudo apt-add-repository --yes ppa:beineri/opt-qt$QT_VERSION_FULL -sudo apt-get update -qq - -sudo apt-get install -qqy \ -cmake \ -uwsgi \ -uuid-dev \ -libcap-dev \ -libzmq3-dev \ -clearsilver-dev \ -libjemalloc-dev \ -qt${QT_VERSION_MM}base \ -qt${QT_VERSION_MM}script \ -qt${QT_VERSION_MM}tools - -export CMAKE_PREFIX_PATH=/opt/qt${QT_VERSION_MM}; - -mkdir -p ${CROOT} || true -cd ${CROOT} - -fw_get -O https://github.com/cutelyst/cutelyst/archive/v$CUTELYST_VER.tar.gz -fw_untar v$CUTELYST_VER.tar.gz - -cd cutelyst-$CUTELYST_VER -mkdir build && cd build - -cmake .. \ --DCMAKE_BUILD_TYPE=Release \ --DCMAKE_INSTALL_PREFIX=$CROOT \ --DUWSGI_PLUGINS_DIR=${CROOT}/lib/uwsgi/plugins \ --DPLUGIN_UWSGI=on \ --DUSE_JEMALLOC=on - -make -j $CPU_COUNT && make install - -echo "QT_VERSION_MM=${QT_VERSION_MM}" > $IROOT/cutelyst.installed - diff --git a/toolset/setup/linux/frameworks/duda.sh b/toolset/setup/linux/frameworks/duda.sh deleted file mode 100644 index b1a9d932c3a..00000000000 --- a/toolset/setup/linux/frameworks/duda.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -fw_installed duda && return 0 - -git clone https://github.com/monkey/dudac.git - -DUDA_HOME=$IROOT/dudac -cd $DUDA_HOME - -# Get v0.31 (no official releases that work 2015-06-25) -git checkout 7c3d5b03b09fb4cb5f5e338fff72df2e25e95ef0 - -./dudac -r -./dudac -s - -echo "export DUDA_HOME=${DUDA_HOME}" > $IROOT/duda.installed -echo -e "export PATH=\$DUDA_HOME:$PATH" >> $IROOT/duda.installed - -source $IROOT/duda.installed diff --git a/toolset/setup/linux/frameworks/ffead-cpp-apache-mongo.sh b/toolset/setup/linux/frameworks/ffead-cpp-apache-mongo.sh deleted file mode 100644 index c41e7c01d0a..00000000000 --- a/toolset/setup/linux/frameworks/ffead-cpp-apache-mongo.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_installed ffead-cpp-apache-mongo && return 0 - -fw_depends mongodb -fw_depends ffead-cpp-unixodbc -fw_depends ffead-cpp-mongocdriver -fw_depends ffead-cpp-httpd - -cd ${IROOT}/ffead-cpp-src/ -cp -f web/te-benchmark/sql-src/TeBkWorldmongo.h web/te-benchmark/include/TeBkWorld.h -cp -f web/te-benchmark/sql-src/TeBkWorldmongo.cpp web/te-benchmark/src/TeBkWorld.cpp -cp -f web/te-benchmark/config/sdormmongo.xml web/te-benchmark/config/sdorm.xml -rm -rf ffead-cpp-2.0-bin -make build-apps -rm -rf ${IROOT}/ffead-cpp-2.0 -cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 -cd ${IROOT}/ffead-cpp-2.0 -rm -rf web/default web/oauthApp web/flexApp web/markers -chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh -./server.sh > ffead-cpp-apache-mongo.log 2>&1 -while ! echo exit | nc localhost 8080; do sleep 5; done -rm -f serv.ctrl -sleep 10 - -cd ${IROOT} - -echo -e "export PATH=${IROOT}/httpd/bin:\$PATH" > $IROOT/ffead-cpp-apache-mongo.installed diff --git a/toolset/setup/linux/frameworks/ffead-cpp-apache-mysql.sh b/toolset/setup/linux/frameworks/ffead-cpp-apache-mysql.sh deleted file mode 100644 index 380b45e5be4..00000000000 --- a/toolset/setup/linux/frameworks/ffead-cpp-apache-mysql.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_installed ffead-cpp-apache-mysql && return 0 - -fw_depends mysql -fw_depends ffead-cpp-unixodbc -fw_depends ffead-cpp-mongocdriver -fw_depends ffead-cpp-httpd - -cd ${IROOT}/ffead-cpp-src/ -cp -f web/te-benchmark/sql-src/TeBkWorldsql.h web/te-benchmark/include/TeBkWorld.h -cp -f web/te-benchmark/sql-src/TeBkWorldsql.cpp web/te-benchmark/src/TeBkWorld.cpp -cp -f web/te-benchmark/config/sdormmysql.xml web/te-benchmark/config/sdorm.xml -rm -rf ffead-cpp-2.0-bin -make build-apps -rm -rf ${IROOT}/ffead-cpp-2.0 -cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 -cd ${IROOT}/ffead-cpp-2.0 -rm -rf web/default web/oauthApp web/flexApp web/markers -chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh -./server.sh > ffead-cpp-apache-mysql.log 2>&1 -while ! echo exit | nc localhost 8080; do sleep 5; done -rm -f serv.ctrl -sleep 10 - -cd ${IROOT} - -echo -e "export PATH=${IROOT}/httpd/bin:\$PATH" > $IROOT/ffead-cpp-apache-mysql.installed diff --git a/toolset/setup/linux/frameworks/ffead-cpp-apache-postgresql.sh b/toolset/setup/linux/frameworks/ffead-cpp-apache-postgresql.sh deleted file mode 100644 index 5596dda5a0f..00000000000 --- a/toolset/setup/linux/frameworks/ffead-cpp-apache-postgresql.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_installed ffead-cpp-apache-postgresql && return 0 - -fw_depends postgresql -fw_depends ffead-cpp-unixodbc -fw_depends ffead-cpp-mongocdriver -fw_depends ffead-cpp-httpd - -cd ${IROOT}/ffead-cpp-src/ -cp -f web/te-benchmark/sql-src/TeBkWorldsql.h web/te-benchmark/include/TeBkWorld.h -cp -f web/te-benchmark/sql-src/TeBkWorldsql.cpp web/te-benchmark/src/TeBkWorld.cpp -cp -f web/te-benchmark/config/sdormpostgresql.xml web/te-benchmark/config/sdorm.xml -rm -rf ffead-cpp-2.0-bin -make build-apps -rm -rf ${IROOT}/ffead-cpp-2.0 -cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 -cd ${IROOT}/ffead-cpp-2.0 -rm -rf web/default web/oauthApp web/flexApp web/markers -chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh -./server.sh > ffead-cpp-apache-postgresql.log 2>&1 -while ! echo exit | nc localhost 8080; do sleep 5; done -rm -f serv.ctrl -sleep 10 - -cd ${IROOT} - -echo -e "export PATH=${IROOT}/httpd/bin:\$PATH" > $IROOT/ffead-cpp-apache-postgresql.installed diff --git a/toolset/setup/linux/frameworks/ffead-cpp-emb-mongo.sh b/toolset/setup/linux/frameworks/ffead-cpp-emb-mongo.sh deleted file mode 100644 index 0994b44eb7c..00000000000 --- a/toolset/setup/linux/frameworks/ffead-cpp-emb-mongo.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_installed ffead-cpp-emb-mongo && return 0 - -fw_depends mongodb -fw_depends ffead-cpp-unixodbc -fw_depends ffead-cpp-mongocdriver -fw_depends ffead-cpp-framework - -cd ${IROOT}/ffead-cpp-src/ -cp -f web/te-benchmark/sql-src/TeBkWorldmongo.h web/te-benchmark/include/TeBkWorld.h -cp -f web/te-benchmark/sql-src/TeBkWorldmongo.cpp web/te-benchmark/src/TeBkWorld.cpp -cp -f web/te-benchmark/config/sdormmongo.xml web/te-benchmark/config/sdorm.xml -rm -rf ffead-cpp-2.0-bin -make build-apps -rm -rf ${IROOT}/ffead-cpp-2.0 -cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 -cd ${IROOT}/ffead-cpp-2.0 -rm -rf web/default web/oauthApp web/flexApp web/markers -chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh -./server.sh > ffead-cpp-emb-mongo.log 2>&1 -while ! echo exit | nc localhost 8080; do sleep 5; done -rm -f serv.ctrl -sleep 10 - -cd ${IROOT} - -echo -e "export PATH=${FFEAD_CPP_PATH}:\$PATH" > $IROOT/ffead-cpp-emb-mongo.installed diff --git a/toolset/setup/linux/frameworks/ffead-cpp-emb-mysql.sh b/toolset/setup/linux/frameworks/ffead-cpp-emb-mysql.sh deleted file mode 100644 index 7d1117e862b..00000000000 --- a/toolset/setup/linux/frameworks/ffead-cpp-emb-mysql.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_installed ffead-cpp-emb-mysql && return 0 - -fw_depends mysql -fw_depends ffead-cpp-unixodbc -fw_depends ffead-cpp-mongocdriver -fw_depends ffead-cpp-framework - -cd ${IROOT}/ffead-cpp-src/ -cp -f web/te-benchmark/sql-src/TeBkWorldsql.h web/te-benchmark/include/TeBkWorld.h -cp -f web/te-benchmark/sql-src/TeBkWorldsql.cpp web/te-benchmark/src/TeBkWorld.cpp -cp -f web/te-benchmark/config/sdormmysql.xml web/te-benchmark/config/sdorm.xml -rm -rf ffead-cpp-2.0-bin -make build-apps -rm -rf ${IROOT}/ffead-cpp-2.0 -cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 -cd ${IROOT}/ffead-cpp-2.0 -rm -rf web/default web/oauthApp web/flexApp web/markers -chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh -./server.sh > ffead-cpp-emb-mysql.log 2>&1 -while ! echo exit | nc localhost 8080; do sleep 5; done -rm -f serv.ctrl -sleep 10 - -cd ${IROOT} - -echo -e "export PATH=${FFEAD_CPP_PATH}:\$PATH" > $IROOT/ffead-cpp-emb-mysql.installed diff --git a/toolset/setup/linux/frameworks/ffead-cpp-emb-postgresql.sh b/toolset/setup/linux/frameworks/ffead-cpp-emb-postgresql.sh deleted file mode 100644 index b227b1548fd..00000000000 --- a/toolset/setup/linux/frameworks/ffead-cpp-emb-postgresql.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_installed ffead-cpp-emb-postgresql && return 0 - -fw_depends postgresql -fw_depends ffead-cpp-unixodbc -fw_depends ffead-cpp-mongocdriver -fw_depends ffead-cpp-framework - -cd ${IROOT}/ffead-cpp-src/ -cp -f web/te-benchmark/sql-src/TeBkWorldsql.h web/te-benchmark/include/TeBkWorld.h -cp -f web/te-benchmark/sql-src/TeBkWorldsql.cpp web/te-benchmark/src/TeBkWorld.cpp -cp -f web/te-benchmark/config/sdormpostgresql.xml web/te-benchmark/config/sdorm.xml -rm -rf ffead-cpp-2.0-bin -make build-apps -rm -rf ${IROOT}/ffead-cpp-2.0 -cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 -cd ${IROOT}/ffead-cpp-2.0 -rm -rf web/default web/oauthApp web/flexApp web/markers -chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh -./server.sh > ffead-cpp-emb-postgresql.log 2>&1 -while ! echo exit | nc localhost 8080; do sleep 5; done -rm -f serv.ctrl -sleep 10 - -cd ${IROOT} - -echo -e "export PATH=${FFEAD_CPP_PATH}:\$PATH" > $IROOT/ffead-cpp-emb-postgresql.installed diff --git a/toolset/setup/linux/frameworks/ffead-cpp-mongocdriver.sh b/toolset/setup/linux/frameworks/ffead-cpp-mongocdriver.sh deleted file mode 100644 index 779cbe6a9b6..00000000000 --- a/toolset/setup/linux/frameworks/ffead-cpp-mongocdriver.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_installed ffead-cpp-mongocdriver && return 0 - -fw_get -o mongo-c-driver-1.4.0.tar.gz https://github.com/mongodb/mongo-c-driver/releases/download/1.4.0/mongo-c-driver-1.4.0.tar.gz -rm -rf mongo-c-driver-1.4.0/ -fw_untar mongo-c-driver-1.4.0.tar.gz -cd mongo-c-driver-1.4.0/ -./configure --prefix=${IROOT} --libdir=${IROOT} --disable-automatic-init-and-cleanup -make && make install - -touch ${IROOT}/ffead-cpp-mongocdriver.installed \ No newline at end of file diff --git a/toolset/setup/linux/frameworks/ffead-cpp-nginx-mongo.sh b/toolset/setup/linux/frameworks/ffead-cpp-nginx-mongo.sh deleted file mode 100644 index 663ff2cf1c1..00000000000 --- a/toolset/setup/linux/frameworks/ffead-cpp-nginx-mongo.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_installed ffead-cpp-nginx-mongo && return 0 - -fw_depends mongodb -fw_depends ffead-cpp-unixodbc -fw_depends ffead-cpp-mongocdriver -fw_depends ffead-cpp-nginx - -cd ${IROOT}/ffead-cpp-src/ -cp -f web/te-benchmark/sql-src/TeBkWorldmongo.h web/te-benchmark/include/TeBkWorld.h -cp -f web/te-benchmark/sql-src/TeBkWorldmongo.cpp web/te-benchmark/src/TeBkWorld.cpp -cp -f web/te-benchmark/config/sdormmongo.xml web/te-benchmark/config/sdorm.xml -rm -rf ffead-cpp-2.0-bin -make build-apps -rm -rf ${IROOT}/ffead-cpp-2.0 -cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 -cd ${IROOT}/ffead-cpp-2.0 -rm -rf web/default web/oauthApp web/flexApp web/markers -chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh -./server.sh > ffead-cpp-nginx-mongo.log 2>&1 -while ! echo exit | nc localhost 8080; do sleep 5; done -rm -f serv.ctrl -sleep 10 - -cd ${IROOT} - -echo -e "export PATH=${IROOT}/nginxfc/sbin:\$PATH" > $IROOT/ffead-cpp-nginx-mongo.installed diff --git a/toolset/setup/linux/frameworks/ffead-cpp-nginx-mysql.sh b/toolset/setup/linux/frameworks/ffead-cpp-nginx-mysql.sh deleted file mode 100644 index d9121ea29b0..00000000000 --- a/toolset/setup/linux/frameworks/ffead-cpp-nginx-mysql.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_installed ffead-cpp-nginx-mysql && return 0 - -fw_depends mysql -fw_depends ffead-cpp-unixodbc -fw_depends ffead-cpp-mongocdriver -fw_depends ffead-cpp-nginx - -cd ${IROOT}/ffead-cpp-src/ -cp -f web/te-benchmark/sql-src/TeBkWorldsql.h web/te-benchmark/include/TeBkWorld.h -cp -f web/te-benchmark/sql-src/TeBkWorldsql.cpp web/te-benchmark/src/TeBkWorld.cpp -cp -f web/te-benchmark/config/sdormmysql.xml web/te-benchmark/config/sdorm.xml -rm -rf ffead-cpp-2.0-bin -make build-apps -rm -rf ${IROOT}/ffead-cpp-2.0 -cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 -cd ${IROOT}/ffead-cpp-2.0 -rm -rf web/default web/oauthApp web/flexApp web/markers -chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh -./server.sh > ffead-cpp-nginx-mysql.log 2>&1 -while ! echo exit | nc localhost 8080; do sleep 5; done -rm -f serv.ctrl -sleep 10 - -cd ${IROOT} - -echo -e "export PATH=${IROOT}/nginxfc/sbin:\$PATH" > $IROOT/ffead-cpp-nginx-mysql.installed diff --git a/toolset/setup/linux/frameworks/ffead-cpp-nginx-postgresql.sh b/toolset/setup/linux/frameworks/ffead-cpp-nginx-postgresql.sh deleted file mode 100644 index 094d713adfd..00000000000 --- a/toolset/setup/linux/frameworks/ffead-cpp-nginx-postgresql.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_installed ffead-cpp-nginx-postgresql && return 0 - -fw_depends postgresql -fw_depends ffead-cpp-unixodbc -fw_depends ffead-cpp-mongocdriver -fw_depends ffead-cpp-nginx - -cd ${IROOT}/ffead-cpp-src/ -cp -f web/te-benchmark/sql-src/TeBkWorldsql.h web/te-benchmark/include/TeBkWorld.h -cp -f web/te-benchmark/sql-src/TeBkWorldsql.cpp web/te-benchmark/src/TeBkWorld.cpp -cp -f web/te-benchmark/config/sdormpostgresql.xml web/te-benchmark/config/sdorm.xml -rm -rf ffead-cpp-2.0-bin -make build-apps -rm -rf ${IROOT}/ffead-cpp-2.0 -cp -rf ffead-cpp-2.0-bin ${IROOT}/ffead-cpp-2.0 -cd ${IROOT}/ffead-cpp-2.0 -rm -rf web/default web/oauthApp web/flexApp web/markers -chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh -./server.sh > ffead-cpp-nginx-postgresql.log 2>&1 -while ! echo exit | nc localhost 8080; do sleep 5; done -rm -f serv.ctrl -sleep 10 - -cd ${IROOT} - -echo -e "export PATH=${IROOT}/nginxfc/sbin:\$PATH" > $IROOT/ffead-cpp-nginx-postgresql.installed diff --git a/toolset/setup/linux/frameworks/ffead-cpp-nginx.sh b/toolset/setup/linux/frameworks/ffead-cpp-nginx.sh deleted file mode 100644 index ff4c82d5f5f..00000000000 --- a/toolset/setup/linux/frameworks/ffead-cpp-nginx.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -fw_installed ffead-cpp-nginx && return 0 - -fw_depends ffead-cpp-framework - -sudo apt-get remove -y nginx - -fw_get -o nginx-1.11.3.tar.gz http://nginx.org/download/nginx-1.11.3.tar.gz -rm -rf ${IROOT}nginx-1.11.3 -fw_untar nginx-1.11.3.tar.gz -rm -rf ${IROOT}/nginxfc -cd nginx-1.11.3 -./configure --prefix=${IROOT}/nginxfc --with-ld-opt="-lstdc++ -L${IROOT}/ffead-cpp-2.0/lib -L${IROOT}" --add-module="${IROOT}/ffead-cpp-src/modules/nginx_mod_ffeadcpp" --with-cc-opt="-I${IROOT}/include -I${IROOT}/include/libmongoc-1.0/ -I${IROOT}/include/libbson-1.0/ -I${IROOT}/ffead-cpp-2.0/include -w -fpermissive" -make install - -cp ${IROOT}/ffead-cpp-src/modules/nginx_mod_ffeadcpp/nginx.conf ${IROOT}/nginxfc/conf/ -sed -i 's|FFEAD_PATH|'${IROOT}/ffead-cpp-2.0'|g' ${IROOT}/nginxfc/conf/nginx.conf - -touch ${IROOT}/ffead-cpp-nginx.installed diff --git a/toolset/setup/linux/frameworks/ffead-cpp-unixodbc.sh b/toolset/setup/linux/frameworks/ffead-cpp-unixodbc.sh deleted file mode 100644 index 3c141cea0a0..00000000000 --- a/toolset/setup/linux/frameworks/ffead-cpp-unixodbc.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -fw_installed ffead-cpp-unixodbc && return 0 - -sudo apt-get install -y build-essential -sudo apt-get install -y uuid-dev libmyodbc odbc-postgresql - -fw_get -o unixODBC-2.3.4.tar.gz ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.4.tar.gz -rm -rf unixODBC-2.3.4 -fw_untar unixODBC-2.3.4.tar.gz -cd unixODBC-2.3.4 -./configure --enable-stats=no --enable-gui=no --enable-drivers=no --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE --libdir=${IROOT} --prefix=${IROOT} --sysconfdir=${IROOT} -make install - -touch ${IROOT}/ffead-cpp-unixodbc.installed \ No newline at end of file diff --git a/toolset/setup/linux/frameworks/jester.sh b/toolset/setup/linux/frameworks/jester.sh deleted file mode 100755 index f4491b1a82f..00000000000 --- a/toolset/setup/linux/frameworks/jester.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -fw_depends nim nimble - -fw_installed jester && return 0 - -JESTER=$IROOT/jester - -git clone https://github.com/dom96/jester.git -cd jester -# 2015-06-25 -git checkout 71b8cc069a0d271d619c2dc41bc6479047885587 -nimble update -# If ~/.nimble/pkgs/jester exists, write over it. -echo 'y' | nimble install - -echo "export JESTER_HOME=${JESTER}" > $IROOT/jester.installed - -source $IROOT/jester.installed diff --git a/toolset/setup/linux/frameworks/libreactor.sh b/toolset/setup/linux/frameworks/libreactor.sh deleted file mode 100644 index f8f3c69af66..00000000000 --- a/toolset/setup/linux/frameworks/libreactor.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -fw_depends gcc-6 - -fw_installed libreactor && return 0 - -mkdir -p ${CROOT} || true -cd ${CROOT} - -LIBREACTOR_HOME=$IROOT/libreactor -mkdir -p $LIBREACTOR_HOME - -cd $LIBREACTOR_HOME -wget https://github.com/fredrikwidlund/libdynamic/releases/download/v1.1.0/libdynamic-1.1.0.tar.gz -tar xfz libdynamic-1.1.0.tar.gz -cd libdynamic-1.1.0 -./configure CC=gcc-6 AR=gcc-ar-6 NM=gcc-nm-6 RANLIB=gcc-ranlib-6 -make && sudo make install - -cd $LIBREACTOR_HOME -wget https://github.com/fredrikwidlund/libreactor/releases/download/v1.0.0/libreactor-1.0.0.tar.gz -tar xfz libreactor-1.0.0.tar.gz -cd libreactor-1.0.0 -./configure CC=gcc-6 AR=gcc-ar-6 NM=gcc-nm-6 RANLIB=gcc-ranlib-6 -make && sudo make install - -cd $LIBREACTOR_HOME -wget https://github.com/fredrikwidlund/libclo/releases/download/v0.1.0/libclo-0.1.0.tar.gz -tar xfz libclo-0.1.0.tar.gz -cd libclo-0.1.0 -./configure CC=gcc-6 AR=gcc-ar-6 NM=gcc-nm-6 RANLIB=gcc-ranlib-6 -make && sudo make install - -cd $LIBREACTOR_HOME -echo "export LIBREACTOR_HOME=${LIBREACTOR_HOME}" >> $IROOT/libreactor.installed - -source $IROOT/libreactor.installed diff --git a/toolset/setup/linux/frameworks/octane.sh b/toolset/setup/linux/frameworks/octane.sh deleted file mode 100644 index f0332c6884e..00000000000 --- a/toolset/setup/linux/frameworks/octane.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -fw_installed octane && return 0 - -OCTANE_HOME=$IROOT/octane - -git clone https://github.com/simongui/octane.git -cd $OCTANE_HOME -# May 22nd, 2017 -git checkout 8c28b1b83f1aa2817a401a3e8437a0af4ec53c28 -make - -echo "export OCTANE_HOME=${OCTANE_HOME}" >> $IROOT/octane.installed -echo -e "export PATH=\$OCTANE_HOME/build/:\$PATH" >> $IROOT/octane.installed - -source $IROOT/octane.installed diff --git a/toolset/setup/linux/frameworks/onion.sh b/toolset/setup/linux/frameworks/onion.sh deleted file mode 100644 index 21da2b15dc5..00000000000 --- a/toolset/setup/linux/frameworks/onion.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -fw_installed onion && return 0 - -git clone https://github.com/davidmoreno/onion.git -cd $IROOT/onion - -# Latest commit on master as of July 10 2014 -# This is post tag v0.7, but pre any later tags -git checkout c460557bfc7d45fb6ba61cb6b7259480a67dde82 - -mkdir -p build -cd build -cmake .. -make - -echo "export ONION_LOG=noinfo" > $IROOT/onion.installed - -source $IROOT/onion.installed diff --git a/toolset/setup/linux/frameworks/phalcon.sh b/toolset/setup/linux/frameworks/phalcon.sh deleted file mode 100644 index 94c8a087e4b..00000000000 --- a/toolset/setup/linux/frameworks/phalcon.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -fw_depends php7 - -fw_installed phalcon && return 0 - -# Enable the PHP phalcon extension -sed -i 's|;extension=phalcon.so|extension=phalcon.so|g' $PHP_HOME/lib/php.ini - -VERSION="3.3.1" - -fw_get -O https://github.com/phalcon/cphalcon/archive/v${VERSION}.tar.gz -fw_untar v${VERSION}.tar.gz -cd cphalcon-${VERSION}/build -./install - -echo "" > $IROOT/phalcon.installed - -source $IROOT/phalcon.installed diff --git a/toolset/setup/linux/frameworks/poco.sh b/toolset/setup/linux/frameworks/poco.sh deleted file mode 100755 index dfbded3be4d..00000000000 --- a/toolset/setup/linux/frameworks/poco.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -fw_installed poco && return 0 - -VERSION=1.6.1 -POCO_HOME=$IROOT/poco_$VERSION - -fw_get -o poco_$VERSION.tar.gz http://pocoproject.org/releases/poco-$VERSION/poco-$VERSION-all.tar.gz -fw_untar poco_$VERSION.tar.gz - -cp -R poco-$VERSION-all/ $POCO_HOME -rm -rf poco-$VERSION-all/ - -cd $POCO_HOME -./configure --no-tests --no-samples -make --quiet PageCompiler-libexec XML-libexec JSON-libexec - -echo "export POCO_HOME=${POCO_HOME}" > $IROOT/poco.installed -echo "export LD_LIBRARY_PATH=$POCO_HOME/lib/Linux/x86_64" >> $IROOT/poco.installed - -source $IROOT/poco.installed - diff --git a/toolset/setup/linux/frameworks/ringojs.sh b/toolset/setup/linux/frameworks/ringojs.sh deleted file mode 100644 index 9a617ea7911..00000000000 --- a/toolset/setup/linux/frameworks/ringojs.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -fw_installed ringojs && return 0 - -VERSION="1.1.0" -RINGOJS=$IROOT/ringojs_$VERSION -RINGOJS_HOME=$IROOT/ringojs-$VERSION - -fw_get -O https://github.com/ringo/ringojs/releases/download/v$VERSION/ringojs-$VERSION.tar.gz -fw_untar ringojs-$VERSION.tar.gz - -echo "export RINGOJS_HOME=${RINGOJS_HOME}" > $IROOT/ringojs.installed -echo -e "export PATH=\$RINGOJS_HOME/bin:\$PATH" >> $IROOT/ringojs.installed - -source $IROOT/ringojs.installed diff --git a/toolset/setup/linux/frameworks/silicon.sh b/toolset/setup/linux/frameworks/silicon.sh deleted file mode 100755 index 91e37910d28..00000000000 --- a/toolset/setup/linux/frameworks/silicon.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -fw_depends libboost-dev clang-3.9 gcc-6 - -fw_installed silicon && return 0 - -SILICON=$IROOT/silicon - -git clone https://github.com/matt-42/silicon.git -cd silicon; -git checkout ecaf04887c9dbbf0f457afab1f487268f6aeffab -CC=clang-3.9 CXX=clang++-3.9 ./install.sh $IROOT - -echo "" > $IROOT/silicon.installed - -source $IROOT/silicon.installed diff --git a/toolset/setup/linux/frameworks/treefrog.sh b/toolset/setup/linux/frameworks/treefrog.sh deleted file mode 100644 index aea548be441..00000000000 --- a/toolset/setup/linux/frameworks/treefrog.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -fw_installed treefrog && return 0 - -TFVER=1.19.0 - -sudo apt-get update -qq -sudo apt-get install -y g++ gcc libjemalloc-dev -sudo apt-get install -y qt5-qmake qt5-default qtbase5-dev qtbase5-dev-tools libqt5sql5 libqt5sql5-mysql libqt5sql5-psql libqt5qml5 libqt5xml5 qtdeclarative5-dev libqt5quick5 libqt5quickparticles5 libqt5gui5 libqt5printsupport5 libqt5widgets5 libqt5opengl5-dev libqt5quicktest5 -fw_get -O https://github.com/treefrogframework/treefrog-framework/archive/v${TFVER}.tar.gz -fw_untar v${TFVER}.tar.gz -cd treefrog-framework-${TFVER} -# TODO: Someday we can try this... I couldn't get it working -#./configure --prefix=$IROOT/treefrog -./configure - -cd src -make -j4 -sudo make install - -cd ../tools -make -j4 -sudo make install - -echo "" > $IROOT/treefrog.installed - -source $IROOT/treefrog.installed diff --git a/toolset/setup/linux/frameworks/ulib.sh b/toolset/setup/linux/frameworks/ulib.sh deleted file mode 100755 index b4116e046ff..00000000000 --- a/toolset/setup/linux/frameworks/ulib.sh +++ /dev/null @@ -1,122 +0,0 @@ -#!/bin/bash - -fw_depends gcc-6 - -fw_installed ulib && return 0 - -ULIB_VERSION=1.4.2 -ULIB_ROOT=$IROOT/ULib -ULIB_DOCUMENT_ROOT=$ULIB_ROOT/ULIB_DOCUMENT_ROOT - -# Create a run directory for ULIB -[ ! -e $IROOT/ulib.installed -a -d $IROOT/ULib ] && rm -rf $IROOT/ULib* - -mkdir -p $ULIB_ROOT -mkdir -p $ULIB_DOCUMENT_ROOT - -#if [ "$TRAVIS" = "true" ]; then -# AVOID "fatal error: postgres_fe.h: No such file or directory" -sudo apt-get install -y postgresql-server-dev-all -#fi - -# make use of FIFO scheduling policy possible (we must avoid use of test because bash signal trapping) -#type setcap >/dev/null 2>/dev/null - -#if [ $? -ne 0 ]; then - sudo apt-get install -y libcap2-bin -#fi - -export CC=gcc-6 -export CXX=g++-6 -export AR=gcc-ar-6 -export RANLIB=gcc-ranlib-6 - -# We need to install mongo-c-driver (we don't have a ubuntu package) -RETCODE=$(fw_exists ${IROOT}/mongo-c-driver.installed) -if [ "$RETCODE" != 0 ]; then - wget https://github.com/mongodb/mongo-c-driver/releases/download/1.1.10/mongo-c-driver-1.1.10.tar.gz - tar -xzf mongo-c-driver-1.1.10.tar.gz - cd mongo-c-driver-1.1.10/ - ./configure --prefix=$IROOT --libdir=$IROOT - make && sudo make install - touch ${IROOT}/mongo-c-driver.installed -fi - -cd $IROOT - -if [ -e ../results/ULib-${ULIB_VERSION}.tar.gz ]; then - mv ../results/ULib-${ULIB_VERSION}.tar.gz . -else - # 1. Download ULib - fw_get -o ULib-${ULIB_VERSION}.tar.gz https://github.com/stefanocasazza/ULib/archive/v${ULIB_VERSION}.tar.gz -fi - -fw_untar ULib-${ULIB_VERSION}.tar.gz - -# 2. Compile application (userver_tcp) -cd ULib-$ULIB_VERSION - -# AVOID "configure: error: newly created file is older than distributed files! Check your system clock" -find . -exec touch {} \; - -cp -r tests/examples/benchmark/FrameworkBenchmarks/ULib/db $ULIB_ROOT - -cat <$ULIB_ROOT/benchmark.cfg -userver { -PORT 8080 -PREFORK_CHILD 2 -TCP_LINGER_SET 0 -LISTEN_BACKLOG 16384 -ORM_DRIVER "mysql pgsql" -CLIENT_FOR_PARALLELIZATION 100 -DOCUMENT_ROOT $ULIB_DOCUMENT_ROOT -} -EOF - -USP_FLAGS="-DAS_cpoll_cppsp_DO" \ -./configure --prefix=$ULIB_ROOT \ ---disable-static --disable-examples \ ---with-mysql --with-pgsql \ ---without-ssl --without-pcre --without-expat \ ---without-libz --without-libuuid --without-magic --without-libares \ ---enable-static-orm-driver='mysql pgsql' --enable-static-server-plugin=http \ ---with-mongodb --with-mongodb-includes="-I$IROOT/include/libbson-1.0 -I$IROOT/include/libmongoc-1.0" --with-mongodb-ldflags="-L$IROOT" -# --enable-debug \ -#USP_LIBS="-ljson" \ -#cp $TROOT/src/* src/ulib/net/server/plugin/usp - -make install -cd examples/userver -make install - -# Never use setcap inside of TRAVIS -[ "$TRAVIS" != "true" ] || { \ -if [ `ulimit -r` -eq 99 ]; then - sudo setcap cap_sys_nice,cap_sys_resource,cap_net_bind_service,cap_net_raw+eip $IROOT/ULib/bin/userver_tcp -fi -} - -# Compile usp pages (no more REDIS) -cd ../../src/ulib/net/server/plugin/usp -make json.la plaintext.la db.la query.la update.la fortune.la cached_worlds.la \ - mdb.la mquery.la mupdate.la mfortune.la -# rdb.la rquery.la rupdate.la rfortune.la - -# Check that compilation worked -if [ ! -e .libs/cached_worlds.so ]; then - exit 1 -fi - -cp .libs/json.so .libs/plaintext.so \ - .libs/db.so .libs/query.so .libs/update.so .libs/fortune.so .libs/cached_worlds.so \ - .libs/mdb.so .libs/mquery.so .libs/mupdate.so .libs/mfortune.so $ULIB_DOCUMENT_ROOT -# .libs/rdb.so .libs/rquery.so .libs/rupdate.so .libs/rfortune.so \ - -cat <$IROOT/ulib.installed -export ULIB_ROOT=${ULIB_ROOT} -export ULIB_VERSION=${ULIB_VERSION} -export ULIB_DOCUMENT_ROOT=${ULIB_DOCUMENT_ROOT} -export PATH=${ULIB_ROOT}/bin:${PATH} -EOF - -source $IROOT/ulib.installed diff --git a/toolset/setup/linux/frameworks/urweb.sh b/toolset/setup/linux/frameworks/urweb.sh deleted file mode 100755 index fffe397307c..00000000000 --- a/toolset/setup/linux/frameworks/urweb.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -VERSION=20160621 -COMPILER=${IROOT}/urweb - -RETCODE=$(fw_exists ${COMPILER}.installed) -[ "$RETCODE" == 0 ] || { \ - sudo apt-get --assume-yes install mlton - cd $IROOT - fw_get -O http://www.impredicative.com/ur/urweb-$VERSION.tgz - fw_untar urweb-$VERSION.tgz - cd urweb-$VERSION - ./configure --prefix=$IROOT/urweb - make - make install - - echo "export URWEB_HOME=${COMPILER}" > $COMPILER.installed - echo "export LD_LIBRARY_PATH=${COMPILER}/lib" >> $COMPILER.installed - echo -e "export PATH=${COMPILER}/bin:\$PATH" >> $COMPILER.installed - cd $TROOT -} - -source $IROOT/urweb.installed - diff --git a/toolset/setup/linux/frameworks/wt.sh b/toolset/setup/linux/frameworks/wt.sh deleted file mode 100644 index 03e7843f8b3..00000000000 --- a/toolset/setup/linux/frameworks/wt.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -fw_depends postgresql mysql gcc-6 - -fw_installed wt && return 0 - -WT_VERSION=4.0.2 -BOOST_ROOT=${IROOT}/boost -BOOST_INC=${BOOST_ROOT}/include -BOOST_LIB=${BOOST_ROOT}/lib -WT_ROOT=${IROOT}/wt -WT_LIB=${WT_ROOT}/lib -WT_INC=${WT_ROOT}/include -LD_LIBRARY_PATH="${BOOST_LIB}:${WT_LIB}:${LD_LIBRARY_PATH}" -CPLUS_INCLUDE_PATH=/usr/include/postgresql:/usr/include/postgresql/9.3/server:$CPLUS_INCLUDE_PATH - -# Install CMake 3.x -sudo apt-add-repository --yes ppa:george-edison55/cmake-3.x -sudo apt-get update -qq - -sudo apt-get install -qqy \ - cmake - -# Build boost_thread, boost_system, boost_filesystem and boost_program_options -fw_get -o boost_1_65_1.tar.gz https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz -fw_untar boost_1_65_1.tar.gz -cd boost_1_65_1 -./bootstrap.sh -./b2 \ - -d0 \ - toolset=gcc-6 \ - variant=release \ - link=static \ - cxxflags="-std=c++14 -march=native" \ - cflags="-march=native" \ - --prefix=${BOOST_ROOT} \ - --with-system \ - --with-thread \ - --with-program_options \ - --with-filesystem \ - install -cd .. - -fw_get -O https://github.com/emweb/wt/archive/$WT_VERSION.tar.gz -mv $WT_VERSION.tar.gz wt-$WT_VERSION.tar.gz -fw_untar wt-$WT_VERSION.tar.gz - -cd wt-$WT_VERSION -mkdir -p build -cd build -cmake .. -DCMAKE_CXX_STANDARD=14 -DCMAKE_BUILD_TYPE=Release \ - -DBOOST_PREFIX=${BOOST_ROOT} \ - -DCMAKE_INSTALL_PREFIX=${IROOT}/wt -DCONFIGDIR=${IROOT}/wt/etc \ - -DCMAKE_C_COMPILER=$(which gcc-6) \ - -DCMAKE_CXX_COMPILER=$(which g++-6) -DDESTDIR=${IROOT}/wt \ - -DWEBUSER=$(id -u -n) -DWEBGROUP=$(id -g -n) \ - -DENABLE_SSL=OFF -DHTTP_WITH_ZLIB=OFF \ - -DCMAKE_C_FLAGS_RELEASE="-O3 -march=native -DNDEBUG" \ - -DCMAKE_CXX_FLAGS_RELEASE="-O3 -march=native -DNDEBUG" \ - -DBUILD_TESTS=OFF -DENABLE_LIBWTTEST=OFF \ - -DSHARED_LIBS=OFF -make -make install - -cd $IROOT - -echo "export BOOST_ROOT=${BOOST_ROOT}" > $IROOT/wt.installed -echo "export BOOST_INC=${BOOST_INC}" >> $IROOT/wt.installed -echo "export BOOST_LIB=${BOOST_LIB}" >> $IROOT/wt.installed -echo "export WT_ROOT=${WT_ROOT}" >> $IROOT/wt.installed -echo "export WT_LIB=${WT_LIB}" >> $IROOT/wt.installed -echo "export WT_INC=${WT_INC}" >> $IROOT/wt.installed -echo -e "export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:\$LD_LIBRARY_PATH" >> $IROOT/wt.installed -echo -e "export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:\$CPLUS_INCLUDE_PATH" >> $IROOT/wt.installed - -source $IROOT/wt.installed diff --git a/toolset/setup/linux/frameworks/yaf.sh b/toolset/setup/linux/frameworks/yaf.sh deleted file mode 100644 index 101bbbd38a7..00000000000 --- a/toolset/setup/linux/frameworks/yaf.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -fw_depends php5 - -fw_installed yaf && return 0 - -VERSION="2.3.5" -# Enable the PHP yaf extension -sed -i 's|;extension=yaf.so|extension=yaf.so|g' $PHP_HOME/lib/php.ini -# pecl install make fail -#printf "\n" | $PHP_HOME/bin/pecl install -f yaf-2.3.5 - -fw_get -O http://pecl.php.net/get/yaf-${VERSION}.tgz -fw_untar yaf-${VERSION}.tgz -cd yaf-${VERSION} -phpize -./configure -make install - -echo "" > $IROOT/yaf.installed - -source $IROOT/yaf.installed \ No newline at end of file diff --git a/toolset/setup/linux/frameworks/yaf3.sh b/toolset/setup/linux/frameworks/yaf3.sh deleted file mode 100644 index 8125fd7daa6..00000000000 --- a/toolset/setup/linux/frameworks/yaf3.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -fw_depends php7 - -fw_installed yaf && return 0 - -# Enable the PHP yaf extension -sed -i 's|;extension=yaf.so|extension=yaf.so|g' $PHP_HOME/lib/php.ini -printf "\n" | $PHP_HOME/bin/pecl -q install -f yaf-3.0.6 - -echo "" > $IROOT/yaf.installed - -source $IROOT/yaf.installed diff --git a/toolset/setup/linux/languages/dart.sh b/toolset/setup/linux/languages/dart.sh deleted file mode 100644 index 6ad4640baa5..00000000000 --- a/toolset/setup/linux/languages/dart.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -fw_installed dart-sdk && return 0 - -DART_HOME=$IROOT/dart-sdk - -# Dart version 1.10.0 -fw_get -O http://storage.googleapis.com/dart-archive/channels/stable/release/45396/sdk/dartsdk-linux-x64-release.zip -fw_unzip dartsdk-linux-x64-release.zip - -echo "export DART_HOME=${DART_HOME}" > $IROOT/dart-sdk.installed -echo "export PUB_CACHE=${IROOT}/.pubcache" >> $IROOT/dart-sdk.installed -echo -e "export PATH=\$DART_HOME/bin:\$PATH" >> $IROOT/dart-sdk.installed - -source $IROOT/dart-sdk.installed diff --git a/toolset/setup/linux/languages/dlang.sh b/toolset/setup/linux/languages/dlang.sh deleted file mode 100755 index 5376f6e88ec..00000000000 --- a/toolset/setup/linux/languages/dlang.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -fw_depends xdg-utils - -fw_installed dlang && return 0 - -DLANG=$IROOT/dlang -DMDVER="2.078.1" -LDCVER="1.7.0" - -mkdir -p $DLANG -fw_get -O http://downloads.dlang.org/releases/2.x/$DMDVER/dmd_$DMDVER-0_amd64.deb -dpkg-deb -x dmd_$DMDVER-0_amd64.deb $DLANG - -cd $DLANG -fw_get -O https://github.com/ldc-developers/ldc/releases/download/v$LDCVER/ldc2-$LDCVER-linux-x86_64.tar.xz -fw_untar ldc2-$LDCVER-linux-x86_64.tar.xz -ln -s $DLANG/ldc2-$LDCVER-linux-x86_64/bin/ldc2 $DLANG/usr/bin/ldc2 - -# According to this file (dmd.conf) dmd will, upon execution, look for -# a dmd.conf in 1) the current working directory [bad], 2) the directory -# specified by the HOME environment variable [bad], 3) the directory in -# which dmd resides [less bad], and 4) the /etc directory. -# We are trying to maintain as little global presence as possible, so -# we need to change the DFLAGS in the dmd.conf to be correctly sandboxed -# to the $DLANG folder (in IROOT). -cp $DLANG/etc/dmd.conf $DLANG/usr/bin -sed -i "s|-I/usr/|-I${DLANG}/usr/|g" $DLANG/usr/bin/dmd.conf -sed -i "s|-L/usr/|-L${DLANG}/usr/|g" $DLANG/usr/bin/dmd.conf - -echo -e "export PATH=${DLANG}/usr/bin:\$PATH" > $IROOT/dlang.installed - -source $IROOT/dlang.installed diff --git a/toolset/setup/linux/languages/elixir.sh b/toolset/setup/linux/languages/elixir.sh deleted file mode 100755 index d6a87dcd23c..00000000000 --- a/toolset/setup/linux/languages/elixir.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -fw_depends erlang - -fw_installed elixir && return 0 - -ELIXIR_HOME=$IROOT/elixir -VERSION="1.5.2-1" -RELEASE="trusty" -ARCH="amd64" - -fw_get -O http://packages.erlang-solutions.com/erlang/elixir/FLAVOUR_2_download/elixir_${VERSION}~ubuntu~${RELEASE}_${ARCH}.deb -dpkg -x elixir_${VERSION}~ubuntu~${RELEASE}_${ARCH}.deb $IROOT/elixir -$IROOT/erlang/usr/lib/erlang/Install -minimal $IROOT/erlang/usr/lib/erlang - -echo "export ELIXIR_HOME=${ELIXIR_HOME}" > $IROOT/elixir.installed -echo -e "export PATH=\$ELIXIR_HOME/usr/local/bin:\$PATH" >> $IROOT/elixir.installed - -source $IROOT/elixir.installed diff --git a/toolset/setup/linux/languages/erlang.sh b/toolset/setup/linux/languages/erlang.sh deleted file mode 100755 index 3f60562827c..00000000000 --- a/toolset/setup/linux/languages/erlang.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -fw_installed erlang && return 0 - -VERSION="18.2-2" -RELEASE="trusty" -ARCH="amd64" - -fw_get -O http://packages.erlang-solutions.com/site/esl/esl-erlang/FLAVOUR_2_esl/esl-erlang_${VERSION}~ubuntu~${RELEASE}_${ARCH}.deb -dpkg -x esl-erlang_${VERSION}~ubuntu~${RELEASE}_${ARCH}.deb $IROOT/erlang -$IROOT/erlang/usr/lib/erlang/Install -minimal $IROOT/erlang/usr/lib/erlang - -echo -e "export PATH=${IROOT}/erlang/usr/bin:\$PATH" > $IROOT/erlang.installed - -source $IROOT/erlang.installed diff --git a/toolset/setup/linux/languages/haskell.sh b/toolset/setup/linux/languages/haskell.sh deleted file mode 100644 index db755286b16..00000000000 --- a/toolset/setup/linux/languages/haskell.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -fw_installed haskell && return 0 - -CABAL_HOME=/opt/cabal/1.20 -HASKELL_HOME=/opt/ghc/7.8.3 - -# TODO: someday move away from apt -sudo add-apt-repository -y ppa:hvr/ghc -sudo apt-get update -sudo apt-get install -y ghc-7.8.3 cabal-install-1.20 libpcre3-dev - -echo "export LANG=en_US.UTF-8" > $IROOT/haskell.installed -echo "export CABAL_HOME=${CABAL_HOME}" >> $IROOT/haskell.installed -echo "export HASKELL_HOME=${HASKELL_HOME}" >> $IROOT/haskell.installed -echo -e "export PATH=\$HASKELL_HOME/bin:\$CABAL_HOME/bin:\$PATH" >> $IROOT/haskell.installed - -source $IROOT/haskell.installed diff --git a/toolset/setup/linux/languages/java.sh b/toolset/setup/linux/languages/java.sh deleted file mode 100644 index 1728a5c02f3..00000000000 --- a/toolset/setup/linux/languages/java.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_installed java && return 0 - -fw_get -O https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz -fw_untar openjdk-9.0.4_linux-x64_bin.tar.gz - -JAVA_HOME=$IROOT/jdk-9.0.4 -echo "export JAVA_HOME=${JAVA_HOME}" > $IROOT/java.installed -echo -e "export PATH=\$JAVA_HOME/bin:\$PATH" >> $IROOT/java.installed - -source $IROOT/java.installed diff --git a/toolset/setup/linux/languages/java8.sh b/toolset/setup/linux/languages/java8.sh deleted file mode 100644 index 131fd650875..00000000000 --- a/toolset/setup/linux/languages/java8.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -fw_installed java8 && return 0 - -# TODO: Someday get away from apt-get -sudo add-apt-repository -y ppa:openjdk-r/ppa -sudo apt-get update -sudo apt-get install -qqy openjdk-8-jdk - -# https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/1396760 -sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure - -# Setup environment variables -JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 -echo "export JAVA_HOME=${JAVA_HOME}" > $IROOT/java8.installed -echo -e "export PATH=\$JAVA_HOME/bin:\$PATH" >> $IROOT/java8.installed - -source $IROOT/java8.installed diff --git a/toolset/setup/linux/languages/lua.sh b/toolset/setup/linux/languages/lua.sh deleted file mode 100644 index 89640f553f9..00000000000 --- a/toolset/setup/linux/languages/lua.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -fw_installed lua && return 0 - -LUA_VERSION="5.1" -LUA_MICRO="5" - -fw_get -O https://github.com/LuaDist/lua/archive/$LUA_VERSION.$LUA_MICRO.tar.gz -fw_untar $LUA_VERSION.$LUA_MICRO.tar.gz - -LUA_HOME=$IROOT/lua-$LUA_VERSION.$LUA_MICRO - -cd $LUA_HOME -cp src/luaconf.h.orig src/luaconf.h -make linux -cd src -mkdir ../bin ../include ../lib -install -p -m 0755 lua luac ../bin -install -p -m 0644 lua.h luaconf.h lualib.h lauxlib.h ../include -install -p -m 0644 liblua.a ../lib - -echo "export LUA_HOME=${LUA_HOME}" > $IROOT/lua.installed -echo "export LUA_VERSION=${LUA_VERSION}" >> $IROOT/lua.installed -echo "export LUA_MICRO=${LUA_MICRO}" >> $IROOT/lua.installed -echo -e "export LUA=${IROOT}/lua\$LUA_VERSION.\$LUA_MICRO" >> $IROOT/lua.installed -echo -e "export PATH=\$LUA_HOME/bin:\$PATH" >> $IROOT/lua.installed -# TODO: This feels very hackish -echo -e 'export LUA_PATH="./?.lua;./?.lc;$LUA_HOME/share/lua/5.1/?/init.lua;$LUA_HOME/share/lua/5.1/?.lua;$LUA_HOME/lib/lua/5.1/?/init.lua;$LUA_HOME/lib/lua/5.1/?.lua"' >> $IROOT/lua.installed -echo -e 'export LUA_CPATH="./?.lua;./?.lc;$LUA_HOME/share/lua/5.1/?/init.so;$LUA_HOME/share/lua/5.1/?.so;$LUA_HOME/lib/lua/5.1/?/init.so;$LUA_HOME/lib/lua/5.1/?.so"' >> $IROOT/lua.installed -# This helps the fact that Lua/nginx cannot resolve hostnames from /etc/hosts -echo -e "export DBHOST=`getent hosts TFB-database | awk '{ print $1 }'`" >> $IROOT/lua.installed - -source $IROOT/lua.installed diff --git a/toolset/setup/linux/languages/nim.sh b/toolset/setup/linux/languages/nim.sh deleted file mode 100644 index 4faed502ae0..00000000000 --- a/toolset/setup/linux/languages/nim.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_installed nim && return 0 - -NIM_VERSION="0.11.2" -NIM_CSOURCES="6bf2282" - -fw_get -O https://github.com/nim-lang/Nim/archive/v$NIM_VERSION.tar.gz -fw_untar v$NIM_VERSION.tar.gz -mv Nim-$NIM_VERSION nim -cd nim - -git clone git://github.com/nim-lang/csources.git -cd csources -git checkout $NIM_CSOURCES -sh build.sh -cd .. - -bin/nim c koch - -# bootstrapping nim's compiler -./koch boot -d:release - -echo "export NIM_HOME=${IROOT}/nim" > $IROOT/nim.installed -echo -e "export PATH=\$NIM_HOME/bin:\$PATH" >> $IROOT/nim.installed - -source $IROOT/nim.installed - diff --git a/toolset/setup/linux/languages/perl.sh b/toolset/setup/linux/languages/perl.sh deleted file mode 100644 index ae810716c39..00000000000 --- a/toolset/setup/linux/languages/perl.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -fw_installed perl && return 0 - -VERSION="5.18" -PERL=$IROOT/perl-$VERSION - -fw_get -o perl-build.pl https://raw.github.com/tokuhirom/Perl-Build/master/perl-build -# compile with optimizations, n.b. this does not turn on debugging -perl perl-build.pl -DDEBUGGING=-g 5.18.2 perl-$VERSION 2>&1 | tee $IROOT/perl-install.log | awk '{ if (NR%100 == 0) printf "."}' - -fw_get -o cpanminus.pl http://cpanmin.us -perl-$VERSION/bin/perl cpanminus.pl --notest --no-man-page App::cpanminus -# Install only a bare-bones of Perl modules -# Install others in the per-framework install script or cpanfile -perl-$VERSION/bin/cpanm -f --notest --no-man-page Carton JSON JSON::XS IO::Socket::IP IO::Socket::SSL - -echo "export PERL_HOME=${PERL}" > $IROOT/perl.installed -echo -e "export PERL_CARTON_PATH=\$TROOT/local" >> $IROOT/perl.installed -echo -e "export PERL5LIB=\$PERL_CARTON_PATH/lib/perl5" >> $IROOT/perl.installed -echo -e "export PATH=\$PERL_CARTON_PATH/bin:\$PERL_HOME/bin:\$PATH" >> $IROOT/perl.installed - -source $IROOT/perl.installed diff --git a/toolset/setup/linux/languages/php/php-fpm.conf b/toolset/setup/linux/languages/php/php-fpm.conf deleted file mode 100644 index 1ceb002d29c..00000000000 --- a/toolset/setup/linux/languages/php/php-fpm.conf +++ /dev/null @@ -1,513 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;; -; FPM Configuration ; -;;;;;;;;;;;;;;;;;;;;; - -; All relative paths in this configuration file are relative to PHP's install -; prefix (@prefix@). This prefix can be dynamicaly changed by using the -; '-p' argument from the command line. - -; Include one or more files. If glob(3) exists, it is used to include a bunch of -; files from a glob(3) pattern. This directive can be used everywhere in the -; file. -; Relative path can also be used. They will be prefixed by: -; - the global prefix if it's been set (-p arguement) -; - @prefix@ otherwise -;include=etc/fpm.d/*.conf - -;;;;;;;;;;;;;;;;;; -; Global Options ; -;;;;;;;;;;;;;;;;;; - -[global] -; Pid file -; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@ -; Default Value: none -;pid = run/php-fpm.pid - -; Error log file -; If it's set to "syslog", log is sent to syslogd instead of being written -; in a local file. -; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@ -; Default Value: log/php-fpm.log -error_log = /dev/stderr - -; syslog_facility is used to specify what type of program is logging the -; message. This lets syslogd specify that messages from different facilities -; will be handled differently. -; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON) -; Default Value: daemon -;syslog.facility = daemon - -; syslog_ident is prepended to every message. If you have multiple FPM -; instances running on the same server, you can change the default value -; which must suit common needs. -; Default Value: php-fpm -;syslog.ident = php-fpm - -; Log level -; Possible Values: alert, error, warning, notice, debug -; Default Value: notice -;log_level = notice - -; If this number of child processes exit with SIGSEGV or SIGBUS within the time -; interval set by emergency_restart_interval then FPM will restart. A value -; of '0' means 'Off'. -; Default Value: 0 -;emergency_restart_threshold = 0 - -; Interval of time used by emergency_restart_interval to determine when -; a graceful restart will be initiated. This can be useful to work around -; accidental corruptions in an accelerator's shared memory. -; Available Units: s(econds), m(inutes), h(ours), or d(ays) -; Default Unit: seconds -; Default Value: 0 -;emergency_restart_interval = 0 - -; Time limit for child processes to wait for a reaction on signals from master. -; Available units: s(econds), m(inutes), h(ours), or d(ays) -; Default Unit: seconds -; Default Value: 0 -;process_control_timeout = 0 - -; The maximum number of processes FPM will fork. This has been design to control -; the global number of processes when using dynamic PM within a lot of pools. -; Use it with caution. -; Note: A value of 0 indicates no limit -; Default Value: 0 -; process.max = 128 - -; Specify the nice(2) priority to apply to the master process (only if set) -; The value can vary from -19 (highest priority) to 20 (lower priority) -; Note: - It will only work if the FPM master process is launched as root -; - The pool process will inherit the master process priority -; unless it specified otherwise -; Default Value: no set -; process.priority = -19 - -; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. -; Default Value: yes -;daemonize = yes - -; Set open file descriptor rlimit for the master process. -; Default Value: system defined value -;rlimit_files = 1024 - -; Set max core size rlimit for the master process. -; Possible Values: 'unlimited' or an integer greater or equal to 0 -; Default Value: system defined value -;rlimit_core = 0 - -; Specify the event mechanism FPM will use. The following is available: -; - select (any POSIX os) -; - poll (any POSIX os) -; - epoll (linux >= 2.5.44) -; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0) -; - /dev/poll (Solaris >= 7) -; - port (Solaris >= 10) -; Default Value: not set (auto detection) -events.mechanism = epoll - -;;;;;;;;;;;;;;;;;;;; -; Pool Definitions ; -;;;;;;;;;;;;;;;;;;;; - -; Multiple pools of child processes may be started with different listening -; ports and different management options. The name of the pool will be -; used in logs and stats. There is no limitation on the number of pools which -; FPM can handle. Your system will tell you anyway :) - -; Start a new pool named 'www'. -; the variable $pool can we used in any directive and will be replaced by the -; pool name ('www' here) -[www] - -; Per pool prefix -; It only applies on the following directives: -; - 'slowlog' -; - 'listen' (unixsocket) -; - 'chroot' -; - 'chdir' -; - 'php_values' -; - 'php_admin_values' -; When not set, the global prefix (or @php_fpm_prefix@) applies instead. -; Note: This directive can also be relative to the global prefix. -; Default Value: none -;prefix = /path/to/pools/$pool - -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -; Note: TFB does not run php-fpm as root, and therefore these directives are -; ignored. Commenting them out avoids spurious log messages -; user = -; group = - -; The address on which to accept FastCGI requests. -; Valid syntaxes are: -; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on -; a specific port; -; 'port' - to listen on a TCP socket to all addresses on a -; specific port; -; '/path/to/unix/socket' - to listen on a unix socket. -; Note: This value is mandatory. -listen = 127.0.0.1:9001 -;listen = /tmp/php-fpm.sock - -; Set listen(2) backlog. -; Default Value: 128 (-1 on FreeBSD and OpenBSD) -listen.backlog = 4096 - -; Set permissions for unix socket, if one is used. In Linux, read/write -; permissions must be set in order to allow connections from a web server. Many -; BSD-derived systems allow connections regardless of permissions. -; Default Values: user and group are set as the running user -; mode is set to 0666 -;listen.owner = @php_fpm_user@ -;listen.group = @php_fpm_group@ -;listen.mode = 0666 - -; List of ipv4 addresses of FastCGI clients which are allowed to connect. -; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original -; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address -; must be separated by a comma. If this value is left blank, connections will be -; accepted from any ip address. -; Default Value: any -;listen.allowed_clients = 127.0.0.1 - -; Specify the nice(2) priority to apply to the pool processes (only if set) -; The value can vary from -19 (highest priority) to 20 (lower priority) -; Note: - It will only work if the FPM master process is launched as root -; - The pool processes will inherit the master process priority -; unless it specified otherwise -; Default Value: no set -; priority = -19 - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = dynamic - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = 1024 - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 -pm.start_servers = 512 - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = 50 - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = 512 - -; The number of seconds after which an idle process will be killed. -; Note: Used only when pm is set to 'ondemand' -; Default Value: 10s -;pm.process_idle_timeout = 10s; - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. For -; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default Value: 0 -;pm.max_requests = 500 - -; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. It shows the following informations: -; pool - the name of the pool; -; process manager - static, dynamic or ondemand; -; start time - the date and time FPM has started; -; start since - number of seconds since FPM has started; -; accepted conn - the number of request accepted by the pool; -; listen queue - the number of request in the queue of pending -; connections (see backlog in listen(2)); -; max listen queue - the maximum number of requests in the queue -; of pending connections since FPM has started; -; listen queue len - the size of the socket queue of pending connections; -; idle processes - the number of idle processes; -; active processes - the number of active processes; -; total processes - the number of idle + active processes; -; max active processes - the maximum number of active processes since FPM -; has started; -; max children reached - number of times, the process limit has been reached, -; when pm tries to start more children (works only for -; pm 'dynamic' and 'ondemand'); -; Value are updated in real time. -; Example output: -; pool: www -; process manager: static -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 62636 -; accepted conn: 190460 -; listen queue: 0 -; max listen queue: 1 -; listen queue len: 42 -; idle processes: 4 -; active processes: 11 -; total processes: 15 -; max active processes: 12 -; max children reached: 0 -; -; By default the status page output is formatted as text/plain. Passing either -; 'html', 'xml' or 'json' in the query string will return the corresponding -; output syntax. Example: -; http://www.foo.bar/status -; http://www.foo.bar/status?json -; http://www.foo.bar/status?html -; http://www.foo.bar/status?xml -; -; By default the status page only outputs short status. Passing 'full' in the -; query string will also return status for each pool process. -; Example: -; http://www.foo.bar/status?full -; http://www.foo.bar/status?json&full -; http://www.foo.bar/status?html&full -; http://www.foo.bar/status?xml&full -; The Full status returns for each process: -; pid - the PID of the process; -; state - the state of the process (Idle, Running, ...); -; start time - the date and time the process has started; -; start since - the number of seconds since the process has started; -; requests - the number of requests the process has served; -; request duration - the duration in µs of the requests; -; request method - the request method (GET, POST, ...); -; request URI - the request URI with the query string; -; content length - the content length of the request (only with POST); -; user - the user (PHP_AUTH_USER) (or '-' if not set); -; script - the main script called (or '-' if not set); -; last request cpu - the %cpu the last request consumed -; it's always 0 if the process is not in Idle state -; because CPU calculation is done when the request -; processing has terminated; -; last request memory - the max amount of memory the last request consumed -; it's always 0 if the process is not in Idle state -; because memory calculation is done when the request -; processing has terminated; -; If the process is in Idle state, then informations are related to the -; last request the process has served. Otherwise informations are related to -; the current request being served. -; Example output: -; ************************ -; pid: 31330 -; state: Running -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 63087 -; requests: 12808 -; request duration: 1250261 -; request method: GET -; request URI: /test_mem.php?N=10000 -; content length: 0 -; user: - -; script: /home/fat/web/docs/php/test_mem.php -; last request cpu: 0.00 -; last request memory: 0 -; -; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: @EXPANDED_DATADIR@/fpm/status.html -; -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -;pm.status_path = /status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -;ping.path = /ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -; The access log file -; Default: not set -;access.log = log/$pool.access.log - -; The access log format. -; The following syntax is allowed -; %%: the '%' character -; %C: %CPU used by the request -; it can accept the following format: -; - %{user}C for user CPU only -; - %{system}C for system CPU only -; - %{total}C for user + system CPU (default) -; %d: time taken to serve the request -; it can accept the following format: -; - %{seconds}d (default) -; - %{miliseconds}d -; - %{mili}d -; - %{microseconds}d -; - %{micro}d -; %e: an environment variable (same as $_ENV or $_SERVER) -; it must be associated with embraces to specify the name of the env -; variable. Some exemples: -; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e -; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e -; %f: script filename -; %l: content-length of the request (for POST request only) -; %m: request method -; %M: peak of memory allocated by PHP -; it can accept the following format: -; - %{bytes}M (default) -; - %{kilobytes}M -; - %{kilo}M -; - %{megabytes}M -; - %{mega}M -; %n: pool name -; %o: ouput header -; it must be associated with embraces to specify the name of the header: -; - %{Content-Type}o -; - %{X-Powered-By}o -; - %{Transfert-Encoding}o -; - .... -; %p: PID of the child that serviced the request -; %P: PID of the parent of the child that serviced the request -; %q: the query string -; %Q: the '?' character if query string exists -; %r: the request URI (without the query string, see %q and %Q) -; %R: remote IP address -; %s: status (response code) -; %t: server time the request was received -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; %T: time the log has been written (the request has finished) -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; %u: remote user -; -; Default: "%R - %u %t \"%m %r\" %s" -;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" - -; The log file for slow requests -; Default Value: not set -; Note: slowlog is mandatory if request_slowlog_timeout is set -;slowlog = log/$pool.log.slow - -; The timeout for serving a single request after which a PHP backtrace will be -; dumped to the 'slowlog' file. A value of '0s' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_slowlog_timeout = 0 - -; The timeout for serving a single request after which the worker process will -; be killed. This option should be used when the 'max_execution_time' ini option -; does not stop script execution for some reason. A value of '0' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_terminate_timeout = 0 - -; Set open file descriptor rlimit. -; Default Value: system defined value -;rlimit_files = 1024 - -; Set max core size rlimit. -; Possible Values: 'unlimited' or an integer greater or equal to 0 -; Default Value: system defined value -;rlimit_core = 0 - -; Chroot to this directory at the start. This value must be defined as an -; absolute path. When this value is not set, chroot is not used. -; Note: you can prefix with '$prefix' to chroot to the pool prefix or one -; of its subdirectories. If the pool prefix is not set, the global prefix -; will be used instead. -; Note: chrooting is a great security feature and should be used whenever -; possible. However, all PHP paths will be relative to the chroot -; (error_log, sessions.save_path, ...). -; Default Value: not set -;chroot = - -; Chdir to this directory at the start. -; Note: relative path can be used. -; Default Value: current directory or / when chroot -;chdir = /var/www - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -;catch_workers_output = yes - -; Limits the extensions of the main script FPM will allow to parse. This can -; prevent configuration mistakes on the web server side. You should only limit -; FPM to .php extensions to prevent malicious users to use other extensions to -; exectute php code. -; Note: set an empty value to allow all extensions. -; Default Value: .php -;security.limit_extensions = .php .php3 .php4 .php5 - -; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from -; the current environment. -; Default Value: clean env -;env[HOSTNAME] = $HOSTNAME -;env[PATH] = /usr/local/bin:/usr/bin:/bin -;env[TMP] = /tmp -;env[TMPDIR] = /tmp -;env[TEMP] = /tmp - -; Additional php.ini defines, specific to this pool of workers. These settings -; overwrite the values previously defined in the php.ini. The directives are the -; same as the PHP SAPI: -; php_value/php_flag - you can set classic ini defines which can -; be overwritten from PHP call 'ini_set'. -; php_admin_value/php_admin_flag - these directives won't be overwritten by -; PHP call 'ini_set' -; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. - -; Defining 'extension' will load the corresponding shared extension from -; extension_dir. Defining 'disable_functions' or 'disable_classes' will not -; overwrite previously defined php.ini values, but will append the new value -; instead. - -; Note: path INI options can be relative and will be expanded with the prefix -; (pool, global or @prefix@) - -; Default Value: nothing is defined by default except the values in php.ini and -; specified at startup with the -d argument -;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com -php_flag[display_errors] = off -;php_admin_value[error_log] = /var/log/fpm-php.www.log -;php_admin_flag[log_errors] = on -;php_admin_value[memory_limit] = 32M \ No newline at end of file diff --git a/toolset/setup/linux/languages/php/php.ini b/toolset/setup/linux/languages/php/php.ini deleted file mode 100644 index 19df353f19c..00000000000 --- a/toolset/setup/linux/languages/php/php.ini +++ /dev/null @@ -1,1903 +0,0 @@ -[PHP] - -;;;;;;;;;;;;;;;;;;; -; About php.ini ; -;;;;;;;;;;;;;;;;;;; -; PHP's initialization file, generally called php.ini, is responsible for -; configuring many of the aspects of PHP's behavior. - -; PHP attempts to find and load this configuration from a number of locations. -; The following is a summary of its search order: -; 1. SAPI module specific location. -; 2. The PHPRC environment variable. (As of PHP 5.2.0) -; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0) -; 4. Current working directory (except CLI) -; 5. The web server's directory (for SAPI modules), or directory of PHP -; (otherwise in Windows) -; 6. The directory from the --with-config-file-path compile time option, or the -; Windows directory (C:\windows or C:\winnt) -; See the PHP docs for more specific information. -; http://php.net/configuration.file - -; The syntax of the file is extremely simple. Whitespace and lines -; beginning with a semicolon are silently ignored (as you probably guessed). -; Section headers (e.g. [Foo]) are also silently ignored, even though -; they might mean something in the future. - -; Directives following the section heading [PATH=/www/mysite] only -; apply to PHP files in the /www/mysite directory. Directives -; following the section heading [HOST=www.example.com] only apply to -; PHP files served from www.example.com. Directives set in these -; special sections cannot be overridden by user-defined INI files or -; at runtime. Currently, [PATH=] and [HOST=] sections only work under -; CGI/FastCGI. -; http://php.net/ini.sections - -; Directives are specified using the following syntax: -; directive = value -; Directive names are *case sensitive* - foo=bar is different from FOO=bar. -; Directives are variables used to configure PHP or PHP extensions. -; There is no name validation. If PHP can't find an expected -; directive because it is not set or is mistyped, a default value will be used. - -; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one -; of the INI constants (On, Off, True, False, Yes, No and None) or an expression -; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a -; previously set variable or directive (e.g. ${foo}) - -; Expressions in the INI file are limited to bitwise operators and parentheses: -; | bitwise OR -; ^ bitwise XOR -; & bitwise AND -; ~ bitwise NOT -; ! boolean NOT - -; Boolean flags can be turned on using the values 1, On, True or Yes. -; They can be turned off using the values 0, Off, False or No. - -; An empty string can be denoted by simply not writing anything after the equal -; sign, or by using the None keyword: - -; foo = ; sets foo to an empty string -; foo = None ; sets foo to an empty string -; foo = "None" ; sets foo to the string 'None' - -; If you use constants in your value, and these constants belong to a -; dynamically loaded extension (either a PHP extension or a Zend extension), -; you may only use these constants *after* the line that loads the extension. - -;;;;;;;;;;;;;;;;;;; -; About this file ; -;;;;;;;;;;;;;;;;;;; -; PHP comes packaged with two INI files. One that is recommended to be used -; in production environments and one that is recommended to be used in -; development environments. - -; php.ini-production contains settings which hold security, performance and -; best practices at its core. But please be aware, these settings may break -; compatibility with older or less security conscience applications. We -; recommending using the production ini in production and testing environments. - -; php.ini-development is very similar to its production variant, except it's -; much more verbose when it comes to errors. We recommending using the -; development version only in development environments as errors shown to -; application users can inadvertently leak otherwise secure information. - -;;;;;;;;;;;;;;;;;;; -; Quick Reference ; -;;;;;;;;;;;;;;;;;;; -; The following are all the settings which are different in either the production -; or development versions of the INIs with respect to PHP's default behavior. -; Please see the actual settings later in the document for more details as to why -; we recommend these changes in PHP's behavior. - -; display_errors -; Default Value: On -; Development Value: On -; Production Value: Off - -; display_startup_errors -; Default Value: Off -; Development Value: On -; Production Value: Off - -; error_reporting -; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT - -; html_errors -; Default Value: On -; Development Value: On -; Production value: On - -; log_errors -; Default Value: Off -; Development Value: On -; Production Value: On - -; max_input_time -; Default Value: -1 (Unlimited) -; Development Value: 60 (60 seconds) -; Production Value: 60 (60 seconds) - -; output_buffering -; Default Value: Off -; Development Value: 4096 -; Production Value: 4096 - -; register_argc_argv -; Default Value: On -; Development Value: Off -; Production Value: Off - -; request_order -; Default Value: None -; Development Value: "GP" -; Production Value: "GP" - -; session.bug_compat_42 -; Default Value: On -; Development Value: On -; Production Value: Off - -; session.bug_compat_warn -; Default Value: On -; Development Value: On -; Production Value: Off - -; session.gc_divisor -; Default Value: 100 -; Development Value: 1000 -; Production Value: 1000 - -; session.hash_bits_per_character -; Default Value: 4 -; Development Value: 5 -; Production Value: 5 - -; short_open_tag -; Default Value: On -; Development Value: Off -; Production Value: Off - -; track_errors -; Default Value: Off -; Development Value: On -; Production Value: Off - -; url_rewriter.tags -; Default Value: "a=href,area=href,frame=src,form=,fieldset=" -; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry" -; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry" - -; variables_order -; Default Value: "EGPCS" -; Development Value: "GPCS" -; Production Value: "GPCS" - -;;;;;;;;;;;;;;;;;;;; -; php.ini Options ; -;;;;;;;;;;;;;;;;;;;; -; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini" -;user_ini.filename = ".user.ini" - -; To disable this feature set this option to empty value -;user_ini.filename = - -; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes) -;user_ini.cache_ttl = 300 - -;;;;;;;;;;;;;;;;;;;; -; Language Options ; -;;;;;;;;;;;;;;;;;;;; - -; Enable the PHP scripting language engine under Apache. -; http://php.net/engine -engine = On - -; This directive determines whether or not PHP will recognize code between -; tags as PHP source which should be processed as such. It's been -; recommended for several years that you not use the short tag "short cut" and -; instead to use the full tag combination. With the wide spread use -; of XML and use of these tags by other languages, the server can become easily -; confused and end up parsing the wrong code in the wrong context. But because -; this short cut has been a feature for such a long time, it's currently still -; supported for backwards compatibility, but we recommend you don't use them. -; Default Value: On -; Development Value: Off -; Production Value: Off -; http://php.net/short-open-tag -short_open_tag = Off - -; Allow ASP-style <% %> tags. -; http://php.net/asp-tags -asp_tags = Off - -; The number of significant digits displayed in floating point numbers. -; http://php.net/precision -precision = 14 - -; Output buffering is a mechanism for controlling how much output data -; (excluding headers and cookies) PHP should keep internally before pushing that -; data to the client. If your application's output exceeds this setting, PHP -; will send that data in chunks of roughly the size you specify. -; Turning on this setting and managing its maximum buffer size can yield some -; interesting side-effects depending on your application and web server. -; You may be able to send headers and cookies after you've already sent output -; through print or echo. You also may see performance benefits if your server is -; emitting less packets due to buffered output versus PHP streaming the output -; as it gets it. On production servers, 4096 bytes is a good setting for performance -; reasons. -; Note: Output buffering can also be controlled via Output Buffering Control -; functions. -; Possible Values: -; On = Enabled and buffer is unlimited. (Use with caution) -; Off = Disabled -; Integer = Enables the buffer and sets its maximum size in bytes. -; Note: This directive is hardcoded to Off for the CLI SAPI -; Default Value: Off -; Development Value: 4096 -; Production Value: 4096 -; http://php.net/output-buffering -output_buffering = 4096 - -; You can redirect all of the output of your scripts to a function. For -; example, if you set output_handler to "mb_output_handler", character -; encoding will be transparently converted to the specified encoding. -; Setting any output handler automatically turns on output buffering. -; Note: People who wrote portable scripts should not depend on this ini -; directive. Instead, explicitly set the output handler using ob_start(). -; Using this ini directive may cause problems unless you know what script -; is doing. -; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler" -; and you cannot use both "ob_gzhandler" and "zlib.output_compression". -; Note: output_handler must be empty if this is set 'On' !!!! -; Instead you must use zlib.output_handler. -; http://php.net/output-handler -;output_handler = - -; Transparent output compression using the zlib library -; Valid values for this option are 'off', 'on', or a specific buffer size -; to be used for compression (default is 4KB) -; Note: Resulting chunk size may vary due to nature of compression. PHP -; outputs chunks that are few hundreds bytes each as a result of -; compression. If you prefer a larger chunk size for better -; performance, enable output_buffering in addition. -; Note: You need to use zlib.output_handler instead of the standard -; output_handler, or otherwise the output will be corrupted. -; http://php.net/zlib.output-compression -zlib.output_compression = Off - -; http://php.net/zlib.output-compression-level -;zlib.output_compression_level = -1 - -; You cannot specify additional output handlers if zlib.output_compression -; is activated here. This setting does the same as output_handler but in -; a different order. -; http://php.net/zlib.output-handler -;zlib.output_handler = - -; Implicit flush tells PHP to tell the output layer to flush itself -; automatically after every output block. This is equivalent to calling the -; PHP function flush() after each and every call to print() or echo() and each -; and every HTML block. Turning this option on has serious performance -; implications and is generally recommended for debugging purposes only. -; http://php.net/implicit-flush -; Note: This directive is hardcoded to On for the CLI SAPI -implicit_flush = Off - -; The unserialize callback function will be called (with the undefined class' -; name as parameter), if the unserializer finds an undefined class -; which should be instantiated. A warning appears if the specified function is -; not defined, or if the function doesn't include/implement the missing class. -; So only set this entry, if you really want to implement such a -; callback-function. -unserialize_callback_func = - -; When floats & doubles are serialized store serialize_precision significant -; digits after the floating point. The default value ensures that when floats -; are decoded with unserialize, the data will remain the same. -serialize_precision = 17 - -; open_basedir, if set, limits all file operations to the defined directory -; and below. This directive makes most sense if used in a per-directory -; or per-virtualhost web server configuration file. This directive is -; *NOT* affected by whether Safe Mode is turned On or Off. -; http://php.net/open-basedir -;open_basedir = - -; This directive allows you to disable certain functions for security reasons. -; It receives a comma-delimited list of function names. This directive is -; *NOT* affected by whether Safe Mode is turned On or Off. -; http://php.net/disable-functions -disable_functions = - -; This directive allows you to disable certain classes for security reasons. -; It receives a comma-delimited list of class names. This directive is -; *NOT* affected by whether Safe Mode is turned On or Off. -; http://php.net/disable-classes -disable_classes = - -; Colors for Syntax Highlighting mode. Anything that's acceptable in -; would work. -; http://php.net/syntax-highlighting -;highlight.string = #DD0000 -;highlight.comment = #FF9900 -;highlight.keyword = #007700 -;highlight.default = #0000BB -;highlight.html = #000000 - -; If enabled, the request will be allowed to complete even if the user aborts -; the request. Consider enabling it if executing long requests, which may end up -; being interrupted by the user or a browser timing out. PHP's default behavior -; is to disable this feature. -; http://php.net/ignore-user-abort -;ignore_user_abort = On - -; Determines the size of the realpath cache to be used by PHP. This value should -; be increased on systems where PHP opens many files to reflect the quantity of -; the file operations performed. -; http://php.net/realpath-cache-size -realpath_cache_size = 4096K - -; Duration of time, in seconds for which to cache realpath information for a given -; file or directory. For systems with rarely changing files, consider increasing this -; value. -; http://php.net/realpath-cache-ttl -realpath_cache_ttl = 600 - -; Enables or disables the circular reference collector. -; http://php.net/zend.enable-gc -zend.enable_gc = On - -; If enabled, scripts may be written in encodings that are incompatible with -; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such -; encodings. To use this feature, mbstring extension must be enabled. -; Default: Off -;zend.multibyte = Off - -; Allows to set the default encoding for the scripts. This value will be used -; unless "declare(encoding=...)" directive appears at the top of the script. -; Only affects if zend.multibyte is set. -; Default: "" -;zend.script_encoding = - -;;;;;;;;;;;;;;;;; -; Miscellaneous ; -;;;;;;;;;;;;;;;;; - -; Decides whether PHP may expose the fact that it is installed on the server -; (e.g. by adding its signature to the Web server header). It is no security -; threat in any way, but it makes it possible to determine whether you use PHP -; on your server or not. -; http://php.net/expose-php -expose_php = Off - -;;;;;;;;;;;;;;;;;;; -; Resource Limits ; -;;;;;;;;;;;;;;;;;;; - -; Maximum execution time of each script, in seconds -; http://php.net/max-execution-time -; Note: This directive is hardcoded to 0 for the CLI SAPI -max_execution_time = 30 - -; Maximum amount of time each script may spend parsing request data. It's a good -; idea to limit this time on productions servers in order to eliminate unexpectedly -; long running scripts. -; Note: This directive is hardcoded to -1 for the CLI SAPI -; Default Value: -1 (Unlimited) -; Development Value: 60 (60 seconds) -; Production Value: 60 (60 seconds) -; http://php.net/max-input-time -max_input_time = 60 - -; Maximum input variable nesting level -; http://php.net/max-input-nesting-level -;max_input_nesting_level = 64 - -; How many GET/POST/COOKIE input variables may be accepted -; max_input_vars = 1000 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 128M - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Error handling and logging ; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; This directive informs PHP of which errors, warnings and notices you would like -; it to take action for. The recommended way of setting values for this -; directive is through the use of the error level constants and bitwise -; operators. The error level constants are below here for convenience as well as -; some common settings and their meanings. -; By default, PHP is set to take action on all errors, notices and warnings EXCEPT -; those related to E_NOTICE and E_STRICT, which together cover best practices and -; recommended coding standards in PHP. For performance reasons, this is the -; recommend error reporting setting. Your production server shouldn't be wasting -; resources complaining about best practices and coding standards. That's what -; development servers and development settings are for. -; Note: The php.ini-development file has this setting as E_ALL. This -; means it pretty much reports everything which is exactly what you want during -; development and early testing. -; -; Error Level Constants: -; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0) -; E_ERROR - fatal run-time errors -; E_RECOVERABLE_ERROR - almost fatal run-time errors -; E_WARNING - run-time warnings (non-fatal errors) -; E_PARSE - compile-time parse errors -; E_NOTICE - run-time notices (these are warnings which often result -; from a bug in your code, but it's possible that it was -; intentional (e.g., using an uninitialized variable and -; relying on the fact it's automatically initialized to an -; empty string) -; E_STRICT - run-time notices, enable to have PHP suggest changes -; to your code which will ensure the best interoperability -; and forward compatibility of your code -; E_CORE_ERROR - fatal errors that occur during PHP's initial startup -; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's -; initial startup -; E_COMPILE_ERROR - fatal compile-time errors -; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) -; E_USER_ERROR - user-generated error message -; E_USER_WARNING - user-generated warning message -; E_USER_NOTICE - user-generated notice message -; E_DEPRECATED - warn about code that will not work in future versions -; of PHP -; E_USER_DEPRECATED - user-generated deprecation warnings -; -; Common Values: -; E_ALL (Show all errors, warnings and notices including coding standards.) -; E_ALL & ~E_NOTICE (Show all errors, except for notices) -; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) -; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) -; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT -; http://php.net/error-reporting -error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT - -; This directive controls whether or not and where PHP will output errors, -; notices and warnings too. Error output is very useful during development, but -; it could be very dangerous in production environments. Depending on the code -; which is triggering the error, sensitive information could potentially leak -; out of your application such as database usernames and passwords or worse. -; It's recommended that errors be logged on production servers rather than -; having the errors sent to STDOUT. -; Possible Values: -; Off = Do not display any errors -; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) -; On or stdout = Display errors to STDOUT -; Default Value: On -; Development Value: On -; Production Value: Off -; http://php.net/display-errors -display_errors = Off - -; The display of errors which occur during PHP's startup sequence are handled -; separately from display_errors. PHP's default behavior is to suppress those -; errors from clients. Turning the display of startup errors on can be useful in -; debugging configuration problems. But, it's strongly recommended that you -; leave this setting off on production servers. -; Default Value: Off -; Development Value: On -; Production Value: Off -; http://php.net/display-startup-errors -display_startup_errors = Off - -; Besides displaying errors, PHP can also log errors to locations such as a -; server-specific log, STDERR, or a location specified by the error_log -; directive found below. While errors should not be displayed on productions -; servers they should still be monitored and logging is a great way to do that. -; Default Value: Off -; Development Value: On -; Production Value: On -; http://php.net/log-errors -log_errors = On - -; Set maximum length of log_errors. In error_log information about the source is -; added. The default is 1024 and 0 allows to not apply any maximum length at all. -; http://php.net/log-errors-max-len -log_errors_max_len = 1024 - -; Do not log repeated messages. Repeated errors must occur in same file on same -; line unless ignore_repeated_source is set true. -; http://php.net/ignore-repeated-errors -ignore_repeated_errors = Off - -; Ignore source of message when ignoring repeated messages. When this setting -; is On you will not log errors with repeated messages from different files or -; source lines. -; http://php.net/ignore-repeated-source -ignore_repeated_source = Off - -; If this parameter is set to Off, then memory leaks will not be shown (on -; stdout or in the log). This has only effect in a debug compile, and if -; error reporting includes E_WARNING in the allowed list -; http://php.net/report-memleaks -report_memleaks = On - -; This setting is on by default. -;report_zend_debug = 0 - -; Store the last error/warning message in $php_errormsg (boolean). Setting this value -; to On can assist in debugging and is appropriate for development servers. It should -; however be disabled on production servers. -; Default Value: Off -; Development Value: On -; Production Value: Off -; http://php.net/track-errors -track_errors = Off - -; Turn off normal error reporting and emit XML-RPC error XML -; http://php.net/xmlrpc-errors -;xmlrpc_errors = 0 - -; An XML-RPC faultCode -;xmlrpc_error_number = 0 - -; When PHP displays or logs an error, it has the capability of formatting the -; error message as HTML for easier reading. This directive controls whether -; the error message is formatted as HTML or not. -; Note: This directive is hardcoded to Off for the CLI SAPI -; Default Value: On -; Development Value: On -; Production value: On -; http://php.net/html-errors -html_errors = On - -; If html_errors is set to On *and* docref_root is not empty, then PHP -; produces clickable error messages that direct to a page describing the error -; or function causing the error in detail. -; You can download a copy of the PHP manual from http://php.net/docs -; and change docref_root to the base URL of your local copy including the -; leading '/'. You must also specify the file extension being used including -; the dot. PHP's default behavior is to leave these settings empty, in which -; case no links to documentation are generated. -; Note: Never use this feature for production boxes. -; http://php.net/docref-root -; Examples -;docref_root = "/phpmanual/" - -; http://php.net/docref-ext -;docref_ext = .html - -; String to output before an error message. PHP's default behavior is to leave -; this setting blank. -; http://php.net/error-prepend-string -; Example: -;error_prepend_string = "" - -; String to output after an error message. PHP's default behavior is to leave -; this setting blank. -; http://php.net/error-append-string -; Example: -;error_append_string = "" - -; Log errors to specified file. PHP's default behavior is to leave this value -; empty. -; http://php.net/error-log -; Example: -;error_log = php_errors.log -; Log errors to syslog (Event Log on NT, not valid in Windows 95). -;error_log = syslog - -;windows.show_crt_warning -; Default value: 0 -; Development value: 0 -; Production value: 0 - -;;;;;;;;;;;;;;;;; -; Data Handling ; -;;;;;;;;;;;;;;;;; - -; The separator used in PHP generated URLs to separate arguments. -; PHP's default setting is "&". -; http://php.net/arg-separator.output -; Example: -;arg_separator.output = "&" - -; List of separator(s) used by PHP to parse input URLs into variables. -; PHP's default setting is "&". -; NOTE: Every character in this directive is considered as separator! -; http://php.net/arg-separator.input -; Example: -;arg_separator.input = ";&" - -; This directive determines which super global arrays are registered when PHP -; starts up. G,P,C,E & S are abbreviations for the following respective super -; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty -; paid for the registration of these arrays and because ENV is not as commonly -; used as the others, ENV is not recommended on productions servers. You -; can still get access to the environment variables through getenv() should you -; need to. -; Default Value: "EGPCS" -; Development Value: "GPCS" -; Production Value: "GPCS"; -; http://php.net/variables-order -variables_order = "GPCS" - -; This directive determines which super global data (G,P,C,E & S) should -; be registered into the super global array REQUEST. If so, it also determines -; the order in which that data is registered. The values for this directive are -; specified in the same manner as the variables_order directive, EXCEPT one. -; Leaving this value empty will cause PHP to use the value set in the -; variables_order directive. It does not mean it will leave the super globals -; array REQUEST empty. -; Default Value: None -; Development Value: "GP" -; Production Value: "GP" -; http://php.net/request-order -request_order = "GP" - -; This directive determines whether PHP registers $argv & $argc each time it -; runs. $argv contains an array of all the arguments passed to PHP when a script -; is invoked. $argc contains an integer representing the number of arguments -; that were passed when the script was invoked. These arrays are extremely -; useful when running scripts from the command line. When this directive is -; enabled, registering these variables consumes CPU cycles and memory each time -; a script is executed. For performance reasons, this feature should be disabled -; on production servers. -; Note: This directive is hardcoded to On for the CLI SAPI -; Default Value: On -; Development Value: Off -; Production Value: Off -; http://php.net/register-argc-argv -register_argc_argv = Off - -; When enabled, the ENV, REQUEST and SERVER variables are created when they're -; first used (Just In Time) instead of when the script starts. If these -; variables are not used within a script, having this directive on will result -; in a performance gain. The PHP directive register_argc_argv must be disabled -; for this directive to have any affect. -; http://php.net/auto-globals-jit -auto_globals_jit = On - -; Whether PHP will read the POST data. -; This option is enabled by default. -; Most likely, you won't want to disable this option globally. It causes $_POST -; and $_FILES to always be empty; the only way you will be able to read the -; POST data will be through the php://input stream wrapper. This can be useful -; to proxy requests or to process the POST data in a memory efficient fashion. -; http://php.net/enable-post-data-reading -;enable_post_data_reading = Off - -; Maximum size of POST data that PHP will accept. -; Its value may be 0 to disable the limit. It is ignored if POST data reading -; is disabled through enable_post_data_reading. -; http://php.net/post-max-size -post_max_size = 8M - -; Automatically add files before PHP document. -; http://php.net/auto-prepend-file -auto_prepend_file = - -; Automatically add files after PHP document. -; http://php.net/auto-append-file -auto_append_file = - -; By default, PHP will output a character encoding using -; the Content-type: header. To disable sending of the charset, simply -; set it to be empty. -; -; PHP's built-in default is text/html -; http://php.net/default-mimetype -default_mimetype = "text/html" - -; PHP's default character set is set to empty. -; http://php.net/default-charset -;default_charset = "UTF-8" - -; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is -; to disable this feature. If post reading is disabled through -; enable_post_data_reading, $HTTP_RAW_POST_DATA is *NOT* populated. -; http://php.net/always-populate-raw-post-data -;always_populate_raw_post_data = On - -;;;;;;;;;;;;;;;;;;;;;;;;; -; Paths and Directories ; -;;;;;;;;;;;;;;;;;;;;;;;;; - -; UNIX: "/path1:/path2" -;include_path = ".:/php/includes" -; -; Windows: "\path1;\path2" -;include_path = ".;c:\php\includes" -; -; PHP's default setting for include_path is ".;/path/to/php/pear" -; http://php.net/include-path - -; The root of the PHP pages, used only if nonempty. -; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root -; if you are running php as a CGI under any web server (other than IIS) -; see documentation for security issues. The alternate is to use the -; cgi.force_redirect configuration below -; http://php.net/doc-root -doc_root = - -; The directory under which PHP opens the script using /~username used only -; if nonempty. -; http://php.net/user-dir -user_dir = - -; Directory in which the loadable extensions (modules) reside. -; http://php.net/extension-dir -; extension_dir = "./" -; On windows: -; extension_dir = "ext" - -; Whether or not to enable the dl() function. The dl() function does NOT work -; properly in multithreaded servers, such as IIS or Zeus, and is automatically -; disabled on them. -; http://php.net/enable-dl -enable_dl = Off - -; cgi.force_redirect is necessary to provide security running PHP as a CGI under -; most web servers. Left undefined, PHP turns this on by default. You can -; turn it off here AT YOUR OWN RISK -; **You CAN safely turn this off for IIS, in fact, you MUST.** -; http://php.net/cgi.force-redirect -;cgi.force_redirect = 1 - -; if cgi.nph is enabled it will force cgi to always sent Status: 200 with -; every request. PHP's default behavior is to disable this feature. -;cgi.nph = 1 - -; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape -; (iPlanet) web servers, you MAY need to set an environment variable name that PHP -; will look for to know it is OK to continue execution. Setting this variable MAY -; cause security issues, KNOW WHAT YOU ARE DOING FIRST. -; http://php.net/cgi.redirect-status-env -;cgi.redirect_status_env = - -; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's -; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok -; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting -; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting -; of zero causes PHP to behave as before. Default is 1. You should fix your scripts -; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. -; http://php.net/cgi.fix-pathinfo -;cgi.fix_pathinfo=1 - -; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate -; security tokens of the calling client. This allows IIS to define the -; security context that the request runs under. mod_fastcgi under Apache -; does not currently support this feature (03/17/2002) -; Set to 1 if running under IIS. Default is zero. -; http://php.net/fastcgi.impersonate -;fastcgi.impersonate = 1 - -; Disable logging through FastCGI connection. PHP's default behavior is to enable -; this feature. -;fastcgi.logging = 0 - -; cgi.rfc2616_headers configuration option tells PHP what type of headers to -; use when sending HTTP response code. If it's set 0 PHP sends Status: header that -; is supported by Apache. When this option is set to 1 PHP will send -; RFC2616 compliant header. -; Default is zero. -; http://php.net/cgi.rfc2616-headers -;cgi.rfc2616_headers = 0 - -;;;;;;;;;;;;;;;; -; File Uploads ; -;;;;;;;;;;;;;;;; - -; Whether to allow HTTP file uploads. -; http://php.net/file-uploads -file_uploads = On - -; Temporary directory for HTTP uploaded files (will use system default if not -; specified). -; http://php.net/upload-tmp-dir -;upload_tmp_dir = - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 2M - -; Maximum number of files that can be uploaded via a single request -max_file_uploads = 20 - -;;;;;;;;;;;;;;;;;; -; Fopen wrappers ; -;;;;;;;;;;;;;;;;;; - -; Whether to allow the treatment of URLs (like http:// or ftp://) as files. -; http://php.net/allow-url-fopen -allow_url_fopen = On - -; Whether to allow include/require to open URLs (like http:// or ftp://) as files. -; http://php.net/allow-url-include -allow_url_include = Off - -; Define the anonymous ftp password (your email address). PHP's default setting -; for this is empty. -; http://php.net/from -;from="john@doe.com" - -; Define the User-Agent string. PHP's default setting for this is empty. -; http://php.net/user-agent -;user_agent="PHP" - -; Default timeout for socket based streams (seconds) -; http://php.net/default-socket-timeout -default_socket_timeout = 60 - -; If your scripts have to deal with files from Macintosh systems, -; or you are running on a Mac and need to deal with files from -; unix or win32 systems, setting this flag will cause PHP to -; automatically detect the EOL character in those files so that -; fgets() and file() will work regardless of the source of the file. -; http://php.net/auto-detect-line-endings -;auto_detect_line_endings = Off - -;;;;;;;;;;;;;;;;;;;;;; -; Dynamic Extensions ; -;;;;;;;;;;;;;;;;;;;;;; - -; If you wish to have an extension loaded automatically, use the following -; syntax: -; -; extension=modulename.extension -; -; For example, on Windows: -; -; extension=msql.dll -; -; ... or under UNIX: -; -; extension=msql.so -; -; ... or with a path: -; -; extension=/path/to/extension/msql.so -; -; If you only provide the name of the extension, PHP will look for it in its -; default extension directory. -; -; Windows Extensions -; Note that ODBC support is built in, so no dll is needed for it. -; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5) -; extension folders as well as the separate PECL DLL download (PHP 5). -; Be sure to appropriately set the extension_dir directive. -; -;extension=apc.so -zend_extension=opcache.so -;extension=redis.so -;extension=phalcon.so -;extension=yaf.so -extension=mongodb.so -extension=mongo.so -;extension=php_bz2.dll -;extension=php_curl.dll -;extension=php_fileinfo.dll -;extension=php_gd2.dll -;extension=php_gettext.dll -;extension=php_gmp.dll -;extension=php_intl.dll -;extension=php_imap.dll -;extension=php_interbase.dll -;extension=php_ldap.dll -;extension=php_mbstring.dll -;extension=php_exif.dll ; Must be after mbstring as it depends on it -;extension=php_mysql.dll -;extension=php_mysqli.dll -;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client -;extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client -;extension=php_openssl.dll -;extension=php_pdo_firebird.dll -;extension=php_pdo_mysql.dll -;extension=php_pdo_oci.dll -;extension=php_pdo_odbc.dll -;extension=php_pdo_pgsql.dll -;extension=php_pdo_sqlite.dll -;extension=php_pgsql.dll -;extension=php_pspell.dll -;extension=php_shmop.dll - -; The MIBS data available in the PHP distribution must be installed. -; See http://www.php.net/manual/en/snmp.installation.php -;extension=php_snmp.dll - -;extension=php_soap.dll -;extension=php_sockets.dll -;extension=php_sqlite3.dll -;extension=php_sybase_ct.dll -;extension=php_tidy.dll -;extension=php_xmlrpc.dll -;extension=php_xsl.dll -;extension=php_zip.dll - -;;;;;;;;;;;;;;;;;;; -; Module Settings ; -;;;;;;;;;;;;;;;;;;; - -[CLI Server] -; Whether the CLI web server uses ANSI color coding in its terminal output. -cli_server.color = On - -[Date] -; Defines the default timezone used by the date functions -; http://php.net/date.timezone -date.timezone = UTC - -; http://php.net/date.default-latitude -;date.default_latitude = 31.7667 - -; http://php.net/date.default-longitude -;date.default_longitude = 35.2333 - -; http://php.net/date.sunrise-zenith -;date.sunrise_zenith = 90.583333 - -; http://php.net/date.sunset-zenith -;date.sunset_zenith = 90.583333 - -[filter] -; http://php.net/filter.default -;filter.default = unsafe_raw - -; http://php.net/filter.default-flags -;filter.default_flags = - -[iconv] -;iconv.input_encoding = ISO-8859-1 -;iconv.internal_encoding = ISO-8859-1 -;iconv.output_encoding = ISO-8859-1 - -[intl] -;intl.default_locale = -; This directive allows you to produce PHP errors when some error -; happens within intl functions. The value is the level of the error produced. -; Default is 0, which does not produce any errors. -;intl.error_level = E_WARNING - -[sqlite] -; http://php.net/sqlite.assoc-case -;sqlite.assoc_case = 0 - -[sqlite3] -;sqlite3.extension_dir = - -[Pcre] -;PCRE library backtracking limit. -; http://php.net/pcre.backtrack-limit -;pcre.backtrack_limit=100000 - -;PCRE library recursion limit. -;Please note that if you set this value to a high number you may consume all -;the available process stack and eventually crash PHP (due to reaching the -;stack size limit imposed by the Operating System). -; http://php.net/pcre.recursion-limit -;pcre.recursion_limit=100000 - -[Pdo] -; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off" -; http://php.net/pdo-odbc.connection-pooling -;pdo_odbc.connection_pooling=strict - -;pdo_odbc.db2_instance_name - -[Pdo_mysql] -; If mysqlnd is used: Number of cache slots for the internal result set cache -; http://php.net/pdo_mysql.cache_size -pdo_mysql.cache_size = 2000 - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; http://php.net/pdo_mysql.default-socket -pdo_mysql.default_socket= - -[Phar] -; http://php.net/phar.readonly -;phar.readonly = On - -; http://php.net/phar.require-hash -;phar.require_hash = On - -;phar.cache_list = - -[mail function] -; For Win32 only. -; http://php.net/smtp -SMTP = localhost -; http://php.net/smtp-port -smtp_port = 25 - -; For Win32 only. -; http://php.net/sendmail-from -;sendmail_from = me@example.com - -; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). -; http://php.net/sendmail-path -;sendmail_path = - -; Force the addition of the specified parameters to be passed as extra parameters -; to the sendmail binary. These parameters will always replace the value of -; the 5th parameter to mail(), even in safe mode. -;mail.force_extra_parameters = - -; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename -mail.add_x_header = On - -; The path to a log file that will log all mail() calls. Log entries include -; the full path of the script, line number, To address and headers. -;mail.log = -; Log mail to syslog (Event Log on NT, not valid in Windows 95). -;mail.log = syslog - -[SQL] -; http://php.net/sql.safe-mode -sql.safe_mode = Off - -[ODBC] -; http://php.net/odbc.default-db -;odbc.default_db = Not yet implemented - -; http://php.net/odbc.default-user -;odbc.default_user = Not yet implemented - -; http://php.net/odbc.default-pw -;odbc.default_pw = Not yet implemented - -; Controls the ODBC cursor model. -; Default: SQL_CURSOR_STATIC (default). -;odbc.default_cursortype - -; Allow or prevent persistent links. -; http://php.net/odbc.allow-persistent -odbc.allow_persistent = On - -; Check that a connection is still valid before reuse. -; http://php.net/odbc.check-persistent -odbc.check_persistent = On - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/odbc.max-persistent -odbc.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -; http://php.net/odbc.max-links -odbc.max_links = -1 - -; Handling of LONG fields. Returns number of bytes to variables. 0 means -; passthru. -; http://php.net/odbc.defaultlrl -odbc.defaultlrl = 4096 - -; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. -; See the documentation on odbc_binmode and odbc_longreadlen for an explanation -; of odbc.defaultlrl and odbc.defaultbinmode -; http://php.net/odbc.defaultbinmode -odbc.defaultbinmode = 1 - -;birdstep.max_links = -1 - -[Interbase] -; Allow or prevent persistent links. -ibase.allow_persistent = 1 - -; Maximum number of persistent links. -1 means no limit. -ibase.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -ibase.max_links = -1 - -; Default database name for ibase_connect(). -;ibase.default_db = - -; Default username for ibase_connect(). -;ibase.default_user = - -; Default password for ibase_connect(). -;ibase.default_password = - -; Default charset for ibase_connect(). -;ibase.default_charset = - -; Default timestamp format. -ibase.timestampformat = "%Y-%m-%d %H:%M:%S" - -; Default date format. -ibase.dateformat = "%Y-%m-%d" - -; Default time format. -ibase.timeformat = "%H:%M:%S" - -[MySQL] -; Allow accessing, from PHP's perspective, local files with LOAD DATA statements -; http://php.net/mysql.allow_local_infile -mysql.allow_local_infile = On - -; Allow or prevent persistent links. -; http://php.net/mysql.allow-persistent -mysql.allow_persistent = On - -; If mysqlnd is used: Number of cache slots for the internal result set cache -; http://php.net/mysql.cache_size -mysql.cache_size = 2000 - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/mysql.max-persistent -mysql.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -; http://php.net/mysql.max-links -mysql.max_links = -1 - -; Default port number for mysql_connect(). If unset, mysql_connect() will use -; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the -; compile-time value defined MYSQL_PORT (in that order). Win32 will only look -; at MYSQL_PORT. -; http://php.net/mysql.default-port -mysql.default_port = - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; http://php.net/mysql.default-socket -mysql.default_socket = - -; Default host for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysql.default-host -mysql.default_host = - -; Default user for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysql.default-user -mysql.default_user = - -; Default password for mysql_connect() (doesn't apply in safe mode). -; Note that this is generally a *bad* idea to store passwords in this file. -; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password") -; and reveal this password! And of course, any users with read access to this -; file will be able to reveal the password as well. -; http://php.net/mysql.default-password -mysql.default_password = - -; Maximum time (in seconds) for connect timeout. -1 means no limit -; http://php.net/mysql.connect-timeout -mysql.connect_timeout = 60 - -; Trace mode. When trace_mode is active (=On), warnings for table/index scans and -; SQL-Errors will be displayed. -; http://php.net/mysql.trace-mode -mysql.trace_mode = Off - -[MySQLi] - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/mysqli.max-persistent -mysqli.max_persistent = -1 - -; Allow accessing, from PHP's perspective, local files with LOAD DATA statements -; http://php.net/mysqli.allow_local_infile -;mysqli.allow_local_infile = On - -; Allow or prevent persistent links. -; http://php.net/mysqli.allow-persistent -mysqli.allow_persistent = On - -; Maximum number of links. -1 means no limit. -; http://php.net/mysqli.max-links -mysqli.max_links = -1 - -; If mysqlnd is used: Number of cache slots for the internal result set cache -; http://php.net/mysqli.cache_size -mysqli.cache_size = 2000 - -; Default port number for mysqli_connect(). If unset, mysqli_connect() will use -; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the -; compile-time value defined MYSQL_PORT (in that order). Win32 will only look -; at MYSQL_PORT. -; http://php.net/mysqli.default-port -mysqli.default_port = 3306 - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; http://php.net/mysqli.default-socket -mysqli.default_socket = - -; Default host for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysqli.default-host -mysqli.default_host = - -; Default user for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysqli.default-user -mysqli.default_user = - -; Default password for mysqli_connect() (doesn't apply in safe mode). -; Note that this is generally a *bad* idea to store passwords in this file. -; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") -; and reveal this password! And of course, any users with read access to this -; file will be able to reveal the password as well. -; http://php.net/mysqli.default-pw -mysqli.default_pw = - -; Allow or prevent reconnect -mysqli.reconnect = Off - -[mysqlnd] -; Enable / Disable collection of general statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -; http://php.net/mysqlnd.collect_statistics -mysqlnd.collect_statistics = On - -; Enable / Disable collection of memory usage statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -; http://php.net/mysqlnd.collect_memory_statistics -mysqlnd.collect_memory_statistics = Off - -; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. -; http://php.net/mysqlnd.net_cmd_buffer_size -;mysqlnd.net_cmd_buffer_size = 2048 - -; Size of a pre-allocated buffer used for reading data sent by the server in -; bytes. -; http://php.net/mysqlnd.net_read_buffer_size -;mysqlnd.net_read_buffer_size = 32768 - -[OCI8] - -; Connection: Enables privileged connections using external -; credentials (OCI_SYSOPER, OCI_SYSDBA) -; http://php.net/oci8.privileged-connect -;oci8.privileged_connect = Off - -; Connection: The maximum number of persistent OCI8 connections per -; process. Using -1 means no limit. -; http://php.net/oci8.max-persistent -;oci8.max_persistent = -1 - -; Connection: The maximum number of seconds a process is allowed to -; maintain an idle persistent connection. Using -1 means idle -; persistent connections will be maintained forever. -; http://php.net/oci8.persistent-timeout -;oci8.persistent_timeout = -1 - -; Connection: The number of seconds that must pass before issuing a -; ping during oci_pconnect() to check the connection validity. When -; set to 0, each oci_pconnect() will cause a ping. Using -1 disables -; pings completely. -; http://php.net/oci8.ping-interval -;oci8.ping_interval = 60 - -; Connection: Set this to a user chosen connection class to be used -; for all pooled server requests with Oracle 11g Database Resident -; Connection Pooling (DRCP). To use DRCP, this value should be set to -; the same string for all web servers running the same application, -; the database pool must be configured, and the connection string must -; specify to use a pooled server. -;oci8.connection_class = - -; High Availability: Using On lets PHP receive Fast Application -; Notification (FAN) events generated when a database node fails. The -; database must also be configured to post FAN events. -;oci8.events = Off - -; Tuning: This option enables statement caching, and specifies how -; many statements to cache. Using 0 disables statement caching. -; http://php.net/oci8.statement-cache-size -;oci8.statement_cache_size = 20 - -; Tuning: Enables statement prefetching and sets the default number of -; rows that will be fetched automatically after statement execution. -; http://php.net/oci8.default-prefetch -;oci8.default_prefetch = 100 - -; Compatibility. Using On means oci_close() will not close -; oci_connect() and oci_new_connect() connections. -; http://php.net/oci8.old-oci-close-semantics -;oci8.old_oci_close_semantics = Off - -[PostgreSQL] -; Allow or prevent persistent links. -; http://php.net/pgsql.allow-persistent -pgsql.allow_persistent = On - -; Detect broken persistent links always with pg_pconnect(). -; Auto reset feature requires a little overheads. -; http://php.net/pgsql.auto-reset-persistent -pgsql.auto_reset_persistent = Off - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/pgsql.max-persistent -pgsql.max_persistent = -1 - -; Maximum number of links (persistent+non persistent). -1 means no limit. -; http://php.net/pgsql.max-links -pgsql.max_links = -1 - -; Ignore PostgreSQL backends Notice message or not. -; Notice message logging require a little overheads. -; http://php.net/pgsql.ignore-notice -pgsql.ignore_notice = 0 - -; Log PostgreSQL backends Notice message or not. -; Unless pgsql.ignore_notice=0, module cannot log notice message. -; http://php.net/pgsql.log-notice -pgsql.log_notice = 0 - -[Sybase-CT] -; Allow or prevent persistent links. -; http://php.net/sybct.allow-persistent -sybct.allow_persistent = On - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/sybct.max-persistent -sybct.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -; http://php.net/sybct.max-links -sybct.max_links = -1 - -; Minimum server message severity to display. -; http://php.net/sybct.min-server-severity -sybct.min_server_severity = 10 - -; Minimum client message severity to display. -; http://php.net/sybct.min-client-severity -sybct.min_client_severity = 10 - -; Set per-context timeout -; http://php.net/sybct.timeout -;sybct.timeout= - -;sybct.packet_size - -; The maximum time in seconds to wait for a connection attempt to succeed before returning failure. -; Default: one minute -;sybct.login_timeout= - -; The name of the host you claim to be connecting from, for display by sp_who. -; Default: none -;sybct.hostname= - -; Allows you to define how often deadlocks are to be retried. -1 means "forever". -; Default: 0 -;sybct.deadlock_retry_count= - -[bcmath] -; Number of decimal digits for all bcmath functions. -; http://php.net/bcmath.scale -bcmath.scale = 0 - -[browscap] -; http://php.net/browscap -;browscap = extra/browscap.ini - -[Session] -; Handler used to store/retrieve data. -; http://php.net/session.save-handler -session.save_handler = files - -; Argument passed to save_handler. In the case of files, this is the path -; where data files are stored. Note: Windows users have to change this -; variable in order to use PHP's session functions. -; -; The path can be defined as: -; -; session.save_path = "N;/path" -; -; where N is an integer. Instead of storing all the session files in -; /path, what this will do is use subdirectories N-levels deep, and -; store the session data in those directories. This is useful if you -; or your OS have problems with lots of files in one directory, and is -; a more efficient layout for servers that handle lots of sessions. -; -; NOTE 1: PHP will not create this directory structure automatically. -; You can use the script in the ext/session dir for that purpose. -; NOTE 2: See the section on garbage collection below if you choose to -; use subdirectories for session storage -; -; The file storage module creates files using mode 600 by default. -; You can change that by using -; -; session.save_path = "N;MODE;/path" -; -; where MODE is the octal representation of the mode. Note that this -; does not overwrite the process's umask. -; http://php.net/session.save-path -session.save_path = "3;/tmp/php_sessions" - -; Whether to use cookies. -; http://php.net/session.use-cookies -session.use_cookies = 1 - -; http://php.net/session.cookie-secure -;session.cookie_secure = - -; This option forces PHP to fetch and use a cookie for storing and maintaining -; the session id. We encourage this operation as it's very helpful in combating -; session hijacking when not specifying and managing your own session id. It is -; not the end all be all of session hijacking defense, but it's a good start. -; http://php.net/session.use-only-cookies -session.use_only_cookies = 1 - -; Name of the session (used as cookie name). -; http://php.net/session.name -session.name = PHPSESSID - -; Initialize session on request startup. -; http://php.net/session.auto-start -session.auto_start = 0 - -; Lifetime in seconds of cookie or, if 0, until browser is restarted. -; http://php.net/session.cookie-lifetime -session.cookie_lifetime = 0 - -; The path for which the cookie is valid. -; http://php.net/session.cookie-path -session.cookie_path = / - -; The domain for which the cookie is valid. -; http://php.net/session.cookie-domain -session.cookie_domain = - -; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript. -; http://php.net/session.cookie-httponly -session.cookie_httponly = - -; Handler used to serialize data. php is the standard serializer of PHP. -; http://php.net/session.serialize-handler -session.serialize_handler = php - -; Defines the probability that the 'garbage collection' process is started -; on every session initialization. The probability is calculated by using -; gc_probability/gc_divisor. Where session.gc_probability is the numerator -; and gc_divisor is the denominator in the equation. Setting this value to 1 -; when the session.gc_divisor value is 100 will give you approximately a 1% chance -; the gc will run on any give request. -; Default Value: 1 -; Development Value: 1 -; Production Value: 1 -; http://php.net/session.gc-probability -session.gc_probability = 1 - -; Defines the probability that the 'garbage collection' process is started on every -; session initialization. The probability is calculated by using the following equation: -; gc_probability/gc_divisor. Where session.gc_probability is the numerator and -; session.gc_divisor is the denominator in the equation. Setting this value to 1 -; when the session.gc_divisor value is 100 will give you approximately a 1% chance -; the gc will run on any give request. Increasing this value to 1000 will give you -; a 0.1% chance the gc will run on any give request. For high volume production servers, -; this is a more efficient approach. -; Default Value: 100 -; Development Value: 1000 -; Production Value: 1000 -; http://php.net/session.gc-divisor -session.gc_divisor = 1000 - -; After this number of seconds, stored data will be seen as 'garbage' and -; cleaned up by the garbage collection process. -; http://php.net/session.gc-maxlifetime -session.gc_maxlifetime = 1440 - -; NOTE: If you are using the subdirectory option for storing session files -; (see session.save_path above), then garbage collection does *not* -; happen automatically. You will need to do your own garbage -; collection through a shell script, cron entry, or some other method. -; For example, the following script would is the equivalent of -; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): -; find /path/to/sessions -cmin +24 | xargs rm - -; PHP 4.2 and less have an undocumented feature/bug that allows you to -; to initialize a session variable in the global scope. -; PHP 4.3 and later will warn you, if this feature is used. -; You can disable the feature and the warning separately. At this time, -; the warning is only displayed, if bug_compat_42 is enabled. This feature -; introduces some serious security problems if not handled correctly. It's -; recommended that you do not use this feature on production servers. But you -; should enable this on development servers and enable the warning as well. If you -; do not enable the feature on development servers, you won't be warned when it's -; used and debugging errors caused by this can be difficult to track down. -; Default Value: On -; Development Value: On -; Production Value: Off -; http://php.net/session.bug-compat-42 -session.bug_compat_42 = Off - -; This setting controls whether or not you are warned by PHP when initializing a -; session value into the global space. session.bug_compat_42 must be enabled before -; these warnings can be issued by PHP. See the directive above for more information. -; Default Value: On -; Development Value: On -; Production Value: Off -; http://php.net/session.bug-compat-warn -session.bug_compat_warn = Off - -; Check HTTP Referer to invalidate externally stored URLs containing ids. -; HTTP_REFERER has to contain this substring for the session to be -; considered as valid. -; http://php.net/session.referer-check -session.referer_check = - -; How many bytes to read from the file. -; http://php.net/session.entropy-length -;session.entropy_length = 32 - -; Specified here to create the session id. -; http://php.net/session.entropy-file -; Defaults to /dev/urandom -; On systems that don't have /dev/urandom but do have /dev/arandom, this will default to /dev/arandom -; If neither are found at compile time, the default is no entropy file. -; On windows, setting the entropy_length setting will activate the -; Windows random source (using the CryptoAPI) -;session.entropy_file = /dev/urandom - -; Set to {nocache,private,public,} to determine HTTP caching aspects -; or leave this empty to avoid sending anti-caching headers. -; http://php.net/session.cache-limiter -session.cache_limiter = nocache - -; Document expires after n minutes. -; http://php.net/session.cache-expire -session.cache_expire = 180 - -; trans sid support is disabled by default. -; Use of trans sid may risk your users security. -; Use this option with caution. -; - User may send URL contains active session ID -; to other person via. email/irc/etc. -; - URL that contains active session ID may be stored -; in publicly accessible computer. -; - User may access your site with the same session ID -; always using URL stored in browser's history or bookmarks. -; http://php.net/session.use-trans-sid -session.use_trans_sid = 0 - -; Select a hash function for use in generating session ids. -; Possible Values -; 0 (MD5 128 bits) -; 1 (SHA-1 160 bits) -; This option may also be set to the name of any hash function supported by -; the hash extension. A list of available hashes is returned by the hash_algos() -; function. -; http://php.net/session.hash-function -session.hash_function = 0 - -; Define how many bits are stored in each character when converting -; the binary hash data to something readable. -; Possible values: -; 4 (4 bits: 0-9, a-f) -; 5 (5 bits: 0-9, a-v) -; 6 (6 bits: 0-9, a-z, A-Z, "-", ",") -; Default Value: 4 -; Development Value: 5 -; Production Value: 5 -; http://php.net/session.hash-bits-per-character -session.hash_bits_per_character = 5 - -; The URL rewriter will look for URLs in a defined set of HTML tags. -; form/fieldset are special; if you include them here, the rewriter will -; add a hidden field with the info which is otherwise appended -; to URLs. If you want XHTML conformity, remove the form entry. -; Note that all valid entries require a "=", even if no value follows. -; Default Value: "a=href,area=href,frame=src,form=,fieldset=" -; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry" -; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry" -; http://php.net/url-rewriter.tags -url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" - -; Enable upload progress tracking in $_SESSION -; Default Value: On -; Development Value: On -; Production Value: On -; http://php.net/session.upload-progress.enabled -;session.upload_progress.enabled = On - -; Cleanup the progress information as soon as all POST data has been read -; (i.e. upload completed). -; Default Value: On -; Development Value: On -; Production Value: On -; http://php.net/session.upload-progress.cleanup -;session.upload_progress.cleanup = On - -; A prefix used for the upload progress key in $_SESSION -; Default Value: "upload_progress_" -; Development Value: "upload_progress_" -; Production Value: "upload_progress_" -; http://php.net/session.upload-progress.prefix -;session.upload_progress.prefix = "upload_progress_" - -; The index name (concatenated with the prefix) in $_SESSION -; containing the upload progress information -; Default Value: "PHP_SESSION_UPLOAD_PROGRESS" -; Development Value: "PHP_SESSION_UPLOAD_PROGRESS" -; Production Value: "PHP_SESSION_UPLOAD_PROGRESS" -; http://php.net/session.upload-progress.name -;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" - -; How frequently the upload progress should be updated. -; Given either in percentages (per-file), or in bytes -; Default Value: "1%" -; Development Value: "1%" -; Production Value: "1%" -; http://php.net/session.upload-progress.freq -;session.upload_progress.freq = "1%" - -; The minimum delay between updates, in seconds -; Default Value: 1 -; Development Value: 1 -; Production Value: 1 -; http://php.net/session.upload-progress.min-freq -;session.upload_progress.min_freq = "1" - -[MSSQL] -; Allow or prevent persistent links. -mssql.allow_persistent = On - -; Maximum number of persistent links. -1 means no limit. -mssql.max_persistent = -1 - -; Maximum number of links (persistent+non persistent). -1 means no limit. -mssql.max_links = -1 - -; Minimum error severity to display. -mssql.min_error_severity = 10 - -; Minimum message severity to display. -mssql.min_message_severity = 10 - -; Compatibility mode with old versions of PHP 3.0. -mssql.compatability_mode = Off - -; Connect timeout -;mssql.connect_timeout = 5 - -; Query timeout -;mssql.timeout = 60 - -; Valid range 0 - 2147483647. Default = 4096. -;mssql.textlimit = 4096 - -; Valid range 0 - 2147483647. Default = 4096. -;mssql.textsize = 4096 - -; Limits the number of records in each batch. 0 = all records in one batch. -;mssql.batchsize = 0 - -; Specify how datetime and datetim4 columns are returned -; On => Returns data converted to SQL server settings -; Off => Returns values as YYYY-MM-DD hh:mm:ss -;mssql.datetimeconvert = On - -; Use NT authentication when connecting to the server -mssql.secure_connection = Off - -; Specify max number of processes. -1 = library default -; msdlib defaults to 25 -; FreeTDS defaults to 4096 -;mssql.max_procs = -1 - -; Specify client character set. -; If empty or not set the client charset from freetds.conf is used -; This is only used when compiled with FreeTDS -;mssql.charset = "ISO-8859-1" - -[Assertion] -; Assert(expr); active by default. -; http://php.net/assert.active -;assert.active = On - -; Issue a PHP warning for each failed assertion. -; http://php.net/assert.warning -;assert.warning = On - -; Don't bail out by default. -; http://php.net/assert.bail -;assert.bail = Off - -; User-function to be called if an assertion fails. -; http://php.net/assert.callback -;assert.callback = 0 - -; Eval the expression with current error_reporting(). Set to true if you want -; error_reporting(0) around the eval(). -; http://php.net/assert.quiet-eval -;assert.quiet_eval = 0 - -[COM] -; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs -; http://php.net/com.typelib-file -;com.typelib_file = - -; allow Distributed-COM calls -; http://php.net/com.allow-dcom -;com.allow_dcom = true - -; autoregister constants of a components typlib on com_load() -; http://php.net/com.autoregister-typelib -;com.autoregister_typelib = true - -; register constants casesensitive -; http://php.net/com.autoregister-casesensitive -;com.autoregister_casesensitive = false - -; show warnings on duplicate constant registrations -; http://php.net/com.autoregister-verbose -;com.autoregister_verbose = true - -; The default character set code-page to use when passing strings to and from COM objects. -; Default: system ANSI code page -;com.code_page= - -[mbstring] -; language for internal character representation. -; http://php.net/mbstring.language -;mbstring.language = Japanese - -; internal/script encoding. -; Some encoding cannot work as internal encoding. -; (e.g. SJIS, BIG5, ISO-2022-*) -; http://php.net/mbstring.internal-encoding -;mbstring.internal_encoding = EUC-JP - -; http input encoding. -; http://php.net/mbstring.http-input -;mbstring.http_input = auto - -; http output encoding. mb_output_handler must be -; registered as output buffer to function -; http://php.net/mbstring.http-output -;mbstring.http_output = SJIS - -; enable automatic encoding translation according to -; mbstring.internal_encoding setting. Input chars are -; converted to internal encoding by setting this to On. -; Note: Do _not_ use automatic encoding translation for -; portable libs/applications. -; http://php.net/mbstring.encoding-translation -;mbstring.encoding_translation = Off - -; automatic encoding detection order. -; auto means -; http://php.net/mbstring.detect-order -;mbstring.detect_order = auto - -; substitute_character used when character cannot be converted -; one from another -; http://php.net/mbstring.substitute-character -;mbstring.substitute_character = none; - -; overload(replace) single byte functions by mbstring functions. -; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), -; etc. Possible values are 0,1,2,4 or combination of them. -; For example, 7 for overload everything. -; 0: No overload -; 1: Overload mail() function -; 2: Overload str*() functions -; 4: Overload ereg*() functions -; http://php.net/mbstring.func-overload -;mbstring.func_overload = 0 - -; enable strict encoding detection. -;mbstring.strict_detection = Off - -; This directive specifies the regex pattern of content types for which mb_output_handler() -; is activated. -; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) -;mbstring.http_output_conv_mimetype= - -[gd] -; Tell the jpeg decode to ignore warnings and try to create -; a gd image. The warning will then be displayed as notices -; disabled by default -; http://php.net/gd.jpeg-ignore-warning -;gd.jpeg_ignore_warning = 0 - -[exif] -; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. -; With mbstring support this will automatically be converted into the encoding -; given by corresponding encode setting. When empty mbstring.internal_encoding -; is used. For the decode settings you can distinguish between motorola and -; intel byte order. A decode setting cannot be empty. -; http://php.net/exif.encode-unicode -;exif.encode_unicode = ISO-8859-15 - -; http://php.net/exif.decode-unicode-motorola -;exif.decode_unicode_motorola = UCS-2BE - -; http://php.net/exif.decode-unicode-intel -;exif.decode_unicode_intel = UCS-2LE - -; http://php.net/exif.encode-jis -;exif.encode_jis = - -; http://php.net/exif.decode-jis-motorola -;exif.decode_jis_motorola = JIS - -; http://php.net/exif.decode-jis-intel -;exif.decode_jis_intel = JIS - -[Tidy] -; The path to a default tidy configuration file to use when using tidy -; http://php.net/tidy.default-config -;tidy.default_config = /usr/local/lib/php/default.tcfg - -; Should tidy clean and repair output automatically? -; WARNING: Do not use this option if you are generating non-html content -; such as dynamic images -; http://php.net/tidy.clean-output -tidy.clean_output = Off - -[soap] -; Enables or disables WSDL caching feature. -; http://php.net/soap.wsdl-cache-enabled -soap.wsdl_cache_enabled=1 - -; Sets the directory name where SOAP extension will put cache files. -; http://php.net/soap.wsdl-cache-dir -soap.wsdl_cache_dir="/tmp" - -; (time to live) Sets the number of second while cached file will be used -; instead of original one. -; http://php.net/soap.wsdl-cache-ttl -soap.wsdl_cache_ttl=86400 - -; Sets the size of the cache limit. (Max. number of WSDL files to cache) -soap.wsdl_cache_limit = 5 - -[sysvshm] -; A default size of the shared memory segment -;sysvshm.init_mem = 10000 - -[ldap] -; Sets the maximum number of open links or -1 for unlimited. -ldap.max_links = -1 - -[mcrypt] -; For more information about mcrypt settings see http://php.net/mcrypt-module-open - -; Directory where to load mcrypt algorithms -; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) -;mcrypt.algorithms_dir= - -; Directory where to load mcrypt modes -; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) -;mcrypt.modes_dir= - -[dba] -;dba.default_handler= - -; Local Variables: -; tab-width: 4 -; End: -;[apc] -;apc.stat = 0 -;apc.enable_cli = 1 -;apc.shm_size = 64M - -[mysqlnd] -; Enable / Disable collection of general statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -; http://php.net/mysqlnd.collect_statistics -mysqlnd.collect_statistics = Off - -; Enable / Disable collection of memory usage statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -; http://php.net/mysqlnd.collect_memory_statistics -mysqlnd.collect_memory_statistics = Off - -[opcache] -opcache.validate_timestamps = 0 ; The same that apc.stat = 0 -opcache.max_accelerated_files = 20000 -;opcache.enable_file_override = 1 ; Faster for some frameworks -;opcache.save_comments = 0 ; Breaks any fw using annotations comments -;opcache.fast_shutdown = 1 ; Have problems with some big frameworks - - -[yaf] -yaf.library = -yaf.action_prefer = 0 -yaf.lowcase_path = 0 -yaf.use_spl_autoload = 0 -yaf.forward_limit = 5 -yaf.name_suffix = 1 -yaf.name_separator= -yaf.cache_config = 1 -yaf.environ = product -yaf.use_namespace = 1 diff --git a/toolset/setup/linux/languages/php/php5.sh b/toolset/setup/linux/languages/php/php5.sh deleted file mode 100644 index 44677b0d881..00000000000 --- a/toolset/setup/linux/languages/php/php5.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -RETCODE=$(fw_exists ${IROOT}/php5.installed) -[ ! "$RETCODE" == 0 ] || { \ - echo "Moving PHP config files into place"; - sudo cp $FWROOT/toolset/setup/linux/languages/php/php.ini /usr/local/lib/php.ini - sudo cp $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf /usr/local/lib/php-fpm.conf - rm -rf /tmp/php_sessions - /bin/bash $IROOT/php5/ext/session/mod_files.sh /tmp/php_sessions 3 5 - source $IROOT/php5.installed - return 0; } - -VERSION="5.6.33" -PHP_HOME=$IROOT/php-$VERSION - -# Precaution, unlikely to happen. -rm -rf $IROOT/php PHP_HOME cphalcon - -rm -rf $IROOT/php5 -fw_get -o php-${VERSION}.tar.gz http://php.net/distributions/php-${VERSION}.tar.gz -fw_untar php-${VERSION}.tar.gz -mv php-${VERSION} php5 -cd php5 - -echo "Configuring PHP5 quietly..." -./configure --prefix=$PHP_HOME --disable-debug --with-pdo-mysql \ - --with-mysql --with-mcrypt --enable-intl --enable-mbstring \ - --enable-fpm --with-openssl --with-mysqli --with-zlib \ - --enable-opcache --quiet -echo "Making PHP5 quietly..." -make -j2 --quiet -echo "Installing PHP5 quietly" -make --quiet install -cd .. - -# Disable yaf and phalcon, for most PHP frameworks -# (there is a similar line to enable the frameworks in their respective setup files) -sed -i 's|^extension=yaf.so|;extension=yaf.so|g' $FWROOT/toolset/setup/linux/languages/php/php.ini -sed -i 's|^extension=phalcon.so|;extension=phalcon.so|g' $FWROOT/toolset/setup/linux/languages/php/php.ini - -# Enable the correct Mongo DB plugin for PHP 5 -sed -i 's|^extension=mongodb.so|;extension=mongodb.so|g' $FWROOT/toolset/setup/linux/languages/php/php.ini -sed -i 's|;extension=mongo.so|extension=mongo.so|g' $FWROOT/toolset/setup/linux/languages/php/php.ini - -cp $FWROOT/toolset/setup/linux/languages/php/php.ini $PHP_HOME/lib/php.ini -cp $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf $PHP_HOME/lib/php-fpm.conf -rm -rf /tmp/php_sessions -/bin/bash $IROOT/php5/ext/session/mod_files.sh /tmp/php_sessions 3 5 - -# ======================= -# -# Install the PHP extensions that our tests need -# Install all of them here becuase our config file references -# all of these *.so -# ======================== -echo PHP compilation finished, installing extensions - -$PHP_HOME/bin/pecl channel-update pecl.php.net -# Apc.so -$PHP_HOME/bin/pecl config-set php_ini $PHP_HOME/lib/php.ini -printf "\n" | $PHP_HOME/bin/pecl -q install -f redis-2.2.5 - -# mongo.so -printf "\n" | $PHP_HOME/bin/pecl -q install -f mongo - -echo "export PHP_HOME=${PHP_HOME}" > $IROOT/php5.installed -echo -e "export PATH=\$PHP_HOME/bin:\$PHP_HOME/sbin:\$PATH" >> $IROOT/php5.installed - -source $IROOT/php5.installed diff --git a/toolset/setup/linux/languages/php/php7.sh b/toolset/setup/linux/languages/php/php7.sh deleted file mode 100644 index 05d61cc4834..00000000000 --- a/toolset/setup/linux/languages/php/php7.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash - -RETCODE=$(fw_exists ${IROOT}/php7.installed) -[ ! "$RETCODE" == 0 ] || { \ - echo "Moving PHP config files into place"; - sudo cp $FWROOT/toolset/setup/linux/languages/php/php.ini /usr/local/lib/php.ini - sudo cp $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf /usr/local/lib/php-fpm.conf - rm -rf /tmp/php_sessions - /bin/bash $IROOT/php7/ext/session/mod_files.sh /tmp/php_sessions 3 5 - source $IROOT/php7.installed - return 0; } - -VERSION="7.2.2" -PHP_HOME=$IROOT/php-$VERSION - -rm -rf $IROOT/php7 -fw_get -o php-${VERSION}.tar.gz http://php.net/distributions/php-${VERSION}.tar.gz -fw_untar php-${VERSION}.tar.gz -mv php-${VERSION} php7 -cd php7 - -echo "Configuring PHP quietly..." -./configure --prefix=$PHP_HOME --disable-debug \ - --with-zlib --with-pdo-mysql=mysqlnd \ - --enable-intl --enable-mbstring \ - --enable-fpm --with-openssl \ - --with-mysqli=mysqlnd --enable-huge-code-pages \ - --quiet -echo "Making PHP quietly..." -make -j2 --quiet -echo "Installing PHP quietly" -make --quiet install -cd .. - -# Disable yaf and phalcon, for most PHP frameworks -# (there is a similar line to enable the frameworks in their respective setup files) -sed -i 's|^extension=yaf.so|;extension=yaf.so|g' $FWROOT/toolset/setup/linux/languages/php/php.ini -sed -i 's|^extension=phalcon.so|;extension=phalcon.so|g' $FWROOT/toolset/setup/linux/languages/php/php.ini - -# Enable the correct Mongo DB plugin for PHP 7 -sed -i 's|^extension=mongo.so|;extension=mongo.so|g' $FWROOT/toolset/setup/linux/languages/php/php.ini -sed -i 's|;extension=mongodb.so|extension=mongodb.so|g' $FWROOT/toolset/setup/linux/languages/php/php.ini - -cp $FWROOT/toolset/setup/linux/languages/php/php.ini $PHP_HOME/lib/php.ini -cp $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf $PHP_HOME/lib/php-fpm.conf -rm -rf /tmp/php_sessions -/bin/bash $IROOT/php7/ext/session/mod_files.sh /tmp/php_sessions 3 5 - -# ======================= -# -# Install the PHP extensions that our tests need -# Install all of them here becuase our config file references -# all of these *.so -# ======================== -echo PHP7 compilation finished, installing extensions - -$PHP_HOME/bin/pecl channel-update pecl.php.net -# Apc.so -$PHP_HOME/bin/pecl config-set php_ini $PHP_HOME/lib/php.ini - -#printf "\n" | $PHP_HOME/bin/pecl -q install -f redis-3.0.0 - -#removed phalcon install - separate to toolset/setup/linux/frameworks - -# yaf.so - get working for php7 - also separate -#printf "\n" | $PHP_HOME/bin/pecl -q install -f yaf - -# mongodb.so - mongo.so deprecated in php7 use mongodb.so -printf "\n" | $PHP_HOME/bin/pecl -q install -f mongodb - -echo "export PHP_HOME=${PHP_HOME}" > $IROOT/php7.installed -echo -e "export PATH=\$PHP_HOME/bin:\$PHP_HOME/sbin:\$PATH" >> $IROOT/php7.installed - -source $IROOT/php7.installed diff --git a/toolset/setup/linux/languages/pypy2.sh b/toolset/setup/linux/languages/pypy2.sh deleted file mode 100644 index 3f838d4d8d3..00000000000 --- a/toolset/setup/linux/languages/pypy2.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -fw_installed pypy2 && return 0 - -PYPY2_ROOT=$IROOT/pypy2 -PYPY2_VERSION=5.10.0 - -fw_get -o pypy2-v${PYPY2_VERSION}-linux64.tar.bz2 https://bitbucket.org/pypy/pypy/downloads/pypy2-v${PYPY2_VERSION}-linux64.tar.bz2 -fw_untar pypy2-v${PYPY2_VERSION}-linux64.tar.bz2 -mv pypy2-v${PYPY2_VERSION}-linux64 pypy2 - -$PYPY2_ROOT/bin/pypy -m ensurepip -$PYPY2_ROOT/bin/pip install -U pip setuptools wheel - -echo "export PYPY2_ROOT=${PYPY2_ROOT}" > $IROOT/pypy2.installed -echo "export PYTHONHOME=${PYPY2_ROOT}" >> $IROOT/pypy2.installed -echo -e "export PATH=${PYPY2_ROOT}/bin:\$PATH" >> $IROOT/pypy2.installed - -source $IROOT/pypy2.installed diff --git a/toolset/setup/linux/languages/python2.sh b/toolset/setup/linux/languages/python2.sh deleted file mode 100644 index 518e431c057..00000000000 --- a/toolset/setup/linux/languages/python2.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -fw_installed py2 && return 0 - -PY2_ROOT=$IROOT/py2 -PY2_VERSION=2.7.14 - -fw_get -O http://www.python.org/ftp/python/${PY2_VERSION}/Python-${PY2_VERSION}.tar.xz -fw_untar Python-${PY2_VERSION}.tar.xz -cd Python-${PY2_VERSION} -./configure --prefix=${IROOT}/py2 --disable-shared --quiet -make -j4 --quiet 2>&1 | tee $IROOT/python-install.log | awk '{ if (NR%100 == 0) printf "."}' -make install --quiet 2>&1 | tee -a $IROOT/python-install.log | awk '{ if (NR%100 == 0) printf "."}' -cd .. - -$PY2_ROOT/bin/python -m ensurepip -U -$PY2_ROOT/bin/pip install -U setuptools pip wheel - -echo "export PY2_ROOT=${PY2_ROOT}" > $IROOT/py2.installed -echo -e "export PYTHONHOME=\$PY2_ROOT" >> $IROOT/py2.installed -echo -e "export PATH=\$PY2_ROOT/bin:\$PATH" >> $IROOT/py2.installed - -source $IROOT/py2.installed diff --git a/toolset/setup/linux/languages/python3.sh b/toolset/setup/linux/languages/python3.sh deleted file mode 100644 index 373011e8e3b..00000000000 --- a/toolset/setup/linux/languages/python3.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -fw_installed py3 && return 0 - -PY3_ROOT=$IROOT/py3 -PY3_VERSION=3.6.4 - -fw_get -O http://www.python.org/ftp/python/${PY3_VERSION}/Python-${PY3_VERSION}.tar.xz -fw_untar Python-${PY3_VERSION}.tar.xz -cd Python-${PY3_VERSION} -./configure --prefix=$PY3_ROOT --disable-shared --with-computed-gotos --quiet -make -j4 --quiet 2>&1 | tee $IROOT/python3-install.log | awk '{ if (NR%100 == 0) printf "."}' -make install --quiet 2>&1 | tee -a $IROOT/python3-install.log | awk '{ if (NR%100 == 0) printf "."}' -cd .. - -$PY3_ROOT/bin/python3 -m ensurepip -U -$PY3_ROOT/bin/pip3 install -U setuptools pip wheel - -echo "export PY3_ROOT=${PY3_ROOT}" > $IROOT/py3.installed -echo -e "export PYTHONHOME=\$PY3_ROOT" >> $IROOT/py3.installed -echo -e "export PATH=\$PY3_ROOT/bin:\$PATH" >> $IROOT/py3.installed - -source $IROOT/py3.installed diff --git a/toolset/setup/linux/languages/ruby/jruby-1.7.sh b/toolset/setup/linux/languages/ruby/jruby-1.7.sh deleted file mode 100644 index 63e477b9fbc..00000000000 --- a/toolset/setup/linux/languages/ruby/jruby-1.7.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -fw_depends rvm java - -fw_installed jruby-1.7 && return 0 - -# rvm stable [typically] only provides one version of jruby-1.7 -# update this when it changes -JRUBY_VERSION="1.7.27" - -rvm install jruby-$JRUBY_VERSION - -rvm jruby-$JRUBY_VERSION do gem install bundler -v 1.15.4 - -echo "export JRUBY_VERSION=${JRUBY_VERSION}" > $IROOT/jruby-1.7.installed - -source $IROOT/jruby-1.7.installed diff --git a/toolset/setup/linux/languages/ruby/jruby-9.0.sh b/toolset/setup/linux/languages/ruby/jruby-9.0.sh deleted file mode 100644 index 9fd0cfc86a7..00000000000 --- a/toolset/setup/linux/languages/ruby/jruby-9.0.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -fw_depends rvm java - -fw_installed jruby-9.0 && return 0 - -# TODO: JRuby 9.0 is EOL. Remove as soon as possible. -JRUBY_VERSION="9.0.5.0" - -rvm install jruby-$JRUBY_VERSION - -rvm jruby-$JRUBY_VERSION do gem install bundler -v 1.15.4 - -echo "export JRUBY_VERSION=${JRUBY_VERSION}" > $IROOT/jruby-9.0.installed - -source $IROOT/jruby-9.0.installed diff --git a/toolset/setup/linux/languages/ruby/jruby-9.1.sh b/toolset/setup/linux/languages/ruby/jruby-9.1.sh deleted file mode 100644 index db67727e1d9..00000000000 --- a/toolset/setup/linux/languages/ruby/jruby-9.1.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -fw_depends rvm java - -fw_installed jruby-9.1 && return 0 - -# rvm stable [typically] only provides one version of jruby-9.0 -# update this when it changes -JRUBY_VERSION="9.1.14.0" - -rvm install jruby-$JRUBY_VERSION - -rvm jruby-$JRUBY_VERSION do gem install bundler -v 1.15.4 - -echo "export JRUBY_VERSION=${JRUBY_VERSION}" > $IROOT/jruby-9.1.installed - -source $IROOT/jruby-9.1.installed diff --git a/toolset/setup/linux/languages/ruby/ruby-2.0.sh b/toolset/setup/linux/languages/ruby/ruby-2.0.sh deleted file mode 100644 index a44d5b2d331..00000000000 --- a/toolset/setup/linux/languages/ruby/ruby-2.0.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -fw_depends llvm-dev rvm - -fw_installed ruby-2.0 && return 0 - -# TODO: Ruby 2.0 is EOL. Remove as soon as possible. -MRI_VERSION=2.0.0-p648 - -rvm install $MRI_VERSION - -rvm $MRI_VERSION do gem install bundler -v 1.15.4 - -echo "export MRI_VERSION=${MRI_VERSION}" > $IROOT/ruby-2.0.installed - -source $IROOT/ruby-2.0.installed diff --git a/toolset/setup/linux/languages/ruby/ruby-2.1.sh b/toolset/setup/linux/languages/ruby/ruby-2.1.sh deleted file mode 100644 index 061980b88e7..00000000000 --- a/toolset/setup/linux/languages/ruby/ruby-2.1.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -fw_depends llvm-dev rvm - -fw_installed ruby-2.1 && return 0 - -# TODO: Ruby 2.1 is EOL. Remove as soon as possible. -MRI_VERSION=2.1.10 - -rvm install $MRI_VERSION - -rvm $MRI_VERSION do gem install bundler -v 1.15.4 - -echo "export MRI_VERSION=${MRI_VERSION}" > $IROOT/ruby-2.1.installed - -source $IROOT/ruby-2.1.installed diff --git a/toolset/setup/linux/languages/ruby/ruby-2.2.sh b/toolset/setup/linux/languages/ruby/ruby-2.2.sh deleted file mode 100644 index 0fe653a88f3..00000000000 --- a/toolset/setup/linux/languages/ruby/ruby-2.2.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -fw_depends llvm-dev libjemalloc-dev rvm - -fw_installed ruby-2.2 && return 0 - -# rvm stable [typically] only provides one version of ruby-2.2 -# update this when it changes -MRI_VERSION=2.2.8 - -rvm install $MRI_VERSION -C --with-jemalloc - -rvm $MRI_VERSION do gem install bundler -v 1.15.4 - -echo "export MRI_VERSION=${MRI_VERSION}" > $IROOT/ruby-2.2.installed - -source $IROOT/ruby-2.2.installed diff --git a/toolset/setup/linux/languages/ruby/ruby-2.3.sh b/toolset/setup/linux/languages/ruby/ruby-2.3.sh deleted file mode 100644 index 74d7f47831c..00000000000 --- a/toolset/setup/linux/languages/ruby/ruby-2.3.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -fw_depends llvm-dev libjemalloc-dev rvm - -fw_installed ruby-2.3 && return 0 - -# rvm stable [typically] only provides one version of ruby-2.3 -# update this when it changes -MRI_VERSION=2.3.5 - -rvm install $MRI_VERSION -C --with-jemalloc - -rvm $MRI_VERSION do gem install bundler -v 1.15.4 - -echo "export MRI_VERSION=${MRI_VERSION}" > $IROOT/ruby-2.3.installed - -source $IROOT/ruby-2.3.installed diff --git a/toolset/setup/linux/languages/ruby/ruby-2.4.sh b/toolset/setup/linux/languages/ruby/ruby-2.4.sh deleted file mode 100644 index bd6a951dce8..00000000000 --- a/toolset/setup/linux/languages/ruby/ruby-2.4.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -fw_depends llvm-dev libjemalloc-dev rvm - -fw_installed ruby-2.4 && return 0 - -# rvm stable [typically] only provides one version of ruby-2.4 -# update this when it changes -MRI_VERSION=2.4.2 - -rvm install $MRI_VERSION -C --with-jemalloc - -rvm $MRI_VERSION do gem install bundler -v 1.15.4 - -echo "export MRI_VERSION=${MRI_VERSION}" > $IROOT/ruby-2.4.installed - -source $IROOT/ruby-2.4.installed diff --git a/toolset/setup/linux/languages/ruby/rvm.sh b/toolset/setup/linux/languages/ruby/rvm.sh deleted file mode 100644 index af418559fcd..00000000000 --- a/toolset/setup/linux/languages/ruby/rvm.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_installed rvm && return 0 - -export SHELL=/bin/bash -gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 -RVM_INSTALLER="curl -sSL https://get.rvm.io" - -$RVM_INSTALLER | bash -s stable -echo "source ~/.rvm/scripts/rvm" > $IROOT/rvm.installed - -source $IROOT/rvm.installed diff --git a/toolset/setup/linux/languages/rust.sh b/toolset/setup/linux/languages/rust.sh deleted file mode 100644 index d37b31becd6..00000000000 --- a/toolset/setup/linux/languages/rust.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -RUST_VERSION="1.22.1" - -fw_installed rust && return 0 - -fw_get -O https://static.rust-lang.org/dist/rust-${RUST_VERSION}-x86_64-unknown-linux-gnu.tar.gz -fw_untar rust-${RUST_VERSION}-x86_64-unknown-linux-gnu.tar.gz -( - cd rust-${RUST_VERSION}-x86_64-unknown-linux-gnu - ./install.sh --prefix=$IROOT/rust -) - -echo -e "export LD_LIBRARY_PATH=${IROOT}/rust/lib:\$LD_LIBRARY_PATH" > $IROOT/rust.installed -echo -e "export PATH=${IROOT}/rust/bin:\$PATH" >> $IROOT/rust.installed - -source $IROOT/rust.installed diff --git a/toolset/setup/linux/prerequisites.sh b/toolset/setup/linux/prerequisites.sh index bde6ee11ae0..3b420db21b1 100755 --- a/toolset/setup/linux/prerequisites.sh +++ b/toolset/setup/linux/prerequisites.sh @@ -9,31 +9,36 @@ sudo apt-get -yq update # WARNING: DONT PUT A SPACE AFTER ANY BACKSLASH OR APT WILL BREAK sudo apt-get -qqy install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ - cmake build-essential automake `# Needed for building code` \ - curl wget unzip `# Common tools` \ - software-properties-common `# Needed for add-apt-repository` \ - git-core mercurial `# Version control systems` \ - libpcre3 libpcre3-dev libpcrecpp0 `# Regular expression support` \ - libssl-dev libcurl4-openssl-dev `# SSL libraries` \ - libmysqlclient-dev \ - zlib1g-dev python-software-properties \ - libreadline6-dev \ - libbz2-dev \ - libyaml-dev libxml2-dev \ - libxslt-dev libgdbm-dev ncurses-dev \ - libffi-dev htop libtool bison libevent-dev \ - libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 \ - liborc-0.4-0 libwxbase2.8-0 libwxgtk2.8-0 libgnutls-dev \ - libjson0-dev libmcrypt-dev libicu-dev gettext \ - libpq-dev mlton \ - cloc dstat `# Collect resource usage statistics` \ + git-core \ + cloc dstat `# Collect resource usage statistics` \ python-dev \ - python-pip re2c libnuma-dev + python-pip \ + python-software-properties \ + libmysqlclient-dev `# Needed for MySQL-python` \ + libpq-dev `# Needed for psycopg2` \ + linux-image-extra-$(uname -r) `# Needed for Docker on Ubuntu 14` \ + linux-image-extra-virtual `# Needed for Docker on Ubuntu 14` \ + apt-transport-https `# Needed for Docker on Ubuntu 14` \ + ca-certificates `# Needed for Docker on Ubuntu 14` \ + curl `# Needed for Docker on Ubuntu 14` \ + software-properties-common `# Needed for Docker on Ubuntu 14` -sudo pip install colorama==0.3.1 -# Version 2.3 has a nice Counter() and other features -# but it requires --allow-external and --allow-unverified -sudo pip install progressbar==2.2 requests MySQL-python psycopg2 pymongo +sudo pip install colorama==0.3.1 requests MySQL-python psycopg2-binary pymongo + +# +# Install Docker +# +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - +sudo add-apt-repository \ + "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ + $(lsb_release -cs) \ + stable" +sudo apt-get update +sudo apt-get -qqy install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" docker-ce +sudo groupadd docker +sudo usermod -aG docker $USER + +sudo pip install docker==3.1.0 # Get the ulimit from the benchmark config if [ -f benchmark.cfg ]; then @@ -52,10 +57,9 @@ sudo sh -c "echo '* soft rtprio 99' >> /etc/security/l # Create a tfb command alias for running the toolset # For now, this still ensures you have to be in the framework root to run it -sudo tee /etc/profile.d/tfb.sh < $IROOT/ant.installed - -source $IROOT/ant.installed - -ant -version diff --git a/toolset/setup/linux/systools/clang-3.9.sh b/toolset/setup/linux/systools/clang-3.9.sh deleted file mode 100644 index 4f187848001..00000000000 --- a/toolset/setup/linux/systools/clang-3.9.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -fw_installed clang-3.9 && return 0 - -sudo add-apt-repository -s "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-3.9 main" -wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - -sudo apt-get -yq update -sudo apt-get install -qqy clang-3.9 lldb-3.9 - -touch $IROOT/clang-3.9.installed - diff --git a/toolset/setup/linux/systools/conan.sh b/toolset/setup/linux/systools/conan.sh deleted file mode 100755 index 731cc463292..00000000000 --- a/toolset/setup/linux/systools/conan.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -fw_depends python-dev - -fw_installed conan && return 0 - -# We're using conan 0.28.1 because, as of this writing, later versions of conan -# are incompatible with the luna framework, and luna is the only framework that -# uses conan. -pip install --user -Iv conan==0.28.1 - -echo -e "export PATH=~/.local/bin:\$PATH" > $IROOT/conan.installed - -source $IROOT/conan.installed diff --git a/toolset/setup/linux/systools/gcc-4.9.sh b/toolset/setup/linux/systools/gcc-4.9.sh deleted file mode 100644 index d1d74f706b8..00000000000 --- a/toolset/setup/linux/systools/gcc-4.9.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_installed gcc-4.9 && return 0 - -sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y -sudo apt-get -yq update -sudo apt-get install -qqy gcc-4.9 g++-4.9 - -touch $IROOT/gcc-4.9.installed diff --git a/toolset/setup/linux/systools/gcc-6.sh b/toolset/setup/linux/systools/gcc-6.sh deleted file mode 100644 index 6c18d0e1157..00000000000 --- a/toolset/setup/linux/systools/gcc-6.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -fw_installed gcc-6 && return 0 - -sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y -sudo apt-get -yq update -sudo apt-get install -qqy gcc-6 g++-6 - -touch $IROOT/gcc-6.installed diff --git a/toolset/setup/linux/systools/luarocks.sh b/toolset/setup/linux/systools/luarocks.sh deleted file mode 100755 index d79329861bd..00000000000 --- a/toolset/setup/linux/systools/luarocks.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -fw_depends lua - -fw_installed luarocks && return 0 - -LUAROCKS_VERSION="2.2.1" -LUAROCKS=$IROOT/luarocks-$LUAROCKS_VERSION - -fw_get -O http://luarocks.org/releases/luarocks-$LUAROCKS_VERSION.tar.gz -fw_untar luarocks-$LUAROCKS_VERSION.tar.gz - -cd $LUAROCKS -./configure --prefix=$LUA_HOME --with-lua=$LUA_HOME -make --quiet bootstrap - -echo "" > $IROOT/luarocks.installed - -source $IROOT/luarocks.installed diff --git a/toolset/setup/linux/systools/mustache-c.sh b/toolset/setup/linux/systools/mustache-c.sh deleted file mode 100755 index e52c9fbdabd..00000000000 --- a/toolset/setup/linux/systools/mustache-c.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -fw_installed mustache-c && return 0 - -MUSTACHE_C_HOME="${IROOT}/mustache-c" -BUILD_DIR="${MUSTACHE_C_HOME}_build" - -git clone 'https://github.com/x86-64/mustache-c.git' "$BUILD_DIR" -pushd "$BUILD_DIR" -git checkout 55dafd1e95adaca90ea50efb9a8573786514c85a -CFLAGS="-O3 -flto -march=native" ./configure --prefix="$MUSTACHE_C_HOME" -make -j "$(nproc)" install -popd -rm -rf "$BUILD_DIR" - -echo "export MUSTACHE_C_HOME=$MUSTACHE_C_HOME" > "${IROOT}/mustache-c.installed" -echo -e "export LD_LIBRARY_PATH=\$MUSTACHE_C_HOME/lib:\$LD_LIBRARY_PATH" \ - >> "${IROOT}/mustache-c.installed" - -source "${IROOT}/mustache-c.installed" diff --git a/toolset/setup/linux/systools/nimble.sh b/toolset/setup/linux/systools/nimble.sh deleted file mode 100755 index 4ab7b304c7f..00000000000 --- a/toolset/setup/linux/systools/nimble.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -fw_depends nim - -fw_installed nimble && return 0 - -NIMBLE_VERSION="0.6.2" - -cd $NIM_HOME -# nim's package manager -fw_get -O https://github.com/nim-lang/nimble/archive/v$NIMBLE_VERSION.tar.gz -fw_untar v$NIMBLE_VERSION.tar.gz -mv nimble-$NIMBLE_VERSION nimble -cd nimble -../bin/nim c src/nimble -mv src/nimble ../bin/ - -cd $IROOT -echo "" > $IROOT/nimble.installed - -source $IROOT/nimble.installed diff --git a/toolset/setup/linux/systools/sbt.sh b/toolset/setup/linux/systools/sbt.sh deleted file mode 100644 index 811fcbfba79..00000000000 --- a/toolset/setup/linux/systools/sbt.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -fw_installed sbt && return 0 - -VERSION="1.0.4" - -fw_get -o sbt-$VERSION.zip https://github.com/sbt/sbt/releases/download/v$VERSION/sbt-$VERSION.zip -fw_unzip sbt-$VERSION.zip - -echo -e "export PATH=${IROOT}/sbt/bin:\$PATH" > $IROOT/sbt.installed - -source $IROOT/sbt.installed diff --git a/toolset/setup/linux/systools/yajl.sh b/toolset/setup/linux/systools/yajl.sh deleted file mode 100755 index 65f47c58cf0..00000000000 --- a/toolset/setup/linux/systools/yajl.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -fw_installed yajl && return 0 - -VERSION="2.1.0" -ARCHIVE="${VERSION}.tar.gz" -BUILD_DIR="yajl-${VERSION}" -YAJL_HOME="${IROOT}/yajl" - -pushd "${IROOT}" -fw_get -O "https://github.com/lloyd/yajl/archive/$ARCHIVE" -fw_untar "$ARCHIVE" -pushd "$BUILD_DIR" -./configure -p "$YAJL_HOME" -make -j "$(nproc)" install -popd -rm -rf "$BUILD_DIR" -popd - -echo "export YAJL_HOME=$YAJL_HOME" > "${IROOT}/yajl.installed" -echo -e "export LD_LIBRARY_PATH=\$YAJL_HOME/lib:\$LD_LIBRARY_PATH" \ - >> "${IROOT}/yajl.installed" - -source "${IROOT}/yajl.installed" diff --git a/toolset/setup/linux/unbuffered.py b/toolset/setup/linux/unbuffered.py deleted file mode 100644 index b473f755d1f..00000000000 --- a/toolset/setup/linux/unbuffered.py +++ /dev/null @@ -1,13 +0,0 @@ -# Wrapper for unbuffered stream writing. -# http://stackoverflow.com/a/107717/376366 -# Used to make sure print output appears in the correct order -# in log files when spawning subprocesses. - -class Unbuffered: - def __init__(self, stream): - self.stream = stream - def write(self, data): - self.stream.write(data) - self.stream.flush() - def __getattr__(self, attr): - return getattr(self.stream, attr) diff --git a/toolset/setup/linux/webservers/h2o.sh b/toolset/setup/linux/webservers/h2o.sh deleted file mode 100755 index 2772d168e26..00000000000 --- a/toolset/setup/linux/webservers/h2o.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -fw_depends ruby-2.4 - -fw_installed h2o && return 0 - -H2O_HOME="${IROOT}/h2o" -VERSION="2.2.4" -ARCHIVE="v${VERSION}.tar.gz" -BUILD_DIR="h2o-${VERSION}" - -pushd "${IROOT}" -fw_get -O "https://github.com/h2o/h2o/archive/$ARCHIVE" -fw_untar "$ARCHIVE" -pushd "$BUILD_DIR" -cmake -DCMAKE_INSTALL_PREFIX="$H2O_HOME" -DCMAKE_C_FLAGS="-flto -march=native" \ - -DCMAKE_AR=/usr/bin/gcc-ar -DCMAKE_RANLIB=/usr/bin/gcc-ranlib -DWITH_MRUBY=on -make -j "$(nproc)" install -popd -rm -rf "$BUILD_DIR" -popd - -echo "export H2O_HOME=$H2O_HOME" > "${IROOT}/h2o.installed" -echo -e "export PATH=\$H2O_HOME/bin:\$PATH" >> "${IROOT}/h2o.installed" - -source "${IROOT}/h2o.installed" diff --git a/toolset/setup/linux/webservers/microhttpd.sh b/toolset/setup/linux/webservers/microhttpd.sh deleted file mode 100755 index b9a22b62ff6..00000000000 --- a/toolset/setup/linux/webservers/microhttpd.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -fw_installed microhttpd && return 0 - -VERSION=0.9.39 -MICROHTTPD=$IROOT/libmicrohttpd -MICROHTTPD_HOME=$MICROHTTPD-$VERSION - -fw_get -O http://mirror.ibcp.fr/pub/gnu/libmicrohttpd/libmicrohttpd-$VERSION.tar.gz -fw_untar libmicrohttpd-$VERSION.tar.gz -cd libmicrohttpd-$VERSION -./configure --prefix=$MICROHTTPD_HOME -make install - -echo "export MICROHTTPD_HOME=${MICROHTTPD_HOME}" > $IROOT/microhttpd.installed -echo -e "export PATH=${MICROHTTPD_HOME}/bin:\$PATH" >> $IROOT/microhttpd.installed - -source $IROOT/microhttpd.installed diff --git a/toolset/setup/linux/webservers/nginx.sh b/toolset/setup/linux/webservers/nginx.sh deleted file mode 100644 index 82ecf343364..00000000000 --- a/toolset/setup/linux/webservers/nginx.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -fw_installed nginx && return 0 - -VERSION="1.12.2" -NGINX_HOME=$IROOT/nginx - -fw_get -O http://nginx.org/download/nginx-${VERSION}.tar.gz -fw_untar nginx-${VERSION}.tar.gz -cd nginx-${VERSION} - -# There is no --quiet flag that I could find... -echo "Configuring nginx..." -./configure --prefix=$NGINX_HOME > /dev/null - -echo "Compiling and installing nginx..." -make --quiet -make --quiet install - -echo "export NGINX_HOME=${NGINX_HOME}" > $IROOT/nginx.installed -echo -e "export PATH=\$NGINX_HOME/sbin:\$PATH" >> $IROOT/nginx.installed - -source $IROOT/nginx.installed diff --git a/toolset/setup/linux/webservers/openresty.sh b/toolset/setup/linux/webservers/openresty.sh deleted file mode 100644 index b434e6b9312..00000000000 --- a/toolset/setup/linux/webservers/openresty.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -fw_depends lua - -fw_installed openresty && return 0 - -OPENRESTY_VERSION="1.11.2.1" -OPENRESTY=$IROOT/openresty -OPENRESTY_HOME=$OPENRESTY-$OPENRESTY_VERSION - -fw_get -O http://openresty.org/download/openresty-$OPENRESTY_VERSION.tar.gz -fw_untar openresty-$OPENRESTY_VERSION.tar.gz - -cd openresty-$OPENRESTY_VERSION -./configure --with-http_postgres_module --prefix=$OPENRESTY_HOME --with-luajit-xcflags="-DLUAJIT_NUMMODE=2 -O3" --with-cc-opt="-O3" -j4 -make -j4 --quiet -make --quiet install - -echo "export OPENRESTY_HOME=${OPENRESTY_HOME}" > $IROOT/openresty.installed -echo -e "export PATH=\$OPENRESTY_HOME/nginx/sbin:\$PATH" >> $IROOT/openresty.installed - -source $IROOT/openresty.installed diff --git a/toolset/setup/linux/webservers/resin/resin-java8.sh b/toolset/setup/linux/webservers/resin/resin-java8.sh deleted file mode 100644 index 5cd11e2b327..00000000000 --- a/toolset/setup/linux/webservers/resin/resin-java8.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_depends java8 - -fw_installed resin-java8 && return 0 - -RESIN_VERSION=4.0.55 -RESIN_HOME=$IROOT/resin-java8/resin-$RESIN_VERSION - -mkdir resin-java8 -cd resin-java8 -fw_get -O http://www.caucho.com/download/resin-$RESIN_VERSION.tar.gz -fw_untar resin-$RESIN_VERSION.tar.gz -cd resin-$RESIN_VERSION -./configure --prefix=`pwd` -make -make install - -mv conf/resin.properties conf/resin.properties.orig -cat $FWROOT/toolset/setup/linux/webservers/resin/resin.properties > conf/resin.properties - -mv conf/resin.xml conf/resin.xml.orig -cat $FWROOT/toolset/setup/linux/webservers/resin/resin.xml > conf/resin.xml - -echo "export RESIN_HOME=${RESIN_HOME}" > $IROOT/resin-java8.installed -echo -e "export PATH=\$RESIN_HOME/bin:\$PATH" >> $IROOT/resin-java8.installed - -source $IROOT/resin-java8.installed diff --git a/toolset/setup/linux/webservers/resin/resin.properties b/toolset/setup/linux/webservers/resin/resin.properties deleted file mode 100644 index d765db85dac..00000000000 --- a/toolset/setup/linux/webservers/resin/resin.properties +++ /dev/null @@ -1,165 +0,0 @@ -# resin.properties - configuration variable values -# -# See resin.xml, cluster-default.xml, and health.xml for full configuration. -# Any variable defined by ${...} can be set as a property in this file. -# -# Individual server overrides can be specified by prepending the server.id. -# For example, increasing the log level for an individual server: -# -# log_level : info -# app-0.log_level : finest -# -# Like Resin XML configuration, modification of this file will trigger -# a restart. -# - -# General log level (modify resin.xml for more granular log level adjustments) -log_level : severe - -# Enable verbose browser error reporting -dev_mode : false - -# How often Resin should check for updated files. -dependency_check_interval : 5m - -# Enable /resin-doc Resin documentation -resin_doc : false -resin_doc_host : - -# List Triad server ip-addresses:hmux-port for each tier, space separated -# App tier Triad servers must be listed to enable web-tier to -# app-tier load-balancing - -# web-tier Triad servers: web-0 web-1 web-2 -# web_servers : 127.0.0.1:6810 - -# app-tier Triad servers: app-0 app-1 app-2 -app_servers : 127.0.0.1:6800 - -# Configures Resin for a memcached server tier -# memcached-tier Triad servers: memcached-0 memcached-1 memcached-2 -# memcached_servers : 127.0.0.1:6820 -# memcached_port : 11211 - -# Allow elastic nodes to join the cluster (enable for cloud mode) -# elastic_cloud_enable : true - -# The cluster that elastic nodes should join - each will contact a Triad server -# Use a separate resin.properties file for each cluster -home_cluster : app - -# Used for an elastic server to join the cluster in home_cluster -# elastic_server : true - -# Create a distinct webapps/ directory for each server, for vertical scaling -# elastic_webapp : true - -# Used for cloud servers with dynamic IP addresses where the DNS name for the -# server is assigned after the server starts. Resin will retry the start. -# elastic_dns : true - -# specifies the --server in the config file -# home_server : app-0 - -# Set HTTP and HTTPS bind address -# http_address : * - -# Set HTTP and HTTPS ports. -# Use overrides for individual server control, for example: app-0.http : 8081 -app.http : 8080 -# app.https : 8443 - -web.http : 8080 -# web.https : 8443 - -# memcached.http : 8080 -# memcached.https : 8443 - -# For security, Resin can switch to a non-root user after binding to port 80 -setuid_user : -setuid_group : - -# Arg passed directly to the JVM -jvm_args : -Xmx2048m -Xms2048m -XX:MaxPermSize=256m -jvm_mode : -server - -# Local URLs for the watchdog to check to ensure the server is up, -# space separated -# http_ping_urls : http://127.0.0.1/test.jsp - -# Throttle the number of active threads for a port -port_thread_max : 256 -accept_thread_max : 32 -accept_thread_min : 4 - -# Enable JNI TCP speed optimizations -tcp_cork : true -sendfile : true - -# OpenSSL certificate configuration -# Keys are typically stored in the resin configuration directory. -# openssl_file : keys/test.crt -# openssl_key : keys/test.key -# openssl_password : changeme - -# JSSE certificate configuration -# Keys are typically stored in the resin configuration directory. -# jsse_keystore_type : jks -# jsse_keystore_file : /etc/resin/keys/server.keystore -# jsse_keystore_password : changeme - -# In absence of a signed certificate, Resin will fallback to using a -# self-signed development certificate if HTTPS is enabled - -# Enable the proxy-cache - for caching static content in memory -proxy_cache_enable : true - -# Sets the proxy cache memory size -# proxy_cache_size : 256m - -# Enable clustered persistent sessions (for failover) -session_store : true - -# disable the quercus *.php mapping when using Apache for PHP -# quercus_disable : true - -# Web-apps named with numeric suffixes, e.g. foo-10.0.war and can be browsed -# as /foo. When a new version of the web-app is deployed, Resin continues -# to route active session requests to the previous web-app version while -# new sessions go to the new version, so users will not be aware of the -# application upgrade. -# webapp_multiversion_routing : true - -# Set the email address to receive weekly and restart PDF reports -# email : admin@example.com - -# Set a global password to prevent foreign Resin instances from connecting. -# Must be identical between web, app, and cache clusters. -# cluster_system_key : changeme - -# Enable remote admin (for remote CLI and for EC2 ext: triad discovery) -# remote_admin_enable : true - -# Enable /resin-admin web administration console -web_admin_enable : false -web_admin_host : - -# Permit access to /resin-admin from non-local network ip-addresses -# web_admin_external : true - -# Require HTTPS to access /resin-admin -# web_admin_ssl : true - -# Enable Resin REST Admin -# rest_admin_enable : true - -# Require SSL for REST Admin -# rest_admin_ssl : true - -# Access to /resin-admin and remote CLI is password restricted. -# Use "resinctl generate-password" and copy/paste here to set the admin -# admin_user : admin -# admin_password : {SSHA}xxxxxxxx - -# Enable reading EC2 user data as resin properties -# properties_import_url : http://169.254.169.254/latest/user-data diff --git a/toolset/setup/linux/webservers/resin/resin.sh b/toolset/setup/linux/webservers/resin/resin.sh deleted file mode 100644 index 3a4302f3b70..00000000000 --- a/toolset/setup/linux/webservers/resin/resin.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -fw_depends java - -fw_installed resin && return 0 - -RESIN_VERSION=4.0.55 -RESIN_HOME=$IROOT/resin/resin-$RESIN_VERSION - -mkdir resin -cd resin -fw_get -O http://www.caucho.com/download/resin-$RESIN_VERSION.tar.gz -fw_untar resin-$RESIN_VERSION.tar.gz -cd resin-$RESIN_VERSION -./configure --prefix=`pwd` -make -make install - -mv conf/resin.properties conf/resin.properties.orig -cat $FWROOT/toolset/setup/linux/webservers/resin/resin.properties > conf/resin.properties - -mv conf/resin.xml conf/resin.xml.orig -cat $FWROOT/toolset/setup/linux/webservers/resin/resin.xml > conf/resin.xml - -echo "export RESIN_HOME=${RESIN_HOME}" > $IROOT/resin.installed -echo -e "export PATH=\$RESIN_HOME/bin:\$PATH" >> $IROOT/resin.installed - -source $IROOT/resin.installed diff --git a/toolset/setup/linux/webservers/resin/resin.xml b/toolset/setup/linux/webservers/resin/resin.xml deleted file mode 100644 index 235d0f10f8d..00000000000 --- a/toolset/setup/linux/webservers/resin/resin.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - -Xms1g - -Xmx1g - - - - - - - - - - \ No newline at end of file diff --git a/toolset/setup/scaffolding/setup.sh b/toolset/setup/scaffolding/setup.sh index b3b0fecdd10..af775592448 100755 --- a/toolset/setup/scaffolding/setup.sh +++ b/toolset/setup/scaffolding/setup.sh @@ -19,7 +19,7 @@ # Three HOST entries are provided to this script: # -# TFB-database = The IP address of the database +# tfb-database = The IP address of the database # TFB-client = The IP address of the client making the HTTP requests # TFB-server = The IP address of this machine servicing HTTP requests # diff --git a/toolset/setup/scaffolding/setup_mysql.sh b/toolset/setup/scaffolding/setup_mysql.sh index b3b0fecdd10..af775592448 100755 --- a/toolset/setup/scaffolding/setup_mysql.sh +++ b/toolset/setup/scaffolding/setup_mysql.sh @@ -19,7 +19,7 @@ # Three HOST entries are provided to this script: # -# TFB-database = The IP address of the database +# tfb-database = The IP address of the database # TFB-client = The IP address of the client making the HTTP requests # TFB-server = The IP address of this machine servicing HTTP requests # diff --git a/toolset/setup/sqlserver/setup-sqlserver-bootstrap.ps1 b/toolset/setup/sqlserver/setup-sqlserver-bootstrap.ps1 deleted file mode 100644 index 5df879a4254..00000000000 --- a/toolset/setup/sqlserver/setup-sqlserver-bootstrap.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -# To download and run this script, open an elevated Command Prompt and then run: -# -# powershell -ExecutionPolicy Bypass -Command "iex (New-Object Net.WebClient).DownloadString('https://raw.github.com/TechEmpower/FrameworkBenchmarks/master/toolset/setup/sqlserver/setup-sqlserver-bootstrap.ps1')" - -$basedir = "C:\FrameworkBenchmarks" -$rawRepo = "https://raw.github.com/TechEmpower/FrameworkBenchmarks/master" - -$config_url = $rawRepo + "/config" -$config_local = $basedir + "\config" -$setup_sqlserver_url = $rawRepo + "/toolset/setup/sqlserver/setup-sqlserver.ps1" -$setup_sqlserver_local = $basedir + "\setup-sqlserver.ps1" -$create_sqlserver_login_and_database_url = $config_url + "/create-sqlserver-login-and-database.sql" -$create_sqlserver_login_and_database_local = $config_local + "/create-sqlserver-login-and-database.sql" -$create_sqlserver_url = $config_url + "/create-sqlserver.sql" -$create_sqlserver_local = $config_local + "/create-sqlserver.sql" - -Write-Host "Creating directory: $config_local`n" -New-Item -Path $config_local -Type Directory -Force | Out-Null - -Write-Host "Downloading setup files...`n" -(New-Object System.Net.WebClient).DownloadFile($setup_sqlserver_url, $setup_sqlserver_local) -(New-Object System.Net.WebClient).DownloadFile($create_sqlserver_login_and_database_url, $create_sqlserver_login_and_database_local) -(New-Object System.Net.WebClient).DownloadFile($create_sqlserver_url, $create_sqlserver_local) - -powershell -ExecutionPolicy Bypass -File $setup_sqlserver_local diff --git a/toolset/setup/sqlserver/setup-sqlserver.ps1 b/toolset/setup/sqlserver/setup-sqlserver.ps1 deleted file mode 100644 index 299ebb1ba42..00000000000 --- a/toolset/setup/sqlserver/setup-sqlserver.ps1 +++ /dev/null @@ -1,91 +0,0 @@ -# This script downloads and installs SQL Server and opens it on port 1433. -# -# To run this script, run an elevated Command Prompt and enter: -# -# powershell -ExecutionPolicy Bypass -File - -$basedir = "C:\FrameworkBenchmarks" -$workdir = "$basedir\installs" -New-Item -Path $workdir -Type directory -Force | Out-Null - -If (-Not (Get-Service | ? Name -Eq "MSSQLSERVER")) { - - Write-Host "Could not find default SQL Server instance, MSSQLSERVER." - Write-Host "Downloading SQL Server (several GBs)..." - - # URLs from http://www.microsoft.com/en-us/download/details.aspx?id=35575 - - $sqlserver_exe_url = "http://download.microsoft.com/download/3/B/D/3BD9DD65-D3E3-43C3-BB50-0ED850A82AD5/SQLServer2012SP1-FullSlipstream-x64-ENU.exe" - $sqlserver_exe_local = "$workdir\SQLServer2012SP1-FullSlipstream-x64-ENU.exe" - (New-Object System.Net.WebClient).DownloadFile($sqlserver_exe_url, $sqlserver_exe_local) - - $sqlserver_box_url = "http://download.microsoft.com/download/3/B/D/3BD9DD65-D3E3-43C3-BB50-0ED850A82AD5/SQLServer2012SP1-FullSlipstream-x64-ENU.box" - $sqlserver_box_local = "$workdir\SQLServer2012SP1-FullSlipstream-x64-ENU.box" - (New-Object System.Net.WebClient).DownloadFile($sqlserver_box_url, $sqlserver_box_local) - - Write-Host "Installing SQL Server..." - - # Install only the SQL Server database engine. - # Use a default instance name. - # Make %COMPUTERNAME%\Administrators have administrative rights. - - # The following is not used because this is done in PowerShell below. - # /securitymode=SQL /sapwd=S3cr3tS3cr3t /TCPENABLED=1 - # Allow Windows Authentication or old-style SQL authentication. - # The password of the sa account is specified. - # SQL Server will be listening on TCP port 1433. - # - Start-Process "$sqlserver_exe_local" "/q /action=install /features=SQLEngine /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS=Administrators /IACCEPTSQLSERVERLICENSETERMS" -Wait -} - -# In case we just installed SQL Server and the environment variables haven't been refreshed, manually -# refresh PSModulePath so that Import-Module sqlps will work. - -$env:PSModulePath = [Environment]::GetEnvironmentVariable("PSModulePath", [System.EnvironmentVariableTarget]::Machine) - -Import-Module sqlps - -Write-Host "Setting SQL Server to start on boot..." - -Set-Service MSSQLSERVER -StartupType Automatic - -Write-Host "Ensuring that SQL Server is started..." - -Start-Service MSSQLSERVER - -Write-Host "Enabling SQL authentication..." - -# Enable SQL authentication -$s = New-Object ('Microsoft.SqlServer.Management.Smo.Server') -$s.Settings.LoginMode = [Microsoft.SqlServer.Management.SMO.ServerLoginMode]::Mixed -$s.Alter() - -Write-Host "Configuring SQL Server to listen on TCP (default port 1433)..." - -# Enable the TCP protocol on the default instance. -$wmi = New-Object ('Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer') -$uri = "ManagedComputer[@Name='" + (Get-Content env:computername) + "']/ ServerInstance[@Name='MSSQLSERVER']/ServerProtocol[@Name='Tcp']" -$Tcp = $wmi.GetSmoObject($uri) -$Tcp.IsEnabled = $true -$Tcp.Alter() - -Write-Host "Restarting SQL Server..." - -Restart-Service -Name MSSQLSERVER - -If (-Not (Get-NetFirewallPortFilter | ? LocalPort -Eq "1433")) { - Write-Host "Opening port 1433 in firewall..." - New-NetFirewallRule -DisplayName "SQL 1433" -Action Allow -Direction Inbound -LocalPort 1433 -Protocol TCP | Out-Null -} else { - Write-Host "Port 1433 is already configured in firewall." -} - -Write-Host "Creating SQL Server login and populated database..." - -# Connect with Windows Authentication, assuming that we have access. -Invoke-Sqlcmd -InputFile "$basedir\config\create-sqlserver-login-and-database.sql" -OutputSqlErrors $True -QueryTimeout 180 - -# Now that benchmarkdbuser has been created, we can connect with those credentials. -Invoke-Sqlcmd -Username benchmarkdbuser -Password B3nchmarkDBPass -Database hello_world -InputFile "$basedir\config\create-sqlserver.sql" -OutputSqlErrors $True -QueryTimeout 180 - -Write-Host "Done." diff --git a/toolset/setup/windows/databases/sqlserver/create-sqlserver-login-and-database.sql b/toolset/setup/windows/databases/sqlserver/create-sqlserver-login-and-database.sql deleted file mode 100644 index 700b7c6f4b0..00000000000 --- a/toolset/setup/windows/databases/sqlserver/create-sqlserver-login-and-database.sql +++ /dev/null @@ -1,28 +0,0 @@ --- This SQL Server T-SQL script creates the database user and hello_world database. --- --- To run this script, login to an administrator account in Windows, open a command prompt and run: --- --- "%ProgramFiles%\Microsoft SQL Server\110\Tools\binn\sqlcmd.exe" -i --- - -IF EXISTS (SELECT * FROM sys.server_principals WHERE name = 'benchmarkdbuser') - DROP LOGIN benchmarkdbuser -GO - --- This password has mixed-case and a number to satisfy the Windows password policy -CREATE LOGIN benchmarkdbuser WITH PASSWORD = 'B3nchmarkDBPass' -GO - -IF EXISTS(SELECT * FROM SYS.DATABASES WHERE NAME='hello_world') - DROP DATABASE hello_world -GO - -CREATE DATABASE hello_world -GO -USE hello_world -GO - --- Give this user total power over the database -CREATE USER benchmarkdbuser FOR LOGIN benchmarkdbuser -EXEC sp_addrolemember 'db_owner', 'benchmarkdbuser' -GO diff --git a/toolset/setup/windows/databases/sqlserver/create-sqlserver.sql b/toolset/setup/windows/databases/sqlserver/create-sqlserver.sql deleted file mode 100644 index 9b53168183c..00000000000 --- a/toolset/setup/windows/databases/sqlserver/create-sqlserver.sql +++ /dev/null @@ -1,55 +0,0 @@ --- This SQL Server T-SQL script creates and populates the World and Fortune tables. --- --- To run this script, make sure that you've already run create-sqlserver-login-and-database.sql --- to create the database user and database, then open a command prompt and run: --- --- "%ProgramFiles%\Microsoft SQL Server\110\Tools\binn\sqlcmd.exe" -U benchmarkdbuser -P B3nchmarkDBPass -d hello_world -i - -IF OBJECT_ID('World', 'U') IS NOT NULL - DROP TABLE World -GO - -CREATE TABLE World ( - id int NOT NULL IDENTITY PRIMARY KEY, - randomNumber int NOT NULL default 0 -) -GO - --- Populate World table -DECLARE @RowCount INT -DECLARE @Random INT -SET @RowCount = 0 - -WHILE @RowCount < 10000 -BEGIN - SELECT @Random = ((10000 + 1) - 1) * RAND() + 1 - INSERT INTO World (randomNumber) VALUES (@Random) - SET @RowCount = @RowCount + 1 -END - -GO - -IF OBJECT_ID('Fortune', 'U') IS NOT NULL - DROP TABLE Fortune -GO - --- Note that this uses nvarchar to make sure that the column is Unicode. -CREATE TABLE Fortune ( - id int NOT NULL IDENTITY PRIMARY KEY, - message nvarchar(2048) NOT NULL -) -GO - -INSERT INTO Fortune (message) VALUES (N'fortune: No such file or directory'); -INSERT INTO Fortune (message) VALUES (N'A computer scientist is someone who fixes things that aren''t broken.'); -INSERT INTO Fortune (message) VALUES (N'After enough decimal places, nobody gives a damn.'); -INSERT INTO Fortune (message) VALUES (N'A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1'); -INSERT INTO Fortune (message) VALUES (N'A computer program does what you tell it to do, not what you want it to do.'); -INSERT INTO Fortune (message) VALUES (N'Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen'); -INSERT INTO Fortune (message) VALUES (N'Any program that runs right is obsolete.'); -INSERT INTO Fortune (message) VALUES (N'A list is only as strong as its weakest link. — Donald Knuth'); -INSERT INTO Fortune (message) VALUES (N'Feature: A bug with seniority.'); -INSERT INTO Fortune (message) VALUES (N'Computers make very fast, very accurate mistakes.'); -INSERT INTO Fortune (message) VALUES (N''); -INSERT INTO Fortune (message) VALUES (N'フレームワークのベンチマーク'); -GO diff --git a/toolset/setup/windows/installer-bootstrap.ps1 b/toolset/setup/windows/installer-bootstrap.ps1 deleted file mode 100644 index 3a5a19e906b..00000000000 --- a/toolset/setup/windows/installer-bootstrap.ps1 +++ /dev/null @@ -1,42 +0,0 @@ -param($noexit) - -if (!$noexit) { - Write-Host "`nRestarting PowerShell with -NoExit...`n" - powershell -NoExit -File $MyInvocation.MyCommand.Path 1 - return -} - -$basedir = "C:\FrameworkBenchmarks" -$workdir = $basedir + "\installs" - -$repo = "https://github.com/TechEmpower/FrameworkBenchmarks" -$installer = $basedir + "\toolset\setup\windows\installer.ps1" - -$git = "C:\Git\bin\git.exe" -$gitinstaller_file = "Git-1.8.1.2-preview20130201.exe" -$gitinstaller_url = "https://msysgit.googlecode.com/files/" + $gitinstaller_file -$gitinstaller_local = $workdir + "\" + $gitinstaller_file - -Write-Host "Creating work directory: $workdir `n" -New-Item -Path $workdir -Type Directory -Force | Out-Null - -Write-Host "Downloading git...`n" -(New-Object System.Net.WebClient).DownloadFile($gitinstaller_url, $gitinstaller_local) - -Write-Host "Installing git...`n" -Start-Process $gitinstaller_local '/silent /dir="C:\Git"' -Wait -$env:Path += ";C:\Git\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -Write-Host "Removing git installation files...`n" -Remove-Item -Recurse -Force $basedir - -if (-not (Test-Path $basedir)) -{ - Write-Host "Downloading FrameworkBenchmarks from git...`n" - &$git "clone" $repo $basedir | Out-Host -} - - -Write-Host "`nLaunching installer...`n" -Set-ExecutionPolicy -ExecutionPolicy Bypass -ErrorAction 'SilentlyContinue' -powershell -NoExit -File $installer diff --git a/toolset/setup/windows/installer.ps1 b/toolset/setup/windows/installer.ps1 deleted file mode 100644 index 78841760ea2..00000000000 --- a/toolset/setup/windows/installer.ps1 +++ /dev/null @@ -1,352 +0,0 @@ -# -# Versions of software (will need to be updated from time to time) -# - -$node_installer_file = "node-v0.10.13-x64.msi" -$node_installer_path = "v0.10.13/x64/$node_installer_file" -$python_installer_file = "python-2.7.5.amd64.msi" -$python_installer_path = "2.7.5/$python_installer_file" -$python_version = "27" -$wincache_installer_file = "wincache-1.3.4-5.4-nts-vc9-x86.exe" -$wincache_installer_path = "wincache-1.3.4/$wincache_installer_file" -$go_installer_file = "go1.2.windows-amd64.msi" -$jre_installer_file = "jdk-7u65-windows-x64.exe" -$jdk_installer_file = "jdk-7u65-windows-x64.exe" -$jdk_master_hash = "f0270817998c7408b24a2dd9ac420346" -# http://www.oracle.com/technetwork/java/javase/downloads/java-se-binaries-checksum-1956892.html -$resin_version = "resin-4.0.41" -$resin_installer_file = "$resin_version.zip" -$ant_version = "apache-ant-1.9.2" -$ant_installer_file = "$ant_version-bin.zip" -$maven_version = "apache-maven-3.0.5" -$maven_installer_file = "$maven_version-bin.zip" -$maven_installer_path = "maven-3/3.0.5/binaries/$maven_installer_file" -$scala_version = "2.10.2" -$play_version = "2.2.0" -$play_installer_file = "play-$play_version.zip" -$sbt_version = "0.13.5" -$mercurial_installer_file = "mercurial-2.6.1-x64.msi" -$cygwin_installer_file = "setup-x86_64.exe" - - -$basedir = "C:\FrameworkBenchmarks" -$workdir = "$basedir\installs" -New-Item -Path $workdir -Type directory -Force | Out-Null - -function GetMd5FileHash($fileName) { - [Reflection.Assembly]::LoadWithPartialName("System.Security") | out-null - $md5 = [System.Security.Cryptography.MD5]::Create() - - $file = [System.IO.File]::OpenRead($fileName) - $hash = $md5.ComputeHash($file) - $file.Dispose() - - $sb = New-Object System.Text.StringBuilder - $hash | % { [Void]$sb.Append($_.ToString("x2")) } - $sb.ToString() -} - -# -# Chocolatey package manager -# -Write-Host "Installing Chocolatey package manager" -Invoke-Expression ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) - -# -# ASP.NET -# -Write-Host "Installing IIS, .NET and ASP.NET..." - -# Enable Windows Update to get rid of the yellow warnings -# But this is not strictly neccessary -$Updates = (New-Object -ComObject "Microsoft.Update.AutoUpdate").Settings -$Updates.NotificationLevel = 2 # Notify before download -$Updates.Save() -$Updates.Refresh() - -Install-WindowsFeature Web-Server -Install-WindowsFeature Web-Mgmt-Console -Install-WindowsFeature NET-Framework-45-ASPNET -Install-WindowsFeature Web-Asp-Net45 - -$env:Path += ";C:\Windows\system32\inetsrv"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) -# Optimize performance -appcmd set config -section:httpProtocol /allowKeepAlive:true | Out-Null -appcmd set config -section:httpLogging /dontLog:True | Out-Null -# Enable detailed error pages -#appcmd set config -section:system.webServer/httpErrors -errorMode:Detailed | Out-Null -# Increase queue length for DefaultAppPool to avoid HTTP 503 errors coming from HTTP.SYS -appcmd set apppool DefaultAppPool /queueLength:65535 -# Increase appConcurrentRequestLimit to avoid HTTP 503.2 errors from IIS http://support.microsoft.com/kb/943891 -appcmd set config -section:system.webServer/serverRuntime /appConcurrentRequestLimit:65535 - -# URL Rewrite -$rewrite_url = "http://download.microsoft.com/download/6/7/D/67D80164-7DD0-48AF-86E3-DE7A182D6815/rewrite_2.0_rtw_x64.msi" -$rewrite_local = "$workdir\rewrite_2.0_rtw_x64.msi" -(New-Object System.Net.WebClient).DownloadFile($rewrite_url, $rewrite_local) -Start-Process "msiexec" "/i $rewrite_local /passive" -Wait - -# -# Tools for building .NET projects on the server -# -Write-Host "`nInstalling .NET build tools...`n" - -# .NET Framework 4.5 SDK -$sdktools_url = "http://download.microsoft.com/download/F/1/3/F1300C9C-A120-4341-90DF-8A52509B23AC/standalonesdk/sdksetup.exe" -$sdktools_local = "$workdir\sdksetup.exe" -(New-Object System.Net.WebClient).DownloadFile($sdktools_url, $sdktools_local) -Start-Process "$workdir\sdksetup.exe" "/features OptionId.NetFxSoftwareDevelopmentKit /q /layout $workdir\sdksetup" -Wait -Start-Process "msiexec" "/i $workdir\sdksetup\Redistributable\4.5.50710\sdk_tools4.msi VSEXTUI=1" -Wait - -# Web Deploy 3.0 -$webdeploy_url = "http://download.microsoft.com/download/1/B/3/1B3F8377-CFE1-4B40-8402-AE1FC6A0A8C3/WebDeploy_amd64_en-US.msi" -$webdeploy_local = "$workdir\WebDeploy_amd64_en-US.msi" -(New-Object System.Net.WebClient).DownloadFile($webdeploy_url, $webdeploy_local) -Start-Process "msiexec" "/i $webdeploy_local /passive" -Wait - -# -# node.js -# -Write-Host "Installing node.js...`n" -$node_installer_url = "http://nodejs.org/dist/$node_installer_path" -$node_installer_local = "$workdir\$node_installer_file" -(New-Object System.Net.WebClient).DownloadFile($node_installer_url, $node_installer_local) - -Start-Process $node_installer_local '/passive' -Wait -$env:Path += ";C:\Program Files\nodejs"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# -# Python -# -Write-Host "Installing Python...`n" -$python_installer_url = "http://www.python.org/ftp/python/$python_installer_path" -$python_installer_local = "$workdir\$python_installer_file" -(New-Object System.Net.WebClient).DownloadFile($python_installer_url, $python_installer_local) - -Start-Process $python_installer_local '/passive' -Wait -$env:Path += ";C:\Python$python_version"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# -# PHP -# -Write-Host "Installing PHP..." - -# Locate current PHP 5.4 release -Write-Host "Looking for current PHP 5.4 release" -$php_download_page_url = 'http://windows.php.net/download/' -$php_download_page_file = [IO.Path]::GetTempFileName() -Write-Host "Downloading from $php_download_page_url into $php_download_page_file" -Try { - (New-Object System.Net.WebClient).DownloadFile($php_download_page_url, $php_download_page_file) -} Catch { - Write-Host "ERROR: Could not download from $php_download_page_url." - Write-Host $_.Exception.Message - Exit 1 -} -$file = (cat $php_download_page_file) -join "" -if ($file -match '(?s)h4 id="php-5.4-nts-VC9-x86".*?href="/downloads/releases/(.*?)">Zip') { - $php_installer_file = $matches[1] - $php_installer_url = "http://windows.php.net/downloads/releases/$php_installer_file" - Write-Host "Current PHP 5.4 release found at $php_installer_url" -} -else { - Write-Host "ERROR: Current PHP release was not found. Aborting." - Exit 1 -} - -# Download PHP -$php_installer_local = "$workdir\$php_installer_file" -Try { - (New-Object System.Net.WebClient).DownloadFile($php_installer_url, $php_installer_local) -} Catch { - Write-Host "ERROR: Could not download from $php_installer_url. " - Write-Host $_.Exception.Message - Exit 1 -} - -# Install PHP -$php = "C:\PHP" -[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null -[System.IO.Compression.ZipFile]::ExtractToDirectory($php_installer_local, $php) | Out-Null -$env:Path += ";" + $php; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# php.ini -$phpini = "$php\php.ini" -Copy-Item "$php\php.ini-production" $phpini -(Get-Content $phpini) -Replace ";date.timezone =", "date.timezone = UTC" | Set-Content $phpini -(Get-Content $phpini) -Replace "short_open_tag = Off", "short_open_tag = On" | Set-Content $phpini -(Get-Content $phpini) -Replace "display_errors = Off", "display_errors = Off" | Set-Content $phpini -(Get-Content $phpini) -Replace "log_errors = On", "log_errors = Off" | Set-Content $phpini -(Get-Content $phpini) -Replace "output_buffering = 4096", "output_buffering = Off" | Set-Content $phpini -(Get-Content $phpini) -Replace ";cgi.force_redirect = 1", "cgi.force_redirect = 0" | Set-Content $phpini -(Get-Content $phpini) -Replace ";fastcgi.impersonate = 1", "fastcgi.impersonate = 0" | Set-Content $phpini -(Get-Content $phpini) -Replace ";fastcgi.logging = 0", "fastcgi.logging = 0" | Set-Content $phpini -(Get-Content $phpini) -Replace '; extension_dir = "./"', "extension_dir = `"$php\ext`"" | Set-Content $phpini -(Get-Content $phpini) -Replace ";extension=", "extension=" | Set-Content $phpini -(Get-Content $phpini) -Replace "extension=php_(interbase|oci8|oci8_11g|firebird|oci|pspell|sybase_ct|zip|pdo_firebird|pdo_oci|snmp).dll.*", "" | Set-Content $phpini - -# IIS with PHP via FastCGI -Install-WindowsFeature Web-CGI | Out-Null -appcmd set config -section:system.webServer/fastCgi /+"[fullPath='C:\PHP\php-cgi.exe', arguments='', maxInstances='0', instanceMaxRequests='10000', queueLength='1000', rapidFailsPerMinute='10', idleTimeout='300', activityTimeout='30', requestTimeout='90', protocol='NamedPipe', flushNamedPipe='False']" /commit:apphost | Out-Null -appcmd set config -section:system.webServer/fastCgi /+"[fullPath='C:\PHP\php-cgi.exe'].environmentVariables.[name='PHPRC', value='C:\PHP\php.ini']" /commit:apphost | Out-Null -appcmd set config -section:system.webServer/handlers /+"[name='PHP FastCGI', path='*.php', modules='FastCgiModule', verb='*', scriptProcessor='C:\PHP\php-cgi.exe', resourceType='File', requireAccess='Script']" /commit:apphost | Out-Null - -# phpinfo() test file -Set-Content "c:\inetpub\wwwroot\phpinfo.php" "" - -# wincache -$wincache_url = "http://heanet.dl.sourceforge.net/project/wincache/$wincache_installer_path" -$wincache_local = "$workdir\$wincache_installer_file" -(New-Object System.Net.WebClient).DownloadFile($wincache_url, $wincache_local) -Start-Process $wincache_local "/q /T:$php\ext" -Wait -Move-Item "$php\ext\wincache*" "c:\inetpub\wwwroot" -Set-ItemProperty "c:\inetpub\wwwroot\wincache.php" -name IsReadOnly -value $false -(Get-Content "c:\inetpub\wwwroot\wincache.php") -Replace "'USE_AUTHENTICATION', 1", "'USE_AUTHENTICATION', 0" | Set-Content "c:\inetpub\wwwroot\wincache.php" -Add-Content $phpini "`n`n[PHP]`n" -Add-Content $phpini "extension=php_wincache.dll" - -# composer -$composer_url = "https://getcomposer.org/Composer-Setup.exe" -$composer_local = "$workdir\Composer-Setup.exe" -(New-Object System.Net.WebClient).DownloadFile($composer_url, $composer_local) -Start-Process $composer_local "/silent" -Wait -$env:Path += ";C:\ProgramData\Composer\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -Write-Host "" - -# -# Go -# -Write-Host "Installing Go...`n" -$go_url = "http://go.googlecode.com/files/$go_installer_file" -$go_local = "$workdir\$go_installer_file" -(New-Object System.Net.WebClient).DownloadFile($go_url, $go_local) -Start-Process $go_local "/passive" -Wait -$env:Path += ";C:\Go\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# -# Java -# -Write-Host "Installing Java...`n" - -# jre -#Write-Host "Installing JRE...`n" -#$jre_url = "http://img.cs.montana.edu/windows/$jre_installer_file" -#$jre_local = "$workdir\$jre_installer_file" -#$jre_dir = "C:\Java\jre" -#(New-Object System.Net.WebClient).DownloadFile($jre_url, $jre_local) -#Start-Process $jre_local "/s INSTALLDIR=$jre_dir" -Wait -#$env:Path += ";$jre_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) -#$env:JAVA_HOME = $jre_dir; [Environment]::SetEnvironmentVariable("JAVA_HOME", $jre_dir, [System.EnvironmentVariableTarget]::Machine) - -# jdk -Write-Host "Installing JDK...`n" -$jdk_url = "http://ghaffarian.net/downloads/Java/JDK/$jdk_installer_file" -$jdk_local = "$workdir\$jdk_installer_file" -$jdk_dir = "C:\Java\jdk" -(New-Object System.Net.WebClient).DownloadFile($jdk_url, $jdk_local) - -$jdk_local_hash = GetMd5FileHash($jdk_local) -if ($jdk_master_hash -ne $jdk_local_hash) -{ - Write-Host $jdk_master_hash - Write-Host $jdk_local_hash - Write-Host "JDK file checksum mismatch. Aborting!" - Exit 1 -} - -Start-Process $jdk_local "/s INSTALLDIR=$jdk_dir" -Wait -$env:Path += ";$jdk_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) -$env:JAVA_HOME = $jdk_dir; [Environment]::SetEnvironmentVariable("JAVA_HOME", $jdk_dir, [System.EnvironmentVariableTarget]::Machine) - -# resin -Write-Host "Installing Resin...`n" -$resin_url = "http://www.caucho.com/download/$resin_installer_file" -$resin_local = "$workdir\$resin_installer_file" -$resin_dir = "C:\Java\resin" -(New-Object System.Net.WebClient).DownloadFile($resin_url, $resin_local) -[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null -[System.IO.Compression.ZipFile]::ExtractToDirectory($resin_local, $workdir) | Out-Null -Move-Item "$workdir\$resin_version" $resin_dir -Copy-Item "$basedir\config\resin.properties" "$resin_dir\conf\resin.properties" -[Environment]::SetEnvironmentVariable("RESIN_HOME", $resin_dir, [System.EnvironmentVariableTarget]::Machine) -#$env:Path += ";$resin_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# ant -#Write-Host "Installing Ant...`n" -#$ant_url = "http://apache.mirrors.hoobly.com//ant/binaries/$ant_installer_file" -#$ant_local = "$workdir\$ant_installer_file" -#$ant_dir = "C:\Java\ant" -#(New-Object System.Net.WebClient).DownloadFile($ant_url, $ant_local) -#[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null -#[System.IO.Compression.ZipFile]::ExtractToDirectory($ant_local, $workdir) | Out-Null -#Move-Item "$workdir\$ant_version" $ant_dir -#$env:Path += ";$ant_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# maven -Write-Host "Installing Maven...`n" -$maven_url = "http://mirror.cc.columbia.edu/pub/software/apache/maven/$maven_installer_path" -$maven_local = "$workdir\$maven_installer_file" -$maven_dir = "C:\Java\maven" -(New-Object System.Net.WebClient).DownloadFile($maven_url, $maven_local) -[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null -[System.IO.Compression.ZipFile]::ExtractToDirectory($maven_local, $workdir) | Out-Null -Move-Item "$workdir\$maven_version" $maven_dir -$env:Path += ";$maven_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# scala -cinst scala -version $scala_version - -# play -$play_url = "http://downloads.typesafe.com/play/$play_version/$play_installer_file" -$play_local = "$workdir\$play_installer_file" -$play_dir = "C:\Java\play" -(New-Object System.Net.WebClient).DownloadFile($play_url, $play_local) -[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null -[System.IO.Compression.ZipFile]::ExtractToDirectory($play_local, $workdir) | Out-Null -Move-Item "$workdir\play-$play_version" $play_dir -$env:Path += ";$play_dir"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# sbt -$sbt_installer_file = "sbt-$sbt_version.zip" -$sbt_url = "http://dl.bintray.com/sbt/native-packages/sbt/$sbt_version/$sbt_installer_file" -$sbt_local = "$workdir\$sbt_installer_file" -$sbt_dir = "C:\Java\sbt" -(New-Object System.Net.WebClient).DownloadFile($sbt_url, $sbt_local) -[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null -[System.IO.Compression.ZipFile]::ExtractToDirectory($sbt_local, $workdir) | Out-Null -Move-Item "$workdir\sbt" $sbt_dir -$env:Path += ";$sbt_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# -# Firewall -# -Write-Host "Configuring firewall...`n" -New-NetFirewallRule -DisplayName "HTTP 8080" -Action Allow -Direction Inbound -LocalPort 8080 -Protocol TCP | Out-Null - -# -# Mercurial -# -Write-Host "Installing Mercurial...`n" -$hg_installer_url = "https://bitbucket.org/tortoisehg/files/downloads/$mercurial_installer_file" -$hg_installer_local = "$workdir\$mercurial_installer_file" -(New-Object System.Net.WebClient).DownloadFile($hg_installer_url, $hg_installer_local) - -Start-Process $hg_installer_local '/passive' -Wait -$env:Path += ";C:\Program Files\Mercurial"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# -# Cygwin (including sftp) -# -Write-Host "Installing Cygwin...`n" -$cygwin_installer_url = "http://cygwin.com/$cygwin_installer_file" -$cygwin_installer_dir = $workdir + "\cygwin-installer" -New-Item -Path $cygwin_installer_dir -Type directory -Force | Out-Null -$cygwin_installer_local = "$cygwin_installer_dir\$cygwin_installer_file" -(New-Object System.Net.WebClient).DownloadFile($cygwin_installer_url, $cygwin_installer_local) - -$cygwin_install_dir = "C:\Cygwin" -Start-Process $cygwin_installer_local "-q -n -l $cygwin_installer_dir -s http://mirrors.kernel.org/sourceware/cygwin/ -R $cygwin_install_dir -P openssh" -WorkingDirectory "$cygwin_installer_dir" -Wait -RedirectStandardOutput $cygwin_installer_dir\install.log -$env:Path += ";$cygwin_install_dir;$cygwin_install_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -cd $basedir diff --git a/toolset/setup/windows/installer.ps1~ b/toolset/setup/windows/installer.ps1~ deleted file mode 100644 index 59e31413638..00000000000 --- a/toolset/setup/windows/installer.ps1~ +++ /dev/null @@ -1,340 +0,0 @@ -# -# Versions of software (will need to be updated from time to time) -# - -$node_installer_file = "node-v0.10.13-x64.msi" -$node_installer_path = "v0.10.13/x64/$node_installer_file" -$python_installer_file = "python-2.7.5.amd64.msi" -$python_installer_path = "2.7.5/$python_installer_file" -$python_version = "27" -$wincache_installer_file = "wincache-1.3.4-5.4-nts-vc9-x86.exe" -$wincache_installer_path = "wincache-1.3.4/$wincache_installer_file" -$go_installer_file = "go1.2.windows-amd64.msi" -$jre_installer_file = "jre-7u25-windows-x64.exe" -$jdk_installer_file = "jdk-7u45-windows-x64.exe" -$jdk_master_hash = "943527ed9111cbb746d4ab2bb2c31cd6" -# https://www.oracle.com/technetwork/java/javase/downloads/java-se-binaries-checksum-1956892.html -$resin_version = "resin-4.0.36" -$resin_installer_file = "$resin_version.zip" -$ant_version = "apache-ant-1.9.2" -$ant_installer_file = "$ant_version-bin.zip" -$maven_version = "apache-maven-3.0.5" -$maven_installer_file = "$maven_version-bin.zip" -$maven_installer_path = "maven-3/3.0.5/binaries/$maven_installer_file" -$scala_version = "2.10.2" -$play_version = "2.2.0" -$play_installer_file = "play-$play_version.zip" -$mercurial_installer_file = "mercurial-2.6.1-x64.msi" -$cygwin_installer_file = "setup-x86_64.exe" - - -$basedir = "C:\FrameworkBenchmarks" -$workdir = "$basedir\installs" -New-Item -Path $workdir -Type directory -Force | Out-Null - -function GetMd5FileHash($fileName) { - [Reflection.Assembly]::LoadWithPartialName("System.Security") | out-null - $md5 = [System.Security.Cryptography.MD5]::Create() - - $file = [System.IO.File]::OpenRead($fileName) - $hash = $md5.ComputeHash($file) - $file.Dispose() - - $sb = New-Object System.Text.StringBuilder - $hash | % { [Void]$sb.Append($_.ToString("x2")) } - $sb.ToString() -} - -# -# Chocolatey package manager -# -Write-Host "Installing Chocolatey package manager" -Invoke-Expression ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) - -# -# ASP.NET -# -Write-Host "Installing IIS, .NET and ASP.NET..." - -# Enable Windows Update to get rid of the yellow warnings -# But this is not strictly neccessary -$Updates = (New-Object -ComObject "Microsoft.Update.AutoUpdate").Settings -$Updates.NotificationLevel = 2 # Notify before download -$Updates.Save() -$Updates.Refresh() - -Install-WindowsFeature Web-Server -Install-WindowsFeature Web-Mgmt-Console -Install-WindowsFeature NET-Framework-45-ASPNET -Install-WindowsFeature Web-Asp-Net45 - -$env:Path += ";C:\Windows\system32\inetsrv"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) -# Optimize performance -appcmd set config -section:httpProtocol /allowKeepAlive:true | Out-Null -appcmd set config -section:httpLogging /dontLog:True | Out-Null -# Enable detailed error pages -#appcmd set config -section:system.webServer/httpErrors -errorMode:Detailed | Out-Null -# Increase queue length for DefaultAppPool to avoid HTTP 503 errors coming from HTTP.SYS -appcmd set apppool DefaultAppPool /queueLength:65535 -# Increase appConcurrentRequestLimit to avoid HTTP 503.2 errors from IIS http://support.microsoft.com/kb/943891 -appcmd set config -section:system.webServer/serverRuntime /appConcurrentRequestLimit:65535 - -# URL Rewrite -$rewrite_url = "http://download.microsoft.com/download/6/7/D/67D80164-7DD0-48AF-86E3-DE7A182D6815/rewrite_2.0_rtw_x64.msi" -$rewrite_local = "$workdir\rewrite_2.0_rtw_x64.msi" -(New-Object System.Net.WebClient).DownloadFile($rewrite_url, $rewrite_local) -Start-Process "msiexec" "/i $rewrite_local /passive" -Wait - -# -# Tools for building .NET projects on the server -# -Write-Host "`nInstalling .NET build tools...`n" - -# .NET Framework 4.5 SDK -$sdktools_url = "http://download.microsoft.com/download/F/1/3/F1300C9C-A120-4341-90DF-8A52509B23AC/standalonesdk/sdksetup.exe" -$sdktools_local = "$workdir\sdksetup.exe" -(New-Object System.Net.WebClient).DownloadFile($sdktools_url, $sdktools_local) -Start-Process "$workdir\sdksetup.exe" "/features OptionId.NetFxSoftwareDevelopmentKit /q /layout $workdir\sdksetup" -Wait -Start-Process "msiexec" "/i $workdir\sdksetup\Redistributable\4.5.50710\sdk_tools4.msi VSEXTUI=1" -Wait - -# Web Deploy 3.0 -$webdeploy_url = "http://download.microsoft.com/download/1/B/3/1B3F8377-CFE1-4B40-8402-AE1FC6A0A8C3/WebDeploy_amd64_en-US.msi" -$webdeploy_local = "$workdir\WebDeploy_amd64_en-US.msi" -(New-Object System.Net.WebClient).DownloadFile($webdeploy_url, $webdeploy_local) -Start-Process "msiexec" "/i $webdeploy_local /passive" -Wait - -# -# node.js -# -Write-Host "Installing node.js...`n" -$node_installer_url = "http://nodejs.org/dist/$node_installer_path" -$node_installer_local = "$workdir\$node_installer_file" -(New-Object System.Net.WebClient).DownloadFile($node_installer_url, $node_installer_local) - -Start-Process $node_installer_local '/passive' -Wait -$env:Path += ";C:\Program Files\nodejs"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# -# Python -# -Write-Host "Installing Python...`n" -$python_installer_url = "http://www.python.org/ftp/python/$python_installer_path" -$python_installer_local = "$workdir\$python_installer_file" -(New-Object System.Net.WebClient).DownloadFile($python_installer_url, $python_installer_local) - -Start-Process $python_installer_local '/passive' -Wait -$env:Path += ";C:\Python$python_version"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# -# PHP -# -Write-Host "Installing PHP..." - -# Locate current PHP 5.4 release -Write-Host "Looking for current PHP 5.4 release" -$php_download_page_url = 'http://windows.php.net/download/' -$php_download_page_file = [IO.Path]::GetTempFileName() -Write-Host "Downloading from $php_download_page_url into $php_download_page_file" -Try { - (New-Object System.Net.WebClient).DownloadFile($php_download_page_url, $php_download_page_file) -} Catch { - Write-Host "ERROR: Could not download from $php_download_page_url." - Write-Host $_.Exception.Message - Exit 1 -} -$file = (cat $php_download_page_file) -join "" -if ($file -match '(?s)h4 id="php-5.4-nts-VC9-x86".*?href="/downloads/releases/(.*?)">Zip') { - $php_installer_file = $matches[1] - $php_installer_url = "http://windows.php.net/downloads/releases/$php_installer_file" - Write-Host "Current PHP 5.4 release found at $php_installer_url" -} -else { - Write-Host "ERROR: Current PHP release was not found. Aborting." - Exit 1 -} - -# Download PHP -$php_installer_local = "$workdir\$php_installer_file" -Try { - (New-Object System.Net.WebClient).DownloadFile($php_installer_url, $php_installer_local) -} Catch { - Write-Host "ERROR: Could not download from $php_installer_url. " - Write-Host $_.Exception.Message - Exit 1 -} - -# Install PHP -$php = "C:\PHP" -[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null -[System.IO.Compression.ZipFile]::ExtractToDirectory($php_installer_local, $php) | Out-Null -$env:Path += ";" + $php; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# php.ini -$phpini = "$php\php.ini" -Copy-Item "$php\php.ini-production" $phpini -(Get-Content $phpini) -Replace ";date.timezone =", "date.timezone = UTC" | Set-Content $phpini -(Get-Content $phpini) -Replace "short_open_tag = Off", "short_open_tag = On" | Set-Content $phpini -(Get-Content $phpini) -Replace "display_errors = Off", "display_errors = Off" | Set-Content $phpini -(Get-Content $phpini) -Replace "log_errors = On", "log_errors = Off" | Set-Content $phpini -(Get-Content $phpini) -Replace "output_buffering = 4096", "output_buffering = Off" | Set-Content $phpini -(Get-Content $phpini) -Replace ";cgi.force_redirect = 1", "cgi.force_redirect = 0" | Set-Content $phpini -(Get-Content $phpini) -Replace ";fastcgi.impersonate = 1", "fastcgi.impersonate = 0" | Set-Content $phpini -(Get-Content $phpini) -Replace ";fastcgi.logging = 0", "fastcgi.logging = 0" | Set-Content $phpini -(Get-Content $phpini) -Replace '; extension_dir = "./"', "extension_dir = `"$php\ext`"" | Set-Content $phpini -(Get-Content $phpini) -Replace ";extension=", "extension=" | Set-Content $phpini -(Get-Content $phpini) -Replace "extension=php_(interbase|oci8|oci8_11g|firebird|oci|pspell|sybase_ct|zip|pdo_firebird|pdo_oci|snmp).dll.*", "" | Set-Content $phpini - -# IIS with PHP via FastCGI -Install-WindowsFeature Web-CGI | Out-Null -appcmd set config -section:system.webServer/fastCgi /+"[fullPath='C:\PHP\php-cgi.exe', arguments='', maxInstances='0', instanceMaxRequests='10000', queueLength='1000', rapidFailsPerMinute='10', idleTimeout='300', activityTimeout='30', requestTimeout='90', protocol='NamedPipe', flushNamedPipe='False']" /commit:apphost | Out-Null -appcmd set config -section:system.webServer/fastCgi /+"[fullPath='C:\PHP\php-cgi.exe'].environmentVariables.[name='PHPRC', value='C:\PHP\php.ini']" /commit:apphost | Out-Null -appcmd set config -section:system.webServer/handlers /+"[name='PHP FastCGI', path='*.php', modules='FastCgiModule', verb='*', scriptProcessor='C:\PHP\php-cgi.exe', resourceType='File', requireAccess='Script']" /commit:apphost | Out-Null - -# phpinfo() test file -Set-Content "c:\inetpub\wwwroot\phpinfo.php" "" - -# wincache -$wincache_url = "http://heanet.dl.sourceforge.net/project/wincache/$wincache_installer_path" -$wincache_local = "$workdir\$wincache_installer_file" -(New-Object System.Net.WebClient).DownloadFile($wincache_url, $wincache_local) -Start-Process $wincache_local "/q /T:$php\ext" -Wait -Move-Item "$php\ext\wincache*" "c:\inetpub\wwwroot" -Set-ItemProperty "c:\inetpub\wwwroot\wincache.php" -name IsReadOnly -value $false -(Get-Content "c:\inetpub\wwwroot\wincache.php") -Replace "'USE_AUTHENTICATION', 1", "'USE_AUTHENTICATION', 0" | Set-Content "c:\inetpub\wwwroot\wincache.php" -Add-Content $phpini "`n`n[PHP]`n" -Add-Content $phpini "extension=php_wincache.dll" - -# composer -$composer_url = "https://getcomposer.org/Composer-Setup.exe" -$composer_local = "$workdir\Composer-Setup.exe" -(New-Object System.Net.WebClient).DownloadFile($composer_url, $composer_local) -Start-Process $composer_local "/silent" -Wait -$env:Path += ";C:\ProgramData\Composer\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -Write-Host "" - -# -# Go -# -Write-Host "Installing Go...`n" -$go_url = "http://go.googlecode.com/files/$go_installer_file" -$go_local = "$workdir\$go_installer_file" -(New-Object System.Net.WebClient).DownloadFile($go_url, $go_local) -Start-Process $go_local "/passive" -Wait -$env:Path += ";C:\Go\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# -# Java -# -Write-Host "Installing Java...`n" - -# jre -#Write-Host "Installing JRE...`n" -#$jre_url = "http://img.cs.montana.edu/windows/$jre_installer_file" -#$jre_local = "$workdir\$jre_installer_file" -#$jre_dir = "C:\Java\jre" -#(New-Object System.Net.WebClient).DownloadFile($jre_url, $jre_local) -#Start-Process $jre_local "/s INSTALLDIR=$jre_dir" -Wait -#$env:Path += ";$jre_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) -#$env:JAVA_HOME = $jre_dir; [Environment]::SetEnvironmentVariable("JAVA_HOME", $jre_dir, [System.EnvironmentVariableTarget]::Machine) - -# jdk -Write-Host "Installing JDK...`n" -$jdk_url = "http://ghaffarian.net/downloads/Java/JDK/$jdk_installer_file" -$jdk_local = "$workdir\$jdk_installer_file" -$jdk_dir = "C:\Java\jdk" -(New-Object System.Net.WebClient).DownloadFile($jdk_url, $jdk_local) - -$jdk_local_hash = GetMd5FileHash($jdk_local) -if ($jdk_master_hash -ne $jdk_local_hash) -{ - Write-Host $jdk_master_hash - Write-Host $jdk_local_hash - Write-Host "JDK file checksum mismatch. Aborting!" - Exit 1 -} - -Start-Process $jdk_local "/s INSTALLDIR=$jdk_dir" -Wait -$env:Path += ";$jdk_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) -$env:JAVA_HOME = $jdk_dir; [Environment]::SetEnvironmentVariable("JAVA_HOME", $jdk_dir, [System.EnvironmentVariableTarget]::Machine) - -# resin -Write-Host "Installing Resin...`n" -$resin_url = "http://www.caucho.com/download/$resin_installer_file" -$resin_local = "$workdir\$resin_installer_file" -$resin_dir = "C:\Java\resin" -(New-Object System.Net.WebClient).DownloadFile($resin_url, $resin_local) -[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null -[System.IO.Compression.ZipFile]::ExtractToDirectory($resin_local, $workdir) | Out-Null -Move-Item "$workdir\$resin_version" $resin_dir -Copy-Item "$basedir\config\resin.properties" "$resin_dir\conf\resin.properties" -[Environment]::SetEnvironmentVariable("RESIN_HOME", $resin_dir, [System.EnvironmentVariableTarget]::Machine) -#$env:Path += ";$resin_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# ant -#Write-Host "Installing Ant...`n" -#$ant_url = "http://apache.mirrors.hoobly.com//ant/binaries/$ant_installer_file" -#$ant_local = "$workdir\$ant_installer_file" -#$ant_dir = "C:\Java\ant" -#(New-Object System.Net.WebClient).DownloadFile($ant_url, $ant_local) -#[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null -#[System.IO.Compression.ZipFile]::ExtractToDirectory($ant_local, $workdir) | Out-Null -#Move-Item "$workdir\$ant_version" $ant_dir -#$env:Path += ";$ant_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# maven -Write-Host "Installing Maven...`n" -$maven_url = "http://mirror.cc.columbia.edu/pub/software/apache/maven/$maven_installer_path" -$maven_local = "$workdir\$maven_installer_file" -$maven_dir = "C:\Java\maven" -(New-Object System.Net.WebClient).DownloadFile($maven_url, $maven_local) -[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null -[System.IO.Compression.ZipFile]::ExtractToDirectory($maven_local, $workdir) | Out-Null -Move-Item "$workdir\$maven_version" $maven_dir -$env:Path += ";$maven_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# scala -cinst scala -version $scala_version - -# play -$play_url = "http://downloads.typesafe.com/play/$play_version/$play_installer_file" -$play_local = "$workdir\$play_installer_file" -$play_dir = "C:\Java\play" -(New-Object System.Net.WebClient).DownloadFile($play_url, $play_local) -[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null -[System.IO.Compression.ZipFile]::ExtractToDirectory($play_local, $workdir) | Out-Null -Move-Item "$workdir\play-$play_version" $play_dir -$env:Path += ";$play_dir"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# -# Firewall -# -Write-Host "Configuring firewall...`n" -New-NetFirewallRule -DisplayName "HTTP 8080" -Action Allow -Direction Inbound -LocalPort 8080 -Protocol TCP | Out-Null - -# -# Mercurial -# -Write-Host "Installing Mercurial...`n" -$hg_installer_url = "https://bitbucket.org/tortoisehg/files/downloads/$mercurial_installer_file" -$hg_installer_local = "$workdir\$mercurial_installer_file" -(New-Object System.Net.WebClient).DownloadFile($hg_installer_url, $hg_installer_local) - -Start-Process $hg_installer_local '/passive' -Wait -$env:Path += ";C:\Program Files\Mercurial"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -# -# Cygwin (including sftp) -# -Write-Host "Installing Cygwin...`n" -$cygwin_installer_url = "http://cygwin.com/$cygwin_installer_file" -$cygwin_installer_dir = $workdir + "\cygwin-installer" -New-Item -Path $cygwin_installer_dir -Type directory -Force | Out-Null -$cygwin_installer_local = "$cygwin_installer_dir\$cygwin_installer_file" -(New-Object System.Net.WebClient).DownloadFile($cygwin_installer_url, $cygwin_installer_local) - -$cygwin_install_dir = "C:\Cygwin" -Start-Process $cygwin_installer_local "-q -n -l $cygwin_installer_dir -s http://mirrors.kernel.org/sourceware/cygwin/ -R $cygwin_install_dir -P openssh" -WorkingDirectory "$cygwin_installer_dir" -Wait -RedirectStandardOutput $cygwin_installer_dir\install.log -$env:Path += ";$cygwin_install_dir;$cygwin_install_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) - -cd $basedir diff --git a/toolset/travis/sources.list b/toolset/travis/sources.list deleted file mode 100644 index 3dab6195439..00000000000 --- a/toolset/travis/sources.list +++ /dev/null @@ -1,69 +0,0 @@ -# - -# deb cdrom:[Ubuntu-Server 14.04.4 LTS _Trusty Tahr_ - Release amd64 (20160217.1)]/ trusty main restricted - -# deb cdrom:[Ubuntu-Server 14.04.4 LTS _Trusty Tahr_ - Release amd64 (20160217.1)]/ trusty main restricted - -# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to -# newer versions of the distribution. -deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted -deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted - -## Major bug fix updates produced after the final release of the -## distribution. -deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted -deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted - -## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu -## team. Also, please note that software in universe WILL NOT receive any -## review or updates from the Ubuntu security team. -deb http://us.archive.ubuntu.com/ubuntu/ trusty universe -deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe -deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe -deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe - -## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu -## team, and may not be under a free licence. Please satisfy yourself as to -## your rights to use the software. Also, please note that software in -## multiverse WILL NOT receive any review or updates from the Ubuntu -## security team. -deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse -deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse -deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse -deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse - -## N.B. software from this repository may not have been tested as -## extensively as that contained in the main release, although it includes -## newer versions of some applications which may provide useful features. -## Also, please note that software in backports WILL NOT receive any review -## or updates from the Ubuntu security team. -deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse -deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse - -deb http://security.ubuntu.com/ubuntu trusty-security main restricted -deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted -deb http://security.ubuntu.com/ubuntu trusty-security universe -deb-src http://security.ubuntu.com/ubuntu trusty-security universe -deb http://security.ubuntu.com/ubuntu trusty-security multiverse -deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse - -## Uncomment the following two lines to add software from Canonical's -## 'partner' repository. -## This software is not part of Ubuntu, but is offered by Canonical and the -## respective vendors as a service to Ubuntu users. -# deb http://archive.canonical.com/ubuntu trusty partner -# deb-src http://archive.canonical.com/ubuntu trusty partner - -## Uncomment the following two lines to add software from Ubuntu's -## 'extras' repository. -## This software is not part of Ubuntu, but is offered by third-party -## developers who want to ship their latest software. -# deb http://extras.ubuntu.com/ubuntu trusty main -# deb-src http://extras.ubuntu.com/ubuntu trusty main -# deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main -# deb-src http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main -# deb-src http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main -# deb-src http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main -# deb-src http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main -# deb-src http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main -# deb-src http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main diff --git a/toolset/travis/travis_clean.sh b/toolset/travis/travis_clean.sh deleted file mode 100644 index 0952bc35c97..00000000000 --- a/toolset/travis/travis_clean.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -export DEBIAN_FRONTEND=noninteractive - -# Set up a new PATH variable -export PATH=/home/travis/bin:/home/travis/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - -# Remove services/installs that travis gives us -sudo apt-get purge ruby* -yqq - -# Travis adds sources for the extra services they provide. When doing -# apt updates this can interfere with the standard ubuntu installs so we'll reset the sources. -sudo mv ./toolset/travis/sources.list /etc/apt/sources.list -sudo rm -rf /etc/apt/sources.list.d -sudo mkdir /etc/apt/sources.list.d - -# Postgres user permission fix for travis -sudo chmod og+rX /home /home/travis - -# Remove pre-installed rmv -rvm implode --force -sudo rm -rf /etc/rvmrc -sudo rm ~/.rvmrc diff --git a/toolset/travis/travis_diff.py b/toolset/travis/travis_diff.py index 952b333491c..5bfc4643922 100755 --- a/toolset/travis/travis_diff.py +++ b/toolset/travis/travis_diff.py @@ -8,20 +8,26 @@ # Notes: This script will run in python 2 and 3. print is being used instead of the logging import because # travis does not echo python logging during the before_script lifecycle. +# TODO: Needs to be updated to look at the new Travis test possibilities +# of TEST, TESTDIR, and TESTLANG. IE. Only run a single framework test +# in TESTLANG if it's the only one that's changed + import subprocess import os import re from sets import Set -# Returns a unique list of fw_depends changes -def get_fw_depends_changes(changes_output): - return list(Set(re.findall(r"toolset/setup/linux/.+/(.+)\.sh", changes_output, re.M))) +# Returns a unique list of dockerfile changes +def get_docker_changes(changes_output): + return list( + Set( + re.findall(r"toolset/setup/docker/.+/(.+)\.dockerfile", + changes_output, re.M))) -# Returns a unique list of frameworks that have been changed -def fw_found_in_changes(changes_output): - return re.search(r"" + re.escape(os.environ['TESTDIR']), changes_output, re.M) +def fw_found_in_changes(test, changes_output): + return re.search(r"frameworks/" + test + "/", changes_output, re.M) # Cleans up diffing and grep output and into an array of strings @@ -29,43 +35,27 @@ def clean_output(output): return os.linesep.join([s for s in output.splitlines() if s]) -def quit_diffing(should_test_run): - if should_test_run: - print("travis-diff-continue") +def quit_diffing(): + if len(run_tests): + print("travis-run-tests {!s}".format(" ".join(set(run_tests)))) + else: + print("No tests to run.") exit(0) -# COMMIT MESSAGES: -# Before any complicated diffing, check for forced runs from the commit message -last_commit_msg = subprocess.check_output(['bash', '-c', 'git log -1 --pretty=%B']) +print("TRAVIS_COMMIT_RANGE: {!s}".format(os.getenv("TRAVIS_COMMIT_RANGE"))) +print("TRAVIS_COMMIT : {!s}".format(os.getenv("TRAVIS_COMMIT"))) -# Forced *fw-only* specific tests -if re.search(r'\[ci fw-only.+\]', last_commit_msg, re.M): - if re.search(r'\[ci fw-only(.?)+ ' + re.escape(os.environ['TESTDIR']) + '( .+\]|])', last_commit_msg, re.M): - print("This test has been forced to run from the commit message.") - quit_diffing(True) - else: - print("Skipping this test from the commit message.") - quit_diffing(False) -# Forced full run -if re.search(r'\[ci run-all\]', last_commit_msg, re.M): - print("All tests have been forced to run from the commit message.") - quit_diffing(True) -# Forced framework run -if re.search(r'\[ci fw(.?)+ ' + re.escape(os.environ['TESTDIR']) + '( .+\]|\])', last_commit_msg, re.M): - print('This test has been forced to run from the commit message.') - quit_diffing(True) - -print("TRAVIS_COMMIT_RANGE: {!s}".format(os.environ['TRAVIS_COMMIT_RANGE'])) -print("TRAVIS_COMMIT : {!s}".format(os.environ['TRAVIS_COMMIT'])) - -is_PR = (os.environ['TRAVIS_PULL_REQUEST'] != "false") +is_PR = (os.getenv("TRAVIS_PULL_REQUEST") != "false") commit_range = "" +first_commit = "" +last_commit = "" if is_PR: print('I am testing a pull request') - first_commit = os.environ['TRAVIS_COMMIT_RANGE'].split('...')[0] - last_commit = subprocess.check_output("git rev-list -n 1 FETCH_HEAD^2", shell=True).rstrip('\n') + first_commit = os.getenv("TRAVIS_COMMIT_RANGE").split('...')[0] + last_commit = subprocess.check_output( + "git rev-list -n 1 FETCH_HEAD^2", shell=True).rstrip('\n') print("Guessing that first commit in PR is : {!s}".format(first_commit)) print("Guessing that final commit in PR is : {!s}".format(last_commit)) @@ -76,54 +66,124 @@ def quit_diffing(should_test_run): print("Only one commit in range, examining {!s}".format(last_commit)) commit_range = "-m --first-parent -1 {!s}".format(last_commit) else: - commit_range = "--first-parent {!s}...{!s}".format(first_commit, last_commit) + commit_range = "--first-parent {!s}...{!s}".format( + first_commit, last_commit) if not is_PR: print('I am not testing a pull request') - commit_range = "--first-parent -m {!s}".format(os.environ['TRAVIS_COMMIT_RANGE']) + commit_range = "--first-parent -m {!s}".format( + os.getenv("TRAVIS_COMMIT_RANGE")) # Handle 1 if commit_range == "": - commit_range = "--first-parent -m -1 {!s}".format(os.environ['TRAVIS_COMMIT']) + commit_range = "--first-parent -m -1 {!s}".format( + os.getenv("TRAVIS_COMMIT")) print("Using commit range `{!s}`".format(commit_range)) -print("Running `git log --name-only --pretty=\"format:\" {!s}`".format(commit_range)) -changes = clean_output(subprocess.check_output(['bash', '-c', 'git log --name-only --pretty="format:" {!s}'.format(commit_range)])) - -# Satisfies this requirement: -# Anything in the toolset/ that isn't in the setup/linux/*/ subdirectory -# Any commit message that contains [ci run] +print("Running `git log --name-only --pretty=\"format:\" {!s}`".format( + commit_range)) +changes = clean_output( + subprocess.check_output([ + 'bash', '-c', + 'git log --name-only --pretty="format:" {!s}'.format(commit_range) + ])) +print("Determining what to run based on the following file changes: \n{!s}" + .format(changes)) -if re.search(r'^toolset/(?!setup/linux/.+/)', changes, re.M) is not None: - print("Found changes to core toolset. Running all tests.") - quit_diffing(True) - -if fw_found_in_changes(changes): - print("Found changes that affect this framework. Running test.") - quit_diffing(True) - -# Satisfies this requirement: -# ^toolset/setup/linux/.+/(.+)\.sh - -# Determine what has been changed based on initial diffing output -fw_depends_changes = get_fw_depends_changes(changes) - -# For each of these, find the files that depend on them, if we find more fw_depends stuff, -# add it to the bottom of the list, if it isn't already there. -i = 0 -while i <= len(fw_depends_changes) - 1: - - # Generates output of files that contain the fw_depends for this dependency - more_changes = subprocess.check_output(['bash', '-c', 'grep -RP "fw_depends(.?)+ ' + re.escape(fw_depends_changes[i]) + '( |$)" . || echo ""']) - print("more_changes: {!s}".format(more_changes)) - if fw_found_in_changes(more_changes): - print("Found changes that affect this framework. Running test.") - quit_diffing(True) +# COMMIT MESSAGES: +# Before any complicated diffing, check for forced runs from the commit message +# Use -2 because travis now inserts a merge commit as the last commit +last_commit_msg = subprocess.check_output( + ["bash", "-c", "git log --format=%B -n 1 {!s}".format(last_commit)]) +print("Parsing commit message for travis commands: {!s}" + .format(last_commit_msg)) + +test_dirs = [] +run_tests = [] + +# Break the test env variable down into test directories +if os.getenv("TESTLANG"): + test_dirs = map(lambda x: os.getenv("TESTLANG") + '/' + x, + os.listdir("frameworks/" + os.getenv("TESTLANG"))) +elif os.getenv("TESTDIR"): + test_dirs = os.getenv("TESTDIR").split(' ') - # Preserves the order of the list, so we can continue with this loop - fw_depends_changes.extend(Set(get_fw_depends_changes(more_changes)) - Set(fw_depends_changes)) - i += 1 +# Forced full run +if re.search(r'\[ci run-all\]', last_commit_msg, re.M): + print("All tests have been forced to run from the commit message.") + run_tests = test_dirs + quit_diffing() -# If we get here, there was nothing found -print("Did not find any changes that affect this framework.") -quit_diffing(False) +# Forced *fw-only* specific tests +if re.search(r'\[ci fw-only .+\]', last_commit_msg, re.M): + tests = re.findall(r'\[ci fw-only (.+)\]', last_commit_msg, + re.M)[0].strip().split(' ') + for test in tests: + if test in test_dirs: + print( + "{!s} has been forced to run from the commit message.".format( + test)) + run_tests.append(test) + + # quit here because we're using "only" + quit_diffing() + +# Forced framework run in addition to other tests +if re.search(r'\[ci fw .+\]', last_commit_msg, re.M): + tests = re.findall(r'\[ci fw (.+)\]', last_commit_msg, + re.M)[0].strip().split(' ') + for test in tests: + if test in test_dirs: + print( + "{!s} has been forced to run from the commit message.".format( + test)) + run_tests.append(test) + +# TODO: any changes in the toolset folder will generate a full run. +# Instead limit this to core toolset files and work on diffing +# docker dependencies +# Ignore travis and docker directory changes +# Also for now, ignore the old linux setup folders, as we don't want to +# trigger a full run as we remove old fw_depends scripts. [ci run-all] will +# still work if it's needed. + +if re.search(r'^toolset/(?!(travis/|setup/|continuous/))', changes, + re.M) is not None: + print("Found changes to core toolset. Running all tests.") + run_tests = test_dirs + quit_diffing() + +for test in test_dirs: + if fw_found_in_changes(test, changes): + print("Found changes that affect {!s}".format(test)) + run_tests.append(test) + continue + + # Determine what has been changed based on initial diffing output + docker_changes = get_docker_changes(changes) + + # For each of these, find the files that depend on them, if we find more + # docker FROM dependencies add it to the bottom of the list, if it isn't + # already there. + i = 0 + found = False + while i <= len(docker_changes) - 1 and not found: + + # Generates output of files that contain a FROM import for this dependency + more_changes = subprocess.check_output([ + 'bash', '-c', + 'grep -RP "FROM tfb/' + re.escape(docker_changes[i].replace( + '.dockerfile', '')) + '(:|$)" . || echo ""' + ]) + print("more_changes: {!s}".format(more_changes)) + if fw_found_in_changes(test, more_changes): + print("Found changes that affect {!s}".format(test)) + run_tests.append(test) + found = True + + # Preserves the order of the list, so we can continue with this loop + docker_changes.extend( + Set(get_docker_changes(more_changes)) - Set(docker_changes)) + i += 1 + +quit_diffing() diff --git a/toolset/travis/travis_long.sh b/toolset/travis/travis_long.sh deleted file mode 100755 index 799a95960c8..00000000000 --- a/toolset/travis/travis_long.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# Use to generate a new .travis.yml that runs individual -# tests within a framework directory in a new vm - -# Backup original travis file -mv $FWROOT/.travis.yml $FWROOT/.travis.bak - -# generate new matrix -MATRIX=`$FWROOT/toolset/run-tests.py --list-tests | sed '/FWROOT */d' | sed '/Time */d' | sed '/Results */d' | sed -E 's/(.+)/ - "TEST=\1"/g'` - -tee $FWROOT/.travis.yml <> /home/travis/.ssh/authorized_keys @@ -18,8 +22,6 @@ sed -i s/techempower/travis/g ./benchmark.cfg echo "travis ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers -echo 127.0.0.1 TFB-database | sudo tee --append /etc/hosts -echo 127.0.0.1 TFB-client | sudo tee --append /etc/hosts -echo 127.0.0.1 TFB-server | sudo tee --append /etc/hosts - source ./toolset/setup/linux/prerequisites.sh + +tfb --init --quiet \ No newline at end of file diff --git a/frameworks/C++/luna/.gitignore b/toolset/utils/__init__.py old mode 100644 new mode 100755 similarity index 100% rename from frameworks/C++/luna/.gitignore rename to toolset/utils/__init__.py diff --git a/toolset/utils/benchmark_config.py b/toolset/utils/benchmark_config.py new file mode 100755 index 00000000000..65a84c74947 --- /dev/null +++ b/toolset/utils/benchmark_config.py @@ -0,0 +1,86 @@ +from toolset.benchmark.test_types import * +from toolset.utils.output_helper import QuietOutputStream + +import os +import time + + +class BenchmarkConfig: + def __init__(self, args): + ''' + Configures this BenchmarkConfig given the arguments provided. + ''' + + # Map type strings to their objects + types = dict() + types['json'] = JsonTestType(self) + types['db'] = DBTestType(self) + types['query'] = QueryTestType(self) + types['fortune'] = FortuneTestType(self) + types['update'] = UpdateTestType(self) + types['plaintext'] = PlaintextTestType(self) + types['cached_query'] = CachedQueryTestType(self) + + # Turn type into a map instead of a string + if args.type == 'all': + self.types = types + else: + self.types = {args.type: types[args.type]} + + self.duration = args.duration + self.exclude = args.exclude + self.publish = args.publish + self.build = args.build + self.quiet = args.quiet + self.server_host = args.server_host + self.database_host = args.database_host + self.client_host = args.client_host + self.new = args.new + self.clean = args.clean + self.mode = args.mode + self.list_tests = args.list_tests + self.max_concurrency = max(args.concurrency_levels) + self.concurrency_levels = args.concurrency_levels + self.cached_query_levels = args.cached_query_levels + self.pipeline_concurrency_levels = args.pipeline_concurrency_levels + self.query_levels = args.query_levels + self.parse = args.parse + self.results_environment = args.results_environment + self.results_name = args.results_name + self.results_upload_uri = args.results_upload_uri + self.test = args.test + self.test_dir = args.test_dir + self.test_lang = args.test_lang + self.network_mode = args.network_mode + self.server_docker_host = None + self.database_docker_host = None + self.client_docker_host = None + self.network = None + + if self.network_mode is None: + self.network = 'tfb' + self.server_docker_host = "unix://var/run/docker.sock" + self.database_docker_host = "unix://var/run/docker.sock" + self.client_docker_host = "unix://var/run/docker.sock" + else: + self.network = None + # The only other supported network_mode is 'host', and that means + # that we have a tri-machine setup, so we need to use tcp to + # communicate with docker. + self.server_docker_host = "tcp://%s:2375" % self.server_host + self.database_docker_host = "tcp://%s:2375" % self.database_host + self.client_docker_host = "tcp://%s:2375" % self.client_host + + self.quiet_out = QuietOutputStream(self.quiet) + + self.start_time = time.time() + + # Remember root directory + self.fwroot = os.getenv('FWROOT') + + if hasattr(self, 'parse') and self.parse != None: + self.timestamp = self.parse + else: + self.timestamp = time.strftime("%Y%m%d%H%M%S", time.localtime()) + + self.run_test_timeout_seconds = 7200 diff --git a/toolset/utils/cleaner.py b/toolset/utils/cleaner.py new file mode 100755 index 00000000000..ab9af4d8a9a --- /dev/null +++ b/toolset/utils/cleaner.py @@ -0,0 +1,15 @@ +import os +import shutil + + +def clean(results): + ''' + Cleans the given directory of all files and folders + ''' + results_dir = os.path.dirname(results.directory) + if os.path.exists(results_dir): + for file in os.listdir(results_dir): + if not os.path.exists(os.path.dirname(file)): + shutil.rmtree(os.path.join(results_dir, file)) + else: + os.remove(os.path.join(results_dir, file)) diff --git a/toolset/utils/database_helper.py b/toolset/utils/database_helper.py new file mode 100755 index 00000000000..8c5885f1457 --- /dev/null +++ b/toolset/utils/database_helper.py @@ -0,0 +1,40 @@ +import MySQLdb +import psycopg2 +import pymongo + + +def test_database(config, database_name): + if database_name == "mysql": + try: + db = MySQLdb.connect(config.database_host, "benchmarkdbuser", + "benchmarkdbpass", "hello_world") + cursor = db.cursor() + cursor.execute("SELECT 1") + cursor.fetchall() + db.close() + except: + return False + elif database_name == "postgres": + try: + db = psycopg2.connect( + host=config.database_host, + port="5432", + user="benchmarkdbuser", + password="benchmarkdbpass", + database="hello_world") + cursor = db.cursor() + cursor.execute("SELECT 1") + cursor.fetchall() + db.close() + except: + return False + elif database_name == "mongodb": + try: + connection = pymongo.MongoClient(host=config.database_host) + db = connection.hello_world + db.world.find() + db.close() + except: + return False + + return True \ No newline at end of file diff --git a/toolset/utils/docker_helper.py b/toolset/utils/docker_helper.py new file mode 100755 index 00000000000..e7450fd9c54 --- /dev/null +++ b/toolset/utils/docker_helper.py @@ -0,0 +1,580 @@ +import os +import socket +import fnmatch +import multiprocessing +import json +import docker +import time +import re +import traceback +from threading import Thread +from colorama import Fore, Style + +from toolset.utils.output_helper import log +from toolset.utils.metadata_helper import gather_tests +from toolset.utils.ordered_set import OrderedSet +from toolset.utils.database_helper import test_database + + +def clean(benchmarker_config): + ''' + Cleans all the docker images from the system + ''' + # Clean the app server images + client = docker.DockerClient( + base_url=benchmarker_config.server_docker_host) + + client.images.prune() + for image in client.images.list(): + if len(image.tags) > 0: + # 'techempower/tfb.test.gemini:0.1' -> 'techempower/tfb.test.gemini' + image_tag = image.tags[0].split(':')[0] + if image_tag != 'techempower/tfb': + client.images.remove(image.id, force=True) + client.images.prune() + + # Clean the database server images + client = docker.DockerClient( + base_url=benchmarker_config.database_docker_host) + + client.images.prune() + for image in client.images.list(): + if len(image.tags) > 0: + # 'techempower/tfb.test.gemini:0.1' -> 'techempower/tfb.test.gemini' + image_tag = image.tags[0].split(':')[0] + if image_tag != 'techempower/tfb': + client.images.remove(image.id, force=True) + client.images.prune() + + +def publish(benchmarker_config): + ''' + Builds fresh versions of all the docker container images known in the + system and attempts to publish them to dockerhub. + Note: this requires `docker login` to have been performed prior to the + call. + ''' + start_time = time.time() + + docker_buildargs = { + 'CPU_COUNT': str(multiprocessing.cpu_count()), + 'MAX_CONCURRENCY': str(max(benchmarker_config.concurrency_levels)), + 'TFB_DATABASE': str(benchmarker_config.database_host) + } + + # Force building instead of pulling + benchmarker_config.build = True + tests = gather_tests(benchmarker_config=benchmarker_config) + for test in tests: + __build_dependencies(benchmarker_config, test, + ["%s.dockerfile" % test.name], docker_buildargs) + + client = docker.DockerClient( + base_url=benchmarker_config.server_docker_host) + + client.login("USERNAME", "PASSWORD") + + for image in client.images.list(): + has_tags = len(image.tags) > 0 + if has_tags and 'techempower' in image.tags[0] and 'tfb.test' not in image.tags[0]: + log("Pushing docker image: %s" % image.tags[0].split(':')[0]) + client.images.push(image.tags[0].split(':')[0]) + + log("Publish took: %s seconds" % (time.time() - start_time)) + + +def build(benchmarker_config, test_names, build_log_dir=os.devnull): + ''' + Builds the dependency chain as well as the test implementation docker images + for the given tests. + ''' + docker_buildargs = { + 'MAX_CONCURRENCY': str(max(benchmarker_config.concurrency_levels)), + 'TFB_DATABASE': str(benchmarker_config.database_host) + } + + tests = gather_tests( + include=test_names, benchmarker_config=benchmarker_config) + + for test in tests: + log_prefix = "%s: " % test.name + + test_docker_files = ["%s.dockerfile" % test.name] + if test.docker_files is not None: + if type(test.docker_files) is list: + test_docker_files.extend(test.docker_files) + else: + raise Exception( + "docker_files in benchmark_config.json must be an array") + + if __build_dependencies(benchmarker_config, test, test_docker_files, + docker_buildargs, build_log_dir) > 0: + return 1 + + # Build the test images + for test_docker_file in test_docker_files: + build_log_file = build_log_dir + if build_log_dir is not os.devnull: + build_log_file = os.path.join( + build_log_dir, "%s.log" % test_docker_file.replace( + ".dockerfile", "").lower()) + with open(build_log_file, 'w') as build_log: + try: + for line in docker.APIClient( + base_url=benchmarker_config.server_docker_host + ).build( + path=test.directory, + dockerfile=test_docker_file, + tag="techempower/tfb.test.%s" % + test_docker_file.replace(".dockerfile", ""), + buildargs=docker_buildargs, + forcerm=True): + if line.startswith('{"stream":'): + line = json.loads(line) + line = line[line.keys()[0]].encode('utf-8') + log(line, + prefix=log_prefix, + file=build_log, + color=Fore.WHITE + Style.BRIGHT \ + if re.match(r'^Step \d+\/\d+', line) else '') + except Exception: + tb = traceback.format_exc() + log("Docker build failed; terminating", + prefix=log_prefix, + file=build_log, + color=Fore.RED) + log(tb, prefix=log_prefix, file=build_log) + return 1 + + return 0 + + +def run(benchmarker_config, docker_files, run_log_dir): + ''' + Run the given Docker container(s) + ''' + client = docker.DockerClient( + base_url=benchmarker_config.server_docker_host) + containers = [] + + for docker_file in docker_files: + log_prefix = "%s: " % docker_file.replace(".dockerfile", "") + try: + + def watch_container(container, docker_file): + with open( + os.path.join( + run_log_dir, "%s.log" % docker_file.replace( + ".dockerfile", "").lower()), 'w') as run_log: + for line in container.logs(stream=True): + log(line, prefix=log_prefix, file=run_log) + + extra_hosts = None + name = "tfb-server" + + if benchmarker_config.network is None: + extra_hosts = { + socket.gethostname(): str(benchmarker_config.server_host), + 'tfb-server': str(benchmarker_config.server_host), + 'tfb-database': str(benchmarker_config.database_host) + } + name = None + + sysctl = {'net.core.somaxconn': 65535} + + ulimit = [{ + 'name': 'nofile', + 'hard': 200000, + 'soft': 200000 + }, { + 'name': 'rtprio', + 'hard': 99, + 'soft': 99 + }] + + container = client.containers.run( + "techempower/tfb.test.%s" % docker_file.replace( + ".dockerfile", ""), + name=name, + network=benchmarker_config.network, + network_mode=benchmarker_config.network_mode, + stderr=True, + detach=True, + init=True, + extra_hosts=extra_hosts, + privileged=True, + ulimits=ulimit, + sysctls=sysctl) + + containers.append(container) + + watch_thread = Thread( + target=watch_container, args=( + container, + docker_file, + )) + watch_thread.daemon = True + watch_thread.start() + + except Exception: + with open( + os.path.join(run_log_dir, "%s.log" % docker_file.replace( + ".dockerfile", "").lower()), 'w') as run_log: + tb = traceback.format_exc() + log("Running docker cointainer: %s failed" % docker_file, + prefix=log_prefix, + file=run_log) + log(tb, prefix=log_prefix, file=run_log) + + return containers + + +def successfully_running_containers(benchmarker_config, docker_files, out): + ''' + Returns whether all the expected containers for the given docker_files are + running. + ''' + client = docker.DockerClient( + base_url=benchmarker_config.server_docker_host) + expected_running_container_images = [] + for docker_file in docker_files: + # 'gemini.dockerfile' -> 'gemini' + image_tag = '.'.join(docker_file.split('.')[:-1]) + expected_running_container_images.append(image_tag) + running_container_images = [] + for container in client.containers.list(): + # 'techempower/tfb.test.gemini:0.1' -> 'gemini' + image_tag = container.image.tags[0].split(':')[0][21:] + running_container_images.append(image_tag) + + for image_name in expected_running_container_images: + if image_name not in running_container_images: + log_prefix = "%s: " % image_name + log("ERROR: Expected techempower/tfb.test.%s to be running container" + % image_name, + prefix=log_prefix, + file=out) + return False + return True + + +def stop(benchmarker_config=None, + containers=None, + database_container=None, + test=None): + ''' + Attempts to stop the running test container. + ''' + client = docker.DockerClient( + base_url=benchmarker_config.server_docker_host) + if containers is None: + for container in client.containers.list(): + if len( + container.image.tags + ) > 0 and 'techempower' in container.image.tags[0] and 'tfb:latest' not in container.image.tags[0]: + container.stop() + # 'techempower/tfb.test.gemini:0.1' -> 'techempower/tfb.test.gemini' + client.images.remove( + container.image.tags[0].split(':')[0], force=True) + else: + # Stop all our running containers + for container in containers: + container.stop() + # 'techempower/tfb.test.gemini:0.1' -> 'techempower/tfb.test.gemini' + client.images.remove( + container.image.tags[0].split(':')[0], force=True) + + database_client = docker.DockerClient( + base_url=benchmarker_config.database_docker_host) + # Stop the database container + if database_container is None: + for container in database_client.containers.list(): + if len( + container.image.tags + ) > 0 and 'techempower' in container.image.tags[0] and 'tfb:latest' not in container.image.tags[0]: + container.stop() + # 'techempower/tfb.test.gemini:0.1' -> 'techempower/tfb.test.gemini' + client.images.remove( + container.image.tags[0].split(':')[0], force=True) + else: + database_container.stop() + + client.images.prune() + client.containers.prune() + client.volumes.prune() + + if benchmarker_config.server_docker_host != benchmarker_config.database_docker_host: + database_client.images.prune() + database_client.containers.prune() + database_client.volumes.prune() + + +def find(path, pattern): + ''' + Finds and returns all the the files matching the given pattern recursively in + the given path. + ''' + for root, dirs, files in os.walk(path): + for name in files: + if fnmatch.fnmatch(name, pattern): + return os.path.join(root, name) + + +def start_database(benchmarker_config, test, database): + ''' + Sets up a container for the given database and port, and starts said docker + container. + ''' + image_name = "techempower/%s:latest" % database + log_prefix = image_name + ": " + + database_dir = os.path.join(benchmarker_config.fwroot, "toolset", "setup", + "docker", "databases", database) + docker_file = "%s.dockerfile" % database + + pulled = False + client = docker.DockerClient( + base_url=benchmarker_config.database_docker_host) + try: + # Don't pull if we have it + client.images.get(image_name) + pulled = True + log("Found published image; skipping build", prefix=log_prefix) + except: + # Pull the dependency image + try: + log("Attempting docker pull for image (this can take some time)", + prefix=log_prefix) + client.images.pull(image_name) + pulled = True + log("Found published image; skipping build", prefix=log_prefix) + except: + pass + + if not pulled: + for line in docker.APIClient( + base_url=benchmarker_config.database_docker_host).build( + path=database_dir, + dockerfile=docker_file, + tag="techempower/%s" % database): + if line.startswith('{"stream":'): + line = json.loads(line) + line = line[line.keys()[0]].encode('utf-8') + log(line, + prefix=log_prefix, + color=Fore.WHITE + Style.BRIGHT \ + if re.match(r'^Step \d+\/\d+', line) else '') + + client = docker.DockerClient( + base_url=benchmarker_config.database_docker_host) + + sysctl = {'net.core.somaxconn': 65535, 'kernel.sem': "250 32000 256 512"} + + ulimit = [{'name': 'nofile', 'hard': 65535, 'soft': 65535}] + + container = client.containers.run( + "techempower/%s" % database, + name="tfb-database", + network=benchmarker_config.network, + network_mode=benchmarker_config.network_mode, + detach=True, + ulimits=ulimit, + sysctls=sysctl) + + # Sleep until the database accepts connections + slept = 0 + max_sleep = 60 + database_ready = False + while not database_ready and slept < max_sleep: + time.sleep(1) + slept += 1 + database_ready = test_database(benchmarker_config, database) + + if not database_ready: + log("Database was not ready after startup", prefix=log_prefix) + + return container + + +def test_client_connection(benchmarker_config, url): + ''' + Tests that the app server at the given url responds successfully to a + request. + ''' + client = docker.DockerClient( + base_url=benchmarker_config.client_docker_host) + + try: + client.images.get('techempower/tfb.wrk:latest') + except: + log("Attempting docker pull for image (this can take some time)", + prefix="techempower/tfb.wrk:latest: ") + client.images.pull('techempower/tfb.wrk:latest') + + try: + client.containers.run( + 'techempower/tfb.wrk', + 'curl %s' % url, + network=benchmarker_config.network, + network_mode=benchmarker_config.network_mode) + except: + return False + + return True + + +def benchmark(benchmarker_config, script, variables, raw_file): + ''' + Runs the given remote_script on the wrk container on the client machine. + ''' + + def watch_container(container, raw_file): + with open(raw_file, 'w') as benchmark_file: + for line in container.logs(stream=True): + log(line, file=benchmark_file) + + client = docker.DockerClient( + base_url=benchmarker_config.client_docker_host) + + sysctl = {'net.core.somaxconn': 65535} + + ulimit = [{'name': 'nofile', 'hard': 65535, 'soft': 65535}] + + watch_container( + client.containers.run( + "techempower/tfb.wrk", + "/bin/bash /%s" % script, + environment=variables, + network=benchmarker_config.network, + network_mode=benchmarker_config.network_mode, + detach=True, + stderr=True, + ulimits=ulimit, + sysctls=sysctl), raw_file) + + +def __gather_dependencies(docker_file): + ''' + Gathers all the known docker dependencies for the given docker image. + ''' + deps = [] + + docker_dir = os.path.join( + os.getenv('FWROOT'), "toolset", "setup", "docker") + + if os.path.exists(docker_file): + with open(docker_file) as fp: + for line in fp.readlines(): + tokens = line.strip().split(' ') + if tokens[0] == "FROM": + # This is magic that our base image points to + if tokens[1] != "ubuntu:16.04": + dep_ref = tokens[1].strip().split(':')[0].strip() + if '/' not in dep_ref: + raise AttributeError( + "Could not find docker FROM dependency: %s" % + dep_ref) + depToken = dep_ref.split('/')[1] + deps.append(tokens[1]) + dep_docker_file = os.path.join( + os.path.dirname(docker_file), + depToken + ".dockerfile") + if not os.path.exists(dep_docker_file): + dep_docker_file = find(docker_dir, + depToken + ".dockerfile") + deps.extend(__gather_dependencies(dep_docker_file)) + + return deps + + +def __build_dependencies(benchmarker_config, + test, + test_docker_files, + docker_buildargs, + build_log_dir=os.devnull): + ''' + Builds all the dependency docker images for the given test. + Does not build the test docker image. + ''' + for test_docker_file in test_docker_files: + dependencies = OrderedSet( + list( + reversed( + __gather_dependencies( + os.path.join(test.directory, test_docker_file))))) + + docker_dir = os.path.join( + os.getenv('FWROOT'), "toolset", "setup", "docker") + for dep in dependencies: + log_prefix = dep + ": " + pulled = False + + # Do not pull images if we are building specifically + if not benchmarker_config.build: + client = docker.DockerClient( + base_url=benchmarker_config.server_docker_host) + try: + # If we have it, use it + client.images.get(dep) + pulled = True + log("Found published image; skipping build", + prefix=log_prefix) + except: + # Pull the dependency image + try: + log("Attempting docker pull for image (this can take some time)", + prefix=log_prefix) + client.images.pull(dep) + pulled = True + log("Found published image; skipping build", + prefix=log_prefix) + except: + pass + + if not pulled: + dep_ref = dep.strip().split(':')[0].strip() + dependency = dep_ref.split('/')[1] + build_log_file = build_log_dir + if build_log_dir is not os.devnull: + build_log_file = os.path.join( + build_log_dir, "%s.log" % dependency.lower()) + with open(build_log_file, 'w') as build_log: + docker_file = os.path.join(test.directory, + dependency + ".dockerfile") + if not docker_file or not os.path.exists(docker_file): + docker_file = find(docker_dir, + dependency + ".dockerfile") + if not docker_file: + log("Docker build failed; %s could not be found; terminating" + % (dependency + ".dockerfile"), + prefix=log_prefix, + file=build_log, + color=Fore.RED) + return 1 + + # Build the dependency image + try: + for line in docker.APIClient( + base_url=benchmarker_config.server_docker_host + ).build( + path=os.path.dirname(docker_file), + dockerfile="%s.dockerfile" % dependency, + tag=dep, + buildargs=docker_buildargs, + forcerm=True): + if line.startswith('{"stream":'): + line = json.loads(line) + line = line[line.keys()[0]].encode('utf-8') + log(line, + prefix=log_prefix, + file=build_log, + color=Fore.WHITE + Style.BRIGHT \ + if re.match(r'^Step \d+\/\d+', line) else '') + except Exception: + tb = traceback.format_exc() + log("Docker dependency build failed; terminating", + prefix=log_prefix, + file=build_log, + color=Fore.RED) + log(tb, prefix=log_prefix, file=build_log) + return 1 \ No newline at end of file diff --git a/toolset/utils/metadata_helper.py b/toolset/utils/metadata_helper.py new file mode 100644 index 00000000000..3e531cf9dde --- /dev/null +++ b/toolset/utils/metadata_helper.py @@ -0,0 +1,379 @@ +import ConfigParser +import os +import glob +import json + +from ast import literal_eval +from collections import OrderedDict + +from toolset.utils.output_helper import log + + +def gather_langauges(): + ''' + Gathers all the known languages in the suite via the folder names + beneath FWROOT. + ''' + + lang_dir = os.path.join(os.getenv('FWROOT'), "frameworks") + langs = [] + for dir in glob.glob(os.path.join(lang_dir, "*")): + langs.append(dir.replace(lang_dir, "")[1:]) + return langs + + +def gather_tests(include=[], exclude=[], benchmarker_config=None, + results=None): + ''' + Given test names as strings, returns a list of FrameworkTest objects. + For example, 'aspnet-mysql-raw' turns into a FrameworkTest object with + variables for checking the test directory, the test database os, and + other useful items. + + With no arguments, every test in this framework will be returned. + With include, only tests with this exact name will be returned. + With exclude, all tests but those excluded will be returned. + + A config is needed to construct full FrameworkTest objects. If + one is not provided, a default config will be created. + ''' + + # Help callers out a bit + if include is None: + include = [] + if exclude is None: + exclude = [] + + # Old, hacky method to exclude all tests was to + # request a test known to not exist, such as ''. + # If test '' was requested, short-circuit and return + # nothing immediately + if len(include) == 1 and '' in include: + return [] + + # Search for configuration files + config_files = [] + + if benchmarker_config.test_lang: + benchmarker_config.test_dir = [] + for lang in benchmarker_config.test_lang: + if os.path.exists("{!s}/frameworks/{!s}".format( + benchmarker_config.fwroot, lang)): + for test_dir in os.listdir("{!s}/frameworks/{!s}".format( + benchmarker_config.fwroot, lang)): + benchmarker_config.test_dir.append("{!s}/{!s}".format( + lang, test_dir)) + else: + raise Exception( + "Unable to locate language directory: {!s}".format(lang)) + + if benchmarker_config.test_dir: + for test_dir in benchmarker_config.test_dir: + dir_config_files = glob.glob( + "{!s}/frameworks/{!s}/benchmark_config.json".format( + benchmarker_config.fwroot, test_dir)) + if len(dir_config_files): + config_files.extend(dir_config_files) + else: + raise Exception( + "Unable to locate tests in test-dir: {!s}".format( + test_dir)) + else: + config_files.extend( + glob.glob("{!s}/frameworks/*/*/benchmark_config.json".format( + benchmarker_config.fwroot))) + + tests = [] + for config_file_name in config_files: + config = None + with open(config_file_name, 'r') as config_file: + try: + config = json.load(config_file) + except ValueError: + raise Exception( + "Error loading '{!s}'.".format(config_file_name)) + + # Find all tests in the config file + config_tests = parse_config(config, os.path.dirname(config_file_name), + benchmarker_config, results) + + # Filter + for test in config_tests: + if len(include) is 0 and len(exclude) is 0: + # No filters, we are running everything + tests.append(test) + elif test.name in exclude: + continue + elif test.name in include: + tests.append(test) + else: + # An include list exists, but this test is + # not listed there, so we ignore it + pass + + # Ensure we were able to locate everything that was + # explicitly included + if 0 != len(include): + names = {test.name for test in tests} + if 0 != len(set(include) - set(names)): + missing = list(set(include) - set(names)) + raise Exception("Unable to locate tests %s" % missing) + + tests.sort(key=lambda x: x.name) + return tests + + +def gather_remaining_tests(config, results): + ''' + Gathers the tests remaining in a current benchmark run. + ''' + return gather_tests(config.test, config.exclude, config, results) + + +def gather_frameworks(include=[], exclude=[], config=None): + ''' + Return a dictionary mapping frameworks->[test1,test2,test3] + for quickly grabbing all tests in a grouped manner. + Args have the same meaning as gather_tests + ''' + tests = gather_tests(include, exclude, config) + frameworks = dict() + + for test in tests: + if test.framework not in frameworks: + frameworks[test.framework] = [] + frameworks[test.framework].append(test) + return frameworks + + +def test_order(type_name): + """ + This sort ordering is set up specifically to return the length + of the test name. There were SO many problems involved with + 'plaintext' being run first (rather, just not last) that we + needed to ensure that it was run last for every framework. + """ + return len(type_name) + + +def parse_config(config, directory, benchmarker_config, results): + """ + Parses a config file into a list of FrameworkTest objects + """ + from toolset.benchmark.framework_test import FrameworkTest + tests = [] + + # The config object can specify multiple tests + # Loop over them and parse each into a FrameworkTest + for test in config['tests']: + + tests_to_run = [name for (name, keys) in test.iteritems()] + if "default" not in tests_to_run: + log("Framework %s does not define a default test in benchmark_config.json" + % config['framework']) + + # Check that each test configuration is acceptable + # Throw exceptions if a field is missing, or how to improve the field + for test_name, test_keys in test.iteritems(): + # Validates the benchmark_config entry + validate_test(test_name, test_keys, directory) + + # Map test type to a parsed FrameworkTestType object + runTests = dict() + for type_name, type_obj in benchmarker_config.types.iteritems(): + try: + # Makes a FrameWorkTestType object using some of the keys in config + # e.g. JsonTestType uses "json_url" + runTests[type_name] = type_obj.copy().parse(test_keys) + except AttributeError: + # This is quite common - most tests don't support all types + # Quitely log it and move on (debug logging is on in travis and this causes + # ~1500 lines of debug, so I'm totally ignoring it for now + # log("Missing arguments for test type %s for framework test %s" % (type_name, test_name)) + pass + + # We need to sort by test_type to run + sortedTestKeys = sorted(runTests.keys(), key=test_order) + sortedRunTests = OrderedDict() + for sortedTestKey in sortedTestKeys: + sortedRunTests[sortedTestKey] = runTests[sortedTestKey] + + # Prefix all test names with framework except 'default' test + # Done at the end so we may still refer to the primary test as `default` in benchmark config error messages + if test_name == 'default': + test_name = config['framework'] + else: + test_name = "%s-%s" % (config['framework'], test_name) + + # By passing the entire set of keys, each FrameworkTest will have a member for each key + tests.append( + FrameworkTest(test_name, directory, benchmarker_config, + results, sortedRunTests, test_keys)) + + return tests + + +def validate_test(test_name, test_keys, directory): + """ + Validate benchmark config values for this test based on a schema + """ + recommended_lang = directory.split('/')[-2] + windows_url = "https://github.com/TechEmpower/FrameworkBenchmarks/issues/1038" + schema = { + 'language': { + 'help': + ('language', 'The language of the framework used, suggestion: %s' % + recommended_lang) + }, + 'webserver': { + 'help': + ('webserver', + 'Name of the webserver also referred to as the "front-end server"' + ) + }, + 'classification': { + 'allowed': [('Fullstack', '...'), ('Micro', '...'), ('Platform', + '...')] + }, + 'database': { + 'allowed': + [('MySQL', + 'One of the most popular databases around the web and in TFB'), + ('Postgres', + 'An advanced SQL database with a larger feature set than MySQL'), + ('MongoDB', 'A popular document-store database'), + ('Cassandra', 'A highly performant and scalable NoSQL database'), + ('Elasticsearch', + 'A distributed RESTful search engine that is used as a database for TFB tests' + ), + ('Redis', + 'An open-sourced, BSD licensed, advanced key-value cache and store' + ), + ('SQLite', + 'A network-less database, still supported for backwards compatibility' + ), ('SQLServer', 'Microsoft\'s SQL implementation'), + ('None', + 'No database was used for these tests, as is the case with Json Serialization and Plaintext' + )] + }, + 'approach': { + 'allowed': [('Realistic', '...'), ('Stripped', '...')] + }, + 'orm': { + 'allowed': + [('Full', + 'Has a full suite of features like lazy loading, caching, multiple language support, sometimes pre-configured with scripts.' + ), + ('Micro', + 'Has basic database driver capabilities such as establishing a connection and sending queries.' + ), + ('Raw', + 'Tests that do not use an ORM will be classified as "raw" meaning they use the platform\'s raw database connectivity.' + )] + }, + 'platform': { + 'help': + ('platform', + 'Name of the platform this framework runs on, e.g. Node.js, PyPy, hhvm, JRuby ...' + ) + }, + 'framework': { + # Guranteed to be here and correct at this point + # key is left here to produce the set of required keys + }, + 'os': { + 'allowed': + [('Linux', + 'Our best-supported host OS, it is recommended that you build your tests for Linux hosts' + ), + ('Windows', + 'TFB is not fully-compatible on windows, contribute towards our work on compatibility: %s' + % windows_url)] + }, + 'database_os': { + 'allowed': + [('Linux', + 'Our best-supported host OS, it is recommended that you build your tests for Linux hosts' + ), + ('Windows', + 'TFB is not fully-compatible on windows, contribute towards our work on compatibility: %s' + % windows_url)] + } + } + + # Confirm required keys are present + required_keys = schema.keys() + missing = list(set(required_keys) - set(test_keys)) + + if len(missing) > 0: + missingstr = (", ").join(map(str, missing)) + raise Exception( + "benchmark_config.json for test %s is invalid, please amend by adding the following required keys: [%s]" + % (test_name, missingstr)) + + # Check the (all optional) test urls + validate_urls(test_name, test_keys) + + # Check values of keys against schema + for key in required_keys: + val = test_keys.get(key, "").lower() + has_predefined_acceptables = 'allowed' in schema[key] + + if has_predefined_acceptables: + allowed = schema[key].get('allowed', []) + acceptable_values, descriptors = zip(*allowed) + acceptable_values = [a.lower() for a in acceptable_values] + + if val not in acceptable_values: + msg = ( + "Invalid `%s` value specified for test \"%s\" in framework \"%s\"; suggestions:\n" + % (key, test_name, test_keys['framework'])) + helpinfo = ('\n').join([ + " `%s` -- %s" % (v, desc) + for (v, desc) in zip(acceptable_values, descriptors) + ]) + fullerr = msg + helpinfo + "\n" + raise Exception(fullerr) + + elif not has_predefined_acceptables and val == "": + msg = ( + "Value for `%s` in test \"%s\" in framework \"%s\" was missing:\n" + % (key, test_name, test_keys['framework'])) + helpinfo = " %s -- %s" % schema[key]['help'] + fullerr = msg + helpinfo + '\n' + raise Exception(fullerr) + + +def validate_urls(test_name, test_keys): + """ + Separated from validate_test because urls are not required anywhere. We know a url is incorrect if it is + empty or does not start with a "/" character. There is no validation done to ensure the url conforms to + the suggested url specifications, although those suggestions are presented if a url fails validation here. + """ + example_urls = { + "json_url": + "/json", + "db_url": + "/mysql/db", + "query_url": + "/mysql/queries?queries= or /mysql/queries/", + "fortune_url": + "/mysql/fortunes", + "update_url": + "/mysql/updates?queries= or /mysql/updates/", + "plaintext_url": + "/plaintext", + "cached_query_url": + "/mysql/cached_queries?queries= or /mysql/cached_queries" + } + + for test_url in [ + "json_url", "db_url", "query_url", "fortune_url", "update_url", + "plaintext_url", "cached_query_url" + ]: + key_value = test_keys.get(test_url, None) + if key_value != None and not key_value.startswith('/'): + errmsg = """`%s` field in test \"%s\" does not appear to be a valid url: \"%s\"\n + Example `%s` url: \"%s\" + """ % (test_url, test_name, key_value, test_url, example_urls[test_url]) + raise Exception(errmsg) diff --git a/toolset/utils/ordered_set.py b/toolset/utils/ordered_set.py new file mode 100755 index 00000000000..87076b63bf3 --- /dev/null +++ b/toolset/utils/ordered_set.py @@ -0,0 +1,71 @@ +import collections + + +class OrderedSet(collections.MutableSet): + ''' + From https://code.activestate.com/recipes/576694/ + ''' + + def __init__(self, iterable=None): + self.end = end = [] + end += [None, end, end] # sentinel node for doubly linked list + self.map = {} # key --> [key, prev, next] + if iterable is not None: + self |= iterable + + def __len__(self): + return len(self.map) + + def __contains__(self, key): + return key in self.map + + def add(self, key): + if key not in self.map: + end = self.end + curr = end[1] + curr[2] = end[1] = self.map[key] = [key, curr, end] + + def discard(self, key): + if key in self.map: + key, prev, next = self.map.pop(key) + prev[2] = next + next[1] = prev + + def __iter__(self): + end = self.end + curr = end[2] + while curr is not end: + yield curr[0] + curr = curr[2] + + def __reversed__(self): + end = self.end + curr = end[1] + while curr is not end: + yield curr[0] + curr = curr[1] + + def pop(self, last=True): + if not self: + raise KeyError('set is empty') + key = self.end[1][0] if last else self.end[2][0] + self.discard(key) + return key + + def __repr__(self): + if not self: + return '%s()' % (self.__class__.__name__, ) + return '%s(%r)' % (self.__class__.__name__, list(self)) + + def __eq__(self, other): + if isinstance(other, OrderedSet): + return len(self) == len(other) and list(self) == list(other) + return set(self) == set(other) + + +if __name__ == '__main__': + s = OrderedSet('abracadaba') + t = OrderedSet('simsalabim') + print(s | t) + print(s & t) + print(s - t) \ No newline at end of file diff --git a/toolset/utils/output_helper.py b/toolset/utils/output_helper.py new file mode 100755 index 00000000000..4784f52caff --- /dev/null +++ b/toolset/utils/output_helper.py @@ -0,0 +1,94 @@ +# -*- coding: utf-8 -*- +import os, sys, re + +from colorama import Style +from contextlib import contextmanager + +# RegExp for stripping color codes +seq = re.compile(r'\x1B\[\d+m') + +FNULL = open(os.devnull, 'w') + +# To prevent the entire disk from being consumed, refuse to +# append more lines to a log file once it's grown too large. +# Logs that hit this limit are probably repeating the same +# message endlessly anyway. +TOO_MANY_BYTES = 50 * 1024 * 1024 + + +def log(log_text=None, **kwargs): + ''' + Logs the given text and optional prefix to stdout (if quiet is False) and + to an optional log file. By default, we strip out newlines in order to + print our lines correctly, but you can override this functionality if you + want to print multi-line output. + ''' + + # set up some defaults + color = kwargs.get('color', '') + color_reset = Style.RESET_ALL if color else '' + prefix = kwargs.get('prefix', '') + border = kwargs.get('border') + border_bottom = kwargs.get('border_bottom') + file = kwargs.get('file') + quiet = kwargs.get('quiet') + + if border is not None: + border = color + (border * 80) + os.linesep + color_reset + border_bottom = border if border_bottom is None else \ + color + (border_bottom * 80) + os.linesep + color_reset + elif not log_text: + return + + try: + if not quiet: + new_log_text = border or '' + for line in log_text.splitlines(): + if line.strip() is not '': + if prefix: + new_log_text += Style.DIM + prefix + Style.RESET_ALL + new_log_text += color + line + color_reset + os.linesep + new_log_text += border_bottom or '' + + sys.stdout.write(Style.RESET_ALL + new_log_text) + sys.stdout.flush() + + if file is not None and os.fstat( + file.fileno()).st_size < TOO_MANY_BYTES: + file.write(seq.sub('', log_text)) + file.flush() + except: + pass + + +class QuietOutputStream: + ''' + Provides an output stream which either writes to stdout or nothing + depending on the is_quiet param. + ''' + + def __init__(self, is_quiet): + self.is_quiet = is_quiet + + def fileno(self): + with self.enable(): + return sys.stdout.fileno() + + def write(self, message): + with self.enable(): + sys.stdout.write(message) + + @contextmanager + def enable(self): + if self.is_quiet: + old_out = sys.stdout + old_err = sys.stderr + try: + sys.stdout = FNULL + sys.stderr = FNULL + yield + finally: + sys.stdout = old_out + sys.stderr = old_err + else: + yield diff --git a/toolset/utils/results_helper.py b/toolset/utils/results_helper.py new file mode 100755 index 00000000000..17bec80c1aa --- /dev/null +++ b/toolset/utils/results_helper.py @@ -0,0 +1,581 @@ +from toolset.utils.metadata_helper import gather_remaining_tests, gather_frameworks +from toolset.utils.output_helper import log, FNULL + +import os +import subprocess +import uuid +import time +import json +import requests +import threading +import re +import math +import csv +from datetime import datetime + +# Cross-platform colored text +from colorama import Fore, Style + + +class Results: + def __init__(self, config): + ''' + Constructor + ''' + self.config = config + self.directory = os.path.join(self.config.fwroot, "results", + self.config.timestamp) + try: + os.makedirs(self.directory) + except OSError: + pass + self.file = os.path.join(self.directory, "results.json") + + self.uuid = str(uuid.uuid4()) + self.name = datetime.now().strftime(self.config.results_name) + self.environmentDescription = self.config.results_environment + try: + self.git = dict() + self.git['commitId'] = self.__get_git_commit_id() + self.git['repositoryUrl'] = self.__get_git_repository_url() + self.git['branchName'] = self.__get_git_branch_name() + except Exception: + #Could not read local git repository, which is fine. + self.git = None + self.startTime = int(round(time.time() * 1000)) + self.completionTime = None + self.concurrencyLevels = self.config.concurrency_levels + self.pipelineConcurrencyLevels = self.config.pipeline_concurrency_levels + self.queryIntervals = self.config.query_levels + self.cachedQueryIntervals = self.config.cached_query_levels + self.frameworks = [ + t.name for t in gather_remaining_tests(self.config, self) + ] + self.duration = self.config.duration + self.rawData = dict() + self.rawData['json'] = dict() + self.rawData['db'] = dict() + self.rawData['query'] = dict() + self.rawData['fortune'] = dict() + self.rawData['update'] = dict() + self.rawData['plaintext'] = dict() + self.rawData['cached_query'] = dict() + self.completed = dict() + self.succeeded = dict() + self.succeeded['json'] = [] + self.succeeded['db'] = [] + self.succeeded['query'] = [] + self.succeeded['fortune'] = [] + self.succeeded['update'] = [] + self.succeeded['plaintext'] = [] + self.succeeded['cached_query'] = [] + self.failed = dict() + self.failed['json'] = [] + self.failed['db'] = [] + self.failed['query'] = [] + self.failed['fortune'] = [] + self.failed['update'] = [] + self.failed['plaintext'] = [] + self.failed['cached_query'] = [] + self.verify = dict() + + ############################################################################# + # PUBLIC FUNCTIONS + ############################################################################# + + def parse(self, tests): + ''' + Ensures that the system has all necessary software to run + the tests. This does not include that software for the individual + test, but covers software such as curl and weighttp that + are needed. + ''' + # Run the method to get the commmit count of each framework. + self.__count_commits() + # Call the method which counts the sloc for each framework + self.__count_sloc() + + # Time to create parsed files + # Aggregate JSON file + with open(self.file, "w") as f: + f.write(json.dumps(self.__to_jsonable(), indent=2)) + + def parse_test(self, framework_test, test_type): + ''' + Parses the given test and test_type from the raw_file. + ''' + try: + results = dict() + results['results'] = [] + stats = [] + + if os.path.exists( + self.get_raw_file(framework_test.name, test_type)): + with open(self.get_raw_file(framework_test.name, + test_type)) as raw_data: + + is_warmup = True + rawData = None + for line in raw_data: + if "Queries:" in line or "Concurrency:" in line: + is_warmup = False + rawData = None + continue + if "Warmup" in line or "Primer" in line: + is_warmup = True + continue + if not is_warmup: + if rawData == None: + rawData = dict() + results['results'].append(rawData) + if "Latency" in line: + m = re.findall( + r"([0-9]+\.*[0-9]*[us|ms|s|m|%]+)", line) + if len(m) == 4: + rawData['latencyAvg'] = m[0] + rawData['latencyStdev'] = m[1] + rawData['latencyMax'] = m[2] + if "requests in" in line: + m = re.search("([0-9]+) requests in", line) + if m != None: + rawData['totalRequests'] = int(m.group(1)) + if "Socket errors" in line: + if "connect" in line: + m = re.search("connect ([0-9]+)", line) + rawData['connect'] = int(m.group(1)) + if "read" in line: + m = re.search("read ([0-9]+)", line) + rawData['read'] = int(m.group(1)) + if "write" in line: + m = re.search("write ([0-9]+)", line) + rawData['write'] = int(m.group(1)) + if "timeout" in line: + m = re.search("timeout ([0-9]+)", line) + rawData['timeout'] = int(m.group(1)) + if "Non-2xx" in line: + m = re.search( + "Non-2xx or 3xx responses: ([0-9]+)", line) + if m != None: + rawData['5xx'] = int(m.group(1)) + if "STARTTIME" in line: + m = re.search("[0-9]+", line) + rawData["startTime"] = int(m.group(0)) + if "ENDTIME" in line: + m = re.search("[0-9]+", line) + rawData["endTime"] = int(m.group(0)) + test_stats = self.__parse_stats( + framework_test, test_type, + rawData["startTime"], rawData["endTime"], + 1) + stats.append(test_stats) + with open( + self.get_stats_file(framework_test.name, test_type) + + ".json", "w") as stats_file: + json.dump(stats, stats_file, indent=2) + + return results + except IOError: + return None + + def parse_all(self, framework_test): + ''' + Method meant to be run for a given timestamp + ''' + for test_type in framework_test.runTests: + if os.path.exists( + self.get_raw_file(framework_test.name, test_type)): + results = self.parse_test(framework_test, test_type) + self.report_benchmark_results(framework_test, test_type, + results['results']) + + def write_intermediate(self, test_name, status_message): + ''' + Writes the intermediate results for the given test_name and status_message + ''' + self.completed[test_name] = status_message + self.__write_results() + + def set_completion_time(self): + ''' + Sets the completionTime for these results and writes the results + ''' + self.completionTime = int(round(time.time() * 1000)) + self.__write_results() + + def upload(self): + ''' + Attempts to upload the results.json to the configured results_upload_uri + ''' + if self.config.results_upload_uri != None: + try: + requests.post( + self.config.results_upload_uri, + headers={'Content-Type': 'application/json'}, + data=json.dumps(self.__to_jsonable(), indent=2)) + except (Exception): + log("Error uploading results.json") + + def load(self): + ''' + Load the results.json file + ''' + try: + with open(self.file) as f: + self.__dict__.update(json.load(f)) + except (ValueError, IOError): + pass + + def get_raw_file(self, test_name, test_type): + ''' + Returns the output file for this test_name and test_type + Example: fwroot/results/timestamp/test_type/test_name/raw.txt + ''' + path = os.path.join(self.directory, test_name, test_type, "raw.txt") + try: + os.makedirs(os.path.dirname(path)) + except OSError: + pass + return path + + def get_stats_file(self, test_name, test_type): + ''' + Returns the stats file name for this test_name and + Example: fwroot/results/timestamp/test_type/test_name/stats.txt + ''' + path = os.path.join(self.directory, test_name, test_type, "stats.txt") + try: + os.makedirs(os.path.dirname(path)) + except OSError: + pass + return path + + def report_verify_results(self, framework_test, test_type, result): + ''' + Used by FrameworkTest to add verification details to our results + + TODO: Technically this is an IPC violation - we are accessing + the parent process' memory from the child process + ''' + if framework_test.name not in self.verify.keys(): + self.verify[framework_test.name] = dict() + self.verify[framework_test.name][test_type] = result + + def report_benchmark_results(self, framework_test, test_type, results): + ''' + Used by FrameworkTest to add benchmark data to this + + TODO: Technically this is an IPC violation - we are accessing + the parent process' memory from the child process + ''' + if test_type not in self.rawData.keys(): + self.rawData[test_type] = dict() + + # If results has a size from the parse, then it succeeded. + if results: + self.rawData[test_type][framework_test.name] = results + + # This may already be set for single-tests + if framework_test.name not in self.succeeded[test_type]: + self.succeeded[test_type].append(framework_test.name) + else: + # This may already be set for single-tests + if framework_test.name not in self.failed[test_type]: + self.failed[test_type].append(framework_test.name) + + def finish(self): + ''' + Finishes these results. + ''' + if not self.config.parse: + tests = gather_remaining_tests(self.config, self) + # Normally you don't have to use Fore.BLUE before each line, but + # Travis-CI seems to reset color codes on newline (see travis-ci/travis-ci#2692) + # or stream flush, so we have to ensure that the color code is printed repeatedly + log( + "Verification Summary", border='=', border_bottom='-', color=Fore.CYAN) + for test in tests: + log(Fore.CYAN + "| {!s}".format(test.name)) + if test.name in self.verify.keys(): + for test_type, result in self.verify[ + test.name].iteritems(): + if result.upper() == "PASS": + color = Fore.GREEN + elif result.upper() == "WARN": + color = Fore.YELLOW + else: + color = Fore.RED + log(Fore.CYAN + "| " + test_type.ljust(13) + + ' : ' + color + result.upper()) + else: + log(Fore.CYAN + "| " + Fore.RED + + "NO RESULTS (Did framework launch?)") + log('', border='=', border_bottom='', color=Fore.CYAN) + + log("%sTime to complete: %s seconds" % + (Style.RESET_ALL, str(int(time.time() - self.config.start_time)))) + log("Results are saved in " + self.directory) + + ############################################################################# + # PRIVATE FUNCTIONS + ############################################################################# + + def __to_jsonable(self): + ''' + Returns a dict suitable for jsonification + ''' + toRet = dict() + + toRet['uuid'] = self.uuid + toRet['name'] = self.name + toRet['environmentDescription'] = self.environmentDescription + toRet['git'] = self.git + toRet['startTime'] = self.startTime + toRet['completionTime'] = self.completionTime + toRet['concurrencyLevels'] = self.concurrencyLevels + toRet['pipelineConcurrencyLevels'] = self.pipelineConcurrencyLevels + toRet['queryIntervals'] = self.queryIntervals + toRet['cachedQueryIntervals'] = self.cachedQueryIntervals + toRet['frameworks'] = self.frameworks + toRet['duration'] = self.duration + toRet['rawData'] = self.rawData + toRet['completed'] = self.completed + toRet['succeeded'] = self.succeeded + toRet['failed'] = self.failed + toRet['verify'] = self.verify + + return toRet + + def __write_results(self): + try: + with open(self.file, 'w') as f: + f.write(json.dumps(self.__to_jsonable(), indent=2)) + except (IOError): + log("Error writing results.json") + + def __count_sloc(self): + ''' + Counts the significant lines of code for all tests and stores in results. + ''' + frameworks = gather_frameworks(self.config.test, self.config.exclude, + self.config) + + jsonResult = {} + for framework, testlist in frameworks.items(): + if not os.path.exists( + os.path.join(testlist[0].directory, "source_code")): + log("Cannot count lines of code for %s - no 'source_code' file" + % framework) + continue + + # Unfortunately the source_code files use lines like + # ./cpoll_cppsp/www/fortune_old instead of + # ./www/fortune_old + # so we have to back our working dir up one level + wd = os.path.dirname(testlist[0].directory) + + try: + command = "cloc --list-file=%s/source_code --yaml" % testlist[ + 0].directory + + if os.path.exists( + os.path.join(testlist[0].directory, "cloc_defs.txt")): + command += " --read-lang-def %s" % os.path.join( + testlist[0].directory, "cloc_defs.txt") + log("Using custom cloc definitions for %s" % framework) + + # Find the last instance of the word 'code' in the yaml output. This should + # be the line count for the sum of all listed files or just the line count + # for the last file in the case where there's only one file listed. + command = command + "| grep code | tail -1 | cut -d: -f 2" + log("Running \"%s\" (cwd=%s)" % (command, wd)) + lineCount = subprocess.check_output( + command, cwd=wd, shell=True) + jsonResult[framework] = int(lineCount) + except subprocess.CalledProcessError: + continue + except ValueError as ve: + log("Unable to get linecount for %s due to error '%s'" % + (framework, ve)) + self.rawData['slocCounts'] = jsonResult + + def __count_commits(self): + ''' + Count the git commits for all the framework tests + ''' + frameworks = gather_frameworks(self.config.test, self.config.exclude, + self.config) + + def count_commit(directory, jsonResult): + command = "git rev-list HEAD -- " + directory + " | sort -u | wc -l" + try: + commitCount = subprocess.check_output(command, shell=True) + jsonResult[framework] = int(commitCount) + except subprocess.CalledProcessError: + pass + + # Because git can be slow when run in large batches, this + # calls git up to 4 times in parallel. Normal improvement is ~3-4x + # in my trials, or ~100 seconds down to ~25 + # This is safe to parallelize as long as each thread only + # accesses one key in the dictionary + threads = [] + jsonResult = {} + # t1 = datetime.now() + for framework, testlist in frameworks.items(): + directory = testlist[0].directory + t = threading.Thread( + target=count_commit, args=(directory, jsonResult)) + t.start() + threads.append(t) + # Git has internal locks, full parallel will just cause contention + # and slowness, so we rate-limit a bit + if len(threads) >= 4: + threads[0].join() + threads.remove(threads[0]) + + # Wait for remaining threads + for t in threads: + t.join() + # t2 = datetime.now() + # print "Took %s seconds " % (t2 - t1).seconds + + self.rawData['commitCounts'] = jsonResult + self.config.commits = jsonResult + + def __get_git_commit_id(self): + ''' + Get the git commit id for this benchmark + ''' + return subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=self.config.fwroot).strip() + + def __get_git_repository_url(self): + ''' + Gets the git repository url for this benchmark + ''' + return subprocess.check_output( + ["git", "config", "--get", "remote.origin.url"], cwd=self.config.fwroot).strip() + + def __get_git_branch_name(self): + ''' + Gets the git branch name for this benchmark + ''' + return subprocess.check_output( + 'git rev-parse --abbrev-ref HEAD', shell=True, cwd=self.config.fwroot).strip() + + def __parse_stats(self, framework_test, test_type, start_time, end_time, + interval): + ''' + For each test type, process all the statistics, and return a multi-layered + dictionary that has a structure as follows: + + (timestamp) + | (main header) - group that the stat is in + | | (sub header) - title of the stat + | | | (stat) - the stat itself, usually a floating point number + ''' + stats_dict = dict() + stats_file = self.get_stats_file(framework_test.name, test_type) + with open(stats_file) as stats: + # dstat doesn't output a completely compliant CSV file - we need to strip the header + while (stats.next() != "\n"): + pass + stats_reader = csv.reader(stats) + main_header = stats_reader.next() + sub_header = stats_reader.next() + time_row = sub_header.index("epoch") + int_counter = 0 + for row in stats_reader: + time = float(row[time_row]) + int_counter += 1 + if time < start_time: + continue + elif time > end_time: + return stats_dict + if int_counter % interval != 0: + continue + row_dict = dict() + for nextheader in main_header: + if nextheader != "": + row_dict[nextheader] = dict() + header = "" + for item_num, column in enumerate(row): + if (len(main_header[item_num]) != 0): + header = main_header[item_num] + # all the stats are numbers, so we want to make sure that they stay that way in json + row_dict[header][sub_header[item_num]] = float(column) + stats_dict[time] = row_dict + return stats_dict + + def __calculate_average_stats(self, raw_stats): + ''' + We have a large amount of raw data for the statistics that may be useful + for the stats nerds, but most people care about a couple of numbers. For + now, we're only going to supply: + * Average CPU + * Average Memory + * Total network use + * Total disk use + More may be added in the future. If they are, please update the above list. + + Note: raw_stats is directly from the __parse_stats method. + + Recall that this consists of a dictionary of timestamps, each of which + contain a dictionary of stat categories which contain a dictionary of stats + ''' + raw_stat_collection = dict() + + for time_dict in raw_stats.items()[1]: + for main_header, sub_headers in time_dict.items(): + item_to_append = None + if 'cpu' in main_header: + # We want to take the idl stat and subtract it from 100 + # to get the time that the CPU is NOT idle. + item_to_append = sub_headers['idl'] - 100.0 + elif main_header == 'memory usage': + item_to_append = sub_headers['used'] + elif 'net' in main_header: + # Network stats have two parts - recieve and send. We'll use a tuple of + # style (recieve, send) + item_to_append = (sub_headers['recv'], sub_headers['send']) + elif 'dsk' or 'io' in main_header: + # Similar for network, except our tuple looks like (read, write) + item_to_append = (sub_headers['read'], sub_headers['writ']) + if item_to_append is not None: + if main_header not in raw_stat_collection: + raw_stat_collection[main_header] = list() + raw_stat_collection[main_header].append(item_to_append) + + # Simple function to determine human readable size + # http://stackoverflow.com/questions/1094841/reusable-library-to-get-human-readable-version-of-file-size + def sizeof_fmt(num): + # We'll assume that any number we get is convertable to a float, just in case + num = float(num) + for x in ['bytes', 'KB', 'MB', 'GB']: + if num < 1024.0 and num > -1024.0: + return "%3.1f%s" % (num, x) + num /= 1024.0 + return "%3.1f%s" % (num, 'TB') + + # Now we have our raw stats in a readable format - we need to format it for display + # We need a floating point sum, so the built in sum doesn't cut it + display_stat_collection = dict() + for header, values in raw_stat_collection.items(): + display_stat = None + if 'cpu' in header: + display_stat = sizeof_fmt(math.fsum(values) / len(values)) + elif main_header == 'memory usage': + display_stat = sizeof_fmt(math.fsum(values) / len(values)) + elif 'net' in main_header: + receive, send = zip(*values) # unzip + display_stat = { + 'receive': sizeof_fmt(math.fsum(receive)), + 'send': sizeof_fmt(math.fsum(send)) + } + else: # if 'dsk' or 'io' in header: + read, write = zip(*values) # unzip + display_stat = { + 'read': sizeof_fmt(math.fsum(read)), + 'write': sizeof_fmt(math.fsum(write)) + } + display_stat_collection[header] = display_stat + return display_stat diff --git a/toolset/utils/scaffolding.py b/toolset/utils/scaffolding.py new file mode 100755 index 00000000000..04810ec979c --- /dev/null +++ b/toolset/utils/scaffolding.py @@ -0,0 +1,364 @@ +# -*- coding: utf-8 -*- +import os, re +from shutil import copytree +from toolset.utils.metadata_helper import gather_frameworks, gather_langauges + + +class Scaffolding: + def __init__(self): + print(""" +------------------------------------------------------------------------------- + This wizard is intended to help build the scaffolding required for a new + test to be benchmarked. + + From here, you will be prompted for values related to the test you + wish to add. +-------------------------------------------------------------------------------""" + ) + + try: + self.__gather_display_name() + self.__gather_language() + self.__gather_approach() + self.__gather_classification() + self.__gather_orm() + self.__gather_webserver() + self.__gather_versus() + self.__confirm_values() + self.__print_success() + except: + print("") + + def __gather_display_name(self): + print(""" + The name of your test as you wish it to be displayed on the results page. + + Example: Gemini, Gin, Express + """) + self.__prompt_display_name() + while not self.display_name: + self.__prompt_display_name() + self.name = self.display_name.lower() + + def __prompt_display_name(self): + self.display_name = input("Name: ").strip() + + found = False + for framework in gather_frameworks(): + if framework.lower() == self.display_name.lower(): + found = True + + if found: + print(""" + It appears that there is already a '%s' framework in the test suite. You will + have to pick a different name. + """ % self.display_name) + self.display_name = None + + def __gather_language(self): + print(""" + The language in which your test implementation is written. + + Example: Java, Go, PHP + """) + self.language = None + while not self.language: + self.__prompt_language() + + def __prompt_language(self): + self.language = input("Language: ").strip() + + known_languages = gather_langauges() + language = None + for lang in known_languages: + if lang.lower() == self.language.lower(): + language = lang + + if not language: + similar = [] + for lang in known_languages: + if lang.lower()[:1] == self.language.lower()[:1]: + similar.append(lang) + similar = ', '.join(similar) + + print(""" + That language is not currently in our list of known languages. + + Here is a list of similar languages present in our benchmark suite that you + may have meant: + + %s + + Did you mean to add the new language, '%s', to the benchmark suite? + """ % (similar, self.language)) + valid = self.__prompt_confirm_new_language(known_languages) + while not valid: + valid = self.__prompt_confirm_new_language(known_languages) + + if self.confirm_new_lang == 'n': + self.language = None + else: + self.language = self.language.title() + + return self.language + + def __prompt_confirm_new_language(self, known_languages): + self.confirm_new_lang = input("Create New Language '%s' (y/n): " % + self.language).strip().lower() + return self.confirm_new_lang == 'y' or self.confirm_new_lang == 'n' + + def __gather_approach(self): + print(""" + The approach of your test implementation. + + 1) Realistic: Uses the framework with most out-of-the-box functionality + enabled. We consider this realistic because most applications + built with the framework will leave these features enabled. + 2) Stripped: Removes or outright avoids implementing features that are + unnecessary for the particulars of the benchmark exercise. This + might illuminate the marginal improvement available in fine- + tuning a framework to your application's use-case. + + Note: If you are unsure, then your approach is probably Realistic. The + Stripped approach is seldom used and will not have results displayed + by default on the results website. + """) + valid = self.__prompt_approach() + while not valid: + valid = self.__prompt_approach() + + def __prompt_approach(self): + self.approach = input("Approach [1/2]: ").strip() + if self.approach == '1': + self.approach = 'Realistic' + if self.approach == '2': + self.approach = 'Stripped' + return self.approach == 'Realistic' or self.approach == 'Stripped' + + def __gather_classification(self): + print(""" + The classification of your test implementation. + + 1) Fullstack: Robust framework expected to provide high-level functionality + for serving as a web application; for example, ability to + compose views, provide functions for responding with several + data types (json, html, etc), connecting to a database, form + processing, etc. + 2) Micro: Simple framework expected to provide enough middleware to build + a robust web application such as request routing and some + simple plumbing, but may not include built-in functionality + such as, for example, server-composed views. + 3) Platform: Barebones infrastructure for servicing HTTP requests, but does + not include a framework at all. + """) + valid = self.__prompt_classification() + while not valid: + valid = self.__prompt_classification() + if self.classification == 'Platform': + self.platform = 'None' + self.framework = 'None' + else: + self.framework = self.display_name + self.__gather_platform() + + def __prompt_classification(self): + self.classification = input("Classification [1/2/3]: ").strip() + if self.classification == '1': + self.classification = 'Fullstack' + if self.classification == '2': + self.classification = 'Micro' + if self.classification == '3': + self.classification = 'Platform' + return self.classification == 'Fullstack' or \ + self.classification == 'Micro' or \ + self.classification == 'Platform' + + def __gather_platform(self): + print(""" + The platform of your test implementation. + + The platform is the low-level software or API used to host web applications + for the framework; the platform provides an implementation of the HTTP + fundamentals. + + Not all frameworks have a platform and if your programming language provides + much of that by which we define a platform, leave black. + + Example: Servlet, Wai, .NET + """) + self.__prompt_platform() + + def __prompt_platform(self): + self.platform = input("Platform (optional): ").strip() + if self.platform == '': + self.platform = 'None' + + def __gather_orm(self): + print(""" + How you would classify the ORM (object relational mapper) of your test? + + 1) Full: A feature-rich ORM which provides functionality for interacting + with a database without writing a query in all but the most edge + cases. + 2) Micro: An ORM which provides functionality for interacting with a database + for many trivial operations (querying, updating), but not more + robust cases (for example, gathering relations). + 3) Raw: No ORM; raw database access. + """) + valid = self.__prompt_orm() + while not valid: + valid = self.__prompt_orm() + + def __prompt_orm(self): + self.orm = input("ORM [1/2/3]: ").strip() + if self.orm == '1': + self.orm = 'Full' + if self.orm == '2': + self.orm = 'Micro' + if self.orm == '3': + self.orm = 'Raw' + return self.orm == 'Full' or \ + self.orm == 'Micro' or \ + self.orm == 'Raw' + + def __gather_webserver(self): + print(""" + Name of the front-end webserver sitting in front of your test implementation. + + Your test implementation may not use a web-server and may act as its own; you + can leave this blank in this case. + + Example: nginx, Meinheld, httplight + """) + self.__prompt_webserver() + + def __prompt_webserver(self): + self.webserver = input("Webserver (optional): ").strip() + if self.webserver == '': + self.webserver = 'None' + + def __gather_versus(self): + print(""" + The name of another test (elsewhere in this project) that is a subset of this + framework. + This allows for the generation of the framework efficiency chart in the + results web site. + For example, Compojure is compared to "servlet" since Compojure is built on + the Servlet platform. + + Example: Servlet, Wai, Undertow + """) + self.__prompt_versus() + + def __prompt_versus(self): + self.versus = input("Versus (optional): ").strip() + if self.versus == '': + self.versus = 'None' + + def __confirm_values(self): + print(""" + Name: %s + Language: %s + Approach: %s + Classification: %s + Platform: %s + ORM: %s + Webserver: %s + Versus: %s + + Finalize the initialization of your test given the above values? + + Note: once you have initialized your test, you can change these values later. + """ % (self.display_name, self.language, self.approach, + self.classification, self.platform, self.orm, self.webserver, + self.versus)) + + valid = self.__prompt_confirmation() + while not valid: + valid = self.__prompt_confirmation() + + if self.confirmation == 'y': + self.__build_scaffolding() + else: + print('Aborting') + + def __prompt_confirmation(self): + self.confirmation = input("Initialize [y/n]: ").strip().lower() + return self.confirmation == 'y' or self.confirmation == 'n' + + def __build_scaffolding(self): + if self.__create_test_folder(): + self.__copy_scaffold_files() + self.__edit_scaffold_files() + + def __create_test_folder(self): + self.language_dir = os.path.join("frameworks", self.language) + self.test_dir = os.path.join(self.language_dir, self.name) + + if os.path.exists(self.test_dir): + print("Test '%s' already exists; aborting." % self.name) + return False + + return True + + def __copy_scaffold_files(self): + self.scaffold_dir = os.path.join("toolset", "setup", "scaffolding") + copytree(self.scaffold_dir, self.test_dir) + + def __edit_scaffold_files(self): + for file in os.listdir(os.path.join(self.test_dir)): + self.__replace_text( + os.path.join(self.test_dir, file), "\$NAME", self.name) + self.__replace_text( + os.path.join(self.test_dir, file), "\$DISPLAY_NAME", + self.display_name) + self.__replace_text( + os.path.join(self.test_dir, file), "\$APPROACH", self.approach) + self.__replace_text( + os.path.join(self.test_dir, file), "\$CLASSIFICATION", + self.classification) + self.__replace_text( + os.path.join(self.test_dir, file), "\$FRAMEWORK", + self.framework) + self.__replace_text( + os.path.join(self.test_dir, file), "\$LANGUAGE", self.language) + self.__replace_text( + os.path.join(self.test_dir, file), "\$ORM", self.orm) + self.__replace_text( + os.path.join(self.test_dir, file), "\$PLATFORM", self.platform) + self.__replace_text( + os.path.join(self.test_dir, file), "\$WEBSERVER", + self.webserver) + self.__replace_text( + os.path.join(self.test_dir, file), "\$VERSUS", self.versus) + + def __print_success(self): + print(""" +------------------------------------------------------------------------------- + Success! + + Your new test structure has been built to the sepcifications of the suite. + Here is a brief run-down of what has been built: + + frameworks + └─── %s + └─── %s + ├─── .gitignore + ├─── benchmark_config.json + ├─── README.md + ├─── setup.sh + ├─── setup_mysql.sh + └─── source_code + + The next step is to read through your README.md and follow the instructions + provided therein. +-------------------------------------------------------------------------------""" + % (self.language, self.name)) + + # Replaces all text found using the regular expression to_replace with the supplied replacement. + def __replace_text(self, file, to_replace, replacement): + with open(file, "r") as conf: + contents = conf.read() + replaced_text = re.sub(to_replace, replacement, contents) + with open(file, "w") as f: + f.write(replaced_text) \ No newline at end of file diff --git a/toolset/utils/unbuffered.py b/toolset/utils/unbuffered.py new file mode 100644 index 00000000000..5239e0f30d7 --- /dev/null +++ b/toolset/utils/unbuffered.py @@ -0,0 +1,16 @@ +# Wrapper for unbuffered stream writing. +# http://stackoverflow.com/a/107717/376366 +# Used to make sure print output appears in the correct order +# in log files when spawning subprocesses. + + +class Unbuffered: + def __init__(self, stream): + self.stream = stream + + def write(self, data): + self.stream.write(data) + self.stream.flush() + + def __getattr__(self, attr): + return getattr(self.stream, attr)
" and "A computer scientist is someone who fixes things that aren't broken.