Browse Source

Merge pull request #1257 from TechEmpower/meganuke

Meganuke is going live.
Mike Smith 10 years ago
parent
commit
0510e2879c
100 changed files with 240 additions and 390 deletions
  1. 6 6
      .travis.yml
  2. 56 29
      README.md
  3. 3 2
      benchmark.cfg.example
  4. 12 1
      deployment/vagrant-common/bootstrap.sh
  5. 3 2
      deployment/vagrant-common/core.rb
  6. 0 15
      frameworks/C#/aspnet/lib/packages.config
  7. 0 8
      frameworks/C#/nancy/bash_profile.sh
  8. 0 40
      frameworks/C#/nancy/setup_nginx.py
  9. 1 1
      frameworks/C++/ULib/benchmark_config
  10. 11 0
      frameworks/C++/ULib/setup-mysql.sh
  11. 0 48
      frameworks/C++/ULib/setup.py
  12. 14 0
      frameworks/C++/ULib/setup.sh
  13. 1 3
      frameworks/C++/cpoll_cppsp/Makefile
  14. 3 0
      frameworks/C++/cpoll_cppsp/bash_profile.sh
  15. 6 3
      frameworks/C++/cpoll_cppsp/install.sh
  16. 0 20
      frameworks/C++/cpoll_cppsp/setup.py
  17. 8 0
      frameworks/C++/cpoll_cppsp/setup.sh
  18. 0 38
      frameworks/C++/treefrog/setup-thread.py
  19. 17 0
      frameworks/C++/treefrog/setup-thread.sh
  20. 0 38
      frameworks/C++/treefrog/setup.py
  21. 17 0
      frameworks/C++/treefrog/setup.sh
  22. 0 26
      frameworks/C++/wt/setup.py
  23. 10 0
      frameworks/C++/wt/setup.sh
  24. 0 26
      frameworks/C++/wt/setup_postgres.py
  25. 10 0
      frameworks/C++/wt/setup_postgres.sh
  26. 1 3
      frameworks/C/duda/bash_profile.sh
  27. 2 2
      frameworks/C/duda/install.sh
  28. 0 17
      frameworks/C/duda/setup.py
  29. 5 0
      frameworks/C/duda/setup.sh
  30. 1 1
      frameworks/C/lwan/benchmark_config
  31. 10 0
      frameworks/C/lwan/setup-mysql.sh
  32. 0 36
      frameworks/C/lwan/setup.py
  33. 4 0
      frameworks/C/lwan/setup.sh
  34. 0 23
      frameworks/C/onion/setup.py
  35. 7 0
      frameworks/C/onion/setup.sh
  36. 0 0
      frameworks/CSharp/HttpListener/.gitignore
  37. 0 0
      frameworks/CSharp/HttpListener/.nuget/NuGet.Config
  38. 0 0
      frameworks/CSharp/HttpListener/.nuget/NuGet.targets
  39. 0 0
      frameworks/CSharp/HttpListener/HttpListener.sln
  40. 0 0
      frameworks/CSharp/HttpListener/HttpListener/App.config
  41. 0 0
      frameworks/CSharp/HttpListener/HttpListener/Fortunes.cshtml
  42. 0 0
      frameworks/CSharp/HttpListener/HttpListener/Fortunes.generated.cs
  43. 0 0
      frameworks/CSharp/HttpListener/HttpListener/HttpListener.csproj
  44. 0 0
      frameworks/CSharp/HttpListener/HttpListener/Models/Fortune.cs
  45. 0 0
      frameworks/CSharp/HttpListener/HttpListener/Models/MongoDB.cs
  46. 0 0
      frameworks/CSharp/HttpListener/HttpListener/Models/World.cs
  47. 0 0
      frameworks/CSharp/HttpListener/HttpListener/Program.cs
  48. 0 0
      frameworks/CSharp/HttpListener/HttpListener/Properties/AssemblyInfo.cs
  49. 0 0
      frameworks/CSharp/HttpListener/HttpListener/packages.config
  50. 0 0
      frameworks/CSharp/HttpListener/README.md
  51. 0 0
      frameworks/CSharp/HttpListener/__init__.py
  52. 0 0
      frameworks/CSharp/HttpListener/benchmark_config
  53. 0 0
      frameworks/CSharp/HttpListener/install.sh
  54. 0 0
      frameworks/CSharp/HttpListener/setup.ps1
  55. 0 0
      frameworks/CSharp/HttpListener/setup.py
  56. 0 0
      frameworks/CSharp/HttpListener/source_code
  57. 0 0
      frameworks/CSharp/README.md
  58. 0 0
      frameworks/CSharp/aspnet-stripped/.gitignore
  59. 0 0
      frameworks/CSharp/aspnet-stripped/NuGet.exe
  60. 0 0
      frameworks/CSharp/aspnet-stripped/README.md
  61. 0 0
      frameworks/CSharp/aspnet-stripped/__init__.py
  62. 0 0
      frameworks/CSharp/aspnet-stripped/benchmark_config
  63. 0 0
      frameworks/CSharp/aspnet-stripped/install.sh
  64. 0 0
      frameworks/CSharp/aspnet-stripped/setup_iis.ps1
  65. 0 0
      frameworks/CSharp/aspnet-stripped/setup_iis.py
  66. 0 0
      frameworks/CSharp/aspnet-stripped/source_code
  67. 0 0
      frameworks/CSharp/aspnet-stripped/src/App_Code/Common.cs
  68. 0 0
      frameworks/CSharp/aspnet-stripped/src/App_Code/DbHandler.cs
  69. 0 0
      frameworks/CSharp/aspnet-stripped/src/App_Code/FortunesPage.cs
  70. 0 0
      frameworks/CSharp/aspnet-stripped/src/App_Code/JsonHandler.cs
  71. 0 0
      frameworks/CSharp/aspnet-stripped/src/App_Code/Models/Fortune.cs
  72. 0 0
      frameworks/CSharp/aspnet-stripped/src/App_Code/Models/MongoDB.cs
  73. 0 0
      frameworks/CSharp/aspnet-stripped/src/App_Code/Models/World.cs
  74. 0 0
      frameworks/CSharp/aspnet-stripped/src/App_Code/MongoDBHandlers.cs
  75. 0 0
      frameworks/CSharp/aspnet-stripped/src/App_Code/MyModule.cs
  76. 0 0
      frameworks/CSharp/aspnet-stripped/src/App_Code/NoAspxHandlerFactory.cs
  77. 0 0
      frameworks/CSharp/aspnet-stripped/src/App_Code/PlaintextHandler.cs
  78. 0 0
      frameworks/CSharp/aspnet-stripped/src/App_Code/UpdatesHandler.cs
  79. 0 0
      frameworks/CSharp/aspnet-stripped/src/Web.config
  80. 0 0
      frameworks/CSharp/aspnet-stripped/src/fortunes.aspx
  81. 0 0
      frameworks/CSharp/aspnet-stripped/src/mongodbfortunes.aspx
  82. 0 0
      frameworks/CSharp/aspnet-stripped/src/packages.config
  83. 0 0
      frameworks/CSharp/aspnet/.gitignore
  84. 0 0
      frameworks/CSharp/aspnet/README.md
  85. 0 0
      frameworks/CSharp/aspnet/__init__.py
  86. 2 2
      frameworks/CSharp/aspnet/bash_profile.sh
  87. 0 0
      frameworks/CSharp/aspnet/benchmark_config
  88. 0 0
      frameworks/CSharp/aspnet/install.sh
  89. 0 0
      frameworks/CSharp/aspnet/lib/.nuget/NuGet.exe
  90. 0 0
      frameworks/CSharp/aspnet/lib/.nuget/NuGet.targets
  91. 0 0
      frameworks/CSharp/aspnet/nginx.conf
  92. 0 0
      frameworks/CSharp/aspnet/setup_iis.ps1
  93. 0 0
      frameworks/CSharp/aspnet/setup_iis.py
  94. 0 0
      frameworks/CSharp/aspnet/setup_nginx.py
  95. 30 0
      frameworks/CSharp/aspnet/setup_nginx.sh
  96. 0 0
      frameworks/CSharp/aspnet/setup_xsp.py
  97. 0 0
      frameworks/CSharp/aspnet/source_code
  98. 0 0
      frameworks/CSharp/aspnet/src/Application.cs
  99. 0 0
      frameworks/CSharp/aspnet/src/Benchmarks.AspNet.csproj
  100. 0 0
      frameworks/CSharp/aspnet/src/Benchmarks.sln

+ 6 - 6
.travis.yml

@@ -27,12 +27,12 @@ env:
     - "TESTDIR=C/lwan"
     - "TESTDIR=C/lwan"
     - "TESTDIR=C/duda"
     - "TESTDIR=C/duda"
     - "TESTDIR=C/onion"
     - "TESTDIR=C/onion"
-    - "TESTDIR=C#/aspnet"
-    # - "TESTDIR=C#/aspnet-stripped"
-    - "TESTDIR=C#/evhttp-sharp"
-    # - "TESTDIR=C#/HttpListener"
-    - "TESTDIR=C#/nancy"
-    - "TESTDIR=C#/servicestack"
+    - "TESTDIR=CSharp/aspnet"
+    # - "TESTDIR=CSharp/aspnet-stripped"
+    - "TESTDIR=CSharp/evhttp-sharp"
+    # - "TESTDIR=CSharp/HttpListener"
+    - "TESTDIR=CSharp/nancy"
+    - "TESTDIR=CSharp/servicestack"
     - "TESTDIR=C++/cpoll_cppsp"
     - "TESTDIR=C++/cpoll_cppsp"
     - "TESTDIR=C++/treefrog"
     - "TESTDIR=C++/treefrog"
     - "TESTDIR=C++/ULib"
     - "TESTDIR=C++/ULib"

+ 56 - 29
README.md

@@ -102,7 +102,7 @@ set up to have passwordless sudo access.
 **Setting up the `user`**
 **Setting up the `user`**
 
 
 ```bash
 ```bash
-$ sudo vim /etc/sudoers
+sudo vim /etc/sudoers
 ```
 ```
 
 
 You will need to change the line that reads `%sudo   ALL=(ALL:ALL) ALL` to 
 You will need to change the line that reads `%sudo   ALL=(ALL:ALL) ALL` to 
@@ -118,7 +118,7 @@ You will need to also be able to SSH onto each of the 3 machines from any of the
 file to accomplish this.
 file to accomplish this.
 
 
 ```bash
 ```bash
-$ ssh-keygen -t rsa
+ssh-keygen -t rsa
 ```
 ```
 
 
 This will prompt you for various inputs; leave them all blank and just hit 'enter'.
 This will prompt you for various inputs; leave them all blank and just hit 'enter'.
@@ -126,8 +126,8 @@ Next, you will want to allow connections identified via that key signature, so a
 it to your authorized keys.
 it to your authorized keys.
 
 
 ```bash
 ```bash
-$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
-$ chmod 600 ~/.ssh/authorized_keys
+cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
+chmod 600 ~/.ssh/authorized_keys
 ```
 ```
 
 
 Next, you will need these exact same files to exist on the other 2 machines.
 Next, you will need these exact same files to exist on the other 2 machines.
@@ -136,13 +136,13 @@ you for a password (if it does, go back to "Setting up the `user`" and fix it).
 
 
 ```bash
 ```bash
 # Set up the database machine for SSH
 # Set up the database machine for SSH
-$ cat ~/.ssh/id_rsa.pub | ssh [your user]@[database ip] 'cat >> .ssh/authorized_keys'
-$ scp ~/.ssh/id_rsa [your user]@[databse ip]:~/.ssh/id_rsa
-$ scp ~/.ssh/id_rsa.pub [your user]@[database ip]:~/.ssh/id_rsa.pub
+cat ~/.ssh/id_rsa.pub | ssh [your user]@[database ip] 'cat >> .ssh/authorized_keys'
+scp ~/.ssh/id_rsa [your user]@[databse ip]:~/.ssh/id_rsa
+scp ~/.ssh/id_rsa.pub [your user]@[database ip]:~/.ssh/id_rsa.pub
 # Set up the client machine for SSH
 # Set up the client machine for SSH
-$ cat ~/.ssh/id_rsa.pub | ssh [your user]@[client ip] 'cat >> .ssh/authorized_keys'
-$ scp ~/.ssh/id_rsa [your user]@[client ip]:~/.ssh/id_rsa
-$ scp ~/.ssh/id_rsa.pub [your user]@[client ip]:~/.ssh/id_rsa.pub
+cat ~/.ssh/id_rsa.pub | ssh [your user]@[client ip] 'cat >> .ssh/authorized_keys'
+scp ~/.ssh/id_rsa [your user]@[client ip]:~/.ssh/id_rsa
+scp ~/.ssh/id_rsa.pub [your user]@[client ip]:~/.ssh/id_rsa.pub
 ```
 ```
 
 
 Now, test it all out, you should be able to execute all of the following without
 Now, test it all out, you should be able to execute all of the following without
@@ -151,38 +151,64 @@ being prompted for a password. **NOTE** The first time you SSH to these machines
 
 
 ```bash
 ```bash
 # Test your database SSH setup
 # Test your database SSH setup
-$ ssh [database ip]
+ssh [database ip]
 # Accept the signature
 # Accept the signature
 # You are connected to the database machine!
 # You are connected to the database machine!
-$ sudo ls
+sudo ls
 # This should NOT prompt for a password and list the directory's contents
 # This should NOT prompt for a password and list the directory's contents
 # If this is not true, go back to "Setting up the `user`" and fix it
 # If this is not true, go back to "Setting up the `user`" and fix it
-$ exit
+exit
 # Test your client SSH setup
 # Test your client SSH setup
-$ ssh [client ip]
+ssh [client ip]
 # Accept the signature
 # Accept the signature
 # You are connected to the client machine!
 # You are connected to the client machine!
-$ sudo ls
+sudo ls
 # We also need to test that we can SSH back to the server machine
 # We also need to test that we can SSH back to the server machine
-$ ssh [server ip]
+ssh [server ip]
 # Accept the signature
 # Accept the signature
 # You are connected to the server machine!
 # You are connected to the server machine!
-$ sudo ls
+sudo ls
 # If this works, you are golden!
 # If this works, you are golden!
-$ exit
+exit
 # Back on client
 # Back on client
-$ exit
+exit
 # Back on initial ssh connection to server machine
 # Back on initial ssh connection to server machine
 ```
 ```
 
 
+Last, the benchmarks require that every framework test be run under a different
+user than the one who executes the `run-tests.py` script. Creating a `runner_user` named "testrunner" is simple:
+
+```bash
+# Change this value to whatever username you want
+export RUNNER=testrunner
+# Get your primary user
+export ME=$(id -u -n)
+# Create the new testrunner user
+sudo useradd $RUNNER
+# Give him a home dir
+sudo mkdir /home/$RUNNER
+# Make testrunner the owner of his home dir
+sudo chown $RUNNER:$RUNNER /home/$RUNNER
+# Add the testrunner user to every group that the travis user is in
+sudo sed -i 's|:'"$ME"'|:'"$ME"','"$RUNNER"'|g' /etc/group
+# Add the testrunner user to the travis group specifically
+sudo sed -i 's|'"$ME"':x:\(.*\):|'"$ME"':x:\1:'"$RUNNER"'|g' /etc/group
+# Add the travis user to the testrunner group
+sudo sed -i 's|'"$RUNNER"':x:\(.*\):|'"$RUNNER"':x:\1:'"$ME"'|g' /etc/group
+# Add testrunner to the sudoers group
+echo "$RUNNER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
+# Set the default shell for testrunner to /bin/bash
+sudo sed -i 's|/home/'"$RUNNER"':.*|/home/'"$RUNNER"':/bin/bash|g' /etc/passwd
+```
+
 **Setting up prerequisites**
 **Setting up prerequisites**
 
 
 The suite requires that a few libraries and applications are installed in order to run.
 The suite requires that a few libraries and applications are installed in order to run.
 First, clone our repository.
 First, clone our repository.
 
 
 ```bash
 ```bash
-$ git clone https://github.com/TechEmpower/FrameworkBenchmarks.git
-$ sudo pip install -r FrameworkBenchmarks/config/python_requirements.txt
+git clone https://github.com/TechEmpower/FrameworkBenchmarks.git
+sudo pip install -r FrameworkBenchmarks/config/python_requirements.txt
 ```
 ```
 
 
 To install TFB components onto the various servers, you must provide
 To install TFB components onto the various servers, you must provide
@@ -192,9 +218,9 @@ using command line flags, it's easier to use a configuration
 file and avoid having huge flag lists in your commands. 
 file and avoid having huge flag lists in your commands. 
 
 
 ```bash
 ```bash
-$ cd FrameworkBenchmarks
-$ cp benchmark.cfg.example benchmark.cfg
-$ vim benchmark.cfg
+cd FrameworkBenchmarks
+cp benchmark.cfg.example benchmark.cfg
+vim benchmark.cfg
 ```
 ```
 
 
 You will need to change, at a minimum, the following:
 You will need to change, at a minimum, the following:
@@ -202,6 +228,7 @@ You will need to change, at a minimum, the following:
 * `client_host` Set this to the IP address of your client machine
 * `client_host` Set this to the IP address of your client machine
 * `client_identity_file` Set to `/home/[username]/.ssh/id_rsa`
 * `client_identity_file` Set to `/home/[username]/.ssh/id_rsa`
 * `client_user` Set to your username
 * `client_user` Set to your username
+* `runner_user` Set to your runner's username
 * `database_host` Set this to the IP address of your database machine
 * `database_host` Set this to the IP address of your database machine
 * `database_identity_file` Set to `/home/[username]/.ssh/id_rsa`
 * `database_identity_file` Set to `/home/[username]/.ssh/id_rsa`
 * `database_user` Set to your username
 * `database_user` Set to your username
@@ -218,13 +245,13 @@ works, see [here](deployment).
 **Setting up the `load server`**
 **Setting up the `load server`**
 
 
 ```bash
 ```bash
-$ toolset/run-tests.py --install client --install-only
+toolset/run-tests.py --install client --install-only
 ```
 ```
 
 
 **Setting up the `database server`**
 **Setting up the `database server`**
 
 
 ```bash
 ```bash
-$ toolset/run-tests.py --install database --install-only
+toolset/run-tests.py --install database --install-only
 ```
 ```
 
 
 **Setting up the `app server`**
 **Setting up the `app server`**
@@ -235,7 +262,7 @@ can test your setup by running a verification on one of the stable
 frameworks. Since we wrote it, we tend to test with `gemini`:
 frameworks. Since we wrote it, we tend to test with `gemini`:
 
 
 ```bash
 ```bash
-$ toolset/run-tests.py --mode verify --test gemini
+toolset/run-tests.py --mode verify --test gemini
 ```
 ```
 
 
 You can find the results for this verification step under the directory:
 You can find the results for this verification step under the directory:
@@ -247,10 +274,10 @@ You can choose to selectively install components by using the
 
 
 ```bash
 ```bash
 # Install just the software for beego (as an example)
 # Install just the software for beego (as an example)
-$ toolset/run-tests.py --install server --test beego --verbose --install-only
+toolset/run-tests.py --install server --test beego --verbose --install-only
 
 
 # Install all php software but php-fuel (as another example)
 # Install all php software but php-fuel (as another example)
-$ toolset/run-tests.py --install server --test php* --exclude php-fuel --verbose --install-only
+toolset/run-tests.py --install server --test php* --exclude php-fuel --verbose install-only
 
 
 # Install *all* framework software. Expect this to take hours!
 # Install *all* framework software. Expect this to take hours!
 # If running on a remote server, use `screen` or `tmux` or `nohup` to 
 # If running on a remote server, use `screen` or `tmux` or `nohup` to 

+ 3 - 2
benchmark.cfg.example

@@ -2,11 +2,12 @@
 # Available Keys: 
 # Available Keys: 
 client_host=localhost
 client_host=localhost
 client_identity_file=None
 client_identity_file=None
-client_user=localhost
+client_user=techempower
+runner_user=testrunner
 database_host=localhost
 database_host=localhost
 database_identity_file=None
 database_identity_file=None
 database_os=linux
 database_os=linux
-database_user=tfb
+database_user=techempower
 duration=60
 duration=60
 exclude=None
 exclude=None
 install=server
 install=server

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

@@ -59,6 +59,7 @@ if [ ! -e "~/.firstboot" ]; then
   echo "export TFB_DATABASE_HOST=$DATABA_IP" >> ~/.bash_profile
   echo "export TFB_DATABASE_HOST=$DATABA_IP" >> ~/.bash_profile
   echo "export TFB_CLIENT_USER=$USER" >> ~/.bash_profile
   echo "export TFB_CLIENT_USER=$USER" >> ~/.bash_profile
   echo "export TFB_DATABASE_USER=$USER" >> ~/.bash_profile
   echo "export TFB_DATABASE_USER=$USER" >> ~/.bash_profile
+  echo "export TFB_RUNNER_USER=testrunner" >> ~/.bash_profile
   echo "export FWROOT=$HOME/FrameworkBenchmarks" >> ~/.bash_profile 
   echo "export FWROOT=$HOME/FrameworkBenchmarks" >> ~/.bash_profile 
   source ~/.bash_profile
   source ~/.bash_profile
 
 
@@ -74,6 +75,12 @@ if [ ! -e "~/.firstboot" ]; then
   echo $CLIENT_IP TFB-client   | sudo tee --append /etc/hosts
   echo $CLIENT_IP TFB-client   | sudo tee --append /etc/hosts
   echo $SERVER_IP TFB-server   | sudo tee --append /etc/hosts
   echo $SERVER_IP TFB-server   | sudo tee --append /etc/hosts
 
 
+  # Add other users:
+  sudo useradd -m testrunner
+  # WARN: testrunner will NOT have sudo access by round 11
+  #       please begin migrating scripts to not rely on sudo.
+  sudo bash -c "echo 'testrunner ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/90-tfb-testrunner"
+
   # Update hostname to reflect our current role
   # Update hostname to reflect our current role
   if [ "$ROLE" != "all" ]; then
   if [ "$ROLE" != "all" ]; then
     echo "Updating hostname"
     echo "Updating hostname"
@@ -112,8 +119,12 @@ if [ ! -e "~/.firstboot" ]; then
   echo "Setting up SSH access to localhost"
   echo "Setting up SSH access to localhost"
   ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa
   ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa
   cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
   cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
+  sudo -u testrunner mkdir -p /home/testrunner/.ssh
+  sudo -u testrunner ssh-keygen -t rsa -N '' -f /home/testrunner/.ssh/id_rsa
+  sudo -u testrunner bash -c "cat /home/testrunner/.ssh/id_rsa.pub >> /home/testrunner/.ssh/authorized_keys"
+  sudo -u testrunner bash -c "cat /home/vagrant/.ssh/authorized_keys >> /home/testrunner/.ssh/authorized_keys"
   chmod 600 ~/.ssh/authorized_keys
   chmod 600 ~/.ssh/authorized_keys
-
+  sudo -u testrunner chmod 600 /home/testrunner/.ssh/authorized_keys
   # Enable remote SSH access if we are running production environment
   # Enable remote SSH access if we are running production environment
   # Note : this are always copied from the local working copy using a
   # Note : this are always copied from the local working copy using a
   #        file provisioner. While they exist in the git clone we just 
   #        file provisioner. While they exist in the git clone we just 

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

@@ -96,10 +96,11 @@ def provider_virtualbox(config, role)
     vb.memory = ENV.fetch('TFB_VB_MEM', 2048)
     vb.memory = ENV.fetch('TFB_VB_MEM', 2048)
     vb.cpus = ENV.fetch('TFB_VB_CPU', 2)
     vb.cpus = ENV.fetch('TFB_VB_CPU', 2)
 
 
-    override.vm.synced_folder "../..", "/FrameworkBenchmarks"
+    # mount_options addresses issue mitchellh/vagrant#4997
+    override.vm.synced_folder "../..", "/FrameworkBenchmarks", mount_options: ['fmode=777', 'dmode=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
     end
     end
   end
   end
-end
+end

+ 0 - 15
frameworks/C#/aspnet/lib/packages.config

@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="EntityFramework" version="6.0.2" targetFramework="net45" />
-  <package id="Microsoft.AspNet.Mvc" version="5.1.0" targetFramework="net45" />
-  <package id="Microsoft.AspNet.Razor" version="3.1.0" targetFramework="net45" />
-  <package id="Microsoft.AspNet.WebPages" version="3.1.0" targetFramework="net45" />
-  <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
-  <package id="MSBuild.Microsoft.VisualStudio.Web.targets" version="11.0.2.1" />
-  <package id="mongocsharpdriver" version="1.8.3" targetFramework="net45" />
-  <package id="MySql.Data" version="6.8.3" targetFramework="net45" />
-  <package id="MySql.Data.Entities" version="6.8.3" targetFramework="net45" />
-  <package id="Npgsql" version="2.0.14.3" targetFramework="net45" />
-  <package id="Newtonsoft.Json" version="5.0.8" targetFramework="net45" />
-  <package id="ServiceStack.Text" version="4.0.8" targetFramework="net45" />
-</packages>

+ 0 - 8
frameworks/C#/nancy/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 - 40
frameworks/C#/nancy/setup_nginx.py

@@ -1,40 +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("nancy/src/Web.config", "localhost", args.database_host)
-
-  # build
-  subprocess.check_call("rm -rf bin obj", shell=True, cwd="nancy", stderr=errfile, stdout=logfile)
-  subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="nancy/src", stderr=errfile, stdout=logfile)
-  
-  # nginx
-  workers = 'worker_processes ' + str(args.max_threads) + ';'
-  subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > $TROOT/nginx.upstream.conf', 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="nancy", 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)

+ 1 - 1
frameworks/C++/ULib/benchmark_config

@@ -24,7 +24,7 @@
       "versus": ""
       "versus": ""
     },
     },
     "mysql": {
     "mysql": {
-      "setup_file": "setup",
+      "setup_file": "setup-mysql",
       "json_url": "/json",
       "json_url": "/json",
       "db_url": "/db",
       "db_url": "/db",
       "query_url": "/query?queries=",
       "query_url": "/query?queries=",

+ 11 - 0
frameworks/C++/ULib/setup-mysql.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+
+export UMEMPOOL="135,0,0,34,8465,129,-17,-22,41"
+export ORM_DRIVER="mysql"
+export ORM_OPTION="host=${DBHOST} user=benchmarkdbuser password=benchmarkdbpass character-set=utf8 dbname=hello_world"
+
+# 1. Change ULib Server configuration
+sed -i 's|PREFORK_CHILD .*|PREFORK_CHILD '"${MAX_THREADS}"'|g' $ULIB_ROOT/benchmark.cfg
+
+# 2. Start ULib Server (userver_tcp)
+$ULIB_ROOT/bin/userver_tcp -c $ULIB_ROOT/benchmark.cfg &

+ 0 - 48
frameworks/C++/ULib/setup.py

@@ -1,48 +0,0 @@
-import os
-import sys
-import time
-import setup_util
-import subprocess
-import multiprocessing
-
-def get_env_for_database(args):
-  if args.database == 'MySQL':
-     driver = 'mysql'
-     dbname = 'hello_world'
-  else:
-     driver = 'sqlite'
-     dbname = os.environ['ULIB_ROOT'] + '/db/%.*s'
-  return {
-      'UMEMPOOL': '135,0,0,34,8465,129,-17,-22,41',
-      'ORM_DRIVER': driver,
-      'ORM_OPTION': "host=" + args.database_host + " user=benchmarkdbuser password=benchmarkdbpass character-set=utf8 dbname=" + dbname
-    }
-
-def start(args, logfile, errfile):
-  try:
-    ulib_root = os.environ['ULIB_ROOT']
-    fcfg = ulib_root + "/benchmark.cfg"
-    fprg = ulib_root + "/bin/userver_tcp"
-    # 1. Change ULib Server configuration
-    setup_util.replace_text(fcfg, "PREFORK_CHILD .*", "PREFORK_CHILD " + str(multiprocessing.cpu_count()))
-    # 2. Start ULib Server (userver_tcp)
-    subprocess.Popen( "%s -c %s" % (fprg, fcfg), shell=True, stdout=logfile, stderr=errfile, env = get_env_for_database(args))
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-
-def stop(logfile, errfile):
-  try:
-    # Stop ULib Server (userver_tcp)
-    subprocess.check_call("kill -TERM $( cat $ULIB_ROOT/userver_tcp.pid )", shell=True, stderr=errfile, stdout=logfile)
-    time.sleep(3);
-    p = subprocess.Popen(['pgrep', 'userver_tcp'], stdout=subprocess.PIPE)
-    out, err = p.communicate()
-    for line in out.splitlines():
-       if 'userver_tcp' in line:
-         pid = int(line.split(None, 2)[1])
-         os.kill(pid, 9)
-    subprocess.call("rm -f $ULIB_ROOT/userver_tcp.pid", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

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

@@ -0,0 +1,14 @@
+#!/bin/bash
+
+export UMEMPOOL="135,0,0,34,8465,129,-17,-22,41"
+echo $UMEMPOOL
+export ORM_DRIVER="sqlite"
+echo $ORM_DRIVER
+export ORM_OPTION="host=${DBHOST} user=benchmarkdbuser password=benchmarkdbpass character-set=utf8 dbname=${ULIB_ROOT}/db/%.*s"
+echo $ORM_OPTION
+
+# 1. Change ULib Server configuration
+sed -i 's|PREFORK_CHILD .*|PREFORK_CHILD '"${MAX_THREADS}"'|g' $ULIB_ROOT/benchmark.cfg
+
+# 2. Start ULib Server (userver_tcp)
+$ULIB_ROOT/bin/userver_tcp -c $ULIB_ROOT/benchmark.cfg &

+ 1 - 3
frameworks/C++/cpoll_cppsp/Makefile

@@ -6,6 +6,4 @@ clean:
 	$(MAKE) -C $(IROOT)/cppsp_0.2.3 clean
 	$(MAKE) -C $(IROOT)/cppsp_0.2.3 clean
 
 
 cppsp_0.2.3:
 cppsp_0.2.3:
-	$(MAKE) CXX=g++-4.8 -C $(IROOT)/cppsp_0.2.3 all
-
-
+	$(MAKE) -C $(IROOT)/cppsp_0.2.3 all

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

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

+ 6 - 3
frameworks/C++/cpoll_cppsp/install.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists cppsp.installed)
+RETCODE=$(fw_exists ${IROOT}/cppsp.installed)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
 
 sudo apt-get install -y postgresql-server-dev-9.3 libpq-dev
 sudo apt-get install -y postgresql-server-dev-9.3 libpq-dev
@@ -12,7 +12,10 @@ fw_untar cppsp_0.2.3.tar.xz
 # causes oddball issues when mv'ed around inside a folder mounted 
 # causes oddball issues when mv'ed around inside a folder mounted 
 # inside of VirtualBox (may have something to do with case-sensitive 
 # inside of VirtualBox (may have something to do with case-sensitive 
 # filesystems)
 # filesystems)
-cp -R cppsp_rel0.2.3/ $IROOT/cppsp_0.2.3
+cp -R cppsp_rel0.2.3/ ${IROOT}/cppsp_0.2.3
 rm -rf cppsp_rel0.2.3/
 rm -rf cppsp_rel0.2.3/
 
 
-touch cppsp.installed
+sed -i 's|CXX := .*|CXX := g++-4.8|g' ${IROOT}/cppsp_0.2.3/makefile
+sed -i 's|-Wall|-w|g' ${IROOT}/cppsp_0.2.3/makefile
+
+touch ${IROOT}/cppsp.installed

+ 0 - 20
frameworks/C++/cpoll_cppsp/setup.py

@@ -1,20 +0,0 @@
-import subprocess
-import sys
-import os
-import setup_util 
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("cpoll_cppsp/www/connectioninfo.H", "\\#define BENCHMARK_DB_HOST \".*\"", "#define BENCHMARK_DB_HOST \"" + args.database_host + "\"")
-  subprocess.check_call("make clean", shell=True, cwd="cpoll_cppsp", stderr=errfile, stdout=logfile)
-  subprocess.check_call("make", shell=True, cwd="cpoll_cppsp", stderr=errfile, stdout=logfile)
-  subprocess.Popen("./run_application $TROOT/www -g g++-4.8 -m /forcedynamic.cppsm", shell=True, cwd=args.iroot + "/cppsp_0.2.3", stderr=errfile, stdout=logfile);
-  return 0
-
-def stop(logfile, errfile):
-  p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
-  out, err = p.communicate()
-  for line in out.splitlines():
-    if 'cppsp_standalone' in line:
-      pid = int(line.split(None, 2)[1])
-      os.kill(pid, 15)
-  return 0

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

@@ -0,0 +1,8 @@
+#!/bin/bash
+
+sed -i 's|#define BENCHMARK_DB_HOST ".*"|#define BENCHMARK_DB_HOST "'"$DBHOST"'"|g' www/connectioninfo.H
+
+make clean
+make
+cd $CPPSP_HOME
+./run_application $TROOT/www -g g++-4.8 -m /forcedynamic.cppsm &

+ 0 - 38
frameworks/C++/treefrog/setup-thread.py

@@ -1,38 +0,0 @@
-
-import subprocess
-import sys
-import setup_util
-from os.path import expanduser
-
-home = expanduser("~")
-
-##############
-# start(args)
-##############
-def start(args, logfile, errfile):
-  setup_util.replace_text("treefrog/config/database.ini", "HostName=.*", "HostName=" + args.database_host)
-  setup_util.replace_text("treefrog/config/application.ini", "MultiProcessingModule=.*", "MultiProcessingModule=thread")
-
-  # 1. Generate Makefile
-  # 2. Compile applicaton
-  # 3. Clean log files
-  # 4. Start TreeFrog
-  try:
-    subprocess.check_call("qmake -r CONFIG+=release", shell=True, cwd="treefrog", stderr=errfile, stdout=logfile)
-    subprocess.check_call("make clean", shell=True, cwd="treefrog", stderr=errfile, stdout=logfile)
-    subprocess.check_call("make -j8", shell=True, cwd="treefrog", stderr=errfile, stdout=logfile)
-    subprocess.check_call("rm -f log/*.log", shell=True, cwd="treefrog", stderr=errfile, stdout=logfile)
-    subprocess.check_call("treefrog -d $TROOT", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-
-##############
-# stop()
-##############
-def stop(logfile, errfile):
-  try:
-    subprocess.call("treefrog -k abort $TROOT", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 17 - 0
frameworks/C++/treefrog/setup-thread.sh

@@ -0,0 +1,17 @@
+#!/bin/bash
+
+sed -i 's|HostName=.*|HostName='"$DBHOST"'|g' config/database.ini
+sed -i "s|MultiProcessingModule=.*|MultiProcessingModule=thread|g" config/application.ini
+
+# 1. Generate Makefile
+qmake -r CONFIG+=release
+
+# 2. Compile applicaton
+make clean
+make -j8
+
+# 3. Clean log files
+rm -f log/*.log
+
+# 4. Start TreeFrog
+treefrog -d $TROOT &

+ 0 - 38
frameworks/C++/treefrog/setup.py

@@ -1,38 +0,0 @@
-
-import subprocess
-import sys
-import setup_util
-from os.path import expanduser
-
-home = expanduser("~")
-
-##############
-# start(args)
-##############
-def start(args, logfile, errfile):
-  setup_util.replace_text("treefrog/config/database.ini", "HostName=.*", "HostName=" + args.database_host)
-  setup_util.replace_text("treefrog/config/application.ini", "MultiProcessingModule=.*", "MultiProcessingModule=hybrid")
-
-  # 1. Generate Makefile
-  # 2. Compile applicaton
-  # 3. Clean log files
-  # 4. Start TreeFrog
-  try:
-    subprocess.check_call("qmake -r CONFIG+=release", shell=True, cwd="treefrog", stderr=errfile, stdout=logfile)
-    subprocess.check_call("make clean", shell=True, cwd="treefrog", stderr=errfile, stdout=logfile)
-    subprocess.check_call("make -j8", shell=True, cwd="treefrog", stderr=errfile, stdout=logfile)
-    subprocess.check_call("rm -f log/*.log", shell=True, cwd="treefrog", stderr=errfile, stdout=logfile)
-    subprocess.check_call("treefrog -d $TROOT", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-
-##############
-# stop()
-##############
-def stop(logfile, errfile):
-  try:
-    subprocess.call("treefrog -k abort $TROOT", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 17 - 0
frameworks/C++/treefrog/setup.sh

@@ -0,0 +1,17 @@
+#!/bin/bash
+
+sed -i 's|HostName=.*|HostName='"$DBHOST"'|g' config/database.ini
+sed -i "s|MultiProcessingModule=.*|MultiProcessingModule=hybrid|g" config/application.ini
+
+# 1. Generate Makefile
+qmake -r CONFIG+=release
+
+# 2. Compile applicaton
+make clean
+make -j8
+
+# 3. Clean log files
+rm -f log/*.log
+
+# 4. Start TreeFrog
+treefrog -d $TROOT &

+ 0 - 26
frameworks/C++/wt/setup.py

@@ -1,26 +0,0 @@
-import subprocess
-import os
-import setup_util
-
-def start(args, logfile, errfile, cwd='wt'):
-    setup_util.replace_text("wt/benchmark.cpp", "INSERT_DB_HOST_HERE", args.database_host);
-    subprocess.check_call('g++-4.8 -O3 -DNDEBUG -std=c++0x -L${BOOST_LIB} -I${BOOST_INC} -L${WT_LIB} -I${WT_INC} -o benchmark.wt benchmark.cpp -lwt -lwthttp -lwtdbo -lwtdbomysql -lboost_thread', shell=True, cwd=cwd, stderr=errfile, stdout=logfile)
-    subprocess.Popen(['./benchmark.wt',
-        '-c', 'wt_config.xml',
-        '-t', str(args.max_threads),
-    	'--docroot', '.',
-        '--http-address', '0.0.0.0',
-        '--http-port', '8080',
-        '--accesslog=-',
-        '--no-compression'],
-        cwd=cwd, stderr=errfile, stdout=logfile)
-    return 0
-
-def stop(logfile, errfile):
-    p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
-    out, err = p.communicate()
-    for line in out.splitlines():
-        if 'benchmark.wt' in line:
-            pid = int(line.split(None, 2)[1])
-            os.kill(pid, 15)
-    return 0

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

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# 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}"
+
+sed -i 's|INSERT_DB_HOST_HERE|'"${DBHOST}"'|g' benchmark.cpp
+
+g++-4.8 -O3 -DNDEBUG -std=c++0x -L${BOOST_LIB} -I${BOOST_INC} -L${WT_LIB} -I${WT_INC} -o benchmark.wt benchmark.cpp -lwt -lwthttp -lwtdbo -lwtdbomysql -lboost_thread
+
+./benchmark.wt -c wt_config.xml -t ${MAX_THREADS} --docroot . --http-address 0.0.0.0 --http-port 8080 --accesslog=- --no-compression &

+ 0 - 26
frameworks/C++/wt/setup_postgres.py

@@ -1,26 +0,0 @@
-import subprocess
-import os
-import setup_util
-
-def start(args, logfile, errfile, cwd='wt'):
-    setup_util.replace_text("wt/benchmark.cpp", "INSERT_DB_HOST_HERE", args.database_host);
-    subprocess.check_call('g++-4.8 -O3 -DNDEBUG -DBENCHMARK_USE_POSTGRES -std=c++0x -L${BOOST_LIB} -I${BOOST_INC} -L${WT_LIB} -I${WT_INC} -o benchmark_postgres.wt benchmark.cpp -lwt -lwthttp -lwtdbo -lwtdbopostgres -lboost_thread', shell=True, cwd=cwd, stderr=errfile, stdout=logfile)
-    subprocess.Popen(['./benchmark_postgres.wt',
-        '-c', 'wt_config.xml',
-        '-t', str(args.max_threads),
-    	'--docroot', '.',
-        '--http-address', '0.0.0.0',
-        '--http-port', '8080',
-        '--accesslog=-',
-        '--no-compression'],
-        cwd=cwd, stderr=errfile, stdout=logfile)
-    return 0
-
-def stop(logfile, errfile):
-    p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
-    out, err = p.communicate()
-    for line in out.splitlines():
-        if 'benchmark_postgres.wt' in line:
-            pid = int(line.split(None, 2)[1])
-            os.kill(pid, 15)
-    return 0

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

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# 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}"
+
+sed -i 's|INSERT_DB_HOST_HERE|'"${DBHOST}"'|g' benchmark.cpp
+
+g++-4.8 -O3 -DNDEBUG -DBENCHMARK_USE_POSTGRES -std=c++0x -L${BOOST_LIB} -I${BOOST_INC} -L${WT_LIB} -I${WT_INC} -o benchmark_postgres.wt benchmark.cpp -lwt -lwthttp -lwtdbo -lwtdbopostgres -lboost_thread
+
+./benchmark_postgres.wt -c wt_config.xml -t ${MAX_THREADS} --docroot . --http-address 0.0.0.0 --http-port 8080 --accesslog=- --no-compression &

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

@@ -1,5 +1,3 @@
 #!/bin/bash
 #!/bin/bash
 
 
-export DUDAPATH=${IROOT}/dudac-0.23
-
-export PATH="$DUDAPATH:$PATH"
+export DUDA_HOME=${IROOT}/dudac-0.23

+ 2 - 2
frameworks/C/duda/install.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists duda-0.23.installed)
+RETCODE=$(fw_exists ${IROOT}/duda-0.23.installed)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
 
 fw_get http://duda.io/releases/duda-client/dudac-0.23.tar.gz -O dudac-0.23.tar.gz
 fw_get http://duda.io/releases/duda-client/dudac-0.23.tar.gz -O dudac-0.23.tar.gz
@@ -12,4 +12,4 @@ cd dudac-0.23
 ./dudac -s
 ./dudac -s
 
 
 cd ..
 cd ..
-touch duda-0.23.installed
+touch ${IROOT}/duda-0.23.installed

+ 0 - 17
frameworks/C/duda/setup.py

@@ -1,17 +0,0 @@
-import subprocess
-import sys
-import os
-import setup_util 
-
-def start(args, logfile, errfile):
-  subprocess.Popen("dudac -w $TROOT/webservice -p 2001", shell=True, stderr=errfile, stdout=logfile);
-  return 0
-
-def stop(logfile, errfile):
-  p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
-  out, err = p.communicate()
-  for line in out.splitlines():
-    if 'monkey' in line:
-      pid = int(line.split(None, 2)[1])
-      os.kill(pid, 15)
-  return 0

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

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

+ 1 - 1
frameworks/C/lwan/benchmark_config

@@ -24,7 +24,7 @@
       "versus": ""
       "versus": ""
     },
     },
     "mysql": {
     "mysql": {
-      "setup_file": "setup",
+      "setup_file": "setup-mysql",
       "db_url": "/db",
       "db_url": "/db",
       "query_url": "/queries?queries=",
       "query_url": "/queries?queries=",
       "fortune_url": "/fortunes",
       "fortune_url": "/fortunes",

+ 10 - 0
frameworks/C/lwan/setup-mysql.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+export USE_MYSQL=1
+export MYSQL_USER=benchmarkdbuser
+export MYSQL_PASS=benchmarkdbpass
+export MYSQL_HOST=$DBHOST
+export MYSQL_DB=hello_world
+
+cd $LWAN_ROOT/techempower
+$LWAN_BUILD/techempower/techempower &

+ 0 - 36
frameworks/C/lwan/setup.py

@@ -1,36 +0,0 @@
-import subprocess
-import sys
-import os
-
-def get_env_for_database(args):
-  if args.database == 'MySQL':
-    return {
-      'USE_MYSQL': '1',
-      'MYSQL_USER': 'benchmarkdbuser',
-      'MYSQL_PASS': 'benchmarkdbpass',
-      'MYSQL_HOST': args.database_host,
-      'MYSQL_DB': 'hello_world'
-    }
-  return None
-
-def start(args, logfile, errfile):
-  subprocess.call('rm -rf ${LWAN_BUILD}', shell=True, stderr=errfile, stdout=logfile)
-  subprocess.call('mkdir -p ${LWAN_BUILD}', shell=True, stderr=errfile, stdout=logfile)
-  subprocess.call('cmake ${LWAN_ROOT} -DCMAKE_BUILD_TYPE=Release && make techempower',
-      cwd=os.environ['LWAN_BUILD'], shell=True, stderr=errfile, stdout=logfile)
-
-  db_dir = os.path.join(os.environ['LWAN_ROOT'], 'techempower')
-  exe_path = os.path.join(os.environ['LWAN_BUILD'], 'techempower', 'techempower')
-
-  subprocess.Popen(exe_path, cwd=db_dir, stderr=errfile, stdout=logfile, shell=True,
-      env = get_env_for_database(args))
-
-  return 0
-
-def stop(logfile, errfile):
-  p = subprocess.Popen(['pgrep', 'techempower'], stdout=subprocess.PIPE)
-  out, err = p.communicate()
-  for line in out.splitlines():
-      pid = int(line)
-      os.kill(pid, 2)
-  return 0

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

@@ -0,0 +1,4 @@
+#!/bin/bash
+
+cd $LWAN_ROOT/techempower
+$LWAN_BUILD/techempower/techempower &

+ 0 - 23
frameworks/C/onion/setup.py

@@ -1,23 +0,0 @@
-import subprocess
-import sys
-import os
-import setup_util 
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("onion/hello.c", "mysql_real_connect\(data.db\[i\], \".*\",", "mysql_real_connect(data.db[i], \"" + args.database_host + "\",")
-  
-  subprocess.call("rm -f *.o", cwd="onion", shell=True, stderr=errfile, stdout=logfile)
-  subprocess.call("cp -R $IROOT/onion/ onion/onion", shell=True, stderr=errfile, stdout=logfile)
-  subprocess.call("rm CMakeCache.txt", shell=True, cwd="onion/onion/build", stderr=errfile, stdout=logfile)
-  subprocess.Popen("make && ./hello", shell=True, cwd="onion", stderr=errfile, stdout=logfile)
-  return 0
-
-def stop(logfile, errfile):
-  
-  p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
-  out, err = p.communicate()
-  for line in out.splitlines():
-    if 'hello' in line:
-      pid = int(line.split(None, 2)[1])
-      os.kill(pid, 15)
-  return 0

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

@@ -0,0 +1,7 @@
+#!/bin/bash
+
+rm -f *.o
+ln -s $IROOT/onion onion
+rm -f onion/build/CMakeCache.txt
+make
+./hello &

+ 0 - 0
frameworks/C#/HttpListener/.gitignore → frameworks/CSharp/HttpListener/.gitignore


+ 0 - 0
frameworks/C#/HttpListener/.nuget/NuGet.Config → frameworks/CSharp/HttpListener/.nuget/NuGet.Config


+ 0 - 0
frameworks/C#/HttpListener/.nuget/NuGet.targets → frameworks/CSharp/HttpListener/.nuget/NuGet.targets


+ 0 - 0
frameworks/C#/HttpListener/HttpListener.sln → frameworks/CSharp/HttpListener/HttpListener.sln


+ 0 - 0
frameworks/C#/HttpListener/HttpListener/App.config → frameworks/CSharp/HttpListener/HttpListener/App.config


+ 0 - 0
frameworks/C#/HttpListener/HttpListener/Fortunes.cshtml → frameworks/CSharp/HttpListener/HttpListener/Fortunes.cshtml


+ 0 - 0
frameworks/C#/HttpListener/HttpListener/Fortunes.generated.cs → frameworks/CSharp/HttpListener/HttpListener/Fortunes.generated.cs


+ 0 - 0
frameworks/C#/HttpListener/HttpListener/HttpListener.csproj → frameworks/CSharp/HttpListener/HttpListener/HttpListener.csproj


+ 0 - 0
frameworks/C#/HttpListener/HttpListener/Models/Fortune.cs → frameworks/CSharp/HttpListener/HttpListener/Models/Fortune.cs


+ 0 - 0
frameworks/C#/HttpListener/HttpListener/Models/MongoDB.cs → frameworks/CSharp/HttpListener/HttpListener/Models/MongoDB.cs


+ 0 - 0
frameworks/C#/HttpListener/HttpListener/Models/World.cs → frameworks/CSharp/HttpListener/HttpListener/Models/World.cs


+ 0 - 0
frameworks/C#/HttpListener/HttpListener/Program.cs → frameworks/CSharp/HttpListener/HttpListener/Program.cs


+ 0 - 0
frameworks/C#/HttpListener/HttpListener/Properties/AssemblyInfo.cs → frameworks/CSharp/HttpListener/HttpListener/Properties/AssemblyInfo.cs


+ 0 - 0
frameworks/C#/HttpListener/HttpListener/packages.config → frameworks/CSharp/HttpListener/HttpListener/packages.config


+ 0 - 0
frameworks/C#/HttpListener/README.md → frameworks/CSharp/HttpListener/README.md


+ 0 - 0
frameworks/C#/HttpListener/__init__.py → frameworks/CSharp/HttpListener/__init__.py


+ 0 - 0
frameworks/C#/HttpListener/benchmark_config → frameworks/CSharp/HttpListener/benchmark_config


+ 0 - 0
frameworks/C#/HttpListener/install.sh → frameworks/CSharp/HttpListener/install.sh


+ 0 - 0
frameworks/C#/HttpListener/setup.ps1 → frameworks/CSharp/HttpListener/setup.ps1


+ 0 - 0
frameworks/C#/HttpListener/setup.py → frameworks/CSharp/HttpListener/setup.py


+ 0 - 0
frameworks/C#/HttpListener/source_code → frameworks/CSharp/HttpListener/source_code


+ 0 - 0
frameworks/C#/README.md → frameworks/CSharp/README.md


+ 0 - 0
frameworks/C#/aspnet-stripped/.gitignore → frameworks/CSharp/aspnet-stripped/.gitignore


+ 0 - 0
frameworks/C#/aspnet-stripped/NuGet.exe → frameworks/CSharp/aspnet-stripped/NuGet.exe


+ 0 - 0
frameworks/C#/aspnet-stripped/README.md → frameworks/CSharp/aspnet-stripped/README.md


+ 0 - 0
frameworks/C#/aspnet-stripped/__init__.py → frameworks/CSharp/aspnet-stripped/__init__.py


+ 0 - 0
frameworks/C#/aspnet-stripped/benchmark_config → frameworks/CSharp/aspnet-stripped/benchmark_config


+ 0 - 0
frameworks/C#/aspnet-stripped/install.sh → frameworks/CSharp/aspnet-stripped/install.sh


+ 0 - 0
frameworks/C#/aspnet-stripped/setup_iis.ps1 → frameworks/CSharp/aspnet-stripped/setup_iis.ps1


+ 0 - 0
frameworks/C#/aspnet-stripped/setup_iis.py → frameworks/CSharp/aspnet-stripped/setup_iis.py


+ 0 - 0
frameworks/C#/aspnet-stripped/source_code → frameworks/CSharp/aspnet-stripped/source_code


+ 0 - 0
frameworks/C#/aspnet-stripped/src/App_Code/Common.cs → frameworks/CSharp/aspnet-stripped/src/App_Code/Common.cs


+ 0 - 0
frameworks/C#/aspnet-stripped/src/App_Code/DbHandler.cs → frameworks/CSharp/aspnet-stripped/src/App_Code/DbHandler.cs


+ 0 - 0
frameworks/C#/aspnet-stripped/src/App_Code/FortunesPage.cs → frameworks/CSharp/aspnet-stripped/src/App_Code/FortunesPage.cs


+ 0 - 0
frameworks/C#/aspnet-stripped/src/App_Code/JsonHandler.cs → frameworks/CSharp/aspnet-stripped/src/App_Code/JsonHandler.cs


+ 0 - 0
frameworks/C#/aspnet-stripped/src/App_Code/Models/Fortune.cs → frameworks/CSharp/aspnet-stripped/src/App_Code/Models/Fortune.cs


+ 0 - 0
frameworks/C#/aspnet-stripped/src/App_Code/Models/MongoDB.cs → frameworks/CSharp/aspnet-stripped/src/App_Code/Models/MongoDB.cs


+ 0 - 0
frameworks/C#/aspnet-stripped/src/App_Code/Models/World.cs → frameworks/CSharp/aspnet-stripped/src/App_Code/Models/World.cs


+ 0 - 0
frameworks/C#/aspnet-stripped/src/App_Code/MongoDBHandlers.cs → frameworks/CSharp/aspnet-stripped/src/App_Code/MongoDBHandlers.cs


+ 0 - 0
frameworks/C#/aspnet-stripped/src/App_Code/MyModule.cs → frameworks/CSharp/aspnet-stripped/src/App_Code/MyModule.cs


+ 0 - 0
frameworks/C#/aspnet-stripped/src/App_Code/NoAspxHandlerFactory.cs → frameworks/CSharp/aspnet-stripped/src/App_Code/NoAspxHandlerFactory.cs


+ 0 - 0
frameworks/C#/aspnet-stripped/src/App_Code/PlaintextHandler.cs → frameworks/CSharp/aspnet-stripped/src/App_Code/PlaintextHandler.cs


+ 0 - 0
frameworks/C#/aspnet-stripped/src/App_Code/UpdatesHandler.cs → frameworks/CSharp/aspnet-stripped/src/App_Code/UpdatesHandler.cs


+ 0 - 0
frameworks/C#/aspnet-stripped/src/Web.config → frameworks/CSharp/aspnet-stripped/src/Web.config


+ 0 - 0
frameworks/C#/aspnet-stripped/src/fortunes.aspx → frameworks/CSharp/aspnet-stripped/src/fortunes.aspx


+ 0 - 0
frameworks/C#/aspnet-stripped/src/mongodbfortunes.aspx → frameworks/CSharp/aspnet-stripped/src/mongodbfortunes.aspx


+ 0 - 0
frameworks/C#/aspnet-stripped/src/packages.config → frameworks/CSharp/aspnet-stripped/src/packages.config


+ 0 - 0
frameworks/C#/aspnet/.gitignore → frameworks/CSharp/aspnet/.gitignore


+ 0 - 0
frameworks/C#/aspnet/README.md → frameworks/CSharp/aspnet/README.md


+ 0 - 0
frameworks/C#/aspnet/__init__.py → frameworks/CSharp/aspnet/__init__.py


+ 2 - 2
frameworks/C#/servicestack/bash_profile.sh → frameworks/CSharp/aspnet/bash_profile.sh

@@ -2,7 +2,7 @@
 
 
 export MONO_ROOT=${IROOT}/mono-3.6.0-install
 export MONO_ROOT=${IROOT}/mono-3.6.0-install
 
 
-export PATH="$MONO_ROOT/bin:$PATH"
-
 # Needed to find Mono's shared libraries
 # Needed to find Mono's shared libraries
 export LD_LIBRARY_PATH="$MONO_ROOT/lib"
 export LD_LIBRARY_PATH="$MONO_ROOT/lib"
+
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 0
frameworks/C#/aspnet/benchmark_config → frameworks/CSharp/aspnet/benchmark_config


+ 0 - 0
frameworks/C#/aspnet/install.sh → frameworks/CSharp/aspnet/install.sh


+ 0 - 0
frameworks/C#/aspnet/lib/.nuget/NuGet.exe → frameworks/CSharp/aspnet/lib/.nuget/NuGet.exe


+ 0 - 0
frameworks/C#/aspnet/lib/.nuget/NuGet.targets → frameworks/CSharp/aspnet/lib/.nuget/NuGet.targets


+ 0 - 0
frameworks/C#/aspnet/nginx.conf → frameworks/CSharp/aspnet/nginx.conf


+ 0 - 0
frameworks/C#/aspnet/setup_iis.ps1 → frameworks/CSharp/aspnet/setup_iis.ps1


+ 0 - 0
frameworks/C#/aspnet/setup_iis.py → frameworks/CSharp/aspnet/setup_iis.py


+ 0 - 0
frameworks/C#/aspnet/setup_nginx.py → frameworks/CSharp/aspnet/setup_nginx.py


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

@@ -0,0 +1,30 @@
+#!/bin/bash
+
+sed -i 's|localhost|'"$DBHOST"'|g' src/Web.config
+
+# build
+rm -rf bin obj
+cd src
+$MONO_ROOT/bin/xbuild /p:Configuration=Release
+
+# nginx
+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
+done
+conf+="}"
+echo -e $conf > $TROOT/nginx.upstream.conf
+
+$NGINX_HOME/sbin/nginx -c $TROOT/nginx.conf -g "${MAX_THREADS}"
+
+# Start fastcgi for each thread
+# 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
+done

+ 0 - 0
frameworks/C#/aspnet/setup_xsp.py → frameworks/CSharp/aspnet/setup_xsp.py


+ 0 - 0
frameworks/C#/aspnet/source_code → frameworks/CSharp/aspnet/source_code


+ 0 - 0
frameworks/C#/aspnet/src/Application.cs → frameworks/CSharp/aspnet/src/Application.cs


+ 0 - 0
frameworks/C#/aspnet/src/Benchmarks.AspNet.csproj → frameworks/CSharp/aspnet/src/Benchmarks.AspNet.csproj


+ 0 - 0
frameworks/C#/aspnet/src/Benchmarks.sln → frameworks/CSharp/aspnet/src/Benchmarks.sln


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