Browse Source

Merge remote-tracking branch 'upstream/master' into issue-1048

Conflicts:
	toolset/setup/linux/prerequisites.sh
marko asplund 11 years ago
parent
commit
69bd0bcda2
91 changed files with 404 additions and 322 deletions
  1. 1 1
      README.md
  2. 1 0
      config/cassandra/cleanup-keyspace.cql
  3. 0 2
      config/cassandra/create-keyspace.cql
  4. 3 1
      config/php.ini
  5. 1 0
      deployment/vagrant-common/bootstrap.sh
  6. 13 1
      deployment/vagrant-virtualbox/README.md
  7. 4 4
      frameworks/Dart/dart/README.md
  8. 1 1
      frameworks/Dart/dart/benchmark_config
  9. 1 1
      frameworks/Dart/dart/install.sh
  10. 4 4
      frameworks/Dart/dart/pubspec.yaml
  11. 53 45
      frameworks/Dart/dart/server.dart
  12. 1 44
      frameworks/Dart/dart/setup.py
  13. 3 0
      frameworks/Haskell/wai/bash_profile.sh
  14. 3 3
      frameworks/Haskell/wai/bench/bench.cabal
  15. 12 8
      frameworks/Haskell/wai/bench/wai.hs
  16. 1 1
      frameworks/Haskell/wai/install.sh
  17. 2 4
      frameworks/Haskell/wai/setup.py
  18. 3 0
      frameworks/Haskell/yesod/bash_profile.sh
  19. 17 10
      frameworks/Haskell/yesod/bench/bench.cabal
  20. 106 64
      frameworks/Haskell/yesod/bench/src/yesod.hs
  21. 1 1
      frameworks/Haskell/yesod/install.sh
  22. 1 5
      frameworks/Haskell/yesod/setup.py
  23. 1 1
      frameworks/Java/curacao/README.md
  24. 3 3
      frameworks/Java/curacao/build.sbt
  25. 3 2
      frameworks/Java/servlet3-cass/benchmark_config
  26. 3 1
      frameworks/Java/servlet3-cass/setup.py
  27. 7 4
      frameworks/Lua/lapis/config.lua
  28. 6 2
      frameworks/Lua/lapis/config.moon
  29. 1 0
      frameworks/Lua/lapis/setup.py
  30. 4 3
      frameworks/Lua/lapis/web.lua
  31. 3 1
      frameworks/Lua/lapis/web.moon
  32. 2 0
      frameworks/Lua/openresty/app.lua
  33. 1 1
      frameworks/PHP/cakephp/README.md
  34. 3 1
      frameworks/PHP/cakephp/app/Config/core.php
  35. 1 1
      frameworks/PHP/cakephp/bash_profile.sh
  36. 2 1
      frameworks/PHP/cakephp/setup.py
  37. 1 1
      frameworks/PHP/hhvm/bash_profile.sh
  38. 1 1
      frameworks/PHP/php-codeigniter/README.md
  39. 1 1
      frameworks/PHP/php-codeigniter/bash_profile.sh
  40. 1 1
      frameworks/PHP/php-fatfree/bash_profile.sh
  41. 1 1
      frameworks/PHP/php-fuel/README.md
  42. 1 1
      frameworks/PHP/php-fuel/bash_profile.sh
  43. 1 1
      frameworks/PHP/php-kohana/README.md
  44. 10 15
      frameworks/PHP/php-kohana/application/config/database.php
  45. 1 1
      frameworks/PHP/php-kohana/bash_profile.sh
  46. 1 1
      frameworks/PHP/php-laravel/bash_profile.sh
  47. 1 1
      frameworks/PHP/php-laravel/readme.md
  48. 1 1
      frameworks/PHP/php-lithium/README.md
  49. 1 1
      frameworks/PHP/php-lithium/bash_profile.sh
  50. 1 1
      frameworks/PHP/php-micromvc/README.md
  51. 1 1
      frameworks/PHP/php-micromvc/bash_profile.sh
  52. 1 1
      frameworks/PHP/php-phalcon-micro/README.md
  53. 1 1
      frameworks/PHP/php-phalcon-micro/bash_profile.sh
  54. 1 1
      frameworks/PHP/php-phalcon/README.md
  55. 1 1
      frameworks/PHP/php-phalcon/bash_profile.sh
  56. 1 1
      frameworks/PHP/php-phpixie/bash_profile.sh
  57. 1 1
      frameworks/PHP/php-pimf/README.md
  58. 1 1
      frameworks/PHP/php-pimf/bash_profile.sh
  59. 1 1
      frameworks/PHP/php-senthot/bash_profile.sh
  60. 1 1
      frameworks/PHP/php-silex-orm/README.md
  61. 1 1
      frameworks/PHP/php-silex-orm/bash_profile.sh
  62. 1 1
      frameworks/PHP/php-silex-orm/web/index.php
  63. 1 1
      frameworks/PHP/php-silex/README.md
  64. 1 1
      frameworks/PHP/php-silex/bash_profile.sh
  65. 1 1
      frameworks/PHP/php-silica/README.md
  66. 1 1
      frameworks/PHP/php-silica/bash_profile.sh
  67. 1 1
      frameworks/PHP/php-slim/README.md
  68. 1 1
      frameworks/PHP/php-slim/bash_profile.sh
  69. 1 1
      frameworks/PHP/php-symfony2-stripped/README.md
  70. 1 1
      frameworks/PHP/php-symfony2-stripped/bash_profile.sh
  71. 1 1
      frameworks/PHP/php-symfony2/README.md
  72. 2 2
      frameworks/PHP/php-symfony2/app/config/config_prod.yml
  73. 1 1
      frameworks/PHP/php-symfony2/bash_profile.sh
  74. 1 1
      frameworks/PHP/php-yaf/bash_profile.sh
  75. 1 1
      frameworks/PHP/php-yii2/bash_profile.sh
  76. 1 1
      frameworks/PHP/php-zend-framework/bash_profile.sh
  77. 1 1
      frameworks/PHP/php/README.md
  78. 1 1
      frameworks/PHP/php/bash_profile.sh
  79. 1 1
      frameworks/PHP/php/deploy/nginx.conf
  80. 2 2
      frameworks/PHP/php/deploy/php
  81. 1 1
      frameworks/PHP/phreeze/bash_profile.sh
  82. 0 2
      toolset/benchmark/fortune_html_parser.py
  83. 4 3
      toolset/benchmark/framework_test.py
  84. 19 1
      toolset/run-ci.py
  85. 0 6
      toolset/setup/linux/frameworks/yesod.sh
  86. 16 8
      toolset/setup/linux/installer.py
  87. 1 1
      toolset/setup/linux/languages/composer.sh
  88. 13 0
      toolset/setup/linux/languages/haskell78.sh
  89. 13 12
      toolset/setup/linux/languages/php.sh
  90. 5 2
      toolset/setup/linux/prerequisites.sh
  91. 5 5
      toolset/setup/linux/webservers/openresty.sh

+ 1 - 1
README.md

@@ -65,7 +65,7 @@ The full benchmark requires at least three computers:
 
 * `app server`: The computer that your framework will be launched on.
 * `load server`: The computer that will generate client load. Also known as the `client machine`.
-* `database server`: The computer that runs all the databases. Also knonw as the `DB server`.
+* `database server`: The computer that runs all the databases. Also known as the `DB server`.
 
 This codebase (`TechEmpower/FrameworkBenchmarks` aka `TFB`) must be run on 
 the `app server`. The codebase contains a number of `framework directories`, each 

+ 1 - 0
config/cassandra/cleanup-keyspace.cql

@@ -0,0 +1 @@
+DROP KEYSPACE tfb;

+ 0 - 2
config/cassandra/create-keyspace.cql

@@ -1,6 +1,4 @@
 
-DROP KEYSPACE tfb;
-
 CREATE KEYSPACE tfb WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1 };
 USE tfb;
 

+ 3 - 1
config/php.ini

@@ -865,7 +865,9 @@ default_socket_timeout = 60
 ; extension folders as well as the separate PECL DLL download (PHP 5).
 ; Be sure to appropriately set the extension_dir directive.
 ;
-extension=apc.so
+;extension=apc.so
+zend_extension=opcache.so
+extension=redis.so
 extension=phalcon.so
 extension=yaf.so
 ;extension=php_bz2.dll

+ 1 - 0
deployment/vagrant-common/bootstrap.sh

@@ -90,6 +90,7 @@ if [ ! -e "~/.firstboot" ]; then
 
   # Install prerequisite tools
   echo "Installing prerequisites"
+  sudo apt-get update
   sudo apt-get install -y git
   sudo apt-get install -y python-pip
 

+ 13 - 1
deployment/vagrant-virtualbox/README.md

@@ -9,4 +9,16 @@ that modify how TFB launches your Virtuabox virtual machines.
 | `TFB_VB_SHOW`                    | `true,false`        | Show the VM in a window when running? Default is false
 | `TFB_VB_ARCH`                    | `64,32`             | Used to force TFB to run a 32-bit virtual machine. This is unsupported, as many of the framework binaries we download are 64-bit only and will not launch. If you cannot run a 64-bit VM, then we recommend using the Amazon AWS provider instead of using this variable
 | `TFB_VB_MEM`                     | `<number>` e.g. `2048` | Size of VM's RAM in MB. Default is `2048`
-| `TFB_VB_CPU`                     | `<number>` e.g. `2` | Number of host CPUs that the VM can access
+| `TFB_VB_CPU`                     | `<number>` e.g. `2` | Number of host CPUs that the VM can access
+
+# Tips and Tricks
+
+**Use Snapshots To Speed Development**
+
+There is an excellent Vagrant plugin to perform  
+snapshots [here](https://github.com/scalefactory/vagrant-multiprovider-snap). 
+Another alternative is [here](https://github.com/dergachev/vagrant-vbox-snapshot).
+My standard workflow is to do `vagrant up` and immediately 
+do a `vagrant snap` to preserve the initial state. Then I can
+install things, work on pull requests, etc, and roll back to the 
+initial state each time to avoid interference. 

+ 4 - 4
frameworks/Dart/dart/README.md

@@ -4,12 +4,12 @@ This is the dart portion of a [benchmarking test suite](../) comparing a variety
 
 ## Versions
 
-* [Dart SDK version >=1.3.0](http://www.dartlang.org/)
-* [Dart args version 0.11.0+1](http://pub.dartlang.org/packages/args)
+* [Dart SDK version >=1.6.0](http://www.dartlang.org/)
+* [Dart args version 0.12.0+2](http://pub.dartlang.org/packages/args)
 * [Dart crypto version 0.9.0](http://pub.dartlang.org/packages/crypto)
 * [Dart mustache version 0.1.8](http://pub.dartlang.org/packages/mustache)
-* [Dart postgresql version 0.2.13](http://pub.dartlang.org/packages/postgresql)
-* [Dart yaml version 0.9.0](http://pub.dartlang.org/packages/yaml)
+* [Dart postgresql version 0.2.14](http://pub.dartlang.org/packages/postgresql)
+* [Dart yaml version 2.0.1+1](http://pub.dartlang.org/packages/yaml)
 
 ## Test URLs
 

+ 1 - 1
frameworks/Dart/dart/benchmark_config

@@ -17,7 +17,7 @@
       "language": "Dart",
       "orm": "Raw",
       "platform": "Dart",
-      "webserver": "nginx",
+      "webserver": "None",
       "os": "Linux",
       "database_os": "Linux",
       "display_name": "dart",

+ 1 - 1
frameworks/Dart/dart/install.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 
-fw_depends dart nginx
+fw_depends dart

+ 4 - 4
frameworks/Dart/dart/pubspec.yaml

@@ -1,10 +1,10 @@
 name: dartbenchmark
 description: A benchmark of dart
 environment:
-  sdk: ">=1.3.0 <2.0.0"
+  sdk: '>=1.6.0 <2.0.0'
 dependencies:
-  args: 0.11.0+1
+  args: 0.12.0+2
   crypto: 0.9.0
   mustache: 0.1.8
-  postgresql: 0.2.13
-  yaml: 0.9.0
+  postgresql: 0.2.14
+  yaml: 2.0.1+1

+ 53 - 45
frameworks/Dart/dart/server.dart

@@ -1,6 +1,7 @@
 import 'dart:async' show Future;
-import 'dart:io';
 import 'dart:convert';
+import 'dart:io';
+import 'dart:isolate';
 import 'dart:math' show Random;
 import 'package:args/args.dart' show ArgParser;
 import 'package:mustache/mustache.dart' as mustache;
@@ -17,11 +18,26 @@ main(List<String> args) {
   parser.addOption('address', abbr: 'a', defaultsTo: '0.0.0.0');
   parser.addOption('port', abbr: 'p', defaultsTo: '8080');
   parser.addOption('dbconnections', abbr: 'd', defaultsTo: '256');
+  parser.addOption('isolates', abbr: 'i', defaultsTo: '1');
   var arguments = parser.parse(args);
-  _startServer(
-      arguments['address'],
-      int.parse(arguments['port']),
-      int.parse(arguments['dbconnections']));
+  var isolates = int.parse(arguments['isolates']);
+  var dbConnections = int.parse(arguments['dbconnections']) ~/ isolates;
+  ServerSocket.bind(arguments['address'], int.parse(arguments['port']))
+      .then((server) {
+        var ref = server.reference;
+        for (int i = 1; i < isolates; i++) {
+          Isolate.spawn(startInIsolate, [ref, dbConnections]);
+        }
+        _startServer(server, dbConnections);
+      });
+}
+
+void startInIsolate(args) {
+  var ref = args[0];
+  var dbConnections = args[1];
+  ref.create().then((server) {
+    _startServer(server, dbConnections);
+  });
 }
 
 /// The entity used in the database query and update tests.
@@ -51,15 +67,6 @@ const _WORLD_TABLE_SIZE = 10000;
 /// A random number generator.
 final _RANDOM = new Random();
 
-/// The 'text/html; charset=utf-8' content type.
-final _TYPE_HTML = new ContentType('text', 'html', charset: 'utf-8');
-
-/// The 'application/json' content type.
-final _TYPE_JSON = new ContentType('application', 'json');
-
-/// The 'text/html; charset=utf-8' content type.
-final _TYPE_TEXT = new ContentType('text', 'plain', charset: 'utf-8');
-
 /// The PostgreSQL connection pool used by all the tests that require database
 /// connectivity.
 var _connectionPool;
@@ -70,7 +77,7 @@ var _fortunesTemplate;
 /// Starts a benchmark server, which listens for connections from
 /// '[address] : [port]' and maintains [dbConnections] connections to the
 /// database.
-_startServer(address, port, dbConnections) {
+_startServer(serverSocket, dbConnections) {
   Future.wait([
     new File('postgresql.yaml').readAsString().then((config) {
       _connectionPool = new pgpool.Pool(
@@ -83,33 +90,33 @@ _startServer(address, port, dbConnections) {
       _fortunesTemplate = mustache.parse(template);
     })
   ]).then((_) {
-    HttpServer.bind(address, port).then((server) {
-      server.serverHeader = 'dart';
-      server.listen((request) {
-        switch (request.uri.path) {
-          case '/json':
-            _jsonTest(request);
-            break;
-          case '/db':
-            _dbTest(request);
-            break;
-          case '/queries':
-            _queriesTest(request);
-            break;
-          case '/fortunes':
-            _fortunesTest(request);
-            break;
-          case '/updates':
-            _updatesTest(request);
-            break;
-          case '/plaintext':
-            _plaintextTest(request);
-            break;
-          default:
-            _sendResponse(request, HttpStatus.NOT_FOUND);
-            break;
-        }
-      });
+    var server = new HttpServer.listenOn(serverSocket);
+    server.defaultResponseHeaders.clear();
+    server.serverHeader = 'dart';
+    server.listen((request) {
+      switch (request.uri.path) {
+        case '/json':
+          _jsonTest(request);
+          break;
+        case '/db':
+          _dbTest(request);
+          break;
+        case '/queries':
+          _queriesTest(request);
+          break;
+        case '/fortunes':
+          _fortunesTest(request);
+          break;
+        case '/updates':
+          _updatesTest(request);
+          break;
+        case '/plaintext':
+          _plaintextTest(request);
+          break;
+        default:
+          _sendResponse(request, HttpStatus.NOT_FOUND);
+          break;
+      }
     });
   });
 }
@@ -140,17 +147,18 @@ _sendResponse(request, statusCode, [ type, response ]) {
 
 /// Completes the given [request] by writing the [response] as HTML.
 _sendHtml(request, response) {
-  _sendResponse(request, HttpStatus.OK, _TYPE_HTML, response);
+  _sendResponse(request, HttpStatus.OK, ContentType.HTML, response);
 }
 
 /// Completes the given [request] by writing the [response] as JSON.
 _sendJson(request, response) {
-  _sendResponse(request, HttpStatus.OK, _TYPE_JSON, JSON.encode(response));
+  _sendResponse(
+      request, HttpStatus.OK, ContentType.JSON, JSON.encode(response));
 }
 
 /// Completes the given [request] by writing the [response] as plain text.
 _sendText(request, response) {
-  _sendResponse(request, HttpStatus.OK, _TYPE_TEXT, response);
+  _sendResponse(request, HttpStatus.OK, ContentType.TEXT, response);
 }
 
 /// Responds with the JSON test to the [request].

+ 1 - 44
frameworks/Dart/dart/setup.py

@@ -13,55 +13,12 @@ def start(args, logfile, errfile):
     #
     # start dart servers
     #
-    for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen('dart server.dart -a 127.0.0.1 -p ' + str(port) + ' -d ' + str(args.max_concurrency / args.max_threads), shell=True, cwd='dart', stderr=errfile, stdout=logfile)
-    #
-    # create nginx configuration
-    #
-    conf = []
-    conf.append('worker_processes ' + str(args.max_threads) + ';')
-    conf.append('error_log stderr error;')
-    conf.append('events {')
-    conf.append('    worker_connections 1024;')
-    conf.append('}')
-    conf.append('http {')
-    conf.append('    access_log off;')
-    conf.append('    include /usr/local/nginx/conf/mime.types;')
-    conf.append('    default_type application/octet-stream;')
-    conf.append('    sendfile on;')
-    conf.append('    upstream dart_cluster {')
-    for port in range(9001, 9001 + args.max_threads):
-      conf.append('        server 127.0.0.1:' + str(port) + ';')
-    conf.append('        keepalive ' + str(args.max_concurrency / args.max_threads) + ';')
-    conf.append('    }')
-    conf.append('    server {')
-    conf.append('        listen 8080;')
-    conf.append('        location / {')
-    conf.append('            proxy_pass http://dart_cluster;')
-    conf.append('            proxy_http_version 1.1;')
-    conf.append('            proxy_set_header Connection "";')
-    conf.append('        }')
-    conf.append('    }')
-    conf.append('}')
-    #
-    # write nginx configuration to disk
-    #
-    with open('dart/nginx.conf', 'w') as f:
-      f.write('\n'.join(conf))
-    #
-    # start nginx
-    #
-    subprocess.Popen('sudo /usr/local/nginx/sbin/nginx -c $TROOT/nginx.conf', shell=True, cwd='dart', stderr=errfile, stdout=logfile);
+    subprocess.Popen('dart server.dart -a 0.0.0.0 -p 8080 -d ' + str(args.max_concurrency) + ' -i ' + str(args.max_threads), shell=True, cwd='dart', stderr=errfile, stdout=logfile)
     return 0
   except subprocess.CalledProcessError:
     return 1
 
 def stop(logfile, errfile):
-  #
-  # stop nginx
-  #
-  subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c $TROOT/nginx.conf -s stop', shell=True, cwd='dart', stderr=errfile, stdout=logfile)
-  os.remove('dart/nginx.conf')
   #
   # stop dart servers
   #

+ 3 - 0
frameworks/Haskell/wai/bash_profile.sh

@@ -0,0 +1,3 @@
+# Where to find the ghc and cabal executables
+export PATH="/opt/ghc/7.8.3/bin:/opt/cabal/1.20/bin:$PATH"
+export LANG=en_US.UTF-8

+ 3 - 3
frameworks/Haskell/wai/bench/bench.cabal

@@ -11,12 +11,12 @@ executable         bench
 
     extensions: OverloadedStrings
 
-    build-depends: base                          >= 4          && < 5
+    build-depends: base                          >= 4.7        && < 5
                  , aeson                         >= 0.6.1.0
-                 , conduit-extra                 >= 1.1
                  , http-types
                  , network                       >= 2.4
-                 , streaming-commons
                  , text                          >= 1.0
                  , wai                           >= 3.0
                  , warp                          >= 3.0
+                 , blaze-builder
+                 , bytestring                    >= 0.10

+ 12 - 8
frameworks/Haskell/wai/bench/wai.hs

@@ -1,20 +1,24 @@
 {-# LANGUAGE OverloadedStrings, BangPatterns #-}
 
+import Blaze.ByteString.Builder (copyByteString)
 import Control.Concurrent (runInUnboundThread)
 import Data.Aeson ((.=), object, encode)
-import Data.Streaming.Network (bindPortTCP)
+import qualified Data.ByteString.Lazy as L
 import Data.Text (Text)
 import Network.HTTP.Types (status200)
-import Network.Wai (responseLBS)
+import Network.Wai (responseBuilder)
 import qualified Network.Wai.Handler.Warp as W
 
 main :: IO ()
-main = runInUnboundThread $ do
-    s <- bindPortTCP 8000 "*"
-    W.runSettingsSocket settings s app
+main =
+    runInUnboundThread $ W.runSettings settings app
   where
-    settings = W.setOnException (\_ _ -> return ()) W.defaultSettings
+    settings = W.setPort 8000
+             $ W.setOnException (\_ _ -> return ()) W.defaultSettings
     app _ respond = respond response
-    !response = responseLBS status200 ct json
+    !response = responseBuilder status200 ct json
     ct = [("Content-Type", "application/json")]
-    !json = encode $ object ["message" .= ("Hello, World!" :: Text)]
+    !json = copyByteString
+          $ L.toStrict
+          $ encode
+          $ object ["message" .= ("Hello, World!" :: Text)]

+ 1 - 1
frameworks/Haskell/wai/install.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 
-fw_depends haskell
+fw_depends haskell78

+ 2 - 4
frameworks/Haskell/wai/setup.py

@@ -6,13 +6,11 @@ import os
 
 def start(args, logfile, errfile):
   subprocess.check_call("cabal update", shell=True, cwd="wai/bench", stderr=errfile, stdout=logfile)
-  subprocess.check_call("cabal install --only-dependencies", shell=True, cwd="wai/bench", stderr=errfile, stdout=logfile)
-  subprocess.check_call("cabal configure", shell=True, cwd="wai/bench", stderr=errfile, stdout=logfile)
-  subprocess.check_call("cabal build", shell=True, cwd="wai/bench", stderr=errfile, stdout=logfile)
+  subprocess.check_call("cabal install", shell=True, cwd="wai/bench", stderr=errfile, stdout=logfile)
 
   db_host = args.database_host
   threads = str(args.max_threads)
-  subprocess.Popen("dist/build/bench/bench " + threads + " " + db_host + " +RTS -A32m -N", shell=True, cwd="wai/bench", stderr=errfile, stdout=logfile)
+  subprocess.Popen("dist/build/bench/bench " + threads + " " + db_host + " +RTS -A32m -N" + threads, shell=True, cwd="wai/bench", stderr=errfile, stdout=logfile)
   return 0
 
 def stop(logfile, errfile):

+ 3 - 0
frameworks/Haskell/yesod/bash_profile.sh

@@ -0,0 +1,3 @@
+# Where to find the ghc and cabal executables
+export PATH="/opt/ghc/7.8.3/bin:/opt/cabal/1.20/bin:$PATH"
+export LANG=en_US.UTF-8

+ 17 - 10
frameworks/Haskell/yesod/bench/bench.cabal

@@ -16,20 +16,27 @@ executable         bench
                 TypeFamilies
                 GADTs
                 EmptyDataDecls
+                CPP
 
-    build-depends: base                          >= 4          && < 5
-                 , yesod                         == 1.2.2
-                 , yesod-core                    == 1.2.4
-                 , text                          >= 0.11       && < 0.12
-                 , persistent                    >= 1.2        && < 1.3
-                 , persistent-mysql              >= 1.2        && < 1.3
-                 , persistent-mongoDB            >= 1.2        && < 1.3
-                 , warp                          >= 1.3        && < 1.4
-                 , unix                          >= 2.5
-                 , network-conduit               >= 1.0
+    build-depends: base                          >= 4.7        && < 5
+                 , yesod-core                    >= 1.4.2      && < 1.5
+                 , text                          >= 0.11       && < 1.3
+                 , persistent                    >= 2.1        && < 2.2
+                 , persistent-mysql              >= 2.1        && < 2.2
+                 , persistent-template           >= 2.1        && < 2.2
+                 , warp                          >= 3.0.2.2    && < 3.1
+                 , auto-update                   >= 0.1.1.4    && < 0.2
                  , primitive                     >= 0.5
                  , mwc-random                    >= 0.12
                  , pool-conduit                  >= 0.1.2
                  , network
                  , mongoDB
+                 , monad-logger
+                 , mtl
+                 , wai
+                 , http-types
                  , aeson
+                 , blaze-builder
+                 , bytestring                    >= 0.10
+                 , resource-pool
+                 , resourcet

+ 106 - 64
frameworks/Haskell/yesod/bench/src/yesod.hs

@@ -1,35 +1,58 @@
-{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies, MultiParamTypeClasses, OverloadedStrings #-}
-{-# LANGUAGE GADTs #-}
-{-# LANGUAGE RecordWildCards #-}
-{-# LANGUAGE EmptyDataDecls #-}
-{-# LANGUAGE RankNTypes #-}
-import Yesod hiding (Field)
-import System.Environment (getArgs)
-import qualified Network.Wai.Handler.Warp as Warp
-import Data.Text (Text)
-import Data.Conduit.Pool (Pool)
-import qualified Database.Persist.MySQL as My
-import qualified Database.Persist.MongoDB as Mongo
-import qualified Database.MongoDB as Mongo
-import Database.MongoDB ((=:), Field((:=)))
-import qualified System.Random.MWC as R
-import Control.Monad.Primitive (PrimState)
-import Control.Monad (replicateM)
-import Data.Conduit.Network (bindPort)
-import System.Posix.Process (forkProcess)
-import Control.Monad (replicateM_)
-import Network (PortID (PortNumber))
-import Data.Int (Int64)
-
-mkPersist sqlSettings [persistLowerCase|
+{-# LANGUAGE EmptyDataDecls             #-}
+{-# LANGUAGE FlexibleContexts           #-}
+{-# LANGUAGE FlexibleInstances          #-}
+{-# LANGUAGE GADTs                      #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE MultiParamTypeClasses      #-}
+{-# LANGUAGE OverloadedStrings          #-}
+{-# LANGUAGE QuasiQuotes                #-}
+{-# LANGUAGE RankNTypes                 #-}
+{-# LANGUAGE RecordWildCards            #-}
+{-# LANGUAGE TemplateHaskell            #-}
+{-# LANGUAGE TypeFamilies               #-}
+{-# LANGUAGE ViewPatterns               #-}
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+module Main (main, resourcesApp, Widget, WorldId) where
+import           Blaze.ByteString.Builder
+import           Control.Concurrent           (runInUnboundThread)
+import           Control.Monad                (replicateM)
+import           Control.Monad.Logger         (runNoLoggingT)
+import           Control.Monad.Primitive      (PrimState)
+import           Control.Monad.Reader         (ReaderT)
+import           Control.Monad.Trans.Resource (InternalState)
+import           Data.Aeson                   (encode)
+import qualified Data.ByteString.Lazy         as L
+import           Data.Conduit.Pool            (Pool, createPool)
+import           Data.Int                     (Int64)
+import           Data.IORef                   (newIORef)
+import           Data.Pool                    (withResource)
+import           Data.Text                    (Text)
+import           Database.MongoDB             (Field ((:=)), (=:))
+import qualified Database.MongoDB             as Mongo
+import           Database.Persist             (Key, PersistEntity,
+                                               PersistEntityBackend,
+                                               PersistStore, get)
+import qualified Database.Persist.MySQL       as My
+import           Database.Persist.TH          (mkPersist, mpsGeneric,
+                                               persistLowerCase, sqlSettings)
+import           Network                      (PortID (PortNumber))
+import           Network.HTTP.Types
+import           Network.Wai
+import qualified Network.Wai.Handler.Warp     as Warp
+import           System.Environment           (getArgs)
+import           System.IO.Unsafe             (unsafePerformIO)
+import qualified System.Random.MWC            as R
+import           Yesod.Core
+
+mkPersist sqlSettings { mpsGeneric = True } [persistLowerCase|
 World sql=World
     randomNumber Int sql=randomNumber
 |]
 
 data App = App
-    { appGen :: R.Gen (PrimState IO)
-    , mySqlPool :: Pool My.Connection
-    , mongoDBPool :: Pool Mongo.Connection
+    { appGen      :: !(R.Gen (PrimState IO))
+    , mySqlPool   :: !(Pool My.SqlBackend)
+    , mongoDBPool :: !(Pool Mongo.Pipe)
     }
 
 -- | Not actually using the non-raw mongoDB.
@@ -40,27 +63,41 @@ mkYesod "App" [parseRoutes|
 /db                 DbR       GET
 /dbs/#Int           DbsR      GET
 
-/mongo/db           MongoDbR  GET
-/mongo/dbs/#Int     MongoDbsR GET
-
 /mongo/raw/db       MongoRawDbR  GET
 /mongo/raw/dbs/#Int MongoRawDbsR GET
 |]
 
+fakeInternalState :: InternalState
+fakeInternalState = unsafePerformIO $ newIORef $ error "fakeInternalState forced"
+{-# NOINLINE fakeInternalState #-}
+
 instance Yesod App where
     makeSessionBackend _ = return Nothing
+    {-# INLINE makeSessionBackend #-}
     shouldLog _ _ _ = False
+    {-# INLINE shouldLog #-}
     yesodMiddleware = id
-
-getJsonR :: Handler Value
-getJsonR = return $ object ["message" .= ("Hello, World!" :: Text)]
+    {-# INLINE yesodMiddleware #-}
+    cleanPath _ = Right
+    {-# INLINE cleanPath #-}
+    yesodWithInternalState _ _ = ($ fakeInternalState)
+    {-# INLINE yesodWithInternalState #-}
+    maximumContentLength _ _ = Nothing
+    {-# INLINE maximumContentLength #-}
+
+getJsonR :: Handler ()
+getJsonR = sendWaiResponse
+         $ responseBuilder
+            status200
+            [("Content-Type", typeJson)]
+         $ copyByteString
+         $ L.toStrict
+         $ encode
+         $ object ["message" .= ("Hello, World!" :: Text)]
 
 
 getDbR :: Handler Value
-getDbR = getDb (intQuery runMySQL )
-
-getMongoDbR :: Handler Value
-getMongoDbR = getDb (intQuery runMongoDB )
+getDbR = getDb (intQuery runMySQL My.toSqlKey)
 
 getMongoRawDbR :: Handler Value
 getMongoRawDbR = getDb rawMongoIntQuery
@@ -68,10 +105,7 @@ getMongoRawDbR = getDb rawMongoIntQuery
 getDbsR :: Int -> Handler Value
 getDbsR cnt = do
     App {..} <- getYesod
-    multiRandomHandler (intQuery runMySQL) cnt
-
-getMongoDbsR :: Int -> Handler Value
-getMongoDbsR cnt = multiRandomHandler (intQuery runMongoDB) cnt
+    multiRandomHandler (intQuery runMySQL My.toSqlKey) cnt
 
 getMongoRawDbsR :: Int -> Handler Value
 getMongoRawDbsR cnt = multiRandomHandler rawMongoIntQuery cnt
@@ -84,26 +118,35 @@ getDb :: (Int64 -> Handler Value) -> Handler Value
 getDb query = do
     app <- getYesod
     i <- liftIO (randomNumber (appGen app))
-    query i
+    value <- query i
+    sendWaiResponse
+        $ responseBuilder
+            status200
+            [("Content-Type", typeJson)]
+        $ copyByteString
+        $ L.toStrict
+        $ encode value
 
 
 runMongoDB :: Mongo.Action Handler b -> Handler b
 runMongoDB f = do
   App {..} <- getYesod
-  Mongo.runMongoDBPoolDef f mongoDBPool
+  withResource mongoDBPool $ \pipe ->
+    Mongo.access pipe Mongo.ReadStaleOk "hello_world" f
 
 runMySQL :: My.SqlPersistT Handler b -> Handler b
 runMySQL f = do
   App {..} <- getYesod
   My.runSqlPool f mySqlPool
 
-intQuery :: forall (m :: * -> *) (m1 :: * -> *) val backend.
-           (Monad m, PersistEntity val, PersistStore m1,
-            PersistEntityBackend val ~ PersistMonadBackend m1) =>
-           (m1 (Maybe val) -> m (Maybe (WorldGeneric backend)))
+intQuery :: (MonadIO m, PersistEntity val, PersistStore backend
+            , backend ~ PersistEntityBackend val
+            ) =>
+           (ReaderT backend m (Maybe val) -> m (Maybe (WorldGeneric backend)))
+           -> (Int64 -> Key val)
            -> Int64 -> m Value
-intQuery db i = do
-    Just x <- db $ get (Key $ PersistInt64 i)
+intQuery db toKey i = do
+    Just x <- db $ get $ toKey i
     return $ jsonResult (worldRandomNumber x)
   where
     jsonResult :: Int -> Value
@@ -111,7 +154,7 @@ intQuery db i = do
 
 rawMongoIntQuery :: Mongo.Val v => v -> Handler Value
 rawMongoIntQuery i = do
-    Just x <- runMongoDB $ Mongo.findOne (Mongo.select ["id" =: i] "world")
+    Just x <- runMongoDB $ Mongo.findOne (Mongo.select ["id" =: i] "World")
     return $ documentToJson x
 
 multiRandomHandler :: ToJSON a
@@ -141,30 +184,29 @@ instance ToJSON Mongo.Value where
 
 main :: IO ()
 main = R.withSystemRandom $ \gen -> do
-    socket <- bindPort 8000 "*"
     [cores, host] <- getArgs
-    myPool <- My.createMySQLPool My.defaultConnectInfo
+    myPool <- runNoLoggingT $ My.createMySQLPool My.defaultConnectInfo
         { My.connectUser = "benchmarkdbuser"
         , My.connectPassword = "benchmarkdbpass"
         , My.connectDatabase = "hello_world"
         , My.connectHost = host
         } 1000
 
-    mongoPool <- Mongo.createMongoDBPool "hello_world" host (PortNumber 27017)
-        (Just (Mongo.MongoAuth "benchmarkdbuser" "benchmarkdbpass"))
-           1  -- what is the optimal stripe count? 1 is said to be a good default
-           1000
-           3  -- 3 second timeout
+    mongoPool <- createPool
+        (Mongo.connect $ Mongo.Host host $ PortNumber 27017)
+        Mongo.close
+        (read cores) -- what is the optimal stripe count? 1 is said to be a good default
+        3  -- 3 second timeout
+        1000
 
     app <- toWaiAppPlain App
         { appGen = gen
         , mySqlPool = myPool
         , mongoDBPool = mongoPool
         }
-    let run = Warp.runSettingsSocket Warp.defaultSettings
-                { Warp.settingsPort = 8000
-                , Warp.settingsHost = "*"
-                , Warp.settingsOnException = const $ return ()
-                } socket app
-    replicateM_ (read cores - 1) $ forkProcess run
-    run
+    runInUnboundThread $ Warp.runSettings
+        ( Warp.setPort 8000
+        $ Warp.setHost "*"
+        $ Warp.setOnException (\_ _ -> return ())
+          Warp.defaultSettings
+        ) app

+ 1 - 1
frameworks/Haskell/yesod/install.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 
-fw_depends yesod haskell
+fw_depends haskell78

+ 1 - 5
frameworks/Haskell/yesod/setup.py

@@ -5,16 +5,12 @@ import setup_util
 import os
 
 def start(args, logfile, errfile):
-  #setup_util.replace_text("yesod/bench/config/mysql.yml", "host: .*", "host: " + args.database_host)
-  
   subprocess.check_call("cabal update", shell=True, cwd="yesod/bench", stderr=errfile, stdout=logfile)
   subprocess.check_call("cabal install", shell=True, cwd="yesod/bench", stderr=errfile, stdout=logfile)
-  subprocess.check_call("cabal configure", shell=True, cwd="yesod/bench", stderr=errfile, stdout=logfile)
-  subprocess.check_call("cabal build", shell=True, cwd="yesod/bench", stderr=errfile, stdout=logfile)
 
   db_host = args.database_host
   threads = str(args.max_threads)
-  subprocess.Popen("dist/build/bench/bench " + threads + " " + db_host + " +RTS -A4M -N -qg2 -I0 -G2", shell=True, cwd="yesod/bench", stderr=errfile, stdout=logfile)
+  subprocess.Popen("dist/build/bench/bench " + threads + " " + db_host + " +RTS -A32M -N" + threads, shell=True, cwd="yesod/bench", stderr=errfile, stdout=logfile)
   return 0
 
 def stop(logfile, errfile):

+ 1 - 1
frameworks/Java/curacao/README.md

@@ -4,7 +4,7 @@ Curacao is an open-source toolkit for building REST/HTTP-based integration layer
 
 ## Versions
 
-Curacao 2.6.2
+Curacao 2.6.3
 https://github.com/markkolich/curacao
 
 ## Tests

+ 3 - 3
frameworks/Java/curacao/build.sbt

@@ -13,9 +13,9 @@ resolvers ++= Seq(
 )
 
 libraryDependencies ++= Seq(
-  "com.kolich.curacao" % "curacao" % "2.6.2" % "compile",
-  "com.kolich.curacao" % "curacao-gson" % "2.6.2" % "compile",
-  "org.eclipse.jetty" % "jetty-webapp" % "9.2.0.v20140526" % "compile",
+  "com.kolich.curacao" % "curacao" % "2.6.3" % "compile",
+  "com.kolich.curacao" % "curacao-gson" % "2.6.3" % "compile",
+  "org.eclipse.jetty" % "jetty-webapp" % "9.2.3.v20140905" % "compile",
   "javax.servlet" % "javax.servlet-api" % "3.0.1" % "provided",
   "org.slf4j" % "slf4j-api" % "1.7.2" % "compile",
   "ch.qos.logback" % "logback-core" % "1.0.7" % "compile",

+ 3 - 2
frameworks/Java/servlet3-cass/benchmark_config

@@ -23,11 +23,12 @@
     "raw": {
       "setup_file": "setup",
       "db_url": "/servlet3-cass/db",
-      "query_url": "/servlet3-cass/db?queries=",
+      "query_url": "/servlet3-cass/queries?queries=",
+      "update_url": "/servlet3-cass/updates?queries=",
       "port": 8080,
       "approach": "Realistic",
       "classification": "Platform",
-      "database": "Apache Cassandra",
+      "database": "Cassandra",
       "framework": "servlet3-cass",
       "language": "Java",
       "orm": "Raw",

+ 3 - 1
frameworks/Java/servlet3-cass/setup.py

@@ -16,7 +16,9 @@ def start(args, logfile, errfile):
       subprocess.check_call("C:\\Java\\resin\\bin\\start.bat", shell=True, stderr=errfile, stdout=logfile)
       return 0
     subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("cp servlet3-cass/target/servlet3-cass.war $RESIN_HOME/webapps/", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("cp servlet3-cass/target/servlet3-cass.war $RESIN_HOME/webapps/", shell=True, stderr=errfile, stdout=logfile)    
+#    subprocess.call("echo checking connection to TFB DB host: "+args.database_host, shell=True, stderr=errfile, stdout=logfile)
+#    subprocess.call("for i in 1 2 3 4 5; do nc -vz "+args.database_host+" 9160  && echo 'C* ok' && break || echo 'waiting for C*'; sleep 2; if [ $i -eq '5' ]; then echo 'ERROR: failed to connect to Cassandra'; fi; done", shell=True, stderr=errfile, stdout=logfile)
     subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=errfile, stdout=logfile)
     return 0
   except subprocess.CalledProcessError:

+ 7 - 4
frameworks/Lua/lapis/config.lua

@@ -3,12 +3,15 @@ do
   local _obj_0 = require("lapis.config")
   config = _obj_0.config
 end
-config("development", function()
-  return postgresql_url("postgres://benchmarkdbuser:[email protected]/hello_world")
-end)
+config("development", function() end)
 return config("production", function()
   port(80)
   num_workers(4)
   lua_code_cache("on")
-  return postgresql_url("postgres://benchmarkdbuser:[email protected]/hello_world")
+  return postgres({
+    backend = "pgmoon",
+    database = "hello_world",
+    user = "postgres",
+    host = "DBHOSTNAME"
+  })
 end)

+ 6 - 2
frameworks/Lua/lapis/config.moon

@@ -1,10 +1,14 @@
 import config from require "lapis.config"
 
 config "development", ->
-  postgresql_url "postgres://benchmarkdbuser:[email protected]/hello_world"
 
 config "production", ->
   port 80
   num_workers 4
   lua_code_cache "on"
-  postgresql_url "postgres://benchmarkdbuser:[email protected]/hello_world"
+  postgres {
+    backend: "pgmoon"
+    database: "hello_world"
+    user: "postgres"
+    host: "DBHOSTNAME"
+  }

+ 1 - 0
frameworks/Lua/lapis/setup.py

@@ -4,6 +4,7 @@ import setup_util
 import os
 
 def start(args, logfile, errfile):
+  setup_util.replace_text("lapis/config.lua", "DBHOSTNAME", args.database_host)
   setup_util.replace_text("lapis/nginx.conf", "DBHOSTNAME", args.database_host)
   #subprocess.Popen('/usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -g "worker_processes ' + str((args.max_threads)) + ';"', shell=True, cwd="lapis", stderr=errfile, stdout=logfile)
   subprocess.Popen('lapis server production', shell=True, cwd="lapis", stderr=errfile, stdout=logfile)

+ 4 - 3
frameworks/Lua/lapis/web.lua

@@ -23,8 +23,7 @@ end
 local min, random
 do
   local _obj_0 = math
-  min = _obj_0.min
-  random = _obj_0.random
+  min, random = _obj_0.min, _obj_0.random
 end
 local Fortune
 do
@@ -117,6 +116,7 @@ do
         }
       end
       local worlds = { }
+      num_queries = min(500, num_queries)
       for i = 1, num_queries do
         local w = World:find(random(1, 10000))
         insert(worlds, {
@@ -178,7 +178,8 @@ do
         num_queries = 1
       end
       local worlds = { }
-      for i = 1, min(500, num_queries) do
+      num_queries = min(500, num_queries)
+      for i = 1, num_queries do
         local wid = random(1, 10000)
         local world = World:find(wid)
         world.randomnumber = random(1, 10000)

+ 3 - 1
frameworks/Lua/lapis/web.moon

@@ -21,6 +21,7 @@ class Benchmark extends lapis.Application
       return json: {id:w.id,randomNumber:w.randomnumber}
 
     worlds = {}
+    num_queries = min(500, num_queries)
     for i = 1, num_queries
       w = World\find random(1, 10000)
       insert worlds, {id:w.id,randomNumber:w.randomnumber} 
@@ -55,7 +56,8 @@ class Benchmark extends lapis.Application
     if num_queries == 0
       num_queries = 1
     worlds = {}
-    for i = 1, min(500, num_queries)
+    num_queries = min(500, num_queries)
+    for i = 1, num_queries
       wid = random(1, 10000)
       world = World\find wid
       world.randomnumber = random(1, 10000)

+ 2 - 0
frameworks/Lua/openresty/app.lua

@@ -2,6 +2,7 @@ local mysql = mysql
 
 local encode = encode
 local random = math.random
+local min = math.min
 
 local mysqlconn = {
 	host = "DBHOSTNAME",
@@ -23,6 +24,7 @@ return function(ngx)
 		ngx.print(encode(db:query('SELECT * FROM World WHERE id = '..random(1,10000))[1]))
 	else
 		local worlds = {}
+		num_queries = min(500, num_queries)
 		for i=1, num_queries do
 			worlds[#worlds+1] = db:query('SELECT * FROM World WHERE id = '..random(1,10000))[1]
 		end

+ 1 - 1
frameworks/PHP/cakephp/README.md

@@ -19,7 +19,7 @@ Uses the CakePHP Model functionality.
 The tests were run with:
 
 * [Cake Version 2.3.0](http://cakephp.org/)
-* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
+* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 

+ 3 - 1
frameworks/PHP/cakephp/app/Config/core.php

@@ -248,7 +248,7 @@ Configure::write('App.baseUrl', env('SCRIPT_NAME'));
  *       Please check the comments in boostrap.php for more info on the cache engines available
  *       and their setttings.
  */
-$engine = 'Apc';
+$engine = 'Redis';
 
 // In development mode, caches should expire quickly.
 $duration = '+999 days';
@@ -265,6 +265,7 @@ $prefix = 'myapp_';
  */
 Cache::config('_cake_core_', array(
 	'engine' => $engine,
+	'server' => 'REDISSERVER',
 	'prefix' => $prefix . 'cake_core_',
 	'path' => CACHE . 'persistent' . DS,
 	'serialize' => ($engine === 'File'),
@@ -277,6 +278,7 @@ Cache::config('_cake_core_', array(
  */
 Cache::config('_cake_model_', array(
 	'engine' => $engine,
+	'server' => 'REDISSERVER',
 	'prefix' => $prefix . 'cake_model_',
 	'path' => CACHE . 'models' . DS,
 	'serialize' => ($engine === 'File'),

+ 1 - 1
frameworks/PHP/cakephp/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 2 - 1
frameworks/PHP/cakephp/setup.py

@@ -8,13 +8,14 @@ from os.path import expanduser
 def start(args, logfile, errfile):
   fwroot = args.fwroot
   setup_util.replace_text("cakephp/app/Config/database.php", "'host' => '.*',", "'host' => '" + args.database_host + "',")
+  setup_util.replace_text("cakephp/app/Config/core.php", "'REDISSERVER'", "'" + args.database_host + "'")
   setup_util.replace_text("cakephp/deploy/cake", "\".*\/FrameworkBenchmarks/cakephp", "\"%s" % args.troot)
   setup_util.replace_text("cakephp/deploy/cake", "Directory .*\/FrameworkBenchmarks/cakephp", "Directory %s" % args.troot)
   setup_util.replace_text("cakephp/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/cakephp", "root %s" % args.troot)
 
   try:
     if os.name == 'nt':
-      setup_util.replace_text("cakephp/app/Config/core.php", "'Apc'", "'Wincache'")
+      setup_util.replace_text("cakephp/app/Config/core.php", "'Redis'", "'Wincache'")
       subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\cakephp" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
       subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\cakephp\\app\\webroot"', shell=True, stderr=errfile, stdout=logfile)
       return 0

+ 1 - 1
frameworks/PHP/hhvm/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-codeigniter/README.md

@@ -18,7 +18,7 @@ Uses the db abstraction class from Codeigniter
 The tests were run with:
 
 * [Codeigniter Version 2.1.3](http://ellislab.com/codeigniter)
-* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
+* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 

+ 1 - 1
frameworks/PHP/php-codeigniter/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-fatfree/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-fuel/README.md

@@ -18,7 +18,7 @@ Uses the Fuel ORM
 The tests were run with:
 
 * [FuelPHP 1.5.3](http://fuelphp.com/)
-* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
+* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 

+ 1 - 1
frameworks/PHP/php-fuel/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-kohana/README.md

@@ -18,7 +18,7 @@ Uses the db abstraction class from Kohana
 The tests were run with:
 
 * [Kohana Version 3.3.0](http://kohanaframework.org/)
-* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
+* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 

+ 10 - 15
frameworks/PHP/php-kohana/application/config/database.php

@@ -4,22 +4,17 @@ return array
 (
     'default' => array
     (
-        'type'       => 'MySQL',
+        'type'       => 'PDO',
         'connection' => array(
-            /**
-             * The following options are available for MySQL:
-             *
-             * string   hostname     server hostname, or socket
-             * string   database     database name
-             * string   username     database username
-             * string   password     database password
-             * boolean  persistent   use persistent connections?
-             * array    variables    system variables as "key => value" pairs
-             *
-             * Ports and sockets may be appended to the hostname.
-             */
-            'hostname'   => 'localhost',
-            'database'   => 'hello_world',
+		/**
+		 * The following options are available for PDO:
+		 *
+		 * string   dsn         Data Source Name
+		 * string   username    database username
+		 * string   password    database password
+		 * boolean  persistent  use persistent connections?
+		 */
+	    'dsn'        => 'mysql:host=localhost;dbname=hello_world',
             'username'   => 'benchmarkdbuser',
             'password'   => 'benchmarkdbpass',
             'persistent' => FALSE,

+ 1 - 1
frameworks/PHP/php-kohana/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-laravel/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-laravel/readme.md

@@ -23,7 +23,7 @@ Uses Laravels template engine 'blade'
 The tests were run with:
 
 * [Laravel Version 3.2.14](http://laravel.com/)
-* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
+* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 

+ 1 - 1
frameworks/PHP/php-lithium/README.md

@@ -18,7 +18,7 @@ Uses the db model class from Lithium
 The tests were run with:
 
 * [Lithium Version 0.11](http://lithify.me)
-* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
+* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 

+ 1 - 1
frameworks/PHP/php-lithium/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-micromvc/README.md

@@ -18,7 +18,7 @@ Uses the built-in ORM of micromvc
 The tests were run with:
 
 * [Micromvc 4.0.0](http://www.micromvc.com/)
-* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
+* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 

+ 1 - 1
frameworks/PHP/php-micromvc/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-phalcon-micro/README.md

@@ -23,7 +23,7 @@ Uses Phalcon's template engine 'Volt'
 The tests were run with:
 
 * [Phalcon 1.0.0](http://phalconphp.com/)
-* [PHP Version 5.4.13](http://www.php.net/) with FPM, APC and Phalcon extension
+* [PHP Version 5.5.17](http://www.php.net/) with FPM, APC and Phalcon extension
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 

+ 1 - 1
frameworks/PHP/php-phalcon-micro/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-phalcon/README.md

@@ -24,7 +24,7 @@ Uses Phalcons template engine 'Volt'
 The tests were run with:
 
 * [Phalcon 1.0.0](http://phalconphp.com/)
-* [PHP Version 5.4.13](http://www.php.net/) with FPM, APC and Phalcon extension
+* [PHP Version 5.5.17](http://www.php.net/) with FPM, APC and Phalcon extension
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 * [MongoDB 2.4.8](https://mongodb.org/)

+ 1 - 1
frameworks/PHP/php-phalcon/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-phpixie/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-pimf/README.md

@@ -23,7 +23,7 @@ Uses PIMF plain vanilla PHTML rendering
 The tests were run with:
 
 * [PIMF Version 1.8.6](http://pimf-framework.de/)
-* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
+* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 

+ 1 - 1
frameworks/PHP/php-pimf/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-senthot/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-silex-orm/README.md

@@ -19,7 +19,7 @@ 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.4.13](http://www.php.net/) with FPM and APC
+* [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/)
 

+ 1 - 1
frameworks/PHP/php-silex-orm/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-silex-orm/web/index.php

@@ -35,7 +35,7 @@ $app->register(new DoctrineOrmServiceProvider, array(
                 'use_simple_annotation_reader' => false,
             ),
         ),
-        'metadata_cache' => 'apc'
+        'metadata_cache' => 'redis'
     ),
 ));
 

+ 1 - 1
frameworks/PHP/php-silex/README.md

@@ -18,7 +18,7 @@ Uses the Doctrine DBAL functionality.
 The tests were run with:
 
 * [Silex Version 1.0](http://silex.sensiolabs.org/)
-* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
+* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 

+ 1 - 1
frameworks/PHP/php-silex/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-silica/README.md

@@ -18,7 +18,7 @@ Uses the Doctrine DBAL functionality.
 The tests were run with:
 
 * [Silica dev-master](https://github.com/changloong/Silica)
-* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
+* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 

+ 1 - 1
frameworks/PHP/php-silica/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-slim/README.md

@@ -19,7 +19,7 @@ The tests were run with:
 
 * [Slim 2.2.0](http://www.slimframework.com/)
 * [RedBeanPHP 3.4.2](http://redbeanphp.com/)
-* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
+* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 

+ 1 - 1
frameworks/PHP/php-slim/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-symfony2-stripped/README.md

@@ -24,7 +24,7 @@ Uses Symfony's template engine 'Twig'
 The tests were run with:
 
 * [Symfony Version 2.2.1](http://symfony.com/)
-* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
+* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 

+ 1 - 1
frameworks/PHP/php-symfony2-stripped/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-symfony2/README.md

@@ -24,7 +24,7 @@ Uses Symfony's template engine 'Twig'
 The tests were run with:
 
 * [Symfony Version 2.2.1](http://symfony.com/)
-* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
+* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 

+ 2 - 2
frameworks/PHP/php-symfony2/app/config/config_prod.yml

@@ -13,9 +13,9 @@ framework:
 
 doctrine:
     orm:
-        metadata_cache_driver: apc
+        metadata_cache_driver: redis
         #result_cache_driver: apc
-        query_cache_driver: apc
+        query_cache_driver: redis
 
 monolog:
     handlers:

+ 1 - 1
frameworks/PHP/php-symfony2/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-yaf/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-yii2/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php-zend-framework/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php/README.md

@@ -15,7 +15,7 @@ Use the PHP standard [JSON encoder](http://www.php.net/manual/en/function.json-e
 ## Infrastructure Software Versions
 The tests were run with:
 
-* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
+* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
 * [nginx 1.4.0](http://nginx.org/)
 * [MySQL 5.5.29](https://dev.mysql.com/)
 * [PHP ActiveRecord Nightly 20121221](http://www.phpactiverecord.org/)

+ 1 - 1
frameworks/PHP/php/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 1 - 1
frameworks/PHP/php/deploy/nginx.conf

@@ -69,7 +69,7 @@ http {
         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
         #
         location ~ \.php$ {
-            root /home/hyoung/FrameworkBenchmarks/php;
+            root /home/ubuntu/FrameworkBenchmarks/frameworks/PHP/php;
             fastcgi_pass   fastcgi_backend;
 #            fastcgi_pass 127.0.0.1:9001;
             fastcgi_index  index.php;

+ 2 - 2
frameworks/PHP/php/deploy/php

@@ -1,6 +1,6 @@
 <VirtualHost *:8080>
-  Alias /php/ "/home/hyoung/FrameworkBenchmarks/php/"
-  <Directory /home/hyoung/FrameworkBenchmarks/php/>
+  Alias /php/ "/home/ubuntu/FrameworkBenchmarks/frameworks/PHP/php/"
+  <Directory /home/ubuntu/FrameworkBenchmarks/frameworks/PHP/php/>
           Options Indexes FollowSymLinks MultiViews
           #AllowOverride None
           Order allow,deny

+ 1 - 1
frameworks/PHP/phreeze/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export PHP_HOME=${IROOT}/php-5.4.13
+export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 

+ 0 - 2
toolset/benchmark/fortune_html_parser.py

@@ -115,7 +115,5 @@ class FortuneHTMLParser(HTMLParser):
     if not diff:
       out.write("Fortune invalid. Diff following:\n")
       diff_str = ''.join(unified_diff(self.valid.split(' '), body.split(' '), fromfile='Valid', tofile='Response', n=5))
-      #diff_str = re.sub(r'(?<![ +]) (?![ +])', '', diff_str)
-      diff_str = re.sub(r'  ', ' ', diff_str)
       out.write(diff_str)
     return diff

+ 4 - 3
toolset/benchmark/framework_test.py

@@ -378,7 +378,7 @@ class FrameworkTest:
       parser = FortuneHTMLParser()
       parser.feed(htmlString)
 
-      return parser.isValidFortune(out)
+      return (parser.isValidFortune(out), )
     except:
       print "Got exception when trying to validate the fortune test: {exception} ".format(exception=traceback.format_exc())
     return (False, err_str)
@@ -653,13 +653,14 @@ class FrameworkTest:
       url = self.benchmarker.generate_url(self.fortune_url, self.port)
       output = self.__curl_url(url, self.FORTUNE, out, err)
       out.write("VALIDATING FORTUNE ... ")
-      if self.validateFortune(output, out, err):
+      ret_tuple = self.validateFortune(output, out, err)
+      if ret_tuple[0]:
         self.fortune_url_passed = True
         out.write("PASS\n\n")
         self.benchmarker.report_verify_results(self, self.FORTUNE, 'pass')
       else:
         self.fortune_url_passed = False
-        out.write("\nFAIL\n\n")
+        out.write("\nFAIL " + ret_tuple[1] + "\n\n")
         self.benchmarker.report_verify_results(self, self.FORTUNE, 'fail')
         result = False
       out.flush()

+ 19 - 1
toolset/run-ci.py

@@ -195,8 +195,9 @@ class CIRunnner:
     validtests = [t for t in osvalidtests if t.database.lower() == "mysql"
                   or t.database.lower() == "postgres"
                   or t.database.lower() == "mongodb"
+                  or t.database.lower() == "cassandra"
                   or t.database.lower() == "none"]
-    log.info("Found %s usable tests (%s valid for linux, %s valid for linux and {mysql,postgres,mongodb,none}) in directory '%s'", 
+    log.info("Found %s usable tests (%s valid for linux, %s valid for linux and {mysql,postgres,mongodb,cassandra,none}) in directory '%s'", 
       len(dirtests), len(osvalidtests), len(validtests), '$FWROOT/frameworks/' + testdir)
     if len(validtests) == 0:
       log.critical("Found no test that is possible to run in Travis-CI! Aborting!")
@@ -314,11 +315,17 @@ class CIRunnner:
     until timeout 15s sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10; do echo 'Waiting for apt-key' ; done
     echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
 
+    # Add Apache Cassandra repository
+    until timeout 15s sudo apt-key adv --keyserver pgp.mit.edu --recv 4BD736A82B5C1B00; do echo 'Waiting for apt-key' ; done
+    sudo apt-add-repository  'deb http://www.apache.org/dist/cassandra/debian 20x main'
+
     sudo apt-get -q update
     
     # MongoDB takes a good 30-45 seconds to turn on, so install it first
     sudo apt-get -q install mongodb-org
 
+    sudo apt-get install -o Dpkg::Options::="--force-confnew" cassandra
+
     sudo apt-get -q install openssh-server
 
     # Run as travis user (who already has passwordless sudo)
@@ -332,14 +339,25 @@ class CIRunnner:
     # =======================================================
 
     # Add data to mysql
+    echo "Populating MySQL DB data"
     mysql -uroot < config/create.sql
 
     # Setup Postgres
+    echo "Setting up Postgres database"
     psql --version
     sudo useradd benchmarkdbuser -p benchmarkdbpass
     sudo -u postgres psql template1 < config/create-postgres-database.sql
     sudo -u benchmarkdbuser psql hello_world < config/create-postgres.sql
 
+    # Setup Apache Cassandra
+    echo "Setting up Apache Cassandra database"
+    until nc -z localhost 9160 ; do echo Waiting for Cassandra; sleep 1; done
+    cat config/cassandra/cleanup-keyspace.cql | sudo cqlsh
+    python config/cassandra/db-data-gen.py > config/cassandra/tfb-data.cql
+    sudo cqlsh -f config/cassandra/create-keyspace.cql
+    sudo cqlsh -f config/cassandra/tfb-data.cql
+
+    echo "Setting up MongDB database"
     # Setup MongoDB (see install above)
     mongod --version
     until nc -z localhost 27017 ; do echo Waiting for MongoDB; sleep 1; done

+ 0 - 6
toolset/setup/linux/frameworks/yesod.sh

@@ -1,6 +0,0 @@
-#!/bin/bash
-
-fw_depends haskell
-
-cabal update
-cabal install yesod persistent-mysql

+ 16 - 8
toolset/setup/linux/installer.py

@@ -148,6 +148,7 @@ class Installer:
     ##############################
     # MySQL
     ##############################
+    echo "Setting up MySQL database"
     sudo sh -c "echo mysql-server mysql-server/root_password_again select secret | debconf-set-selections"
     sudo sh -c "echo mysql-server mysql-server/root_password select secret | debconf-set-selections"
 
@@ -175,6 +176,7 @@ class Installer:
     ##############################
     # Postgres
     ##############################
+    echo "Setting up Postgres database"
     sudo -u postgres psql template1 < create-postgres-database.sql
     sudo -u benchmarkdbuser psql hello_world < create-postgres.sql
     rm create-postgres-database.sql create-postgres.sql
@@ -192,6 +194,7 @@ class Installer:
     ##############################
     # MongoDB
     ##############################
+    echo "Setting up MongoDB database"
     sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
     echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
     sudo apt-get -y update
@@ -201,6 +204,7 @@ class Installer:
     sudo service mongod stop
     sudo mv /etc/mongodb.conf /etc/mongodb.conf.orig
     sudo mv mongodb.conf /etc/mongodb.conf
+    sudo mv mongodb.conf /etc/mongod.conf
     sudo cp -R -p /var/lib/mongodb /ssd/
     sudo cp -R -p /var/log/mongodb /ssd/log/
     sudo service mongod start
@@ -212,6 +216,7 @@ class Installer:
     ##############################
     # Apache Cassandra
     ##############################
+    echo "Setting up Apache Cassandra database"
     sudo apt-get install -qqy openjdk-7-jdk
     export CASS_V=2.0.7
     wget -nv http://archive.apache.org/dist/cassandra/$CASS_V/apache-cassandra-$CASS_V-bin.tar.gz
@@ -220,22 +225,25 @@ class Installer:
     rm -rf /ssd/cassandra /ssd/log/cassandra
     mkdir -p /ssd/cassandra /ssd/log/cassandra
     
-    sed -i "s/^.*seeds:.*/          - seeds: \"%s\"/" cassandra/cassandra.yaml
-    sed -i "s/^listen_address:.*/listen_address: %s/" cassandra/cassandra.yaml
-    sed -i "s/^rpc_address:.*/rpc_address: %s/" cassandra/cassandra.yaml
+    sed -i "s/^.*seeds:.*/          - seeds: \"{database_host}\"/" cassandra/cassandra.yaml
+    sed -i "s/^listen_address:.*/listen_address: {database_host}/" cassandra/cassandra.yaml
+    sed -i "s/^rpc_address:.*/rpc_address: {database_host}/" cassandra/cassandra.yaml
     
     mv cassandra/cassandra.yaml apache-cassandra-$CASS_V/conf
     mv cassandra/log4j-server.properties apache-cassandra-$CASS_V/conf
-    nohup apache-cassandra-$CASS_V/bin/cassandra > cassandra.log
+    nohup apache-cassandra-$CASS_V/bin/cassandra -p c.pid > cassandra.log
 
-    sleep 10
-    cat cassandra/create-keyspace.cql | apache-cassandra-$CASS_V/bin/cqlsh $TFB_DATABASE_HOST
-    python cassandra/db-data-gen.py | apache-cassandra-$CASS_V/bin/cqlsh $TFB_DATABASE_HOST
+    until nc -z {database_host} 9160 ; do echo Waiting for Cassandra; sleep 1; done
+    cat cassandra/cleanup-keyspace.cql | apache-cassandra-$CASS_V/bin/cqlsh {database_host}
+    python cassandra/db-data-gen.py > cassandra/tfb-data.cql
+    apache-cassandra-$CASS_V/bin/cqlsh -f cassandra/create-keyspace.cql {database_host}
+    apache-cassandra-$CASS_V/bin/cqlsh -f cassandra/tfb-data.cql {database_host}
     rm -rf apache-cassandra-*-bin.tar.gz cassandra
 
     ##############################
     # Redis
     ##############################
+    echo "Setting up Redis database"
     sudo service redis-server stop
     # NOTE: This will cause errors on Ubuntu 12.04, as apt installs 
     # an older version of redis
@@ -243,7 +251,7 @@ class Installer:
     sudo service redis-server start
     bash create-redis.sh
     rm create-redis.sh
-    """ % (self.benchmarker.database_host, self.benchmarker.database_host, self.benchmarker.database_host)
+    """.format(database_host=self.benchmarker.database_host)
     
     print("\nINSTALL: %s" % self.benchmarker.database_ssh_string)
     p = subprocess.Popen(self.benchmarker.database_ssh_string.split(" ") + ["bash"], stdin=subprocess.PIPE)

+ 1 - 1
toolset/setup/linux/languages/composer.sh

@@ -9,7 +9,7 @@ fw_get https://getcomposer.org/installer -O composer-installer.php
 mkdir -p php-composer
 
 # Use the PHP from our IROOT directory
-PHP_HOME=${IROOT}/php-5.4.13
+PHP_HOME=${IROOT}/php-5.5.17
 ${PHP_HOME}/bin/php composer-installer.php --install-dir=$IROOT/php-composer
 
 touch php-composer.installed

+ 13 - 0
toolset/setup/linux/languages/haskell78.sh

@@ -0,0 +1,13 @@
+#!/bin/bash -ex
+
+RETCODE=$(fw_exists /opt/ghc/7.8.3/bin/ghc)
+[ ! "$RETCODE" == 0 ] || { return 0; }
+
+lsb_release -a
+env
+
+export LANG=en_US.UTF-8
+
+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

+ 13 - 12
toolset/setup/linux/languages/php.sh

@@ -11,20 +11,20 @@ RETCODE=$(fw_exists php.installed)
   sudo cp $FWROOT/config/php-fpm.conf /usr/local/lib/php-fpm.conf
   return 0; }
 
-fw_get http://museum.php.net/php5/php-5.4.13.tar.gz -O php-5.4.13.tar.gz
-fw_untar php-5.4.13.tar.gz
+fw_get http://php.net/distributions/php-5.5.17.tar.gz -O php-5.5.17.tar.gz
+fw_untar php-5.5.17.tar.gz
 ls
-mv php-5.4.13 php
+mv php-5.5.17 php
 ls
 cd php
 
-./configure --prefix=$IROOT/php-5.4.13 --with-pdo-mysql --with-mysql --with-mcrypt --enable-intl --enable-mbstring --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --with-openssl
+./configure --prefix=$IROOT/php-5.5.17 --with-pdo-mysql --with-mysql --with-mcrypt --enable-intl --enable-mbstring --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --with-openssl --enable-opcache
 make
 make install
 cd ..
 
-cp $FWROOT/config/php.ini $IROOT/php-5.4.13/lib/php.ini
-cp $FWROOT/config/php-fpm.conf $IROOT/php-5.4.13/lib/php-fpm.conf
+cp $FWROOT/config/php.ini $IROOT/php-5.5.17/lib/php.ini
+cp $FWROOT/config/php-fpm.conf $IROOT/php-5.5.17/lib/php-fpm.conf
 
 # =======================
 #
@@ -35,22 +35,23 @@ cp $FWROOT/config/php-fpm.conf $IROOT/php-5.4.13/lib/php-fpm.conf
 echo PHP compilation finished, building modules
 
 # Apc.so
-$IROOT/php-5.4.13/bin/pecl config-set php_ini $IROOT/php-5.4.13/lib/php.ini
-printf "\n" | $IROOT/php-5.4.13/bin/pecl install -f apc-beta
+$IROOT/php-5.5.17/bin/pecl config-set php_ini $IROOT/php-5.5.17/lib/php.ini
+#printf "\n" | $IROOT/php-5.5.17/bin/pecl install -f apc-beta
+printf "\n" | $IROOT/php-5.5.17/bin/pecl install -f redis
 
 # yaf.so
-printf "\n" | $IROOT/php-5.4.13/bin/pecl install -f yaf
+printf "\n" | $IROOT/php-5.5.17/bin/pecl install -f yaf
 
 # phalcon.so
 #   The configure seems broken, does not respect prefix. If you 
 #   update the value of PATH then it finds the prefix from `which php`
-export PATH=$IROOT/php-5.4.13/bin:$IROOT/php-5.4.13/sbin:$PATH
+export PATH=$IROOT/php-5.5.17/bin:$IROOT/php-5.5.17/sbin:$PATH
 git clone git://github.com/phalcon/cphalcon.git
 cd cphalcon
 git checkout phalcon-v1.3.2
 cd build/64bits 
-$IROOT/php-5.4.13/bin/phpize
-./configure --prefix=$IROOT/php-5.4.13 --enable-phalcon
+$IROOT/php-5.5.17/bin/phpize
+./configure --prefix=$IROOT/php-5.5.17 --enable-phalcon
 make
 make install
 

+ 5 - 2
toolset/setup/linux/prerequisites.sh

@@ -1,5 +1,8 @@
 #!/bin/bash
 
+set -x
+export DEBIAN_FRONTEND=noninteractive
+
 RETCODE=$(fw_exists fwbm_prereqs_installed)
 [ ! "$RETCODE" == 0 ] || { \
   echo "Prerequisites installed!"; 
@@ -12,10 +15,10 @@ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
 echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
 
 sudo apt-get -y update
-sudo apt-get -y -o Dpkg::Options::="--force-confnew" upgrade
+sudo apt-get -y upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
 
 # WARNING: DONT PUT A SPACE AFTER ANY BACKSLASH OR APT WILL BREAK
-sudo apt-get -y install \
+sudo apt-get -y 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` \

+ 5 - 5
toolset/setup/linux/webservers/openresty.sh

@@ -5,12 +5,12 @@ RETCODE=$(fw_exists openresty.installed)
 
 fw_depends nginx lua
 
-fw_get http://openresty.org/download/ngx_openresty-1.5.12.1.tar.gz
-fw_untar ngx_openresty-1.5.12.1.tar.gz
+fw_get http://openresty.org/download/ngx_openresty-1.7.4.1.tar.gz
+fw_untar ngx_openresty-1.7.4.1.tar.gz
 
-cd ngx_openresty-1.5.12.1
-./configure --with-luajit-xcflags=-DLUAJIT_NUMMODE=2 --with-cc-opt=-O2 --with-http_postgres_module -j4
+cd ngx_openresty-1.7.4.1
+./configure --with-luajit-xcflags=-DLUAJIT_NUMMODE=2 --with-http_postgres_module -j4
 make -j4
 sudo make install
 
-touch $IROOT/openresty.installed
+touch $IROOT/openresty.installed