Browse Source

Merge remote-tracking branch 'origin/master' into golang-goji

Conflicts:
	.travis.yml
Zane Kansil 10 years ago
parent
commit
b3f66bb88d
100 changed files with 715 additions and 512 deletions
  1. 17 1
      .mailmap
  2. 5 4
      .travis.yml
  3. 1 1
      LICENSE
  4. 2 0
      README.md
  5. 0 1
      config/benchmark_profile
  6. 11 2
      deployment/vagrant-common/bootstrap.sh
  7. 18 2
      deployment/vagrant-common/core.rb
  8. 0 16
      frameworks/C++/ULib/bash_profile.sh
  9. 0 0
      frameworks/C++/ULib/benchmark_config.json
  10. 4 0
      frameworks/C++/ULib/setup.sh
  11. 4 0
      frameworks/C++/ULib/setup_mysql.sh
  12. 4 0
      frameworks/C++/ULib/setup_sqlite.sh
  13. 0 3
      frameworks/C++/cpoll_cppsp/bash_profile.sh
  14. 0 0
      frameworks/C++/cpoll_cppsp/benchmark_config.json
  15. 1 0
      frameworks/C++/cpoll_cppsp/setup.sh
  16. 15 0
      frameworks/C++/silicon/CMakeLists.txt
  17. 51 0
      frameworks/C++/silicon/benchmark_config.json
  18. 20 0
      frameworks/C++/silicon/install.sh
  19. 137 0
      frameworks/C++/silicon/main.cc
  20. 3 0
      frameworks/C++/silicon/setup_epoll_mysql.sh
  21. 3 0
      frameworks/C++/silicon/setup_tpc_mysql.sh
  22. 47 0
      frameworks/C++/silicon/symbols.hh
  23. 0 0
      frameworks/C++/treefrog/benchmark_config.json
  24. 0 11
      frameworks/C++/wt/bash_profile.sh
  25. 0 0
      frameworks/C++/wt/benchmark_config.json
  26. 10 0
      frameworks/C++/wt/install.sh
  27. 7 0
      frameworks/C++/wt/setup.sh
  28. 8 0
      frameworks/C++/wt/setup_postgres.sh
  29. 0 3
      frameworks/C/duda/bash_profile.sh
  30. 0 0
      frameworks/C/duda/benchmark_config.json
  31. 1 0
      frameworks/C/duda/setup.sh
  32. 0 0
      frameworks/C/haywire/benchmark_config.json
  33. 0 0
      frameworks/C/lwan/benchmark_config.json
  34. 0 0
      frameworks/C/onion/benchmark_config.json
  35. 0 0
      frameworks/CSharp/HttpListener/benchmark_config.json
  36. 0 0
      frameworks/CSharp/aspnet-stripped/benchmark_config.json
  37. 2 2
      frameworks/CSharp/aspnet/.gitignore
  38. 7 28
      frameworks/CSharp/aspnet/README.md
  39. 0 8
      frameworks/CSharp/aspnet/bash_profile.sh
  40. 0 0
      frameworks/CSharp/aspnet/benchmark_config.json
  41. BIN
      frameworks/CSharp/aspnet/lib/.nuget/NuGet.exe
  42. 0 135
      frameworks/CSharp/aspnet/lib/.nuget/NuGet.targets
  43. 17 1
      frameworks/CSharp/aspnet/nginx.conf
  44. 0 45
      frameworks/CSharp/aspnet/setup_nginx.py
  45. 23 16
      frameworks/CSharp/aspnet/setup_nginx.sh
  46. 0 34
      frameworks/CSharp/aspnet/setup_xsp.py
  47. 56 0
      frameworks/CSharp/aspnet/src/Benchmarks.build.proj
  48. 24 28
      frameworks/CSharp/aspnet/src/Benchmarks.csproj
  49. 1 1
      frameworks/CSharp/aspnet/src/Benchmarks.sln
  50. 1 1
      frameworks/CSharp/aspnet/src/Models/MongoDB.cs
  51. 0 1
      frameworks/CSharp/aspnet/src/Views/Fortunes.cshtml
  52. 4 4
      frameworks/CSharp/aspnet/src/Views/Web.config
  53. 4 4
      frameworks/CSharp/aspnet/src/Web.config
  54. 15 0
      frameworks/CSharp/aspnet/src/packages.config
  55. 0 8
      frameworks/CSharp/evhttp-sharp/bash_profile.sh
  56. 0 0
      frameworks/CSharp/evhttp-sharp/benchmark_config.json
  57. 0 28
      frameworks/CSharp/evhttp-sharp/setup.py
  58. 16 0
      frameworks/CSharp/evhttp-sharp/setup.sh
  59. 0 5
      frameworks/CSharp/nancy/bash_profile.sh
  60. 1 1
      frameworks/CSharp/nancy/benchmark_config.json
  61. 34 0
      frameworks/CSharp/nancy/setup_libevent.sh
  62. 15 20
      frameworks/CSharp/nancy/setup_nginx.sh
  63. 1 0
      frameworks/CSharp/nancy/src/Global.asax.cs
  64. 1 1
      frameworks/CSharp/nancy/src/LibeventHost/LibeventHost.csproj
  65. 0 8
      frameworks/CSharp/servicestack/bash_profile.sh
  66. 0 0
      frameworks/CSharp/servicestack/benchmark_config.json
  67. 30 0
      frameworks/CSharp/servicestack/setup_nginx.sh
  68. 14 0
      frameworks/CSharp/servicestack/setup_xsp.sh
  69. 12 0
      frameworks/CSharp/servicestack/src/AppHostConfigHelper.cs
  70. 18 1
      frameworks/CSharp/servicestack/src/DbFactories/PostgreSqlOrmLiteConnectionFactory.cs
  71. 3 1
      frameworks/CSharp/servicestack/src/Model/Fortune.cs
  72. 1 1
      frameworks/CSharp/servicestack/src/ServiceStackBenchmark.csproj
  73. 0 5
      frameworks/Clojure/compojure/bash_profile.sh
  74. 0 0
      frameworks/Clojure/compojure/benchmark_config.json
  75. 1 1
      frameworks/Clojure/compojure/install.sh
  76. 5 0
      frameworks/Clojure/compojure/setup.sh
  77. 0 5
      frameworks/Clojure/http-kit/bash_profile.sh
  78. 0 0
      frameworks/Clojure/http-kit/benchmark_config.json
  79. 1 1
      frameworks/Clojure/http-kit/install.sh
  80. 2 0
      frameworks/Clojure/http-kit/setup.sh
  81. 0 2
      frameworks/Clojure/luminus/bash_profile.sh
  82. 0 0
      frameworks/Clojure/luminus/benchmark_config.json
  83. 1 1
      frameworks/Clojure/luminus/install.sh
  84. 3 0
      frameworks/Clojure/luminus/setup.sh
  85. 0 5
      frameworks/Dart/dart-redstone/bash_profile.sh
  86. 0 0
      frameworks/Dart/dart-redstone/benchmark_config.json
  87. 2 0
      frameworks/Dart/dart-redstone/setup.sh
  88. 0 7
      frameworks/Dart/dart-start/bash_profile.sh
  89. 0 0
      frameworks/Dart/dart-start/benchmark_config.json
  90. 3 0
      frameworks/Dart/dart-start/setup.sh
  91. 0 7
      frameworks/Dart/dart-stream/bash_profile.sh
  92. 0 0
      frameworks/Dart/dart-stream/benchmark_config.json
  93. 3 0
      frameworks/Dart/dart-stream/setup.sh
  94. 0 5
      frameworks/Dart/dart/bash_profile.sh
  95. 0 0
      frameworks/Dart/dart/benchmark_config.json
  96. 20 15
      frameworks/Dart/dart/server.dart
  97. 5 1
      frameworks/Dart/dart/setup.sh
  98. 0 6
      frameworks/Elixir/WeberFramework/.gitignore
  99. 0 2
      frameworks/Elixir/WeberFramework/README.md
  100. 0 23
      frameworks/Elixir/WeberFramework/benchmark_config

+ 17 - 1
.mailmap

@@ -3,17 +3,27 @@ Adam Chlipala <[email protected]> <[email protected]>
 Alex Schneider <[email protected]> <aschneider@techempower> Alexander Schneider
 Alex Schneider <[email protected]> <aschneider@techempower> Alexander Schneider
 Alex Schneider <[email protected]> Alexander Schneider <[email protected]>
 Alex Schneider <[email protected]> Alexander Schneider <[email protected]>
 
 
+Aoyama Kazuharu <[email protected]> AOYAMA Kazuharu <[email protected]> 
+Aoyama Kazuharu <[email protected]> AOYAMA Kazuharu <[email protected]>
+
+Brian Clozel <[email protected]> Brian Clozel <[email protected]> 
+
 Christian Knuth <[email protected]> <[email protected]>
 Christian Knuth <[email protected]> <[email protected]>
 
 
 Donovan Muller <[email protected]> donovanmuller <[email protected]>
 Donovan Muller <[email protected]> donovanmuller <[email protected]>
 
 
 Eduardo Silva <[email protected]> <[email protected]>
 Eduardo Silva <[email protected]> <[email protected]>
 
 
+Finn Bock <[email protected]> bckfnn <[email protected]>
+
 Gerard Roche <[email protected]> <[email protected]>
 Gerard Roche <[email protected]> <[email protected]>
 
 
 Gjero Krsteski <[email protected]> gjerokrsteski <[email protected]> 
 Gjero Krsteski <[email protected]> gjerokrsteski <[email protected]> 
 Gjero Krsteski <[email protected]> g.krsteski <[email protected]>
 Gjero Krsteski <[email protected]> g.krsteski <[email protected]>
 
 
+Haley Young <[email protected]> haleyyoung <[email protected]>
+Haley Young <[email protected]> haleyyoung <[email protected]>
+
 INADA Naoki <[email protected]> <[email protected]> 
 INADA Naoki <[email protected]> <[email protected]> 
 INADA Naoki <[email protected]> <[email protected]>
 INADA Naoki <[email protected]> <[email protected]>
 
 
@@ -23,7 +33,8 @@ Juan José Aguililla <[email protected]> jamming <juanjoaguililla@gmail.
 
 
 Karol Buček <[email protected]> kares <[email protected]> 
 Karol Buček <[email protected]> kares <[email protected]> 
 
 
-Lari Hotari <[email protected]> <[email protected]>
+Lari Hotari <[email protected]> Lari Hotari <[email protected]>
+Lari Hotari <[email protected]> Lari Hotari <[email protected]>
 
 
 Leandro Pereira <[email protected]> <[email protected]>
 Leandro Pereira <[email protected]> <[email protected]>
 
 
@@ -41,6 +52,7 @@ mcocciaTE <[email protected]> mcoccia <[email protected]>
 
 
 Mike Smith <[email protected]> Mike Smith <[email protected]>
 Mike Smith <[email protected]> Mike Smith <[email protected]>
 Mike Smith <[email protected]> msmith-techempower <[email protected]>
 Mike Smith <[email protected]> msmith-techempower <[email protected]>
+Mike Smith <[email protected]> msmith <[email protected]>
 
 
 Raphael Andre Bauer <[email protected]> reyez <[email protected]>
 Raphael Andre Bauer <[email protected]> reyez <[email protected]>
 
 
@@ -50,6 +62,10 @@ Stefan Geneshky <[email protected]> Stefan G <[email protected]>
 
 
 Stefano Casazza <[email protected]> stefanocasazza <[email protected]>
 Stefano Casazza <[email protected]> stefanocasazza <[email protected]>
 Stefano Casazza <[email protected]> stefanocasazza <[email protected]>
 Stefano Casazza <[email protected]> stefanocasazza <[email protected]>
+Stefano Casazza <[email protected]> stefano casazza <[email protected]>
+
+Shengjun Yu <[email protected]> shengjun yu <[email protected]>
+Shengjun Yu <[email protected]> yushengjun <[email protected]>
 
 
 Skamander <[email protected]> sksamuel <[email protected]>
 Skamander <[email protected]> sksamuel <[email protected]>
 
 

+ 5 - 4
.travis.yml

@@ -26,6 +26,7 @@ env:
     - "TESTDIR=CSharp/nancy"
     - "TESTDIR=CSharp/nancy"
     - "TESTDIR=CSharp/servicestack"
     - "TESTDIR=CSharp/servicestack"
     - "TESTDIR=C++/cpoll_cppsp"
     - "TESTDIR=C++/cpoll_cppsp"
+    - "TESTDIR=C++/silicon"
     - "TESTDIR=C++/treefrog"
     - "TESTDIR=C++/treefrog"
     - "TESTDIR=C++/ULib"
     - "TESTDIR=C++/ULib"
     - "TESTDIR=C++/wt"
     - "TESTDIR=C++/wt"
@@ -36,7 +37,6 @@ env:
     - "TESTDIR=Dart/dart-redstone"
     - "TESTDIR=Dart/dart-redstone"
     - "TESTDIR=Dart/dart-start"
     - "TESTDIR=Dart/dart-start"
     - "TESTDIR=Dart/dart-stream"
     - "TESTDIR=Dart/dart-stream"
-    - "TESTDIR=Elixir/WeberFramework"
     - "TESTDIR=Erlang/cowboy"
     - "TESTDIR=Erlang/cowboy"
     - "TESTDIR=Erlang/elli"
     - "TESTDIR=Erlang/elli"
     - "TESTDIR=Go/beego"
     - "TESTDIR=Go/beego"
@@ -44,6 +44,7 @@ env:
     - "TESTDIR=Go/gin"
     - "TESTDIR=Go/gin"
     - "TESTDIR=Go/go"
     - "TESTDIR=Go/go"
     - "TESTDIR=Go/goji"
     - "TESTDIR=Go/goji"
+    - "TESTDIR=Go/go-mongodb"
     - "TESTDIR=Go/revel"
     - "TESTDIR=Go/revel"
     - "TESTDIR=Go/revel-jet"
     - "TESTDIR=Go/revel-jet"
     - "TESTDIR=Go/revel-qbs"
     - "TESTDIR=Go/revel-qbs"
@@ -124,6 +125,8 @@ env:
     - "TESTDIR=Python/pyramid"
     - "TESTDIR=Python/pyramid"
     - "TESTDIR=Python/tornado"
     - "TESTDIR=Python/tornado"
     - "TESTDIR=Python/uwsgi"
     - "TESTDIR=Python/uwsgi"
+    - "TESTDIR=Python/web2py"
+    - "TESTDIR=Python/wheezyweb"
     - "TESTDIR=Python/wsgi"
     - "TESTDIR=Python/wsgi"
     - "TESTDIR=Racket/racket-ws"
     - "TESTDIR=Racket/racket-ws"
     - "TESTDIR=Ruby/grape"
     - "TESTDIR=Ruby/grape"
@@ -136,7 +139,6 @@ env:
     - "TESTDIR=Scala/finagle"
     - "TESTDIR=Scala/finagle"
     - "TESTDIR=Scala/lift-stateless"
     - "TESTDIR=Scala/lift-stateless"
     - "TESTDIR=Scala/plain"
     - "TESTDIR=Scala/plain"
-    - "TESTDIR=Scala/play-activate-mysql"
     - "TESTDIR=Scala/play2-scala"
     - "TESTDIR=Scala/play2-scala"
     - "TESTDIR=Scala/scalatra"
     - "TESTDIR=Scala/scalatra"
     - "TESTDIR=Scala/scruffy"
     - "TESTDIR=Scala/scruffy"
@@ -148,7 +150,7 @@ env:
 before_install:
 before_install:
   # Need to install python modules before using 
   # Need to install python modules before using 
   # python
   # python
-  - pip install -r config/python_requirements.txt
+  - pip install -r requirements.txt
 
 
   # Configure Travis-CI build environment for TFB
   # Configure Travis-CI build environment for TFB
   #   e.g. setup databases, users, etc
   #   e.g. setup databases, users, etc
@@ -167,4 +169,3 @@ install:
 script: 
 script: 
   # Pick one test in this directory and verify
   # Pick one test in this directory and verify
   - time ./toolset/run-ci.py verify "$TESTDIR"
   - time ./toolset/run-ci.py verify "$TESTDIR"
-  

+ 1 - 1
LICENSE

@@ -8,7 +8,7 @@ modification, are permitted provided that the following conditions are met:
     * Redistributions in binary form must reproduce the above copyright
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
       documentation and/or other materials provided with the distribution.
-    * Neither the name of the TechEmpower, Inc. nor the names of its
+    * Neither the name TechEmpower, Inc. nor the names of its
       contributors may be used to endorse or promote products derived from
       contributors may be used to endorse or promote products derived from
       this software without specific prior written permission.
       this software without specific prior written permission.
 
 

+ 2 - 0
README.md

@@ -1,6 +1,8 @@
 # Welcome to [TechEmpower Framework Benchmarks (TFB)](http://www.techempower.com/benchmarks/) 
 # Welcome to [TechEmpower Framework Benchmarks (TFB)](http://www.techempower.com/benchmarks/) 
 [![Build Status](https://travis-ci.org/TechEmpower/FrameworkBenchmarks.svg?branch=master)](https://travis-ci.org/TechEmpower/FrameworkBenchmarks) 
 [![Build Status](https://travis-ci.org/TechEmpower/FrameworkBenchmarks.svg?branch=master)](https://travis-ci.org/TechEmpower/FrameworkBenchmarks) 
 [![Documentation Status](https://readthedocs.org/projects/frameworkbenchmarks/badge/?version=latest)](https://readthedocs.org/projects/frameworkbenchmarks/?badge=latest)
 [![Documentation Status](https://readthedocs.org/projects/frameworkbenchmarks/badge/?version=latest)](https://readthedocs.org/projects/frameworkbenchmarks/?badge=latest)
+[![Issue Stats](http://www.issuestats.com/github/TechEmpower/FrameworkBenchmarks/badge/issue?style=flat)](http://www.issuestats.com/github/TechEmpower/FrameworkBenchmarks)
+[![Issue Stats](http://www.issuestats.com/github/TechEmpower/FrameworkBenchmarks/badge/pr?style=flat)](http://www.issuestats.com/github/TechEmpower/FrameworkBenchmarks)
 
 
 This project provides representative performance measures across a wide field of web 
 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 
 application frameworks. With much help from the community, coverage is quite broad and 

+ 0 - 1
config/benchmark_profile

@@ -18,7 +18,6 @@ export TFB_DISTRIB_CODENAME=$DISTRIB_CODENAME
 export TFB_DISTRIB_DESCRIPTION=$DISTRIB_DESCRIPTION
 export TFB_DISTRIB_DESCRIPTION=$DISTRIB_DESCRIPTION
 
 
 
 
-export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
 export RESIN_HOME=${IROOT}/resin-4.0.41
 export RESIN_HOME=${IROOT}/resin-4.0.41
 export GRAILS_HOME=${IROOT}/grails-2.4.4
 export GRAILS_HOME=${IROOT}/grails-2.4.4
 export VERTX_HOME=${IROOT}/vert.x-2.1.1
 export VERTX_HOME=${IROOT}/vert.x-2.1.1

+ 11 - 2
deployment/vagrant-common/bootstrap.sh

@@ -106,14 +106,23 @@ if [ ! -e "~/.firstboot" ]; then
   # If they didn't sync, we need to clone it
   # If they didn't sync, we need to clone it
   if [ -d "/FrameworkBenchmarks" ]; then
   if [ -d "/FrameworkBenchmarks" ]; then
     ln -s /FrameworkBenchmarks $FWROOT
     ln -s /FrameworkBenchmarks $FWROOT
-    echo "Removing installs/ and results/ folders so they do not interfere"
+    echo "Removing your current results folder to avoid interference"
     rm -rf $FWROOT/installs $FWROOT/results
     rm -rf $FWROOT/installs $FWROOT/results
+
+    # vboxfs does not support chown or chmod, which we need. 
+    # We therefore bind-mount a normal linux directory so we can
+    # use these operations. This enables us to 
+    # use `chown -R testrunner:testrunner $FWROOT/installs` later
+    echo "Mounting over your installs folder"
+    mkdir -p /tmp/TFB_installs
+    mkdir -p /FrameworkBenchmarks/installs
+    sudo mount -o bind /tmp/TFB_installs $FWROOT/installs
   else
   else
     # If there is no synced folder, clone the project
     # If there is no synced folder, clone the project
     echo "Cloning project from $GH_REPO $GH_BRANCH"
     echo "Cloning project from $GH_REPO $GH_BRANCH"
     git clone -b ${GH_BRANCH} https://github.com/${GH_REPO}.git $FWROOT
     git clone -b ${GH_BRANCH} https://github.com/${GH_REPO}.git $FWROOT
   fi
   fi
-  sudo pip install -r $FWROOT/config/python_requirements.txt
+  sudo pip install -r $FWROOT/requirements.txt
 
 
   # Everyone gets SSH access to localhost
   # Everyone gets SSH access to localhost
   echo "Setting up SSH access to localhost"
   echo "Setting up SSH access to localhost"

+ 18 - 2
deployment/vagrant-common/core.rb

@@ -95,11 +95,27 @@ def provider_virtualbox(config, role, ip_address='172.16.0.16')
       vb.gui = true
       vb.gui = true
     end
     end
 
 
+    # Improve Windows VirtualBox DNS resolution speed
+    # Addresses mitchellh/vagrant#1807 and TechEmpower/FrameworkBenchmarks#1288
+    vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
+    vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
+
     vb.memory = ENV.fetch('TFB_VB_MEM', 3022)
     vb.memory = ENV.fetch('TFB_VB_MEM', 3022)
     vb.cpus = ENV.fetch('TFB_VB_CPU', 2)
     vb.cpus = ENV.fetch('TFB_VB_CPU', 2)
 
 
-    # mount_options addresses issue mitchellh/vagrant#4997
-    override.vm.synced_folder "../..", "/FrameworkBenchmarks", mount_options: ['fmode=777', 'dmode=777']
+    # The VirtualBox file system for shared folders (vboxfs)
+    # does not support posix's chown/chmod - these can only 
+    # be set at mount time, and they are uniform for the entire
+    # shared directory. We require chown, because we have the 
+    # testrunner user account, so this is a problem. To mitigate
+    # the effects, we set the folders and files to 777 permissions. 
+    # Even though we cannot chown them to testrunner, with 777 and 
+    # owner vagrant *most* of the software works ok. Occasional 
+    # issues are still possible. 
+    #
+    # See mitchellh/vagrant#4997
+    # See http://superuser.com/a/640028/136050
+    override.vm.synced_folder "../..", "/FrameworkBenchmarks", :mount_options => ["dmode=777", "fmode=777"]
 
 
     if role.eql? "all" or role.eql? "app"
     if role.eql? "all" or role.eql? "app"
       override.vm.network :forwarded_port, guest: 8080, host: 28080
       override.vm.network :forwarded_port, guest: 8080, host: 28080

+ 0 - 16
frameworks/C++/ULib/bash_profile.sh

@@ -1,16 +0,0 @@
-#---------------------------------------------------------------------------------------------------------
-# bash_profile.sh - set the environment of our ULib installation
-#---------------------------------------------------------------------------------------------------------
-# TROOT - Path of this test's directory
-# IROOT - Path of this test's install directory ($FWROOT/installs or $FWROOT/installs/pertest/<test-name>)
-#---------------------------------------------------------------------------------------------------------
-# INFO:root:Running installation for ULib
-# INSTALL: 
-#    export TROOT=$FWROOT/ULib && 
-#    export IROOT=$FWROOT/installs && 
-#    . $FWROOT/toolset/setup/linux/bash_functions.sh && 
-#    . $FWROOT/ULib/install.sh (cwd=$FWROOT//installs)
-#---------------------------------------------------------------------------------------------------------
-export ULIB_VERSION=1.4.2
-export ULIB_ROOT=$IROOT/ULib
-export ULIB_DOCUMENT_ROOT=${ULIB_ROOT}/ULIB_DOCUMENT_ROOT

+ 0 - 0
frameworks/C++/ULib/benchmark_config → frameworks/C++/ULib/benchmark_config.json


+ 4 - 0
frameworks/C++/ULib/setup.sh

@@ -1,5 +1,9 @@
 #!/bin/bash
 #!/bin/bash
 
 
+export ULIB_VERSION=1.4.2
+export ULIB_ROOT=$IROOT/ULib
+export ULIB_DOCUMENT_ROOT=${ULIB_ROOT}/ULIB_DOCUMENT_ROOT
+
 export UMEMPOOL="136,0,0,85,1160,155,-17,-22,40"
 export UMEMPOOL="136,0,0,85,1160,155,-17,-22,40"
 
 
 # 1. Change ULib Server configuration
 # 1. Change ULib Server configuration

+ 4 - 0
frameworks/C++/ULib/setup_mysql.sh

@@ -1,5 +1,9 @@
 #!/bin/bash
 #!/bin/bash
 
 
+export ULIB_VERSION=1.4.2
+export ULIB_ROOT=$IROOT/ULib
+export ULIB_DOCUMENT_ROOT=${ULIB_ROOT}/ULIB_DOCUMENT_ROOT
+
 export ORM_DRIVER="mysql"
 export ORM_DRIVER="mysql"
 export ORM_OPTION="host=${DBHOST} user=benchmarkdbuser password=benchmarkdbpass character-set=utf8 dbname=hello_world"
 export ORM_OPTION="host=${DBHOST} user=benchmarkdbuser password=benchmarkdbpass character-set=utf8 dbname=hello_world"
 
 

+ 4 - 0
frameworks/C++/ULib/setup_sqlite.sh

@@ -1,5 +1,9 @@
 #!/bin/bash
 #!/bin/bash
 
 
+export ULIB_VERSION=1.4.2
+export ULIB_ROOT=$IROOT/ULib
+export ULIB_DOCUMENT_ROOT=${ULIB_ROOT}/ULIB_DOCUMENT_ROOT
+
 export ORM_DRIVER="sqlite"
 export ORM_DRIVER="sqlite"
 export ORM_OPTION="host=${DBHOST} user=benchmarkdbuser password=benchmarkdbpass character-set=utf8 dbname=${ULIB_ROOT}/db/%.*s"
 export ORM_OPTION="host=${DBHOST} user=benchmarkdbuser password=benchmarkdbpass character-set=utf8 dbname=${ULIB_ROOT}/db/%.*s"
 
 

+ 0 - 3
frameworks/C++/cpoll_cppsp/bash_profile.sh

@@ -1,3 +0,0 @@
-#!/bin/bash
-
-export CPPSP_HOME=$IROOT/cppsp_0.2.3

+ 0 - 0
frameworks/C++/cpoll_cppsp/benchmark_config → frameworks/C++/cpoll_cppsp/benchmark_config.json


+ 1 - 0
frameworks/C++/cpoll_cppsp/setup.sh

@@ -1,4 +1,5 @@
 #!/bin/bash
 #!/bin/bash
+export CPPSP_HOME=$IROOT/cppsp_0.2.3
 
 
 sed -i 's|#define BENCHMARK_DB_HOST ".*"|#define BENCHMARK_DB_HOST "'"$DBHOST"'"|g' www/connectioninfo.H
 sed -i 's|#define BENCHMARK_DB_HOST ".*"|#define BENCHMARK_DB_HOST "'"$DBHOST"'"|g' www/connectioninfo.H
 
 

+ 15 - 0
frameworks/C++/silicon/CMakeLists.txt

@@ -0,0 +1,15 @@
+cmake_minimum_required(VERSION 2.8)
+
+project(silicon)
+
+include_directories($ENV{IROOT}/include)
+
+link_directories($ENV{IROOT}/lib)
+add_definitions(-std=c++14  -ftemplate-depth=512 -DNDEBUG -O3)
+
+add_executable(silicon_tpc_mysql main.cc)
+target_link_libraries(silicon_tpc_mysql microhttpd mysqlclient)
+
+add_executable(silicon_epoll_mysql main.cc)
+set_target_properties(silicon_epoll_mysql PROPERTIES COMPILE_FLAGS "-DTFB_USE_EPOLL")
+target_link_libraries(silicon_epoll_mysql microhttpd mysqlclient)

+ 51 - 0
frameworks/C++/silicon/benchmark_config.json

@@ -0,0 +1,51 @@
+{
+  "framework": "silicon",
+  "tests": [{
+    "default": {
+      "setup_file": "setup_tpc_mysql",
+      "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": "silicon",
+      "language": "C++",
+      "orm": "Full",
+      "platform": "Silicon",
+      "webserver": "None",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "silicon-tpc-mysql",
+      "notes": "",
+      "versus": ""
+    },
+    "epoll-mysql": {
+      "setup_file": "setup_epoll_mysql",
+      "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": "silicon",
+      "language": "C++",
+      "orm": "Full",
+      "platform": "Silicon",
+      "webserver": "None",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "silicon-epoll-mysql",
+      "notes": "",
+      "versus": ""
+    }
+  }]
+}

+ 20 - 0
frameworks/C++/silicon/install.sh

@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# Install silicon
+DIR=`pwd`
+rm -fr silicon;
+git clone https://github.com/matt-42/silicon.git
+cd silicon;
+CXX=/usr/bin/g++-4.9 ./install.sh $IROOT
+
+# Install microhttpd
+cd $DIR
+fw_get http://mirror.ibcp.fr/pub/gnu/libmicrohttpd/libmicrohttpd-0.9.39.tar.gz
+fw_untar libmicrohttpd-0.9.39.tar.gz
+cd libmicrohttpd-0.9.39
+./configure --prefix=$IROOT
+make install
+
+cd $TROOT
+mkdir -p build
+cd build; cmake .. -DCMAKE_CXX_COMPILER=g++-4.9; make silicon_tpc_mysql; make silicon_epoll_mysql

+ 137 - 0
frameworks/C++/silicon/main.cc

@@ -0,0 +1,137 @@
+#include <algorithm>
+#include <unistd.h>
+#include <iostream>
+#include <silicon/backends/mhd.hh>
+#include <silicon/api.hh>
+#include <silicon/middlewares/mysql_connection.hh>
+#include <silicon/middlewares/mysql_orm.hh>
+#include "symbols.hh"
+
+using namespace s;
+using namespace sl;
+
+typedef decltype(D(_id(_auto_increment, _primary_key) = int(),
+                   _randomNumber = int())) random_number;
+
+typedef decltype(D(_id(_auto_increment, _primary_key) = int(),
+                   _message = std::string())) fortune;
+
+typedef mysql_orm_factory<random_number> rn_orm_factory;
+typedef mysql_orm<random_number> rn_orm;
+
+typedef mysql_orm_factory<fortune> fortune_orm_factory;
+typedef mysql_orm<fortune> fortune_orm;
+
+std::string escape_html_entities(const std::string& data)
+{
+    std::string buffer;
+    buffer.reserve(data.size());
+    for(size_t pos = 0; pos != data.size(); ++pos) {
+        switch(data[pos]) {
+            case '&':  buffer.append("&amp;");       break;
+            case '\"': buffer.append("&quot;");      break;
+            case '\'': buffer.append("&apos;");      break;
+            case '<':  buffer.append("&lt;");        break;
+            case '>':  buffer.append("&gt;");        break;
+            default:   buffer.append(&data[pos], 1); break;
+        }
+    }
+    return std::move(buffer);
+}
+
+int main(int argc, char* argv[])
+{
+
+  if (argc != 3)
+  {
+    std::cerr << "Usage: " << argv[0] << " mysql_host port" << std::endl;
+    return 1;
+  }
+  
+  auto hello_api = make_api(
+
+    _plaintext = [] () { return response(_content_type = "text/plain",
+                                         _body = "Hello, World!"); },
+
+    _json = [] () { return response(_content_type = "application/json",
+                                    _body = D(_message = "Hello, World!")); },
+                        
+    _db = [] (rn_orm& orm) {
+      random_number r;
+      orm.find_by_id(1245, r);
+      return response(_content_type = "application/json",
+                      _body = r);
+    },
+
+    _queries = [] (rn_orm& orm, get_parameters& get_params) {
+      int N = atoi(get_params["queries"].c_str());
+      N = std::max(1, std::min(N, 500));
+
+      std::vector<random_number> qs(N);
+      for (int i = 0; i < N; i++)
+        orm.find_by_id(1 + rand() % 9999, qs[i]);
+      return response(_content_type = "application/json",
+                      _body = std::move(qs));
+    },
+
+    _updates = [] (rn_orm& orm, get_parameters& get_params) {
+      int N = atoi(get_params["queries"].c_str());
+      N = std::max(1, std::min(N, 500));
+
+      std::vector<random_number> qs(N);
+      for (int i = 0; i < N; i++)
+      {
+        orm.find_by_id(1 + rand() % 9999, qs[i]);
+        qs[i].randomNumber = 1 + rand() % 9999;
+        orm.update(qs[i]);
+      }
+      return response(_content_type = "application/json",
+                      _body = std::move(qs));
+    },
+  
+    _fortunes = [] (fortune_orm& orm) {
+      std::vector<fortune> table;
+      orm.forall([&] (fortune& f) { table.push_back(f); });
+      table.push_back(fortune(0, "Additional fortune added at request time."));
+
+      std::sort(table.begin(), table.end(),
+                [] (const fortune& a, const fortune& b) { return a.message < b.message; });
+
+      std::stringstream ss;
+
+      ss << "<!DOCTYPE html><html><head><title>Fortunes</title></head><body><table><tr><th>id</th><th>message</th></tr>";
+      for(auto& f : table)
+        ss << "<tr><td>" << f.id << "</td><td>" << escape_html_entities(f.message) << "</td></tr>";
+      ss << "</table></body></html>";
+
+      return response(_content_type = "text/html",
+                      _body = ss.str());
+    }
+  
+    ).bind_factories(
+      mysql_connection_factory(argv[1], "benchmarkdbuser", "benchmarkdbpass", "hello_world"),
+      fortune_orm_factory("Fortune"),
+      rn_orm_factory("World")
+      );
+  
+  try
+  {
+
+    // Start the server.
+    sl::mhd_json_serve(hello_api, atoi(argv[2])
+#ifdef TFB_USE_EPOLL
+                       , _linux_epoll, _nthreads = 1000
+#else
+                       , _one_thread_per_connection
+#endif
+      );
+  }
+  catch (std::exception& e)
+  {
+    std::cerr << e.what() << std::endl;
+  }
+  catch (sl::error::error& e)
+  {
+    std::cerr << e.what() << std::endl;
+  }
+}

+ 3 - 0
frameworks/C++/silicon/setup_epoll_mysql.sh

@@ -0,0 +1,3 @@
+#! /bin/bash
+
+$TROOT/build/silicon_epoll_mysql ${DBHOST} 8080 &

+ 3 - 0
frameworks/C++/silicon/setup_tpc_mysql.sh

@@ -0,0 +1,3 @@
+#! /bin/bash
+
+$TROOT/build/silicon_tpc_mysql ${DBHOST} 8080 &

+ 47 - 0
frameworks/C++/silicon/symbols.hh

@@ -0,0 +1,47 @@
+// Generated by iod_generate_symbols.
+#include <iod/symbol.hh>
+#ifndef IOD_SYMBOL_db
+#define IOD_SYMBOL_db
+    iod_define_symbol(db)
+#endif
+
+#ifndef IOD_SYMBOL_fortunes
+#define IOD_SYMBOL_fortunes
+    iod_define_symbol(fortunes)
+#endif
+
+#ifndef IOD_SYMBOL_id
+#define IOD_SYMBOL_id
+    iod_define_symbol(id)
+#endif
+
+#ifndef IOD_SYMBOL_json
+#define IOD_SYMBOL_json
+    iod_define_symbol(json)
+#endif
+
+#ifndef IOD_SYMBOL_message
+#define IOD_SYMBOL_message
+    iod_define_symbol(message)
+#endif
+
+#ifndef IOD_SYMBOL_plaintext
+#define IOD_SYMBOL_plaintext
+    iod_define_symbol(plaintext)
+#endif
+
+#ifndef IOD_SYMBOL_queries
+#define IOD_SYMBOL_queries
+    iod_define_symbol(queries)
+#endif
+
+#ifndef IOD_SYMBOL_randomNumber
+#define IOD_SYMBOL_randomNumber
+    iod_define_symbol(randomNumber)
+#endif
+
+#ifndef IOD_SYMBOL_updates
+#define IOD_SYMBOL_updates
+    iod_define_symbol(updates)
+#endif
+

+ 0 - 0
frameworks/C++/treefrog/benchmark_config → frameworks/C++/treefrog/benchmark_config.json


+ 0 - 11
frameworks/C++/wt/bash_profile.sh

@@ -1,11 +0,0 @@
-#!/bin/bash
-
-export BOOST_ROOT=/usr/local
-export BOOST_INC=${BOOST_ROOT}/include
-export BOOST_LIB=${BOOST_ROOT}/lib
-
-export WT_ROOT=${IROOT}/wt
-export WT_LIB=${WT_ROOT}/lib
-export WT_INC=${WT_ROOT}/include
-
-export LD_LIBRARY_PATH="${BOOST_LIB}:${WT_LIB}:${LD_LIBRARY_PATH}"

+ 0 - 0
frameworks/C++/wt/benchmark_config → frameworks/C++/wt/benchmark_config.json


+ 10 - 0
frameworks/C++/wt/install.sh

@@ -1,3 +1,13 @@
 #!/bin/bash
 #!/bin/bash
 
 
+export BOOST_ROOT=/usr/local
+export BOOST_INC=${BOOST_ROOT}/include
+export BOOST_LIB=${BOOST_ROOT}/lib
+
+export WT_ROOT=${IROOT}/wt
+export WT_LIB=${WT_ROOT}/lib
+export WT_INC=${WT_ROOT}/include
+
+export LD_LIBRARY_PATH="${BOOST_LIB}:${WT_LIB}:${LD_LIBRARY_PATH}"
+
 fw_depends apache wt
 fw_depends apache wt

+ 7 - 0
frameworks/C++/wt/setup.sh

@@ -1,4 +1,11 @@
 #!/bin/bash
 #!/bin/bash
+export BOOST_ROOT=/usr/local
+export BOOST_INC=${BOOST_ROOT}/include
+export BOOST_LIB=${BOOST_ROOT}/lib
+
+export WT_ROOT=${IROOT}/wt
+export WT_LIB=${WT_ROOT}/lib
+export WT_INC=${WT_ROOT}/include
 
 
 # This has to be included here since it is one of the vars NOT copied from the original environment
 # This has to be included here since it is one of the vars NOT copied from the original environment
 export LD_LIBRARY_PATH="${BOOST_LIB}:${WT_LIB}:${LD_LIBRARY_PATH}"
 export LD_LIBRARY_PATH="${BOOST_LIB}:${WT_LIB}:${LD_LIBRARY_PATH}"

+ 8 - 0
frameworks/C++/wt/setup_postgres.sh

@@ -1,7 +1,15 @@
 #!/bin/bash
 #!/bin/bash
+export BOOST_ROOT=/usr/local
+export BOOST_INC=${BOOST_ROOT}/include
+export BOOST_LIB=${BOOST_ROOT}/lib
+
+export WT_ROOT=${IROOT}/wt
+export WT_LIB=${WT_ROOT}/lib
+export WT_INC=${WT_ROOT}/include
 
 
 # This has to be included here since it is one of the vars NOT copied from the original environment
 # This has to be included here since it is one of the vars NOT copied from the original environment
 export LD_LIBRARY_PATH="${BOOST_LIB}:${WT_LIB}:${LD_LIBRARY_PATH}"
 export LD_LIBRARY_PATH="${BOOST_LIB}:${WT_LIB}:${LD_LIBRARY_PATH}"
+export CPLUS_INCLUDE_PATH=/usr/include/postgresql:/usr/include/postgresql/9.3/server:$CPLUS_INCLUDE_PATH
 
 
 sed -i 's|INSERT_DB_HOST_HERE|'"${DBHOST}"'|g' benchmark.cpp
 sed -i 's|INSERT_DB_HOST_HERE|'"${DBHOST}"'|g' benchmark.cpp
 
 

+ 0 - 3
frameworks/C/duda/bash_profile.sh

@@ -1,3 +0,0 @@
-#!/bin/bash
-
-export DUDA_HOME=${IROOT}/dudac-0.23

+ 0 - 0
frameworks/C/duda/benchmark_config → frameworks/C/duda/benchmark_config.json


+ 1 - 0
frameworks/C/duda/setup.sh

@@ -1,5 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
+export DUDA_HOME=${IROOT}/dudac-0.23
 export PATH=${DUDA_HOME}:$PATH
 export PATH=${DUDA_HOME}:$PATH
 
 
 dudac -w $TROOT/webservice -p 2001 &
 dudac -w $TROOT/webservice -p 2001 &

+ 0 - 0
frameworks/C/haywire/benchmark_config → frameworks/C/haywire/benchmark_config.json


+ 0 - 0
frameworks/C/lwan/benchmark_config → frameworks/C/lwan/benchmark_config.json


+ 0 - 0
frameworks/C/onion/benchmark_config → frameworks/C/onion/benchmark_config.json


+ 0 - 0
frameworks/CSharp/HttpListener/benchmark_config → frameworks/CSharp/HttpListener/benchmark_config.json


+ 0 - 0
frameworks/CSharp/aspnet-stripped/benchmark_config → frameworks/CSharp/aspnet-stripped/benchmark_config.json


+ 2 - 2
frameworks/CSharp/aspnet/.gitignore

@@ -2,5 +2,5 @@
 *.suo
 *.suo
 */bin/*
 */bin/*
 */obj/*
 */obj/*
-lib/*
-!lib/.nuget
+*/packages/*
+nginx.upstream.conf

+ 7 - 28
frameworks/CSharp/aspnet/README.md

@@ -18,7 +18,7 @@
 **Platforms**
 **Platforms**
 
 
 * .NET Framework 4.5 (Windows)
 * .NET Framework 4.5 (Windows)
-* Mono 3.2.8 (Linux)
+* Mono 3.99.0 (Linux)
 
 
 **Web Servers**
 **Web Servers**
 
 
@@ -29,37 +29,16 @@
 **Web Stack**
 **Web Stack**
 
 
 * ASP.NET 4.5
 * ASP.NET 4.5
-* ASP.NET MVC Framework 5.1.0
+* ASP.NET MVC Framework 5.2.2
+* ASP.NET Razor 3.2.2
 
 
 **Databases**
 **Databases**
 
 
-* MySQL Connector/Net 6.8.3
-* Npgsql 2.0.14.3
-* Entity Framework 6.0.2
-* Mongo C# Driver 1.8.3
+* MySQL Connector/Net 6.9.5
+* Npgsql 2.2.3
+* Entity Framework 6.1.1
+* Mongo C# Driver 1.9.2
 
 
 **Developer Tools**
 **Developer Tools**
 
 
 * Visual Studio 2012
 * Visual Studio 2012
-
-## Mono Installation
-
-    sudo apt-get install git-core build-essential autoconf automake libtool zlib1g-dev pkg-config gettext
-
-    git clone git://github.com/mono/mono
-    cd mono
-    git checkout mono-3.2.8
-    ./autogen.sh --prefix=/usr/local
-    make get-monolite-latest
-    make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/gmcs.exe
-    sudo make install
-
-    cd ..
-
-    git clone git://github.com/mono/xsp
-    cd xsp
-    ./autogen.sh --prefix=/usr/local
-    make
-    sudo make install
-    
-    mozroots --import --sync

+ 0 - 8
frameworks/CSharp/aspnet/bash_profile.sh

@@ -1,8 +0,0 @@
-#!/bin/bash
-
-export MONO_ROOT=${IROOT}/mono-3.6.0-install
-
-# Needed to find Mono's shared libraries
-export LD_LIBRARY_PATH="$MONO_ROOT/lib"
-
-export NGINX_HOME=${IROOT}/nginx

+ 0 - 0
frameworks/CSharp/aspnet/benchmark_config → frameworks/CSharp/aspnet/benchmark_config.json


BIN
frameworks/CSharp/aspnet/lib/.nuget/NuGet.exe


+ 0 - 135
frameworks/CSharp/aspnet/lib/.nuget/NuGet.targets

@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-    <PropertyGroup>
-        <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
-        
-        <!-- Enable the restore command to run before builds -->
-        <RestorePackages Condition="  '$(RestorePackages)' == '' ">false</RestorePackages>
-
-        <!-- Property that enables building a package from a project -->
-        <BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
-
-        <!-- Determines if package restore consent is required to restore packages -->
-        <RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">false</RequireRestoreConsent>
-        
-        <!-- Download NuGet.exe if it does not already exist -->
-        <DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">true</DownloadNuGetExe>
-    </PropertyGroup>
-    
-    <ItemGroup Condition=" '$(PackageSources)' == '' ">
-        <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
-        <!-- The official NuGet package source (https://nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
-        <!--
-            <PackageSource Include="https://nuget.org/api/v2/" />
-            <PackageSource Include="https://my-nuget-source/nuget/" />
-        -->
-    </ItemGroup>
-
-    <PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
-        <!-- Windows specific commands -->
-        <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), "..", "lib", ".nuget"))</NuGetToolsPath>
-        <PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "..", "lib", "packages.config"))</PackagesConfig>
-        <RepositoryPath>$([System.IO.Path]::Combine($(SolutionDir), "..", "lib"))</RepositoryPath>
-    </PropertyGroup>
-    
-    <PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
-        <!-- We need to launch nuget.exe with the mono command if we're not on windows -->
-        <NuGetToolsPath>$(SolutionDir)..\lib\.nuget</NuGetToolsPath>
-        <PackagesConfig>$(SolutionDir)..\lib\packages.config</PackagesConfig>
-        <RepositoryPath>$(SolutionDir)..\lib</RepositoryPath>
-    </PropertyGroup>
-    
-    <PropertyGroup>
-        <!-- NuGet command -->
-        <NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
-        <PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
-        
-        <NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
-        <NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono $(NuGetExePath)</NuGetCommand>
-
-        <PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
-        
-        <RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
-        <NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
-        
-        <!-- Commands -->
-        <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)"  $(NonInteractiveSwitch) $(RequireConsentSwitch) -OutputDirectory "$(RepositoryPath)"</RestoreCommand>
-        <BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties Configuration=$(Configuration) $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
-
-        <!-- We need to ensure packages are restored prior to assembly resolve -->
-        <BuildDependsOn Condition="$(RestorePackages) == 'true'">
-            RestorePackages;
-            $(BuildDependsOn);
-        </BuildDependsOn>
-
-        <!-- Make the build depend on restore packages -->
-        <BuildDependsOn Condition="$(BuildPackage) == 'true'">
-            $(BuildDependsOn);
-            BuildPackage;
-        </BuildDependsOn>
-    </PropertyGroup>
-
-    <Target Name="CheckPrerequisites">
-        <!-- Raise an error if we're unable to locate nuget.exe  -->
-        <Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
-        <!--
-        Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
-        This effectively acts as a lock that makes sure that the download operation will only happen once and all
-        parallel builds will have to wait for it to complete.
-        -->
-        <MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
-    </Target>
-
-    <Target Name="_DownloadNuGet">
-        <DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
-    </Target>
-
-    <Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
-        <Exec Command="$(RestoreCommand)"
-              Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
-              
-        <Exec Command="$(RestoreCommand)"
-              LogStandardErrorAsError="true"
-              Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
-    </Target>
-
-    <Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
-        <Exec Command="$(BuildCommand)" 
-              Condition=" '$(OS)' != 'Windows_NT' " />
-              
-        <Exec Command="$(BuildCommand)"
-              LogStandardErrorAsError="true"
-              Condition=" '$(OS)' == 'Windows_NT' " />
-    </Target>
-    
-    <UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
-        <ParameterGroup>
-            <OutputFilename ParameterType="System.String" Required="true" />
-        </ParameterGroup>
-        <Task>
-            <Reference Include="System.Core" />
-            <Using Namespace="System" />
-            <Using Namespace="System.IO" />
-            <Using Namespace="System.Net" />
-            <Using Namespace="Microsoft.Build.Framework" />
-            <Using Namespace="Microsoft.Build.Utilities" />
-            <Code Type="Fragment" Language="cs">
-                <![CDATA[
-                try {
-                    OutputFilename = Path.GetFullPath(OutputFilename);
-
-                    Log.LogMessage("Downloading latest version of NuGet.exe...");
-                    WebClient webClient = new WebClient();
-                    webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);
-
-                    return true;
-                }
-                catch (Exception ex) {
-                    Log.LogErrorFromException(ex);
-                    return false;
-                }
-            ]]>
-            </Code>
-        </Task>
-    </UsingTask>
-</Project>

+ 17 - 1
frameworks/CSharp/aspnet/nginx.conf

@@ -19,7 +19,23 @@ http {
 
 
         location / {
         location / {
             fastcgi_pass mono;
             fastcgi_pass mono;
-            include /usr/local/nginx/conf/fastcgi_params;
+            fastcgi_param  QUERY_STRING       $query_string;
+            fastcgi_param  REQUEST_METHOD     $request_method;
+            fastcgi_param  CONTENT_TYPE       $content_type;
+            fastcgi_param  CONTENT_LENGTH     $content_length;
+            fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
+            fastcgi_param  REQUEST_URI        $request_uri;
+            fastcgi_param  DOCUMENT_URI       $document_uri;
+            fastcgi_param  DOCUMENT_ROOT      $document_root;
+            fastcgi_param  SERVER_PROTOCOL    $server_protocol;
+            fastcgi_param  HTTPS              $https if_not_empty;
+            fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
+            fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;
+            fastcgi_param  REMOTE_ADDR        $remote_addr;
+            fastcgi_param  REMOTE_PORT        $remote_port;
+            fastcgi_param  SERVER_ADDR        $server_addr;
+            fastcgi_param  SERVER_PORT        $server_port;
+            fastcgi_param  SERVER_NAME        $server_name;
             fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
             fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
         }
         }
     }
     }

+ 0 - 45
frameworks/CSharp/aspnet/setup_nginx.py

@@ -1,45 +0,0 @@
-import subprocess
-import sys
-import setup_util
-import os
-
-def start(args, logfile, errfile):
-  if os.name == 'nt':
-    return 1
-  
-  setup_util.replace_text("aspnet/src/Web.config", "localhost", args.database_host)
-
-  # build
-  subprocess.check_call("rm -rf bin obj", shell=True, cwd="aspnet", stderr=errfile, stdout=logfile)
-  subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="aspnet/src", stderr=errfile, stdout=logfile)
-  subprocess.check_call("sudo chown -R $USER:$USER $MONO_ROOT", shell=True, stderr=errfile, stdout=logfile)
-  
-  # nginx
-  workers = 'worker_processes ' + str(args.max_threads) + ';'
-  logfile.write("Setting up workers as %s\n\n" % workers)
-  subprocess.check_call("echo Hello there", shell=True, stderr=errfile, stdout=logfile);
-  command = 'echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > $TROOT/nginx.upstream.conf'
-  logfile.write("Using command %s" % command)
-  subprocess.check_call(command, shell=True, stderr=errfile, stdout=logfile);
-  subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c $TROOT/nginx.conf -g "' + workers + '"', shell=True, stderr=errfile, stdout=logfile)
-  
-  # Start fastcgi for each thread
-  # To debug, use --printlog --verbose --loglevels=All
-  for port in range(9001, 9001 + args.max_threads):
-    subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 --applications=/:%s/src --socket=tcp:127.0.0.1:%s " % (args.directory, port), shell=True, cwd="aspnet", stderr=errfile, stdout=logfile)
-
-def stop(logfile, errfile):
-  if os.name == 'nt':
-    return 0
-  
-  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/nginx.conf -s stop", shell=True, stderr=errfile, stdout=logfile)
-  subprocess.check_call("rm -f $TROOT/nginx.upstream.conf", shell=True, stderr=errfile, stdout=logfile)
-  #
-  # stop mono
-  #
-  p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
-  out, err = p.communicate()
-  for line in out.splitlines():
-    if 'mono-server' in line and not 'run-ci' in line and not 'run-tests' in line:
-      pid = int(line.split(None, 2)[1])
-      os.kill(pid, 15)

+ 23 - 16
frameworks/CSharp/aspnet/setup_nginx.sh

@@ -1,30 +1,37 @@
 #!/bin/bash
 #!/bin/bash
 
 
+set -e
+
+# mono environment variables
+. ${IROOT}/mono.installed
+
+export NGINX_HOME=${IROOT}/nginx
+
 sed -i 's|localhost|'"$DBHOST"'|g' src/Web.config
 sed -i 's|localhost|'"$DBHOST"'|g' src/Web.config
 
 
-# build
-rm -rf bin obj
-cd src
-$MONO_ROOT/bin/xbuild /p:Configuration=Release
+# 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+$MAX_THREADS))
 
 
 # nginx
 # nginx
 conf="upstream mono {\n"
 conf="upstream mono {\n"
-current=9001
-end=$(($current+$MAX_THREADS))
-while [ $current -lt $end ]; do
-  conf+="\tserver 127.0.0.1:${current};\n"
-  let current=current+1
+for port in $(seq $port_start $port_end); do
+  conf+="\tserver 127.0.0.1:${port};\n"
 done
 done
 conf+="}"
 conf+="}"
 echo -e $conf > $TROOT/nginx.upstream.conf
 echo -e $conf > $TROOT/nginx.upstream.conf
 
 
-$NGINX_HOME/sbin/nginx -c $TROOT/nginx.conf -g "${MAX_THREADS}"
+$NGINX_HOME/sbin/nginx -c $TROOT/nginx.conf -g "worker_processes ${MAX_THREADS};"
 
 
-# Start fastcgi for each thread
 # To debug, use --printlog --verbose --loglevels=All
 # To debug, use --printlog --verbose --loglevels=All
-current=9001
-end=$(($current+$MAX_THREADS))
-while [ $current -lt $end ]; do
-  MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 --applications=/:$(pwd)/src --socket=tcp:127.0.0.1:$current
-  let current=current+1
+for port in $(seq $port_start $port_end); do
+  fastcgi-mono-server4 --applications=/:${TROOT}/src --socket=tcp:127.0.0.1:$port &
 done
 done

+ 0 - 34
frameworks/CSharp/aspnet/setup_xsp.py

@@ -1,34 +0,0 @@
-import subprocess
-import sys
-import setup_util
-import os
-
-def start(args, logfile, errfile):
-  if os.name == 'nt':
-    return 1
-  
-  setup_util.replace_text("aspnet/src/Web.config", "localhost", args.database_host)
-
-  try:
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd="aspnet/src", stderr=errfile, stdout=logfile)
-    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="aspnet/src", stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R ubuntu:ubuntu /usr/local/etc/mono", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.Popen("MONO_OPTIONS=--gc=sgen xsp4 --nonstop", shell=True, cwd="aspnet/src", stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-
-def stop(logfile, errfile):
-  if os.name == 'nt':
-    return 0
-  
-  p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
-  out, err = p.communicate()
-  for line in out.splitlines():
-    if 'xsp4' in line:
-      pid = int(line.split(None, 2)[1])
-      try:
-        os.kill(pid, 15)
-      except OSError:
-        pass
-  return 0

+ 56 - 0
frameworks/CSharp/aspnet/src/Benchmarks.build.proj

@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+  <PropertyGroup>
+    <SolutionDir>$(MSBuildThisFileDirectory)</SolutionDir>
+    <Configuration Condition=" '$(Configuration)'=='' ">Release</Configuration>
+    <NuGetExe Condition=" '$(NuGetExe)'=='' ">packages/nuget.exe</NuGetExe>
+    <NuGetExeDir>packages/</NuGetExeDir>
+    <NuGetDownloadAddress Condition=" '$(NuGetDownloadAddress)'=='' ">http://nuget.org/nuget.exe</NuGetDownloadAddress>
+    <NuGetCommand Condition=" '$(NuGetCommand)'=='' AND '$(OS)' == 'Windows_NT'">"$(NuGetExe)"</NuGetCommand>
+    <NuGetCommand Condition=" '$(NuGetCommand)'=='' AND '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 "$(NuGetExe)"</NuGetCommand>
+    <Properties>Configuration=$(Configuration);SolutionDir=$(SolutionDir)</Properties>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <Solution Include="*.sln" />
+  </ItemGroup>
+
+  <UsingTask TaskName="DownloadFile" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" Condition=" '$(OS)' == 'Windows_NT' ">
+    <ParameterGroup>
+      <Address ParameterType="System.String" Required="true"/>
+      <OutputFilename ParameterType="System.String" Required="true" />
+    </ParameterGroup>
+    <Task>
+      <Reference Include="System" />
+      <Code Type="Fragment" Language="cs">
+        <![CDATA[
+            new System.Net.WebClient().DownloadFile(Address, OutputFilename);
+        ]]>
+      </Code>
+    </Task>
+  </UsingTask>
+
+  <Target Name="DownloadNuGet">
+    <MakeDir Directories="$(NuGetExeDir)" Condition=" !Exists('$(NuGetExeDir)') " />
+    <DownloadFile Address="$(NuGetDownloadAddress)" OutputFilename="$(NuGetExe)" Condition=" '$(OS)' == 'Windows_NT' AND !Exists('$(NuGetExe)')" />
+    <Exec Command="wget $(NuGetDownloadAddress) -O $(NuGetExe)" Condition=" '$(OS)' != 'Windows_NT' AND !Exists('$(NuGetExe)') " />
+  </Target>
+
+  <Target Name="RestorePackages" DependsOnTargets="DownloadNuGet">
+    <Exec Command="$(NuGetCommand) restore &quot;%(Solution.Identity)&quot;" />
+  </Target>
+
+  <Target Name="Clean">
+    <MSBuild Targets="Clean" Projects="@(Solution)" Properties="$(Properties)" />
+  </Target>
+
+  <Target Name="Build" DependsOnTargets="RestorePackages">
+    <MSBuild Targets="Build" Projects="@(Solution)" Properties="$(Properties)" />
+  </Target>
+
+  <Target Name="Rebuild" DependsOnTargets="RestorePackages">
+    <MSBuild Targets="Rebuild" Projects="@(Solution)" Properties="$(Properties)" />
+  </Target>
+
+</Project>

+ 24 - 28
frameworks/CSharp/aspnet/src/Benchmarks.AspNet.csproj → frameworks/CSharp/aspnet/src/Benchmarks.csproj

@@ -45,69 +45,61 @@
     <Reference Include="System.Web.Extensions" />
     <Reference Include="System.Web.Extensions" />
     <Reference Include="System.Web.Mvc">
     <Reference Include="System.Web.Mvc">
       <Private>True</Private>
       <Private>True</Private>
-      <HintPath>..\lib\Microsoft.AspNet.Mvc.5.1.0\lib\net45\System.Web.Mvc.dll</HintPath>
-    </Reference>
-    <Reference Include="System.Web.Helpers">
-      <Private>True</Private>
-      <HintPath>..\lib\Microsoft.AspNet.WebPages.3.1.0\lib\net45\System.Web.Helpers.dll</HintPath>
+      <HintPath>$(SolutionDir)\packages\Microsoft.AspNet.Mvc.5.2.2\lib\net45\System.Web.Mvc.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="System.Web.Razor">
     <Reference Include="System.Web.Razor">
       <Private>True</Private>
       <Private>True</Private>
-      <HintPath>..\lib\Microsoft.AspNet.Razor.3.1.0\lib\net45\System.Web.Razor.dll</HintPath>
+      <HintPath>$(SolutionDir)\packages\Microsoft.AspNet.Razor.3.2.2\lib\net45\System.Web.Razor.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="System.Web.WebPages">
     <Reference Include="System.Web.WebPages">
       <Private>True</Private>
       <Private>True</Private>
-      <HintPath>..\lib\Microsoft.AspNet.WebPages.3.1.0\lib\net45\System.Web.WebPages.dll</HintPath>
-    </Reference>
-    <Reference Include="System.Web.WebPages.Deployment">
-      <Private>True</Private>
-      <HintPath>..\lib\Microsoft.AspNet.WebPages.3.1.0\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
+      <HintPath>$(SolutionDir)\packages\Microsoft.AspNet.WebPages.3.2.2\lib\net45\System.Web.WebPages.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="System.Web.WebPages.Razor">
     <Reference Include="System.Web.WebPages.Razor">
       <Private>True</Private>
       <Private>True</Private>
-      <HintPath>..\lib\Microsoft.AspNet.WebPages.3.1.0\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
-    </Reference>
-    <Reference Include="Microsoft.Web.Infrastructure">
-      <Private>True</Private>
-      <HintPath>..\lib\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
+      <HintPath>$(SolutionDir)\packages\Microsoft.AspNet.WebPages.3.2.2\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="Newtonsoft.Json">
     <Reference Include="Newtonsoft.Json">
-      <HintPath>..\lib\Newtonsoft.Json.5.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
+      <HintPath>$(SolutionDir)\packages\Newtonsoft.Json.6.0.6\lib\net45\Newtonsoft.Json.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="ServiceStack.Text">
     <Reference Include="ServiceStack.Text">
-      <HintPath>..\lib\ServiceStack.Text.4.0.8\lib\net40\ServiceStack.Text.dll</HintPath>
+      <HintPath>$(SolutionDir)\packages\ServiceStack.Text.4.0.34\lib\net40\ServiceStack.Text.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="EntityFramework">
     <Reference Include="EntityFramework">
       <Private>True</Private>
       <Private>True</Private>
-      <HintPath>..\lib\EntityFramework.6.0.2\lib\net45\EntityFramework.dll</HintPath>
+      <HintPath>$(SolutionDir)\packages\EntityFramework.6.1.1\lib\net45\EntityFramework.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="EntityFramework">
     <Reference Include="EntityFramework">
       <Private>True</Private>
       <Private>True</Private>
-      <HintPath>..\lib\EntityFramework.6.0.2\lib\net45\EntityFramework.SqlServer.dll</HintPath>
+      <HintPath>$(SolutionDir)\packages\EntityFramework.6.1.1\lib\net45\EntityFramework.SqlServer.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="MySql">
     <Reference Include="MySql">
       <Private>True</Private>
       <Private>True</Private>
-      <HintPath>..\lib\MySql.Data.6.8.3\lib\net45\MySql.Data.dll</HintPath>
+      <HintPath>$(SolutionDir)\packages\MySql.Data.6.9.5\lib\net45\MySql.Data.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="MySql">
     <Reference Include="MySql">
       <Private>True</Private>
       <Private>True</Private>
-      <HintPath>..\lib\MySql.Data.Entities.6.8.3.0\lib\net45\mysql.data.entity.EF6.dll</HintPath>
+      <HintPath>$(SolutionDir)\packages\MySql.Data.Entity.6.9.5\lib\net45\MySql.Data.Entity.EF6.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="Npgsql">
     <Reference Include="Npgsql">
       <Private>True</Private>
       <Private>True</Private>
-      <HintPath>..\lib\Npgsql.2.0.14.3\lib\net45\Npgsql.dll</HintPath>
+      <HintPath>$(SolutionDir)\packages\Npgsql.2.2.3\lib\net45\Npgsql.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="Npgsql">
     <Reference Include="Npgsql">
       <Private>True</Private>
       <Private>True</Private>
-      <HintPath>..\lib\Npgsql.2.0.14.3\lib\net45\Mono.Security.dll</HintPath>
+      <HintPath>$(SolutionDir)\packages\Npgsql.EntityFramework.2.2.3\lib\net45\Npgsql.EntityFramework.dll</HintPath>
+    </Reference>
+    <Reference Include="Npgsql">
+      <Private>True</Private>
+      <HintPath>$(SolutionDir)\packages\Npgsql.2.2.3\lib\net45\Mono.Security.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="MongoDB">
     <Reference Include="MongoDB">
       <Private>True</Private>
       <Private>True</Private>
-      <HintPath>..\lib\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Bson.dll</HintPath>
+      <HintPath>$(SolutionDir)\packages\mongocsharpdriver.1.9.2\lib\net35\MongoDB.Bson.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="MongoDB">
     <Reference Include="MongoDB">
       <Private>True</Private>
       <Private>True</Private>
-      <HintPath>..\lib\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Driver.dll</HintPath>
+      <HintPath>$(SolutionDir)\packages\mongocsharpdriver.1.9.2\lib\net35\MongoDB.Driver.dll</HintPath>
     </Reference>
     </Reference>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
@@ -137,6 +129,11 @@
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>
     </Content>
     </Content>
   </ItemGroup>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config">
+      <SubType>Designer</SubType>
+    </None>
+  </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <None Include="Properties\PublishProfiles\IIS.pubxml" />
     <None Include="Properties\PublishProfiles\IIS.pubxml" />
   </ItemGroup>
   </ItemGroup>
@@ -147,8 +144,7 @@
   </PropertyGroup>
   </PropertyGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != '' And Exists('$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets')" />
   <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != '' And Exists('$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets')" />
-  <Import Project="..\lib\MSBuild.Microsoft.VisualStudio.Web.targets.11.0.2.1\tools\VSToolsPath\WebApplications\Microsoft.WebApplication.targets" Condition="('$(VSToolsPath)' == '' Or !Exists('$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets')) And Exists('..\lib\MSBuild.Microsoft.VisualStudio.Web.targets.11.0.2.1\tools\VSToolsPath\WebApplications\Microsoft.WebApplication.targets')" />
-  <Import Project="..\lib\.nuget\NuGet.targets" Condition="Exists('..\lib\.nuget\NuGet.targets')" />
+  <Import Project="$(SolutionDir)\packages\MSBuild.Microsoft.VisualStudio.Web.targets.11.0.2.1\tools\VSToolsPath\WebApplications\Microsoft.WebApplication.targets" Condition="('$(VSToolsPath)' == '' Or !Exists('$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets')) And Exists('$(SolutionDir)\packages\MSBuild.Microsoft.VisualStudio.Web.targets.11.0.2.1\tools\VSToolsPath\WebApplications\Microsoft.WebApplication.targets')" />
   <Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)' == 'true'">
   <Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)' == 'true'">
     <AspNetCompiler VirtualPath="/" PhysicalPath="$(WebProjectOutputDir)" />
     <AspNetCompiler VirtualPath="/" PhysicalPath="$(WebProjectOutputDir)" />
   </Target>
   </Target>

+ 1 - 1
frameworks/CSharp/aspnet/src/Benchmarks.sln

@@ -1,7 +1,7 @@
 
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 2012
 # Visual Studio 2012
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmarks.AspNet", "Benchmarks.AspNet.csproj", "{62C3DEA2-2696-4200-BD83-011679316847}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmarks", "Benchmarks.csproj", "{62C3DEA2-2696-4200-BD83-011679316847}"
 EndProject
 EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution

+ 1 - 1
frameworks/CSharp/aspnet/src/Models/MongoDB.cs

@@ -48,6 +48,6 @@ namespace Benchmarks.AspNet.Models
     public class MongoWorld : World
     public class MongoWorld : World
     {
     {
         [ScriptIgnore]
         [ScriptIgnore]
-        public ObjectId _id { get; set; }
+        public object _id { get; set; }
     }
     }
 }
 }

+ 0 - 1
frameworks/CSharp/aspnet/src/Views/Fortunes.cshtml

@@ -3,7 +3,6 @@
 <!DOCTYPE html>
 <!DOCTYPE html>
 <html>
 <html>
 <head>
 <head>
-    <meta charset="utf-8">
     <title>Fortunes</title>
     <title>Fortunes</title>
 </head>
 </head>
 <body>
 <body>

+ 4 - 4
frameworks/CSharp/aspnet/src/Views/Web.config

@@ -1,13 +1,13 @@
 <?xml version="1.0"?>
 <?xml version="1.0"?>
 <configuration>
 <configuration>
   <configSections>
   <configSections>
-    <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
-      <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
-      <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
+    <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
+      <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
+      <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
     </sectionGroup>
     </sectionGroup>
   </configSections>
   </configSections>
   <system.web.webPages.razor>
   <system.web.webPages.razor>
-    <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
+    <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
     <pages pageBaseType="System.Web.Mvc.WebViewPage">
     <pages pageBaseType="System.Web.Mvc.WebViewPage">
       <namespaces>
       <namespaces>
         <add namespace="System.Web.Mvc" />
         <add namespace="System.Web.Mvc" />

+ 4 - 4
frameworks/CSharp/aspnet/src/Web.config

@@ -15,16 +15,16 @@
   <system.data>
   <system.data>
     <DbProviderFactories>
     <DbProviderFactories>
       <clear/>
       <clear/>
-      <add name="MySql.Data.MySqlClient" description="Data Provider for MySQL" invariant="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.7.2.0"/>
-      <add name="Npgsql" description="Data Provider for PostgreSQL" invariant="Npgsql" type="Npgsql.NpgsqlFactory, Npgsql, Version=2.0.13.91"/>
+      <add name="MySql.Data.MySqlClient" description="Data Provider for MySQL" invariant="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.5"/>
+      <add name="Npgsql" description="Data Provider for PostgreSQL" invariant="Npgsql" type="Npgsql.NpgsqlFactory, Npgsql, Version=2.2.3"/>
       <add name="System.Data.SqlClient" description="Data Provider for Microsoft SQL Server" invariant="System.Data.SqlClient" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=4.0.0.0"/>
       <add name="System.Data.SqlClient" description="Data Provider for Microsoft SQL Server" invariant="System.Data.SqlClient" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=4.0.0.0"/>
     </DbProviderFactories>
     </DbProviderFactories>
   </system.data>
   </system.data>
   <!-- Entity Framework -->
   <!-- Entity Framework -->
   <entityFramework>
   <entityFramework>
     <providers>
     <providers>
-      <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity, Version=6.7.2.0"/>
-      <provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, Npgsql, Version=2.0.13.91"/>
+      <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.5"/>
+      <provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, Npgsql.EntityFramework, Version=2.2.3"/>
       <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
       <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
     </providers>
     </providers>
   </entityFramework>
   </entityFramework>

+ 15 - 0
frameworks/CSharp/aspnet/src/packages.config

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="EntityFramework" version="6.1.1" targetFramework="net45" />
+  <package id="Microsoft.AspNet.Mvc" version="5.2.2" targetFramework="net45" />
+  <package id="Microsoft.AspNet.Razor" version="3.2.2" targetFramework="net45" />
+  <package id="Microsoft.AspNet.WebPages" version="3.2.2" targetFramework="net45" />
+  <package id="MSBuild.Microsoft.VisualStudio.Web.targets" version="11.0.2.1" />
+  <package id="mongocsharpdriver" version="1.9.2" targetFramework="net45" />
+  <package id="MySql.Data" version="6.9.5" targetFramework="net45" />
+  <package id="MySql.Data.Entity" version="6.9.5" targetFramework="net45" />
+  <package id="Npgsql" version="2.2.3" targetFramework="net45" />
+  <package id="Npgsql.EntityFramework" version="2.2.3" targetFramework="net45" />
+  <package id="Newtonsoft.Json" version="6.0.6" targetFramework="net45" />
+  <package id="ServiceStack.Text" version="4.0.34" targetFramework="net45" />
+</packages>

+ 0 - 8
frameworks/CSharp/evhttp-sharp/bash_profile.sh

@@ -1,8 +0,0 @@
-#!/bin/bash
-
-export MONO_ROOT=${IROOT}/mono-3.6.0-install
-
-export PATH="$MONO_ROOT/bin:$PATH"
-
-# Needed to find Mono's shared libraries
-export LD_LIBRARY_PATH="$MONO_ROOT/lib"

+ 0 - 0
frameworks/CSharp/evhttp-sharp/benchmark_config → frameworks/CSharp/evhttp-sharp/benchmark_config.json


+ 0 - 28
frameworks/CSharp/evhttp-sharp/setup.py

@@ -1,28 +0,0 @@
-import subprocess
-import sys
-import setup_util
-import os
-
-def start(args, logfile, errfile):
-  if os.name == 'nt':
-    return 1
-  
-  # build
-  subprocess.check_call("rm -rf bin obj", shell=True, cwd="evhttp-sharp", stdout=logfile, stderr=errfile)
-  subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="evhttp-sharp/src", stdout=logfile, stderr=errfile)
-  os.environ['MONO_GC_PARAMS']="nursery-size=64m"
-  subprocess.Popen("mono -O=all $TROOT/src/bin/Release/EvHttpSharpBenchmark.exe 127.0.0.1 8085 " + str(args.max_threads), shell=True, cwd="evhttp-sharp", stdout=logfile, stderr=errfile)
-
-def stop(logfile, errfile):
-  if os.name == 'nt':
-    return 0
-  
-  # stop mono
-  p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
-  out, err = p.communicate()
-  for line in out.splitlines():
-    if 'mono' in line and not 'run-ci' in line and not 'run-tests' in line:
-      pid = int(line.split(None, 2)[1])
-      os.kill(pid, 15)
-
-  return 0

+ 16 - 0
frameworks/CSharp/evhttp-sharp/setup.sh

@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+#mono environment variables
+. ${IROOT}/mono.installed
+
+#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 $MAX_THREADS &

+ 0 - 5
frameworks/CSharp/nancy/bash_profile.sh

@@ -1,5 +0,0 @@
-#!/bin/bash
-
-export MONO_ROOT=${IROOT}/mono-3.6.0-install
-
-export NGINX_HOME=${IROOT}/nginx

+ 1 - 1
frameworks/CSharp/nancy/benchmark_config → frameworks/CSharp/nancy/benchmark_config.json

@@ -47,7 +47,7 @@
       "db_url": "/db",
       "db_url": "/db",
       "query_url": "/db/",
       "query_url": "/db/",
       "port": 8080,
       "port": 8080,
-	        "approach": "Realistic",
+      "approach": "Realistic",
       "classification": "Micro",
       "classification": "Micro",
       "database": "MySQL",
       "database": "MySQL",
       "framework": "nancy",
       "framework": "nancy",

+ 34 - 0
frameworks/CSharp/nancy/setup_libevent.sh

@@ -0,0 +1,34 @@
+#!/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}+${MAX_THREADS}))
+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 '"${MAX_THREADS}"';"
+
+# 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

+ 15 - 20
frameworks/CSharp/nancy/setup_nginx.sh

@@ -1,36 +1,31 @@
 #!/bin/bash
 #!/bin/bash
 
 
-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
+export NGINX_HOME=${IROOT}/nginx
 
 
-export PATH="$MONO_ROOT/bin:$PATH"
+. ${IROOT}/mono.installed
 
 
-# Needed to find Mono's shared libraries
-export LD_LIBRARY_PATH="$MONO_ROOT/lib"
+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
 # build
-cd src
-rm -rf bin obj
-$MONO_ROOT/bin/xbuild /p:Configuration=Release
+rm -rf src/bin src/obj
+xbuild src/NancyBenchmark.csproj /t:Clean
+xbuild src/NancyBenchmark.csproj /p:Configuration=Release
 
 
 # nginx
 # nginx
+port_start=9001
+port_end=$((${port_start}+${MAX_THREADS}))
 conf="upstream mono {\n"
 conf="upstream mono {\n"
-current=9001
-end=$(($current+$MAX_THREADS))
-while [ $current -lt $end ]; do
-  conf+="\tserver 127.0.0.1:${current};\n"
-  let current=current+1
+for port in $(seq ${port_start} $port_end); do
+  conf+="\tserver 127.0.0.1:${port};\n"
 done
 done
 conf+="}"
 conf+="}"
-echo -e $conf > $TROOT/nginx.upstream.conf
 
 
-$NGINX_HOME/sbin/nginx -c $TROOT/nginx.conf -g "worker_processes '"${MAX_THREADS}"';"
+echo -e $conf > ${TROOT}/nginx.upstream.conf
+${NGINX_HOME}/sbin/nginx -c ${TROOT}/nginx.conf -g "worker_processes '"${MAX_THREADS}"';"
 
 
 # Start fastcgi for each thread
 # Start fastcgi for each thread
 # To debug, use --printlog --verbose --loglevels=All
 # To debug, use --printlog --verbose --loglevels=All
-current=9001
-end=$(($current+$MAX_THREADS))
-while [ $current -lt $end ]; do
-  MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 --applications=/:${TROOT}/src --socket=tcp:127.0.0.1:$current &
-  let current=current+1
+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
 done

+ 1 - 0
frameworks/CSharp/nancy/src/Global.asax.cs

@@ -11,6 +11,7 @@ namespace NancyBenchmark
     {
     {
         protected void Application_Start()
         protected void Application_Start()
         {
         {
+            StaticConfiguration.DisableErrorTraces = false;
             var threads = 40 * Environment.ProcessorCount;
             var threads = 40 * Environment.ProcessorCount;
             ThreadPool.SetMaxThreads(threads, threads);
             ThreadPool.SetMaxThreads(threads, threads);
             ThreadPool.SetMinThreads(threads, threads);
             ThreadPool.SetMinThreads(threads, threads);

+ 1 - 1
frameworks/CSharp/nancy/src/LibeventHost/LibeventHost.csproj

@@ -33,7 +33,7 @@
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="Nancy">
     <Reference Include="Nancy">
-      <HintPath>..\..\lib\Nancy.0.17.1\lib\net40\Nancy.dll</HintPath>
+      <HintPath>..\..\lib\Nancy.0.23.0\lib\net40\Nancy.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="Nancy.Hosting.Event2">
     <Reference Include="Nancy.Hosting.Event2">
       <HintPath>..\..\lib\Nancy.Hosting.Event2.dll</HintPath>
       <HintPath>..\..\lib\Nancy.Hosting.Event2.dll</HintPath>

+ 0 - 8
frameworks/CSharp/servicestack/bash_profile.sh

@@ -1,8 +0,0 @@
-#!/bin/bash
-
-export MONO_ROOT=${IROOT}/mono-3.6.0-install
-
-export PATH="$MONO_ROOT/bin:$PATH"
-
-# Needed to find Mono's shared libraries
-export LD_LIBRARY_PATH="$MONO_ROOT/lib"

+ 0 - 0
frameworks/CSharp/servicestack/benchmark_config → frameworks/CSharp/servicestack/benchmark_config.json


+ 30 - 0
frameworks/CSharp/servicestack/setup_nginx.sh

@@ -0,0 +1,30 @@
+#!/bin/bash
+
+export NGINX_HOME=${IROOT}/nginx
+
+set -e
+# mono environment variables
+. ${IROOT}/mono.installed
+sed -i 's|localhost|'"$DBHOST"'|g' src/Web.config
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' nginx.conf
+
+# 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+$MAX_THREADS))
+# 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_HOME/sbin/nginx -c $TROOT/nginx.conf -g "worker_processes ${MAX_THREADS};"
+# 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

+ 14 - 0
frameworks/CSharp/servicestack/setup_xsp.sh

@@ -0,0 +1,14 @@
+#!/bin/bash
+
+export NGINX_HOME=${IROOT}/nginx
+
+set -e
+# mono environment variables
+. ${IROOT}/mono.installed
+sed -i 's|localhost|'"$DBHOST"'|g' src/Web.config
+# 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 &

+ 12 - 0
frameworks/CSharp/servicestack/src/AppHostConfigHelper.cs

@@ -4,6 +4,8 @@ using System.Configuration;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Threading;
 using System.Threading;
 
 
+using MongoDB.Bson;
+using MongoDB.Bson.Serialization;
 using MongoDB.Driver;
 using MongoDB.Driver;
 
 
 using ServiceStack.ServiceHost;
 using ServiceStack.ServiceHost;
@@ -24,6 +26,16 @@ namespace ServiceStackBenchmark
                 var database = server.GetDatabase("hello_world");
                 var database = server.GetDatabase("hello_world");
                 container.Register<MongoDatabase>(c => database);
                 container.Register<MongoDatabase>(c => database);
 
 
+                BsonClassMap.RegisterClassMap<World>(cm => {
+                    cm.MapProperty(c => c.id);
+                    cm.MapProperty(c => c.randomNumber);
+                });
+
+                BsonClassMap.RegisterClassMap<Fortune>(cm => {
+                    cm.MapProperty(c => c.id);
+                    cm.MapProperty(c => c.message);
+                });
+
                 // Create needed tables in MySql Server if they do not exist
                 // Create needed tables in MySql Server if they do not exist
                 return database.CreateWorldTable() && database.CreateFortuneTable();
                 return database.CreateWorldTable() && database.CreateFortuneTable();
             }
             }

+ 18 - 1
frameworks/CSharp/servicestack/src/DbFactories/PostgreSqlOrmLiteConnectionFactory.cs

@@ -7,6 +7,23 @@ namespace ServiceStackBenchmark
 {
 {
     public class PostgreSqlOrmLiteConnectionFactory : OrmLiteConnectionFactory, IPostgreSqlOrmLiteConnectionFactory
     public class PostgreSqlOrmLiteConnectionFactory : OrmLiteConnectionFactory, IPostgreSqlOrmLiteConnectionFactory
     {
     {
-        public PostgreSqlOrmLiteConnectionFactory(string s) : base(s, PostgreSQLDialectProvider.Instance) { }
+        public PostgreSqlOrmLiteConnectionFactory(string s) : base(s, PostgreSQLDialectProvider.Instance) {
+            this.DialectProvider.NamingStrategy = new LowercaseNamingStrategy();
+        }
     }
     }
+
+    public class LowercaseNamingStrategy : OrmLiteNamingStrategyBase
+    {
+        public override string GetTableName(string name)
+        {
+            return name.ToLower();
+        }
+
+        public override string GetColumnName(string name)
+        {
+            return name.ToLower();
+        }
+
+    }
+
 }
 }

+ 3 - 1
frameworks/CSharp/servicestack/src/Model/Fortune.cs

@@ -8,6 +8,7 @@ using MongoDB.Driver;
 using MongoDB.Driver.Builders;
 using MongoDB.Driver.Builders;
 
 
 using ServiceStack.DataAnnotations;
 using ServiceStack.DataAnnotations;
+using ServiceStack.Html;
 using ServiceStack.OrmLite;
 using ServiceStack.OrmLite;
 using ServiceStack.Text;
 using ServiceStack.Text;
 
 
@@ -103,7 +104,8 @@ namespace ServiceStackBenchmark.Model
         public static string ToHtml(List<Fortune> fortunes)
         public static string ToHtml(List<Fortune> fortunes)
         {
         {
             string page = @"<!DOCTYPE html><html><head><title>Fortunes</title></head><body><table><tr><th>id</th><th>message</th></tr>";
             string page = @"<!DOCTYPE html><html><head><title>Fortunes</title></head><body><table><tr><th>id</th><th>message</th></tr>";
-            fortunes.ForEach(f => page += @"<tr><td>{0}</td><td>{1}</td></tr>".Fmt(f.id, f.message));
+            HtmlHelper htmlHelper = new HtmlHelper();
+            fortunes.ForEach(f => page += @"<tr><td>{0}</td><td>{1}</td></tr>".Fmt(f.id, htmlHelper.Encode(f.message)));
             page += @"</table></body></html>";
             page += @"</table></body></html>";
             return page;
             return page;
         }
         }

+ 1 - 1
frameworks/CSharp/servicestack/src/ServiceStackBenchmark.csproj

@@ -14,7 +14,7 @@
     <FileAlignment>512</FileAlignment>
     <FileAlignment>512</FileAlignment>
     <TargetFrameworkProfile />
     <TargetFrameworkProfile />
     <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">.\</SolutionDir>
     <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">.\</SolutionDir>
-    <RestorePackages>true</RestorePackages>
+    <RestorePackages>false</RestorePackages>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
     <PlatformTarget>AnyCPU</PlatformTarget>

+ 0 - 5
frameworks/Clojure/compojure/bash_profile.sh

@@ -1,5 +0,0 @@
-#!/bin/bash
-
-export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
-export RESIN_HOME=${IROOT}/resin-4.0.41
-export LEIN_HOME=$IROOT/lein

+ 0 - 0
frameworks/Clojure/compojure/benchmark_config → frameworks/Clojure/compojure/benchmark_config.json


+ 1 - 1
frameworks/Clojure/compojure/install.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 #!/bin/bash
 
 
-fw_depends resin java leiningen
+fw_depends java7 resin leiningen

+ 5 - 0
frameworks/Clojure/compojure/setup.sh

@@ -1,5 +1,10 @@
 #!/bin/bash
 #!/bin/bash
 
 
+source $IROOT/java7.installed
+
+export RESIN_HOME=${IROOT}/resin-4.0.41
+export LEIN_HOME=$IROOT/lein
+
 # Path vars must be set here
 # Path vars must be set here
 export PATH="$JAVA_HOME/bin:$PATH"
 export PATH="$JAVA_HOME/bin:$PATH"
 
 

+ 0 - 5
frameworks/Clojure/http-kit/bash_profile.sh

@@ -1,5 +0,0 @@
-#!/bin/bash
-
-export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
-
-export LEIN_HOME=$IROOT/lein

+ 0 - 0
frameworks/Clojure/http-kit/benchmark_config → frameworks/Clojure/http-kit/benchmark_config.json


+ 1 - 1
frameworks/Clojure/http-kit/install.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 #!/bin/bash
 
 
-fw_depends leiningen java
+fw_depends leiningen java7

+ 2 - 0
frameworks/Clojure/http-kit/setup.sh

@@ -1,4 +1,6 @@
 #!/bin/bash
 #!/bin/bash
+source $IROOT/java7.installed
+export LEIN_HOME=$IROOT/lein
 
 
 cd hello
 cd hello
 $LEIN_HOME/bin/lein clean
 $LEIN_HOME/bin/lein clean

+ 0 - 2
frameworks/Clojure/luminus/bash_profile.sh

@@ -1,2 +0,0 @@
-export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
-export RESIN_HOME=${IROOT}/resin-4.0.41

+ 0 - 0
frameworks/Clojure/luminus/benchmark_config → frameworks/Clojure/luminus/benchmark_config.json


+ 1 - 1
frameworks/Clojure/luminus/install.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 #!/bin/bash
 
 
-fw_depends resin leiningen
+fw_depends java7 resin leiningen 

+ 3 - 0
frameworks/Clojure/luminus/setup.sh

@@ -1,5 +1,8 @@
 #!/bin/bash
 #!/bin/bash
 
 
+source $IROOT/java7.installed
+export RESIN_HOME=${IROOT}/resin-4.0.41
+
 # Path vars must be set here
 # Path vars must be set here
 export PATH="$JAVA_HOME/bin:$PATH"
 export PATH="$JAVA_HOME/bin:$PATH"
 
 

+ 0 - 5
frameworks/Dart/dart-redstone/bash_profile.sh

@@ -1,5 +0,0 @@
-#!/bin/bash
-
-export DART_HOME=$IROOT/dart-sdk
-
-export PUB_CACHE=$IROOT/.pubcache

+ 0 - 0
frameworks/Dart/dart-redstone/benchmark_config → frameworks/Dart/dart-redstone/benchmark_config.json


+ 2 - 0
frameworks/Dart/dart-redstone/setup.sh

@@ -1,4 +1,6 @@
 #!/bin/bash
 #!/bin/bash
+export DART_HOME=$IROOT/dart-sdk
+export PUB_CACHE=$IROOT/.pubcache
 
 
 sed -i 's|host: .*|host: '"${DBHOST}"'|g' postgresql.yaml
 sed -i 's|host: .*|host: '"${DBHOST}"'|g' postgresql.yaml
 sed -i 's|host: .*|host: '"${DBHOST}"'|g' mongodb.yaml
 sed -i 's|host: .*|host: '"${DBHOST}"'|g' mongodb.yaml

+ 0 - 7
frameworks/Dart/dart-start/bash_profile.sh

@@ -1,7 +0,0 @@
-#!/bin/bash
-
-export DART_HOME=$IROOT/dart-sdk
-
-export PUB_CACHE=$IROOT/.pubcache
-
-export NGINX_HOME=$IROOT/nginx

+ 0 - 0
frameworks/Dart/dart-start/benchmark_config → frameworks/Dart/dart-start/benchmark_config.json


+ 3 - 0
frameworks/Dart/dart-start/setup.sh

@@ -1,4 +1,7 @@
 #!/bin/bash
 #!/bin/bash
+export DART_HOME=$IROOT/dart-sdk
+export PUB_CACHE=$IROOT/.pubcache
+export NGINX_HOME=$IROOT/nginx
 
 
 sed -i 's|host: .*|host: '"${DBHOST}"'|g' postgresql.yaml
 sed -i 's|host: .*|host: '"${DBHOST}"'|g' postgresql.yaml
 sed -i 's|host: .*|host: '"${DBHOST}"'|g' mongodb.yaml
 sed -i 's|host: .*|host: '"${DBHOST}"'|g' mongodb.yaml

+ 0 - 7
frameworks/Dart/dart-stream/bash_profile.sh

@@ -1,7 +0,0 @@
-#!/bin/bash
-
-export DART_HOME=$IROOT/dart-sdk
-
-export PUB_CACHE=$IROOT/.pubcache
-
-export NGINX_HOME=$IROOT/nginx

+ 0 - 0
frameworks/Dart/dart-stream/benchmark_config → frameworks/Dart/dart-stream/benchmark_config.json


+ 3 - 0
frameworks/Dart/dart-stream/setup.sh

@@ -1,4 +1,7 @@
 #!/bin/bash
 #!/bin/bash
+export DART_HOME=$IROOT/dart-sdk
+export PUB_CACHE=$IROOT/.pubcache
+export NGINX_HOME=$IROOT/nginx
 
 
 sed -i 's|host: .*|host: '"${DBHOST}"'|g' postgresql.yaml
 sed -i 's|host: .*|host: '"${DBHOST}"'|g' postgresql.yaml
 sed -i 's|host: .*|host: '"${DBHOST}"'|g' mongodb.yaml
 sed -i 's|host: .*|host: '"${DBHOST}"'|g' mongodb.yaml

+ 0 - 5
frameworks/Dart/dart/bash_profile.sh

@@ -1,5 +0,0 @@
-#!/bin/bash
-
-export DART_HOME=$IROOT/dart-sdk
-
-export PUB_CACHE=$IROOT/.pubcache

+ 0 - 0
frameworks/Dart/dart/benchmark_config → frameworks/Dart/dart/benchmark_config.json


+ 20 - 15
frameworks/Dart/dart/server.dart

@@ -9,21 +9,24 @@ import 'package:postgresql/postgresql.dart' as pg;
 import 'package:postgresql/postgresql_pool.dart' as pgpool;
 import 'package:postgresql/postgresql_pool.dart' as pgpool;
 import 'package:yaml/yaml.dart' as yaml;
 import 'package:yaml/yaml.dart' as yaml;
 
 
+final _encoder = new JsonUtf8Encoder();
+
 /// Starts a new HTTP server that implements the tests to be benchmarked.  The
 /// Starts a new HTTP server that implements the tests to be benchmarked.  The
 /// address and port for incoming connections is configurable via command line
 /// address and port for incoming connections is configurable via command line
 /// arguments, as is the number of database connections to be maintained in the
 /// arguments, as is the number of database connections to be maintained in the
 /// connection pool.
 /// connection pool.
 void main(List<String> args) {
 void main(List<String> args) {
-  var parser = new ArgParser();
-  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 parser = new ArgParser()
+    ..addOption('address', abbr: 'a', defaultsTo: '0.0.0.0')
+    ..addOption('port', abbr: 'p', defaultsTo: '8080')
+    ..addOption('dbconnections', abbr: 'd', defaultsTo: '256')
+    ..addOption('isolates', abbr: 'i', defaultsTo: '1');
   var arguments = parser.parse(args);
   var arguments = parser.parse(args);
   var isolates = int.parse(arguments['isolates']);
   var isolates = int.parse(arguments['isolates']);
   var dbConnections = int.parse(arguments['dbconnections']) ~/ isolates;
   var dbConnections = int.parse(arguments['dbconnections']) ~/ isolates;
-  ServerSocket.bind(arguments['address'], int.parse(arguments['port'])).then(
-      (server) {
+  ServerSocket
+      .bind(arguments['address'], int.parse(arguments['port']))
+      .then((server) {
     var ref = server.reference;
     var ref = server.reference;
     for (int i = 1; i < isolates; i++) {
     for (int i = 1; i < isolates; i++) {
       Isolate.spawn(startInIsolate, [ref, dbConnections]);
       Isolate.spawn(startInIsolate, [ref, dbConnections]);
@@ -128,16 +131,16 @@ int _parseInt(String text) =>
 
 
 /// Completes the given [request] by writing the [response] with the given
 /// Completes the given [request] by writing the [response] with the given
 /// [statusCode] and [type].
 /// [statusCode] and [type].
-void _sendResponse(HttpRequest request, int statusCode, [type, response]) {
+void _sendResponse(HttpRequest request, int statusCode,
+    {ContentType type, List<int> response}) {
   request.response.statusCode = statusCode;
   request.response.statusCode = statusCode;
   request.response.headers.date = new DateTime.now();
   request.response.headers.date = new DateTime.now();
   if (type != null) {
   if (type != null) {
     request.response.headers.contentType = type;
     request.response.headers.contentType = type;
   }
   }
   if (response != null) {
   if (response != null) {
-    var data = UTF8.encode(response);
-    request.response.contentLength = data.length;
-    request.response.add(data);
+    request.response.contentLength = response.length;
+    request.response.add(response);
   } else {
   } else {
     request.response.contentLength = 0;
     request.response.contentLength = 0;
   }
   }
@@ -146,18 +149,20 @@ void _sendResponse(HttpRequest request, int statusCode, [type, response]) {
 
 
 /// Completes the given [request] by writing the [response] as HTML.
 /// Completes the given [request] by writing the [response] as HTML.
 void _sendHtml(HttpRequest request, String response) {
 void _sendHtml(HttpRequest request, String response) {
-  _sendResponse(request, HttpStatus.OK, ContentType.HTML, response);
+  _sendResponse(request, HttpStatus.OK,
+      type: ContentType.HTML, response: UTF8.encode(response));
 }
 }
 
 
 /// Completes the given [request] by writing the [response] as JSON.
 /// Completes the given [request] by writing the [response] as JSON.
 void _sendJson(HttpRequest request, Object response) {
 void _sendJson(HttpRequest request, Object response) {
-  _sendResponse(
-      request, HttpStatus.OK, ContentType.JSON, JSON.encode(response));
+  _sendResponse(request, HttpStatus.OK,
+      type: ContentType.JSON, response: _encoder.convert(response));
 }
 }
 
 
 /// Completes the given [request] by writing the [response] as plain text.
 /// Completes the given [request] by writing the [response] as plain text.
 void _sendText(HttpRequest request, String response) {
 void _sendText(HttpRequest request, String response) {
-  _sendResponse(request, HttpStatus.OK, ContentType.TEXT, response);
+  _sendResponse(request, HttpStatus.OK,
+      type: ContentType.TEXT, response: UTF8.encode(response));
 }
 }
 
 
 /// Responds with the JSON test to the [request].
 /// Responds with the JSON test to the [request].

+ 5 - 1
frameworks/Dart/dart/setup.sh

@@ -2,6 +2,10 @@
 
 
 sed -i 's|host: .*|host: '"${DBHOST}"'|g' postgresql.yaml
 sed -i 's|host: .*|host: '"${DBHOST}"'|g' postgresql.yaml
 
 
+export DART_HOME=$IROOT/dart-sdk
+
+export PUB_CACHE=$IROOT/.pubcache
+
 $DART_HOME/bin/pub upgrade
 $DART_HOME/bin/pub upgrade
 
 
-$DART_HOME/bin/dart server.dart -a 0.0.0.0 -p 8080 -d ${MAX_THREADS} -i ${MAX_THREADS} &
+$DART_HOME/bin/dart server.dart -a 0.0.0.0 -p 8080 -d ${MAX_THREADS} -i ${MAX_THREADS} &

+ 0 - 6
frameworks/Elixir/WeberFramework/.gitignore

@@ -1,6 +0,0 @@
-/ebin
-/deps
-erl_crash.dump
-/tmp
-_build
-/logs

+ 0 - 2
frameworks/Elixir/WeberFramework/README.md

@@ -1,2 +0,0 @@
-WeberFramework
-=====

+ 0 - 23
frameworks/Elixir/WeberFramework/benchmark_config

@@ -1,23 +0,0 @@
-{
-  "framework": "weber",
-  "tests": [{
-    "default": {
-      "setup_file": "setup_weber",
-      "json_url": "/json",
-      "plaintext_url": "/plaintext",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Platform",
-      "database": "Postgres",
-      "framework": "weber",
-      "language": "Elixir",
-      "orm": "Raw",
-      "platform": "Cowboy",
-      "webserver": "Cowboy",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "weber",
-      "notes": "",
-      "versus": ""
-  }}]
-}

Some files were not shown because too many files changed in this diff