Browse Source

Merge branch 'php' of https://github.com/pdonald/FrameworkBenchmarks into pdonald-php

Patrick Falls 12 years ago
parent
commit
3d3d1558f5

+ 28 - 11
README.md

@@ -123,7 +123,7 @@ Assuming this finished without error, we're ready to start the test suite:
 This will run the full set of tests. Results of all the tests will output to ~/FrameworkBenchmarks/results/unique-machine-name/*timestamp*.
 This will run the full set of tests. Results of all the tests will output to ~/FrameworkBenchmarks/results/unique-machine-name/*timestamp*.
 
 
 ### Windows Instructions
 ### Windows Instructions
-Generously provided by @pdonald
+Generously provided by [@pdonald](https://github.com/pdonald)
 
 
 Note: The following tests are the only known tests to run on Windows
 Note: The following tests are the only known tests to run on Windows
 * aspnet
 * aspnet
@@ -132,36 +132,53 @@ Note: The following tests are the only known tests to run on Windows
 * aspnet-mongodb-raw
 * aspnet-mongodb-raw
 * aspnet-mysql-entityframework
 * aspnet-mysql-entityframework
 * aspnet-postgres-entityframework
 * aspnet-postgres-entityframework
+* cake
+* express
+* express-mongodb
+* go
 * nodejs
 * nodejs
 * nodejs-mongodb
 * nodejs-mongodb
-* nodejs-mongodb-raw
 * express
 * express
 * express-mongodb
 * express-mongodb
-* kohana
-* kohana-raw
+* php
+* php-raw
 * codeigniter
 * codeigniter
 * codeigniter-raw
 * codeigniter-raw
+* fuel
+* kohana
+* kohana-raw
+* laravel
+* laravel-raw
+* lithium
+* micromvc
+* slim
+* phreeze
+* servlet
+* servlet-raw
+* servlet-postgres-raw
+* webgo
 
 
 Server installation scripts for Windows Server 2012 R2 on Amazon EC2.
 Server installation scripts for Windows Server 2012 R2 on Amazon EC2.
 
 
 Instructions:
 Instructions:
 
 
-* Create an instance from the Microsoft Windows Server 2012 Base image on Amazon EC2
+* Create an instance from the `Microsoft Windows Server 2012 Base` image on Amazon EC2
 * Connect to it via Remote Desktop
 * Connect to it via Remote Desktop
-* Copy installer-bootstrap.ps1 from this repo to the server (for files CTRL-C + CTRL-V works alright)
+* Copy `installer-bootstrap.ps1` from this repo to the server (for files CTRL-C + CTRL-V works alright)
 * Copy your client private key too while you're at it
 * Copy your client private key too while you're at it
-* Right click on the installer script and select Run with PowerShell
+* Right click on the installer script and select `Run with PowerShell`
 * It will ask something, just hit enter
 * It will ask something, just hit enter
-* It will install git and then launch installer.ps1 from the repo which will install everything else
+* It will install git and then launch `installer.ps1` from the repo which will install everything else
 * Installation shouldn't take more than 5 to 10 minutes
 * Installation shouldn't take more than 5 to 10 minutes
-* Then you have a working console: try python, git, ssh, curl, node etc. everything works + PowerShell goodies
+* Then you have a working console: try `python`, `git`, `ssh`, `curl`, `node` etc. everything works + PowerShell goodies
 
 
 The client/database machine is still assumed to be a Linux box, you can install just the client software via
 The client/database machine is still assumed to be a Linux box, you can install just the client software via
-  python run-tests.py -s server-ip -c client-ip -i "C:\Users\Administrator\Desktop\client.key" --install-software --install client --list-tests
+
+    python run-tests.py -s server-ip -c client-ip -i "C:\Users\Administrator\Desktop\client.key" --install-software --install client --list-tests
 
 
 Now you can run tests:
 Now you can run tests:
 
 
-  python run-tests.py -s server-ip -c client-ip -i "C:\Users\Administrator\Desktop\client.key" --max-threads 2 --duration 30 --sleep 5 --name win --test aspnet --type all
+    python run-tests.py -s server-ip -c client-ip -i "C:\Users\Administrator\Desktop\client.key" --max-threads 2 --duration 30 --sleep 5 --name win --test aspnet --type all
 
 
 
 
 ## Result Files
 ## Result Files

+ 17 - 0
cake/app/webroot/web.config

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+ <system.webServer>
+   <rewrite>
+    <rules>
+     <rule name="Rewrite" stopProcessing="true">
+      <match url=".*" ignoreCase="false" />
+      <conditions>
+       <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
+       <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
+      </conditions>
+      <action type="Rewrite" url="index.php?" appendQueryString="true" />
+     </rule> 
+    </rules>
+   </rewrite>
+ </system.webServer> 
+</configuration>

+ 9 - 0
cake/setup.py

@@ -1,6 +1,7 @@
 
 
 import subprocess
 import subprocess
 import sys
 import sys
+import os
 import setup_util
 import setup_util
 from os.path import expanduser
 from os.path import expanduser
 
 
@@ -13,6 +14,11 @@ def start(args):
   setup_util.replace_text("cake/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("cake/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
+    if os.name == 'nt':
+      setup_util.replace_text("cake/app/Config/core.php", "'Apc'", "'Wincache'")
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\cake" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\cake\\app\\webroot"', shell=True)
+      return 0
     #subprocess.check_call("sudo cp cake/deploy/cake /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo cp cake/deploy/cake /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
     subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
@@ -24,6 +30,9 @@ def start(args):
     return 1
     return 1
 def stop():
 def stop():
   try:
   try:
+    if os.name == 'nt':
+      subprocess.call('appcmd delete site PHP', shell=True)
+      return 0
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo kill -QUIT $( cat cake/deploy/php-fpm.pid )", shell=True)
     subprocess.call("sudo kill -QUIT $( cat cake/deploy/php-fpm.pid )", shell=True)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo a2dissite cake", shell=True)

+ 2 - 0
go/setup.bat

@@ -0,0 +1,2 @@
+set GOPATH=C:\FrameworkBenchmarks\go
+go run src\hello\hello.go

+ 11 - 1
go/setup.py

@@ -5,11 +5,21 @@ import setup_util
 
 
 def start(args):
 def start(args):
   setup_util.replace_text("go/src/hello/hello.go", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)")
   setup_util.replace_text("go/src/hello/hello.go", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)")
+  if os.name == 'nt':
+    #subprocess.call("rmdir /s /q pkg\\windows_amd64", shell=True, cwd="go")
+    #subprocess.call("rmdir /s /q src\\github.com", shell=True, cwd="go")
+    #subprocess.call("del /s /q /f bin\\hello.exe", shell=True, cwd="go")
+    subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\go&& go get ./...", shell=True, cwd="go")
+    subprocess.Popen("setup.bat", shell=True, cwd="go") 
+    return 0
   subprocess.call("go get ./...", shell=True, cwd="go") 
   subprocess.call("go get ./...", shell=True, cwd="go") 
   subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="go")
   subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="go")
   return 0
   return 0
 def stop():
 def stop():
-  
+  if os.name == 'nt':
+    subprocess.call("taskkill /f /im go.exe > NUL", shell=True)
+    subprocess.call("taskkill /f /im hello.exe > NUL", shell=True)
+    return 0
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()
   for line in out.splitlines():
   for line in out.splitlines():

+ 73 - 1
installer.ps1

@@ -78,7 +78,7 @@ Write-Host "Installing PHP...`n"
 
 
 # Download PHP
 # Download PHP
 $php_installer_file = "php-5.4.14-nts-Win32-VC9-x86.zip"
 $php_installer_file = "php-5.4.14-nts-Win32-VC9-x86.zip"
-$php_installer_url = "http://windows.php.net/downloads/releases/$php_installer_file"
+$php_installer_url = "http://windows.php.net/downloads/releases/archives/$php_installer_file"
 $php_installer_local = "$workdir\$php_installer_file"
 $php_installer_local = "$workdir\$php_installer_file"
 (New-Object System.Net.WebClient).DownloadFile($php_installer_url, $php_installer_local)
 (New-Object System.Net.WebClient).DownloadFile($php_installer_url, $php_installer_local)
 
 
@@ -96,6 +96,7 @@ Copy-Item "$php\php.ini-production" $phpini
 (Get-Content $phpini) -Replace "short_open_tag = Off", "short_open_tag = On" | Set-Content $phpini
 (Get-Content $phpini) -Replace "short_open_tag = Off", "short_open_tag = On" | Set-Content $phpini
 (Get-Content $phpini) -Replace '; extension_dir = "./"', "extension_dir = `"$php\ext`"" | Set-Content $phpini
 (Get-Content $phpini) -Replace '; extension_dir = "./"', "extension_dir = `"$php\ext`"" | Set-Content $phpini
 (Get-Content $phpini) -Replace ";extension=", "extension=" | Set-Content $phpini
 (Get-Content $phpini) -Replace ";extension=", "extension=" | Set-Content $phpini
+(Get-Content $phpini) -Replace "extension=php_(interbase|oci8|oci8_11g|firebird|oci|pspell|sybase_ct|zip|pdo_firebird|pdo_oci|snmp).dll.*", "" | Set-Content $phpini
 
 
 # IIS with PHP via FastCGI
 # IIS with PHP via FastCGI
 Install-WindowsFeature Web-CGI | Out-Null
 Install-WindowsFeature Web-CGI | Out-Null
@@ -117,6 +118,77 @@ Set-ItemProperty "c:\inetpub\wwwroot\wincache.php" -name IsReadOnly -value $fals
 Add-Content $phpini "`n`n[PHP]`n"
 Add-Content $phpini "`n`n[PHP]`n"
 Add-Content $phpini "extension=php_wincache.dll"
 Add-Content $phpini "extension=php_wincache.dll"
 
 
+# composer
+$composer_url = "https://getcomposer.org/Composer-Setup.exe"
+$composer_local = "$workdir\Composer-Setup.exe"
+(New-Object System.Net.WebClient).DownloadFile($composer_url, $composer_local)
+Start-Process $composer_local "/silent" -Wait
+$env:Path += ";C:\ProgramData\Composer\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
+#
+# Go
+#
+Write-Host "Installing Go...`n"
+$go_url = "https://go.googlecode.com/files/go1.1rc3.windows-amd64.msi"
+$go_local = "$workdir\go1.1rc3.windows-amd64.msi"
+(New-Object System.Net.WebClient).DownloadFile($go_url, $go_local)
+Start-Process $go_local "/passive" -Wait
+$env:Path += ";C:\Go\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
+#
+# Java
+#
+Write-Host "Installing Java...`n"
+
+# jre
+#$jre_url = "http://img.cs.montana.edu/windows/jre-7u21-windows-x64.exe"
+#$jre_local = "$workdir\jre-7u21-windows-x64.exe"
+#$jre_dir = "C:\Java\jre"
+#(New-Object System.Net.WebClient).DownloadFile($jre_url, $jre_local)
+#Start-Process $jre_local "/s INSTALLDIR=$jre_dir" -Wait
+#$env:Path += ";$jre_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+#$env:JAVA_HOME = $jre_dir; [Environment]::SetEnvironmentVariable("JAVA_HOME", $jre_dir, [System.EnvironmentVariableTarget]::Machine)
+
+# jdk
+$jdk_url = "http://uni-smr.ac.ru/archive/dev/java/SDKs/sun/j2se/7/jdk-7u21-windows-x64.exe"
+$jdk_local = "$workdir\jdk-7u21-windows-x64.exe"
+$jdk_dir = "C:\Java\jdk"
+(New-Object System.Net.WebClient).DownloadFile($jdk_url, $jdk_local)
+Start-Process $jdk_local "/s INSTALLDIR=$jdk_dir" -Wait
+$env:Path += ";$jdk_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+$env:JAVA_HOME = $jdk_dir; [Environment]::SetEnvironmentVariable("JAVA_HOME", $jre_dir, [System.EnvironmentVariableTarget]::Machine)
+
+# resin
+$resin_url = "http://www.caucho.com/download/resin-4.0.36.zip"
+$resin_local = "$workdir\resin-4.0.36.zip"
+$resin_dir = "C:\Java\resin"
+(New-Object System.Net.WebClient).DownloadFile($resin_url, $resin_local)
+[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null
+[System.IO.Compression.ZipFile]::ExtractToDirectory($resin_local, $workdir) | Out-Null
+Move-Item "$workdir\resin-4.0.36" $resin_dir
+Copy-Item "$basedir\config\resin.properties" "$resin_dir\conf\resin.properties"
+#$env:Path += ";$resin_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
+# ant
+#$ant_url = "http://apache.mirrors.hoobly.com//ant/binaries/apache-ant-1.9.0-bin.zip"
+#$ant_local = "$workdir\apache-ant-1.9.0-bin.zip"
+#$ant_dir = "C:\Java\ant"
+#(New-Object System.Net.WebClient).DownloadFile($ant_url, $ant_local)
+#[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null
+#[System.IO.Compression.ZipFile]::ExtractToDirectory($ant_local, $workdir) | Out-Null
+#Move-Item "$workdir\apache-ant-1.9.0" $ant_dir
+#$env:Path += ";$ant_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
+# maven
+$maven_url = "http://mirror.cc.columbia.edu/pub/software/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.zip"
+$maven_local = "$workdir\apache-maven-3.0.5-bin.zip"
+$maven_dir = "C:\Java\maven"
+(New-Object System.Net.WebClient).DownloadFile($maven_url, $maven_local)
+[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null
+[System.IO.Compression.ZipFile]::ExtractToDirectory($maven_local, $workdir) | Out-Null
+Move-Item "$workdir\apache-maven-3.0.5" $maven_dir
+$env:Path += ";$maven_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
 #
 #
 # Firewall
 # Firewall
 #
 #

+ 1 - 1
php-codeigniter/setup.py

@@ -24,7 +24,7 @@ def start(args):
 def stop():
 def stop():
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True)
       return 0
       return 0
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo kill -QUIT $( cat php-codeigniter/deploy/php-fpm.pid )", shell=True)
     subprocess.call("sudo kill -QUIT $( cat php-codeigniter/deploy/php-fpm.pid )", shell=True)

+ 8 - 0
php-fuel/setup.py

@@ -1,5 +1,6 @@
 import subprocess
 import subprocess
 import sys
 import sys
+import os
 import setup_util
 import setup_util
 from os.path import expanduser
 from os.path import expanduser
 
 
@@ -10,6 +11,10 @@ def start(args):
   setup_util.replace_text("php-fuel/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-fuel/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
+    if os.name == 'nt':
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-fuel" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-fuel"', shell=True)
+      return 0
     subprocess.check_call("sudo chown -R www-data:www-data php-fuel", shell=True)
     subprocess.check_call("sudo chown -R www-data:www-data php-fuel", shell=True)
     subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-fuel/deploy/php-fpm.pid", shell=True)
     subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-fuel/deploy/php-fpm.pid", shell=True)
     subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-fuel/deploy/nginx.conf", shell=True)
     subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-fuel/deploy/nginx.conf", shell=True)
@@ -18,6 +23,9 @@ def start(args):
     return 1
     return 1
 def stop():
 def stop():
   try:
   try:
+    if os.name == 'nt':
+      subprocess.call('appcmd delete site PHP', shell=True)
+      return 0
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo kill -QUIT $( cat php-fuel/deploy/php-fpm.pid )", shell=True)
     subprocess.call("sudo kill -QUIT $( cat php-fuel/deploy/php-fpm.pid )", shell=True)
     subprocess.check_call("sudo chown -R $USER:$USER php-fuel", shell=True)
     subprocess.check_call("sudo chown -R $USER:$USER php-fuel", shell=True)

+ 17 - 0
php-fuel/web.config

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+ <system.webServer>
+   <rewrite>
+    <rules>
+     <rule name="Rewrite" stopProcessing="true">
+      <match url=".*" ignoreCase="false" />
+      <conditions>
+       <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
+       <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
+      </conditions>
+      <action type="Rewrite" url="public/index.php?" appendQueryString="true" />
+     </rule> 
+    </rules>
+   </rewrite>
+ </system.webServer> 
+</configuration>

+ 17 - 0
php-laravel/public/web.config

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+ <system.webServer>
+   <rewrite>
+    <rules>
+     <rule name="Rewrite" stopProcessing="true">
+      <match url=".*" ignoreCase="false" />
+      <conditions>
+       <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
+       <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
+      </conditions>
+      <action type="Rewrite" url="index.php?" appendQueryString="true" />
+     </rule> 
+    </rules>
+   </rewrite>
+ </system.webServer> 
+</configuration>

+ 8 - 0
php-laravel/setup.py

@@ -1,5 +1,6 @@
 import subprocess
 import subprocess
 import sys
 import sys
+import os
 import setup_util
 import setup_util
 from os.path import expanduser
 from os.path import expanduser
 
 
@@ -10,6 +11,10 @@ def start(args):
   setup_util.replace_text("php-laravel/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-laravel/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
+    if os.name == 'nt':
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-laravel" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-laravel\\public"', shell=True)
+      return 0
     subprocess.check_call("sudo chown -R www-data:www-data php-laravel", shell=True)
     subprocess.check_call("sudo chown -R www-data:www-data php-laravel", shell=True)
     subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-laravel/deploy/php-fpm.pid", shell=True)
     subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-laravel/deploy/php-fpm.pid", shell=True)
     subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-laravel/deploy/nginx.conf", shell=True)
     subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-laravel/deploy/nginx.conf", shell=True)
@@ -18,6 +23,9 @@ def start(args):
     return 1
     return 1
 def stop():
 def stop():
   try:
   try:
+    if os.name == 'nt':
+      subprocess.call('appcmd delete site PHP', shell=True)
+      return 0
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo kill -QUIT $( cat php-laravel/deploy/php-fpm.pid )", shell=True)
     subprocess.call("sudo kill -QUIT $( cat php-laravel/deploy/php-fpm.pid )", shell=True)
     subprocess.check_call("sudo chown -R $USER:$USER php-laravel", shell=True)
     subprocess.check_call("sudo chown -R $USER:$USER php-laravel", shell=True)

+ 8 - 0
php-lithium/setup.py

@@ -1,5 +1,6 @@
 import subprocess
 import subprocess
 import sys
 import sys
+import os
 import setup_util
 import setup_util
 from os.path import expanduser
 from os.path import expanduser
 
 
@@ -10,6 +11,10 @@ def start(args):
   setup_util.replace_text("php-lithium/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-lithium/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
+    if os.name == 'nt':
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-lithium" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-lithium"', shell=True)
+      return 0
     subprocess.check_call("sudo chown -R www-data:www-data php-lithium", shell=True)
     subprocess.check_call("sudo chown -R www-data:www-data php-lithium", shell=True)
     subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-lithium/deploy/php-fpm.pid", shell=True)
     subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-lithium/deploy/php-fpm.pid", shell=True)
     subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-lithium/deploy/nginx.conf", shell=True)
     subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-lithium/deploy/nginx.conf", shell=True)
@@ -18,6 +23,9 @@ def start(args):
     return 1
     return 1
 def stop():
 def stop():
   try:
   try:
+    if os.name == 'nt':
+      subprocess.call('appcmd delete site PHP', shell=True)
+      return 0
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo kill -QUIT $( cat php-lithium/deploy/php-fpm.pid )", shell=True)
     subprocess.call("sudo kill -QUIT $( cat php-lithium/deploy/php-fpm.pid )", shell=True)
     subprocess.check_call("sudo chown -R $USER:$USER php-lithium", shell=True)
     subprocess.check_call("sudo chown -R $USER:$USER php-lithium", shell=True)

+ 17 - 0
php-micromvc/Public/web.config

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+ <system.webServer>
+   <rewrite>
+    <rules>
+     <rule name="Rewrite" stopProcessing="true">
+      <match url="." ignoreCase="false" />
+      <conditions>
+       <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
+       <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
+      </conditions>
+      <action type="Rewrite" url="index.php?uri=" appendQueryString="true" />
+     </rule> 
+    </rules>
+   </rewrite>
+ </system.webServer> 
+</configuration>

+ 8 - 0
php-micromvc/setup.py

@@ -1,5 +1,6 @@
 import subprocess
 import subprocess
 import sys
 import sys
+import os
 import setup_util
 import setup_util
 from os.path import expanduser
 from os.path import expanduser
 
 
@@ -10,6 +11,10 @@ def start(args):
   setup_util.replace_text("php-micromvc/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-micromvc/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
+    if os.name == 'nt':
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-micromvc" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-micromvc\Public"', shell=True)
+      return 0
     subprocess.check_call("sudo chown -R www-data:www-data php-micromvc", shell=True)
     subprocess.check_call("sudo chown -R www-data:www-data php-micromvc", shell=True)
     subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-micromvc/deploy/php-fpm.pid", shell=True)
     subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-micromvc/deploy/php-fpm.pid", shell=True)
     subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-micromvc/deploy/nginx.conf", shell=True)
     subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-micromvc/deploy/nginx.conf", shell=True)
@@ -18,6 +23,9 @@ def start(args):
     return 1
     return 1
 def stop():
 def stop():
   try:
   try:
+    if os.name == 'nt':
+      subprocess.call('appcmd delete site PHP', shell=True)
+      return 0
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo kill -QUIT $( cat php-micromvc/deploy/php-fpm.pid )", shell=True)
     subprocess.call("sudo kill -QUIT $( cat php-micromvc/deploy/php-fpm.pid )", shell=True)
     subprocess.check_call("sudo chown -R $USER:$USER php-micromvc", shell=True)
     subprocess.check_call("sudo chown -R $USER:$USER php-micromvc", shell=True)

+ 8 - 0
php-slim/setup.py

@@ -1,5 +1,6 @@
 import subprocess
 import subprocess
 import sys
 import sys
+import os
 import setup_util
 import setup_util
 from os.path import expanduser
 from os.path import expanduser
 
 
@@ -10,6 +11,10 @@ def start(args):
   setup_util.replace_text("php-slim/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-slim/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
+    if os.name == 'nt':
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-slim" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-slim"', shell=True)
+      return 0
     subprocess.check_call("sudo chown -R www-data:www-data php-slim", shell=True)
     subprocess.check_call("sudo chown -R www-data:www-data php-slim", shell=True)
     subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-slim/deploy/php-fpm.pid", shell=True)
     subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-slim/deploy/php-fpm.pid", shell=True)
     subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-slim/deploy/nginx.conf", shell=True)
     subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-slim/deploy/nginx.conf", shell=True)
@@ -18,6 +23,9 @@ def start(args):
     return 1
     return 1
 def stop():
 def stop():
   try:
   try:
+    if os.name == 'nt':
+      subprocess.call('appcmd delete site PHP', shell=True)
+      return 0
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo kill -QUIT $( cat php-slim/deploy/php-fpm.pid )", shell=True)
     subprocess.call("sudo kill -QUIT $( cat php-slim/deploy/php-fpm.pid )", shell=True)
     subprocess.check_call("sudo chown -R $USER:$USER php-slim", shell=True)
     subprocess.check_call("sudo chown -R $USER:$USER php-slim", shell=True)

+ 17 - 0
php-slim/web.config

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+ <system.webServer>
+   <rewrite>
+    <rules>
+     <rule name="Rewrite" stopProcessing="true">
+      <match url="." ignoreCase="false" />
+      <conditions>
+       <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
+       <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
+      </conditions>
+      <action type="Rewrite" url="index.php?" appendQueryString="true" />
+     </rule> 
+    </rules>
+   </rewrite>
+ </system.webServer> 
+</configuration>

+ 7 - 0
phreeze/setup.py

@@ -13,6 +13,10 @@ def start(args):
   setup_util.replace_text("phreeze/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("phreeze/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   
   
   try:
   try:
+    if os.name == 'nt':
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\phreeze" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\phreeze"', shell=True)
+      return 0
     #subprocess.check_call("sudo cp php/deploy/phreeze /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo cp php/deploy/phreeze /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo a2ensite php", shell=True)
     #subprocess.check_call("sudo a2ensite php", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data php", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data php", shell=True)
@@ -25,6 +29,9 @@ def start(args):
     return 1
     return 1
 def stop():
 def stop():
   try:
   try:
+    if os.name == 'nt':
+      subprocess.call('appcmd delete site PHP', shell=True)
+      return 0
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo kill -QUIT $( cat phreeze/deploy/php-fpm.pid )", shell=True)
     subprocess.call("sudo kill -QUIT $( cat phreeze/deploy/php-fpm.pid )", shell=True)
     
     

+ 17 - 0
phreeze/web.config

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+ <system.webServer>
+   <rewrite>
+    <rules>
+     <rule name="Rewrite" stopProcessing="true">
+      <match url="." ignoreCase="false" />
+      <conditions>
+       <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
+       <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
+      </conditions>
+      <action type="Rewrite" url="index.php?_REWRITE_COMMAND=" appendQueryString="true" />
+     </rule> 
+    </rules>
+   </rewrite>
+ </system.webServer> 
+</configuration>

+ 10 - 0
servlet/setup.py

@@ -1,6 +1,7 @@
 
 
 import subprocess
 import subprocess
 import sys
 import sys
+import os
 import setup_util
 import setup_util
 
 
 def start(args):
 def start(args):
@@ -8,6 +9,12 @@ def start(args):
 
 
   try:
   try:
     subprocess.check_call("mvn clean compile war:war", shell=True, cwd="servlet")
     subprocess.check_call("mvn clean compile war:war", shell=True, cwd="servlet")
+    if os.name == 'nt':
+      subprocess.check_call("rmdir /s /q C:\\Java\\resin\\webapps", shell=True)
+      subprocess.check_call("mkdir C:\\Java\\resin\\webapps", shell=True)
+      subprocess.check_call("cp servlet\\target\\servlet.war C:\\Java\\resin\\webapps\\servlet.war", shell=True)
+      subprocess.check_call("C:\\Java\\resin\\bin\\start.bat", shell=True)
+      return 0
     subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
     subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
     subprocess.check_call("cp servlet/target/servlet.war $RESIN_HOME/webapps/", shell=True)
     subprocess.check_call("cp servlet/target/servlet.war $RESIN_HOME/webapps/", shell=True)
     subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
     subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
@@ -16,6 +23,9 @@ def start(args):
     return 1
     return 1
 def stop():
 def stop():
   try:
   try:
+    if os.name == 'nt':
+      subprocess.check_call("C:\\Java\\resin\\bin\\stop.bat", shell=True)
+      return 0
     subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
     subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:

+ 2 - 0
webgo/setup.bat

@@ -0,0 +1,2 @@
+set GOPATH=C:\FrameworkBenchmarks\webgo
+go run src\hello\hello.go

+ 8 - 1
webgo/setup.py

@@ -4,11 +4,18 @@ import sys
 import os
 import os
 
 
 def start(args):
 def start(args):
+  if os.name == 'nt':
+    subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\webgo&&go get ./...", shell=True, cwd="webgo")
+    subprocess.Popen("setup.bat", shell=True, cwd="webgo") 
+    return 0
   subprocess.call("go get ./...", shell=True, cwd="webgo")
   subprocess.call("go get ./...", shell=True, cwd="webgo")
   subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="webgo")
   subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="webgo")
   return 0
   return 0
 def stop():
 def stop():
-  
+  if os.name == 'nt':
+    subprocess.call("taskkill /f /im go.exe > NUL", shell=True)
+    subprocess.call("taskkill /f /im hello.exe > NUL", shell=True)
+    return 0
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()
   for line in out.splitlines():
   for line in out.splitlines():