Explorar el Código

Merge pull request #24 from TechEmpower/master

aa
三刀 hace 3 años
padre
commit
77905da759
Se han modificado 100 ficheros con 742 adiciones y 3915 borrados
  1. 3 0
      .github/workflows/build.yml
  2. 2 1
      README.md
  3. 14 18
      frameworks/C++/drogon/drogon-core.dockerfile
  4. 14 18
      frameworks/C++/drogon/drogon.dockerfile
  5. 2 1
      frameworks/C++/drogon/drogon_benchmark/config-core.json
  6. 3 2
      frameworks/C++/drogon/drogon_benchmark/config.json
  7. 1 2
      frameworks/C++/drogon/drogon_benchmark/plugins/SyncPlugin.cc
  8. 6 6
      frameworks/C++/ffead-cpp/benchmark_config.json
  9. 0 44
      frameworks/C++/lithium/benchmark_config.json
  10. 3 1
      frameworks/C++/poco/poco.dockerfile
  11. 16 8
      frameworks/C++/ulib/benchmark_config.json
  12. 0 376
      frameworks/C++/wt/benchmark.cpp
  13. 0 50
      frameworks/C++/wt/benchmark_config.json
  14. 0 25
      frameworks/C++/wt/fortunes.xml
  15. 0 86
      frameworks/C++/wt/wt-postgres.dockerfile
  16. 0 85
      frameworks/C++/wt/wt.dockerfile
  17. 0 6
      frameworks/C++/wt/wt_config.xml
  18. 1 1
      frameworks/C/h2o/CMakeLists.txt
  19. 1 1
      frameworks/C/h2o/benchmark_config.json
  20. 3 1
      frameworks/C/h2o/h2o.dockerfile
  21. 2 4
      frameworks/C/h2o/h2o.sh
  22. 7 7
      frameworks/C/lwan/Makefile
  23. 5 10
      frameworks/C/lwan/lwan-lua.dockerfile
  24. 5 10
      frameworks/C/lwan/lwan.dockerfile
  25. 1 1
      frameworks/C/lwan/src/database.c
  26. 1 1
      frameworks/C/lwan/src/database.h
  27. 1 1
      frameworks/C/lwan/src/json.c
  28. 1 1
      frameworks/C/lwan/src/techempower.c
  29. 5 1
      frameworks/C/lwan/techempower.conf
  30. 1 1
      frameworks/C/nginx/nginx.dockerfile
  31. 22 22
      frameworks/CSharp/appmpower/appmpower-odbc-pg.dockerfile
  32. 2 2
      frameworks/CSharp/appmpower/odbcinst.ini
  33. 34 24
      frameworks/CSharp/appmpower/src/Data/DbCommand.cs
  34. 203 0
      frameworks/CSharp/appmpower/src/Data/DbConnection.cs
  35. 67 0
      frameworks/CSharp/appmpower/src/Data/DbConnections.cs
  36. 6 4
      frameworks/CSharp/appmpower/src/Data/DbProviderFactory.cs
  37. 16 0
      frameworks/CSharp/appmpower/src/Data/InternalConnection.cs
  38. 0 198
      frameworks/CSharp/appmpower/src/Db/PooledConnection.cs
  39. 0 88
      frameworks/CSharp/appmpower/src/Db/PooledConnections.cs
  40. 65 74
      frameworks/CSharp/appmpower/src/RawDb.cs
  41. 4 1
      frameworks/CSharp/appmpower/src/appMpower.ado
  42. 2 1
      frameworks/CSharp/appmpower/src/appMpower.csproj
  43. 17 17
      frameworks/CSharp/aspnetcore/benchmark_config.json
  44. 1 1
      frameworks/CSharp/fastendpoints/Benchmarks/Benchmarks.csproj
  45. 0 25
      frameworks/CSharp/fastendpoints/Benchmarks/Benchmarks.sln
  46. 2 2
      frameworks/CSharp/fastendpoints/Benchmarks/Endpoints/JsonEndpoint.cs
  47. 2 2
      frameworks/CSharp/fastendpoints/Benchmarks/Endpoints/PlainTextEndpoint.cs
  48. 1 1
      frameworks/CSharp/fastendpoints/Benchmarks/Program.cs
  49. 6 2
      frameworks/CSharp/fastendpoints/fastendpoints.dockerfile
  50. 5 5
      frameworks/CSharp/genhttp/Benchmarks/Benchmarks.csproj
  51. 1 1
      frameworks/CSharp/revenj/revenj.dockerfile
  52. 37 0
      frameworks/CSharp/servicestack-v6/.gitignore
  53. 26 0
      frameworks/CSharp/servicestack-v6/Benchmarks/Configure.AppHost.cs
  54. 11 0
      frameworks/CSharp/servicestack-v6/Benchmarks/Models/Json.cs
  55. 6 0
      frameworks/CSharp/servicestack-v6/Benchmarks/Models/PlainText.cs
  56. 4 0
      frameworks/CSharp/servicestack-v6/Benchmarks/Program.cs
  57. 22 0
      frameworks/CSharp/servicestack-v6/Benchmarks/Services/MyServices.cs
  58. 13 0
      frameworks/CSharp/servicestack-v6/Benchmarks/ServicestackV6.csproj
  59. 0 0
      frameworks/CSharp/servicestack-v6/Benchmarks/appsettings.Development.json
  60. 0 0
      frameworks/CSharp/servicestack-v6/Benchmarks/appsettings.json
  61. 26 0
      frameworks/CSharp/servicestack-v6/README.md
  62. 26 0
      frameworks/CSharp/servicestack-v6/benchmark_config.json
  63. 5 5
      frameworks/CSharp/servicestack-v6/config.toml
  64. 12 0
      frameworks/CSharp/servicestack-v6/servicestack-v6.dockerfile
  65. 0 105
      frameworks/CSharp/servicestack/README.md
  66. 0 24
      frameworks/CSharp/servicestack/benchmark_config.json
  67. 0 21
      frameworks/CSharp/servicestack/nginx.conf
  68. 0 27
      frameworks/CSharp/servicestack/run.sh
  69. 0 17
      frameworks/CSharp/servicestack/servicestack.dockerfile
  70. 0 64
      frameworks/CSharp/servicestack/src/AppHost.cs
  71. 0 208
      frameworks/CSharp/servicestack/src/AppHostConfigHelper.cs
  72. 0 8
      frameworks/CSharp/servicestack/src/DbFactories/IMySqlOrmLiteConnectionFactory.cs
  73. 0 8
      frameworks/CSharp/servicestack/src/DbFactories/IPostgreSqlOrmLiteConnectionFactory.cs
  74. 0 8
      frameworks/CSharp/servicestack/src/DbFactories/ISqlServerOrmLiteConnectionFactory.cs
  75. 0 12
      frameworks/CSharp/servicestack/src/DbFactories/MySqlOrmLiteConnectionFactory.cs
  76. 0 29
      frameworks/CSharp/servicestack/src/DbFactories/PostgreSqlOrmLiteConnectionFactory.cs
  77. 0 12
      frameworks/CSharp/servicestack/src/DbFactories/SqlServerOrmLiteConnectionFactory.cs
  78. 0 1
      frameworks/CSharp/servicestack/src/Global.asax
  79. 0 22
      frameworks/CSharp/servicestack/src/Global.asax.cs
  80. 0 114
      frameworks/CSharp/servicestack/src/Model/Fortune.cs
  81. 0 211
      frameworks/CSharp/servicestack/src/Model/World.cs
  82. 0 6
      frameworks/CSharp/servicestack/src/NuGet.config
  83. 0 33
      frameworks/CSharp/servicestack/src/Properties/AssemblyInfo.cs
  84. 0 30
      frameworks/CSharp/servicestack/src/Properties/PublishProfiles/IIS.pubxml
  85. 0 72
      frameworks/CSharp/servicestack/src/SafeRandom.cs
  86. 0 38
      frameworks/CSharp/servicestack/src/SelfHost/App.config
  87. 0 85
      frameworks/CSharp/servicestack/src/SelfHost/AppHostSelfHelper.cs
  88. 0 55
      frameworks/CSharp/servicestack/src/SelfHost/AppSelfHost.cs
  89. 0 37
      frameworks/CSharp/servicestack/src/SelfHost/Program.cs
  90. 0 36
      frameworks/CSharp/servicestack/src/SelfHost/Properties/AssemblyInfo.cs
  91. 0 154
      frameworks/CSharp/servicestack/src/SelfHost/ServiceStackBenchmark.SelfHost.csproj
  92. 0 55
      frameworks/CSharp/servicestack/src/SelfHost/app.manifest
  93. 0 8
      frameworks/CSharp/servicestack/src/SelfHost/packages.config
  94. 0 172
      frameworks/CSharp/servicestack/src/Service/MongoDBService.cs
  95. 0 186
      frameworks/CSharp/servicestack/src/Service/MySqlService.cs
  96. 0 187
      frameworks/CSharp/servicestack/src/Service/PostgreSqlService.cs
  97. 0 99
      frameworks/CSharp/servicestack/src/Service/Services.cs
  98. 0 187
      frameworks/CSharp/servicestack/src/Service/SqlServerService.cs
  99. 0 282
      frameworks/CSharp/servicestack/src/ServiceStackBenchmark.csproj
  100. 0 58
      frameworks/CSharp/servicestack/src/ServiceStackBenchmark.sln

+ 3 - 0
.github/workflows/build.yml

@@ -154,6 +154,9 @@ jobs:
   dependabot:
     needs: verify
     runs-on: ubuntu-latest
+    permissions:
+      pull-requests: write
+      contents: write
     if: ${{ github.actor == 'dependabot[bot]' }}
     steps:
       - name: Dependabot metadata

+ 2 - 1
README.md

@@ -89,7 +89,8 @@ Results of continuous benchmarking runs are available in real time [here](https:
 
 ### Data Visualization
 
-If you have a `results.json` file that you would like to visualize, you can [do that here](https://tfb-status.techempower.com/share). You can also attach a `runid` parameter to that url where `runid` is a run listed on [tfb-status](https://tfb-status.techempower.com) like so: https://www.techempower.com/benchmarks/#section=test&runid=fd07b64e-47ce-411e-8b9b-b13368e988c6
+If you have a `results.json` file that you would like to visualize, you can [do that here](https://tfb-status.techempower.com/share). You can also attach a `runid` parameter to that url where `runid` is a run listed on [tfb-status](https://tfb-status.techempower.com) like so: https://www.techempower.com/benchmarks/#section=test&runid=fd07b64e-47ce-411e-8b9b-b13368e988c6.
+If you want to visualize them or compare different results files on bash, here is an unofficial [plaintext results parser](https://github.com/joeyleeeeeee97/PlainTextResultsParser)
 
 ## Contributing
 

+ 14 - 18
frameworks/C++/drogon/drogon-core.dockerfile

@@ -1,4 +1,4 @@
-FROM ubuntu:18.04
+FROM ubuntu:20.04
 
 COPY ./ ./
 
@@ -11,7 +11,7 @@ RUN  apt-get update -yqq && \
      zlib1g-dev && \
      add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
 	 apt-get update -yqq && \
-	 apt-get install -yqq gcc-8 g++-8
+	 apt-get install -yqq gcc-10 g++-10
 
 RUN locale-gen en_US.UTF-8
 
@@ -19,10 +19,10 @@ ENV LANG en_US.UTF-8
 ENV LANGUAGE en_US:en
 ENV LC_ALL en_US.UTF-8
 
-ENV CC=gcc-8
-ENV CXX=g++-8
-ENV AR=gcc-ar-8
-ENV RANLIB=gcc-ranlib-8
+ENV CC=gcc-10
+ENV CXX=g++-10
+ENV AR=gcc-ar-10
+ENV RANLIB=gcc-ranlib-10
 
 ENV IROOT=/install
 ENV DROGON_ROOT=$IROOT/drogon
@@ -32,26 +32,22 @@ ENV TEST_PATH=/drogon_benchmark/build
 
 WORKDIR $IROOT
 
-RUN wget https://github.com/an-tao/postgres/archive/batch_mode_ubuntu.tar.gz
-RUN tar -xvzf batch_mode_ubuntu.tar.gz
-WORKDIR $PG_ROOT
-
-RUN ./configure --prefix=/usr CFLAGS='-O2 -pipe'
-RUN make && make install
-
-WORKDIR $IROOT
+RUN sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
+RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
+RUN sudo apt -y update
+RUN sudo apt -y install postgresql-server-dev-all
 
 RUN git clone https://github.com/an-tao/drogon
 
 WORKDIR $DROGON_ROOT
 
-RUN git checkout fb17efe765d162be01680b05a3a387c7a182a4c5
+RUN git checkout ebf87d69d7bb45dfa478ba364ef9374d9be25092
 RUN git submodule update --init
 RUN mkdir build
 
 WORKDIR $DROGON_ROOT/build
 
-RUN cmake -DCMAKE_BUILD_TYPE=release ..
+RUN cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_CXX_FLAGS=-flto ..
 RUN make && make install
 
 WORKDIR $IROOT
@@ -62,12 +58,12 @@ WORKDIR $MIMALLOC_ROOT
 RUN git checkout v1.6.7 -b v1.6.7
 RUN mkdir -p out/release
 WORKDIR $MIMALLOC_ROOT/out/release
-RUN cmake ../..
+RUN cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_CXX_FLAGS=-flto ../..
 RUN make && make install
 
 WORKDIR $TEST_PATH
 
-RUN cmake -DCMAKE_BUILD_TYPE=release ..
+RUN cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_CXX_FLAGS=-flto ..
 RUN make
 
 EXPOSE 8080

+ 14 - 18
frameworks/C++/drogon/drogon.dockerfile

@@ -1,4 +1,4 @@
-FROM ubuntu:18.04
+FROM ubuntu:20.04
 
 COPY ./ ./
 
@@ -11,7 +11,7 @@ RUN  apt-get update -yqq && \
      zlib1g-dev && \
      add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
 	 apt-get update -yqq && \
-	 apt-get install -yqq gcc-8 g++-8
+	 apt-get install -yqq gcc-10 g++-10
 
 RUN locale-gen en_US.UTF-8
 
@@ -19,10 +19,10 @@ ENV LANG en_US.UTF-8
 ENV LANGUAGE en_US:en
 ENV LC_ALL en_US.UTF-8
 
-ENV CC=gcc-8
-ENV CXX=g++-8
-ENV AR=gcc-ar-8
-ENV RANLIB=gcc-ranlib-8
+ENV CC=gcc-10
+ENV CXX=g++-10
+ENV AR=gcc-ar-10
+ENV RANLIB=gcc-ranlib-10
 
 ENV IROOT=/install
 ENV DROGON_ROOT=$IROOT/drogon
@@ -32,26 +32,22 @@ ENV TEST_PATH=/drogon_benchmark/build
 
 WORKDIR $IROOT
 
-RUN wget https://github.com/an-tao/postgres/archive/batch_mode_ubuntu.tar.gz
-RUN tar -xvzf batch_mode_ubuntu.tar.gz
-WORKDIR $PG_ROOT
-
-RUN ./configure --prefix=/usr CFLAGS='-O2 -pipe'
-RUN make && make install
-
-WORKDIR $IROOT
+RUN sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
+RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
+RUN sudo apt -y update
+RUN sudo apt -y install postgresql-server-dev-all
 
 RUN git clone https://github.com/an-tao/drogon
 
 WORKDIR $DROGON_ROOT
 
-RUN git checkout fb17efe765d162be01680b05a3a387c7a182a4c5
+RUN git checkout ebf87d69d7bb45dfa478ba364ef9374d9be25092
 RUN git submodule update --init
 RUN mkdir build
 
 WORKDIR $DROGON_ROOT/build
 
-RUN cmake -DCMAKE_BUILD_TYPE=release ..
+RUN cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_CXX_FLAGS=-flto ..
 RUN make && make install
 
 WORKDIR $IROOT
@@ -62,12 +58,12 @@ WORKDIR $MIMALLOC_ROOT
 RUN git checkout v1.6.7 -b v1.6.7
 RUN mkdir -p out/release
 WORKDIR $MIMALLOC_ROOT/out/release
-RUN cmake ../..
+RUN cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_CXX_FLAGS=-flto ../..
 RUN make && make install
 
 WORKDIR $TEST_PATH
 
-RUN cmake -DCMAKE_BUILD_TYPE=release ..
+RUN cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_CXX_FLAGS=-flto ..
 RUN make
 
 EXPOSE 8080

+ 2 - 1
frameworks/C++/drogon/drogon_benchmark/config-core.json

@@ -34,7 +34,8 @@
         //any synchronous interface of it.
         "is_fast": true,
         //connection_number:1 by default
-        "connection_number": 1
+        "connection_number": 1,
+        "auto_batch": false
     }],
     "app": {
         //threads_num:the number of IO threads,1 by default, if the value is set to 0, the number of threads

+ 3 - 2
frameworks/C++/drogon/drogon_benchmark/config.json

@@ -34,7 +34,8 @@
         //any synchronous interface of it.
         "is_fast": true,
         //connection_number:1 by default
-        "connection_number": 1
+        "connection_number": 1,
+        "auto_batch": false
     }],
     "app": {
         //threads_num:the number of IO threads,1 by default, if the value is set to 0, the number of threads
@@ -185,4 +186,4 @@
     }],
     //custom_config: custom configuration for users. This object can be get by the app().getCustomConfig() method. 
     "custom_config": {}
-}
+}

+ 1 - 2
frameworks/C++/drogon/drogon_benchmark/plugins/SyncPlugin.cc

@@ -34,8 +34,7 @@ void SyncPlugin::initAndStart(const Json::Value &config)
                     {
                         auto resp = HttpResponse::newHttpResponse();
                         resp->setBody("Hello, World!");
-                        resp->setContentTypeCodeAndCustomString(
-                            CT_TEXT_PLAIN, "Content-Type: text/plain\r\n");
+                        resp->setContentTypeCode(CT_TEXT_PLAIN);
                         return resp;
                     }
                     break;

+ 6 - 6
frameworks/C++/ffead-cpp/benchmark_config.json

@@ -95,7 +95,7 @@
 			"display_name": "ffead-cpp [v-prof-b]",
 			"notes": "",
 			"versus": "",
-			"tags": []
+			"tags": ["broken"]
 		},
 		"postgresql-raw-profiled": {
 			"db_url": "/t3/d",
@@ -137,7 +137,7 @@
 			"display_name": "ffead-cpp [pg-raw-prof-b]",
 			"notes": "memory libpq batch patch profiled",
 			"versus": "",
-			"tags": []
+			"tags": ["broken"]
 		},
 		"postgresql-raw-async-profiled": {
 			"db_url": "/t4/d",
@@ -219,7 +219,7 @@
 			"display_name": "ffead-cpp [pg-raw-async-prof-b]",
 			"notes": "async memory libpq batch patch profiled",
 			"versus": "",
-			"tags": []
+			"tags": ["broken"]
 		},
 		"postgresql-raw-async-clibpqb-pool-profiled": {
 			"db_url": "/t4/d",
@@ -240,7 +240,7 @@
 			"display_name": "ffead-cpp [pg-raw-async-prof-b-pool]",
 			"notes": "async memory libpq batch patch profiled",
 			"versus": "",
-			"tags": []
+			"tags": ["broken"]
 		},
 		"postgresql-raw-async-qw-profiled": {
 			"db_url": "/t5/d",
@@ -282,7 +282,7 @@
 			"display_name": "ffead-cpp [pg-raw-async-qw-prof-b]",
 			"notes": "async memory libpq batch patch profiled",
 			"versus": "",
-			"tags": []
+			"tags": ["broken"]
 		},
 		"postgresql-raw-async-qw-pool-profiled-m": {
 			"query_url": "/t5/quem?queries=",
@@ -304,4 +304,4 @@
 			"tags": []
 		}
 	}]
-}
+}

+ 0 - 44
frameworks/C++/lithium/benchmark_config.json

@@ -73,51 +73,7 @@
         "display_name": "Lithium-postgres-beta",
         "notes": "",
         "versus": "None"
-      },
-      "postgres-batch": {
-        "db_url"         : "/db",
-        "query_url"      : "/queries?N=",
-        "fortune_url"    : "/fortunes",
-        "update_url"     : "/updates?N=",
-        "port": 8080,
-        "approach": "Realistic",
-        "classification": "Micro",
-        "database": "Postgres",
-        "framework": "Lithium",
-        "language": "C++",
-        "flavor": "None",
-        "orm": "Full",
-        "platform": "None",
-        "webserver": "None",
-        "os": "Linux",
-        "database_os": "Linux",
-        "display_name": "Lithium-postgres-batch",
-        "notes": "",
-        "versus": "None"
-      },
-
-      "postgres-batch-beta": {
-        "db_url"         : "/db",
-        "query_url"      : "/queries?N=",
-        "fortune_url"    : "/fortunes",
-        "update_url"     : "/updates?N=",
-        "port": 8080,
-        "approach": "Realistic",
-        "classification": "Micro",
-        "database": "Postgres",
-        "framework": "Lithium",
-        "language": "C++",
-        "flavor": "None",
-        "orm": "Full",
-        "platform": "None",
-        "webserver": "None",
-        "os": "Linux",
-        "database_os": "Linux",
-        "display_name": "Lithium-postgres-batch-beta",
-        "notes": "",
-        "versus": "None"
       }
-
     }
   ]
 }

+ 3 - 1
frameworks/C++/poco/poco.dockerfile

@@ -9,7 +9,9 @@ ENV POCO_VERSION 1.6.1
 ENV POCO_HOME /poco
 
 WORKDIR ${POCO_HOME}
-RUN curl -sL http://pocoproject.org/releases/poco-${POCO_VERSION}/poco-${POCO_VERSION}-all.tar.gz | tar xz --strip-components=1
+RUN wget https://pocoproject.org/releases/poco-${POCO_VERSION}/poco-${POCO_VERSION}-all.zip
+RUN unzip poco-${POCO_VERSION}-all.zip
+RUN mv ./poco-${POCO_VERSION}-all/* ./
 
 RUN ./configure --no-tests --no-samples
 RUN make --quiet PageCompiler-libexec XML-libexec JSON-libexec

+ 16 - 8
frameworks/C++/ulib/benchmark_config.json

@@ -16,7 +16,8 @@
       "database_os": "Linux",
       "display_name": "ULib",
       "notes": "",
-      "versus": ""
+      "versus": "",
+      "tags": ["broken"]
     },
     "plaintext_fit": {
       "plaintext_url": "/plaintext",
@@ -33,7 +34,8 @@
       "database_os": "Linux",
       "display_name": "ULib-fit",
       "notes": "",
-      "versus": ""
+      "versus": "",
+      "tags": ["broken"]
     },
     "json": {
       "json_url": "/json",
@@ -50,7 +52,8 @@
       "database_os": "Linux",
       "display_name": "ULib",
       "notes": "",
-      "versus": ""
+      "versus": "",
+      "tags": ["broken"]
     },
     "json_fit": {
       "json_url": "/json",
@@ -67,7 +70,8 @@
       "database_os": "Linux",
       "display_name": "ULib-fit",
       "notes": "",
-      "versus": ""
+      "versus": "",
+      "tags": ["broken"]
     },
     "mysql": {
       "db_url": "/db",
@@ -87,7 +91,8 @@
       "database_os": "Linux",
       "display_name": "ULib-mysql",
       "notes": "",
-      "versus": ""
+      "versus": "",
+      "tags": ["broken"]
     },
     "postgres": {
       "db_url": "/db",
@@ -107,7 +112,8 @@
       "database_os": "Linux",
       "display_name": "ULib-postgres",
       "notes": "",
-      "versus": ""
+      "versus": "",
+      "tags": ["broken"]
     },
     "postgres_fit": {
       "db_url": "/db",
@@ -125,7 +131,8 @@
       "database_os": "Linux",
       "display_name": "ULib-fit",
       "notes": "",
-      "versus": ""
+      "versus": "",
+      "tags": ["broken"]
     },
     "mongodb": {
       "setup_file": "setup_mongodb",
@@ -146,7 +153,8 @@
       "database_os": "Linux",
       "display_name": "ULib-mongodb",
       "notes": "",
-      "versus": ""
+      "versus": "",
+      "tags": ["broken"]
     }
   }]
 }

+ 0 - 376
frameworks/C++/wt/benchmark.cpp

@@ -1,376 +0,0 @@
-#include <signal.h>
-#include <cstdlib>
-#include <cstring>
-#include <string>
-#include <vector>
-#include <algorithm>
-
-#include <Wt/WServer.h>
-#include <Wt/WResource.h>
-#include <Wt/Http/Request.h>
-#include <Wt/Http/Response.h>
-#include <Wt/WTemplate.h>
-#include <Wt/Utils.h>
-
-#include <Wt/Dbo/Dbo.h>
-#include <Wt/Dbo/Json.h>
-#ifndef BENCHMARK_USE_POSTGRES
-#include <Wt/Dbo/backend/MySQL.h>
-#else
-#include <Wt/Dbo/backend/Postgres.h>
-#endif
-
-#include <random>
-
-#ifndef WT_WIN32
-extern char **environ;
-#endif // WT_WIN32
-
-class MyMessage {
-public:
-  std::string message;
-
-  template<class Action>
-  void persist(Action& a) {
-    Wt::Dbo::field(a, message, "message");
-  }
-};
-
-class World {
-public:
-  int randomNumber;
-
-  template<class Action>
-  void persist(Action& a) {
-    Wt::Dbo::field(a, randomNumber, "randomnumber");
-  }
-};
-
-class Fortune {
-public:
-  std::string message;
-
-  template<class Action>
-  void persist(Action& a) {
-    Wt::Dbo::field(a, message, "message");
-  }
-};
-
-namespace Wt {
-  namespace Dbo {
-    template<>
-    struct dbo_traits<World> : public dbo_default_traits {
-      static const char *versionField() {
-        return 0;
-      }
-      static IdType invalidId() {
-        return 0;
-      }
-    };
-    template<>
-    struct dbo_traits<Fortune> : public dbo_default_traits {
-      static const char *versionField() {
-        return 0;
-      }
-      static IdType invalidId() {
-        return 0;
-      }
-    };
-  }
-}
-
-class JsonResource : public Wt::WResource {
-public:
-    virtual void handleRequest(const Wt::Http::Request &request, Wt::Http::Response &response) {
-        response.setMimeType("application/json");
-        response.addHeader("Server", "Wt");
-
-        MyMessage message;
-        message.message = "Hello, World!";
-
-        Wt::Dbo::JsonSerializer writer(response.out());
-        writer.serialize(message);
-    }
-};
-
-class MyConnection : public
-#ifdef BENCHMARK_USE_POSTGRES
-  Wt::Dbo::backend::Postgres
-#else
-  Wt::Dbo::backend::MySQL
-#endif
-{
-public:
-#ifdef BENCHMARK_USE_POSTGRES
-  MyConnection(const std::string &db) :
-  Wt::Dbo::backend::Postgres(db) {}
-#else
-  MyConnection(const std::string &db, const std::string &dbuser, const std::string &dbpasswd, const std::string &dbhost, unsigned int dbport) :
-  Wt::Dbo::backend::MySQL(db, dbuser, dbpasswd, dbhost, dbport) {}
-#endif
-
-  virtual void startTransaction() { }
-  virtual void commitTransaction() { }
-  virtual void rollbackTransaction() { }
-};
-
-struct DbStruct {
-  MyConnection *connection;
-  Wt::Dbo::Session session;
-
-  std::default_random_engine rng;
-  std::uniform_int_distribution<int> distribution;
-
-  DbStruct()
-    : connection(0),
-      rng(clock()),
-      distribution(1, 10000) {
-    std::string dbHostStr = "localhost";
-    char *dbHost = std::getenv("DBHOST");
-    if (dbHost)
-      dbHostStr = std::string(dbHost);
-#ifndef BENCHMARK_USE_POSTGRES
-    auto c = Wt::cpp14::make_unique<MyConnection>("hello_world", "benchmarkdbuser", "benchmarkdbpass", dbHostStr, 3306);
-#else
-    auto connStr = std::string("host=") + dbHostStr + " port=5432 user=benchmarkdbuser password=benchmarkdbpass dbname=hello_world";
-    auto c = Wt::cpp14::make_unique<MyConnection>(connStr);
-#endif
-
-    connection = c.get();
-    session.setConnection(std::move(c));
-    session.mapClass<World>("world");
-    session.mapClass<Fortune>("fortune");
-  }
-
-  int rand() {
-    return distribution(rng);
-  }
-};
-
-namespace {
-  thread_local DbStruct *dbStruct_;
-}
-
-class DbResource : public Wt::WResource {
-public:
-  virtual void handleRequest(const Wt::Http::Request &request, Wt::Http::Response &response) {
-    response.setMimeType("application/json");
-    response.addHeader("Server", "Wt");
-
-    if (!dbStruct_) {
-      dbStruct_ = new DbStruct();
-    }
-
-    Wt::Dbo::Transaction transaction(dbStruct_->session);
-    Wt::Dbo::ptr<World> entry = dbStruct_->session.load<World>(dbStruct_->rand());
-    
-    Wt::Dbo::JsonSerializer writer(response.out());
-    writer.serialize(entry);
-  }
-};
-
-class QueriesResource : public Wt::WResource {
-public:
-  virtual void handleRequest(const Wt::Http::Request &request, Wt::Http::Response &response) {
-    int n;
-    if (const std::string *queries = request.getParameter("queries")) {
-      n = atoi(queries->c_str());
-      if (n < 1)
-        n = 1;
-      else if (n > 500)
-        n = 500;
-    } else {
-      n = 1;
-    }
-
-    response.setMimeType("application/json");
-    response.addHeader("Server", "Wt");
-
-    if (!dbStruct_) {
-      dbStruct_ = new DbStruct();
-    }
-
-    Wt::Dbo::Transaction transaction(dbStruct_->session);
-    std::vector<Wt::Dbo::ptr<World> > results;
-    results.reserve(n);
-    for (int i = 0; i < n; ++i) {
-      results.push_back(dbStruct_->session.load<World>(dbStruct_->rand()));
-    }
-    Wt::Dbo::JsonSerializer writer(response.out());
-    writer.serialize(results);
-  }
-};
-
-typedef Wt::Dbo::collection< Wt::Dbo::ptr<Fortune> > Fortunes;
-typedef std::vector<Wt::Dbo::ptr<Fortune> > VFortunes;
-
-bool fortuneCmp(const Wt::Dbo::ptr<Fortune>& f1, const Wt::Dbo::ptr<Fortune>& f2) {
-  return strcmp(f1->message.c_str(), f2->message.c_str()) < 0;
-}
-
-class FortuneTemplate : public Wt::WTemplate {
-private:
-  const VFortunes *fortunes_;
-  mutable std::vector<Wt::Dbo::ptr<Fortune> >::const_iterator it_;
-public:
-  FortuneTemplate(const std::vector<Wt::Dbo::ptr<Fortune> >& fortunes)
-    : Wt::WTemplate(tr("fortunes")),
-      fortunes_(&fortunes),
-      it_(fortunes.end())
-  {
-    addFunction("while", &Wt::WTemplate::Functions::while_f);
-  }
-
-  virtual bool conditionValue(const std::string& name) const {
-    if (name == "next-fortune") {
-      if (it_ == fortunes_->end())
-        it_ = fortunes_->begin();
-      else
-        ++it_;
-
-      if (it_ == fortunes_->end())
-        return false;
-
-      return true;
-    } else
-      return Wt::WTemplate::conditionValue(name);
-  }
-
-  virtual void resolveString(const std::string& varName, const std::vector<Wt::WString>& vars, std::ostream& result) {
-    if (varName == "id")
-      result << it_->id();
-    else if (varName == "message")
-      format(result, Wt::WString((*it_)->message));
-    else
-      Wt::WTemplate::resolveString(varName, vars, result);
-  }
-};
-
-class FortuneResource : public Wt::WResource {
-public:
-  virtual void handleRequest(const Wt::Http::Request &request, Wt::Http::Response &response) {
-    response.setMimeType("text/html; charset=utf-8");
-    response.addHeader("Server", "Wt");
-
-    if (!dbStruct_) {
-      dbStruct_ = new DbStruct();
-    }
-
-    Wt::Dbo::Transaction transaction(dbStruct_->session);
-    Fortunes fortunes = dbStruct_->session.find<Fortune>();
-    VFortunes vFortunes;
-    for (Fortunes::const_iterator i = fortunes.begin(); i != fortunes.end(); ++i)
-      vFortunes.push_back(*i);
-    auto additionalFortune = Wt::cpp14::make_unique<Fortune>();
-    additionalFortune->message = "Additional fortune added at request time.";
-    vFortunes.push_back(Wt::Dbo::ptr<Fortune>(std::move(additionalFortune)));
-
-    std::sort(vFortunes.begin(), vFortunes.end(), fortuneCmp);
-
-    FortuneTemplate tpl(vFortunes);
-
-    response.out() << "<!DOCTYPE html>";
-    tpl.renderTemplate(response.out());
-  }
-};
-
-class UpdateResource : public Wt::WResource {
-public:
-  virtual void handleRequest(const Wt::Http::Request &request, Wt::Http::Response &response) {
-    int n;
-    if (const std::string *queries = request.getParameter("queries")) {
-      n = atoi(queries->c_str());
-      if (n < 1)
-        n = 1;
-      else if (n > 500)
-        n = 500;
-    } else {
-      n = 1;
-    }
-
-    response.setMimeType("application/json");
-    response.addHeader("Server", "Wt");
-
-    if (!dbStruct_) {
-      dbStruct_ = new DbStruct();
-    }
-
-    std::vector<Wt::Dbo::ptr<World> > results;
-
-    for (int i = 0; i < n; ++i) {
-      bool success = false;
-      while (!success) {
-        try {
-          Wt::Dbo::Transaction transaction(dbStruct_->session);
-          Wt::Dbo::ptr<World> world = dbStruct_->session.load<World>(dbStruct_->rand());
-          world.modify()->randomNumber = dbStruct_->rand();
-          transaction.commit();
-          results.push_back(world);
-          success = true;
-        } catch (Wt::Dbo::Exception& e) {
-          // Retry
-        }
-      }
-    }
-
-    Wt::Dbo::JsonSerializer writer(response.out());
-    writer.serialize(results);
-  }
-};
-
-class PlaintextResource : public Wt::WResource {
-  virtual void handleRequest(const Wt::Http::Request &request, Wt::Http::Response &response) {
-    response.setMimeType("text/plain");
-    response.addHeader("Server", "Wt");
-
-    response.out() << "Hello, World!";
-  }
-};
-
-int main(int argc, char** argv) {
-  try {
-    Wt::WServer server(argv[0]);
-
-    server.setServerConfiguration(argc, argv, WTHTTP_CONFIGURATION);
-
-    auto bundle = std::make_shared<Wt::WMessageResourceBundle>();
-    bundle->use(server.appRoot() + "fortunes");
-    server.setLocalizedStrings(bundle);
-
-    JsonResource jsonResource;
-    server.addResource(&jsonResource, "/json");
-
-    DbResource dbResource;
-    server.addResource(&dbResource, "/db");
-
-    QueriesResource queriesResource;
-    server.addResource(&queriesResource, "/queries");
-
-    FortuneResource fortuneResource;
-    server.addResource(&fortuneResource, "/fortune");
-
-    UpdateResource updateResource;
-    server.addResource(&updateResource, "/updates");
-    
-    PlaintextResource plaintextResource;
-    server.addResource(&plaintextResource, "/plaintext");
-
-    if (server.start()) {
-      int sig = Wt::WServer::waitForShutdown();
-
-      std::cerr << "Shutdown (signal = " << sig << ")" << std::endl;
-      server.stop();
-
-#ifndef WT_WIN32
-      if (sig == SIGHUP)
-        Wt::WServer::restart(argc, argv, environ);
-#endif // WT_WIN32
-    }
-  } catch (Wt::WServer::Exception& e) {
-    std::cerr << e.what() << "\n";
-    return 1;
-  } catch (std::exception& e) {
-    std::cerr << "exception: " << e.what() << "\n";
-    return 1;
-  }
-}

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

@@ -1,50 +0,0 @@
-{
-  "framework": "wt",
-  "tests": [{
-     "default": {
-     	"json_url": "/json",
-     	"db_url": "/db",
-     	"query_url": "/queries?queries=",
-     	"fortune_url": "/fortune",
-     	"update_url": "/updates?queries=",
-     	"plaintext_url": "/plaintext",
-     	"port": 8080,
-     	"approach": "Realistic",
-     	"classification": "Fullstack",
-     	"database": "MySQL",
-     	"framework": "wt",
-     	"language": "C++",
-          "flavor": "None",
-     	"orm": "Full",
-     	"platform": "None",
-     	"webserver": "None",
-     	"os": "Linux",
-     	"database_os": "Linux",
-     	"display_name": "wt",
-     	"notes": "",
-          "versus": "wt"
-     },
-     "postgres": {
-     	"db_url": "/db",
-     	"query_url": "/queries?queries=",
-     	"fortune_url": "/fortune",
-     	"update_url": "/updates?queries=",
-     	"port": 8080,
-     	"approach": "Realistic",
-     	"classification": "Fullstack",
-     	"database": "Postgres",
-     	"framework": "wt",
-     	"language": "C++",
-        "flavor": "None",
-     	"orm": "Full",
-     	"platform": "None",
-     	"webserver": "None",
-     	"os": "Linux",
-     	"database_os": "Linux",
-     	"display_name": "wt-postgres",
-     	"notes": "",
-        "versus": "wt",
-		"tags": ["broken"]
-     }
-  }]
-}

+ 0 - 25
frameworks/C++/wt/fortunes.xml

@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<messages>
-    <message id="fortunes">
-<html>
-    <head>
-        <title>Fortunes</title>
-    </head>
-    <body>
-        <table>
-            <tr>
-                <th>id</th>
-                <th>message</th>
-            </tr>
-            ${while:next-fortune fortune-table-row}
-        </table>
-    </body>
-</html></message>
-
-    <message id="fortune-table-row">
-        <tr>
-            <td>${id}</td>
-            <td>${message}</td>
-        </tr>
-    </message>
-</messages>

+ 0 - 86
frameworks/C++/wt/wt-postgres.dockerfile

@@ -1,86 +0,0 @@
-FROM buildpack-deps:xenial
-
-RUN apt-get update -yqq && apt-get install -yqq software-properties-common unzip cmake
-
-RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y
-RUN apt-get update -yqq
-RUN apt-get install -yqq gcc-6 g++-6
-
-ENV WT_VERSION 4.0.2
-ENV BOOST_ROOT /boost
-ENV BOOST_INC ${BOOST_ROOT}/include
-ENV BOOST_LIB ${BOOST_ROOT}/lib
-ENV WT_ROOT /wt
-ENV WT_LIB ${WT_ROOT}/lib
-ENV WT_INC ${WT_ROOT}/include
-ENV LD_LIBRARY_PATH ${BOOST_LIB}:${WT_LIB}:${LD_LIBRARY_PATH}
-ENV CPLUS_INCLUDE_PATH /usr/include/postgresql:/usr/include/postgresql/9.3/server:${CPLUS_INCLUDE_PATH}
-
-WORKDIR ${WT_ROOT}
-COPY benchmark.cpp benchmark.cpp
-COPY fortunes.xml fortunes.xml
-COPY wt_config.xml wt_config.xml
-
-# Build boost_thread, boost_system, boost_filesystem and boost_program_options
-RUN wget -q https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz
-RUN tar xf boost_1_65_1.tar.gz
-RUN cd boost_1_65_1 && \
-    ./bootstrap.sh && \
-    ./b2 \
-      -d0 \
-      toolset=gcc-6 \
-      variant=release \
-      link=static \
-      cxxflags="-std=c++14 -march=native" \
-      cflags="-march=native" \
-      --prefix=${BOOST_ROOT} \
-      --with-system \
-      --with-thread \
-      --with-program_options \
-      --with-filesystem \
-      install
-
-RUN wget -q https://github.com/emweb/wt/archive/${WT_VERSION}.tar.gz
-RUN mv ${WT_VERSION}.tar.gz wt-${WT_VERSION}.tar.gz
-RUN tar xf wt-${WT_VERSION}.tar.gz
-
-RUN cd wt-$WT_VERSION && \
-    mkdir -p build && \
-    cd build && \
-    cmake .. -DCMAKE_CXX_STANDARD=14 -DCMAKE_BUILD_TYPE=Release \
-      -DBOOST_PREFIX=${BOOST_ROOT} \
-      -DCMAKE_INSTALL_PREFIX=${WT_ROOT} -DCONFIGDIR=${WT_ROOT}/etc \
-      -DCMAKE_C_COMPILER=$(which gcc-6) \
-      -DCMAKE_CXX_COMPILER=$(which g++-6) -DDESTDIR=${WT_ROOT} \
-      -DWEBUSER=$(id -u -n) -DWEBGROUP=$(id -g -n) \
-      -DENABLE_SSL=OFF -DHTTP_WITH_ZLIB=OFF \
-      -DCMAKE_C_FLAGS_RELEASE="-O3 -march=native -DNDEBUG" \
-      -DCMAKE_CXX_FLAGS_RELEASE="-O3 -march=native -DNDEBUG" \
-      -DBUILD_TESTS=OFF -DENABLE_LIBWTTEST=OFF \
-      -DSHARED_LIBS=OFF >/dev/null && \
-    make && make install
-
-RUN g++-6 \
-  -std=c++14 \
-  -O3 -march=native -DNDEBUG \
-  -I${BOOST_INC} \
-  -L${BOOST_LIB} \
-  -I${WT_INC} \
-  -L${WT_LIB} \
-  -o te-benchmark-pg.wt \
-  -DBENCHMARK_USE_POSTGRES \
-  benchmark.cpp \
-  -lwthttp -lwt \
-  -lwtdbo -lwtdbopostgres \
-  -lboost_system \
-  -lboost_program_options \
-  -lboost_thread \
-  -lboost_filesystem \
-  -lpthread \
-  -lpq
-
-ENV DBHOST tfb-database
-
-EXPOSE 8080
-
-CMD ./te-benchmark-pg.wt -c wt_config.xml -t $(nproc) --docroot . --approot . --http-listen 0.0.0.0:8080 --accesslog=- --no-compression

+ 0 - 85
frameworks/C++/wt/wt.dockerfile

@@ -1,85 +0,0 @@
-FROM buildpack-deps:xenial
-
-RUN apt-get update -yqq && apt-get install -yqq software-properties-common unzip cmake
-
-RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y
-RUN apt-get update -yqq
-RUN apt-get install -yqq gcc-6 g++-6
-
-ENV WT_VERSION 4.0.2
-ENV BOOST_ROOT /boost
-ENV BOOST_INC ${BOOST_ROOT}/include
-ENV BOOST_LIB ${BOOST_ROOT}/lib
-ENV WT_ROOT /wt
-ENV WT_LIB ${WT_ROOT}/lib
-ENV WT_INC ${WT_ROOT}/include
-ENV LD_LIBRARY_PATH ${BOOST_LIB}:${WT_LIB}:${LD_LIBRARY_PATH}
-ENV CPLUS_INCLUDE_PATH /usr/include/postgresql:/usr/include/postgresql/9.3/server:${CPLUS_INCLUDE_PATH}
-
-WORKDIR ${WT_ROOT}
-COPY benchmark.cpp benchmark.cpp
-COPY fortunes.xml fortunes.xml
-COPY wt_config.xml wt_config.xml
-
-# Build boost_thread, boost_system, boost_filesystem and boost_program_options
-RUN wget -q https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz
-RUN tar xf boost_1_65_1.tar.gz
-RUN cd boost_1_65_1 && \
-    ./bootstrap.sh && \
-    ./b2 \
-      -d0 \
-      toolset=gcc-6 \
-      variant=release \
-      link=static \
-      cxxflags="-std=c++14 -march=native" \
-      cflags="-march=native" \
-      --prefix=${BOOST_ROOT} \
-      --with-system \
-      --with-thread \
-      --with-program_options \
-      --with-filesystem \
-      install
-
-RUN wget -q https://github.com/emweb/wt/archive/${WT_VERSION}.tar.gz
-RUN mv ${WT_VERSION}.tar.gz wt-${WT_VERSION}.tar.gz
-RUN tar xf wt-${WT_VERSION}.tar.gz
-
-RUN cd wt-$WT_VERSION && \
-    mkdir -p build && \
-    cd build && \
-    cmake .. -DCMAKE_CXX_STANDARD=14 -DCMAKE_BUILD_TYPE=Release \
-      -DBOOST_PREFIX=${BOOST_ROOT} \
-      -DCMAKE_INSTALL_PREFIX=${WT_ROOT} -DCONFIGDIR=${WT_ROOT}/etc \
-      -DCMAKE_C_COMPILER=$(which gcc-6) \
-      -DCMAKE_CXX_COMPILER=$(which g++-6) -DDESTDIR=${WT_ROOT} \
-      -DWEBUSER=$(id -u -n) -DWEBGROUP=$(id -g -n) \
-      -DENABLE_SSL=OFF -DHTTP_WITH_ZLIB=OFF \
-      -DCMAKE_C_FLAGS_RELEASE="-O3 -march=native -DNDEBUG" \
-      -DCMAKE_CXX_FLAGS_RELEASE="-O3 -march=native -DNDEBUG" \
-      -DBUILD_TESTS=OFF -DENABLE_LIBWTTEST=OFF \
-      -DSHARED_LIBS=OFF >/dev/null && \
-    make && make install
-
-RUN g++-6 \
-  -std=c++14 \
-  -O3 -march=native -DNDEBUG \
-  -I${BOOST_INC} \
-  -L${BOOST_LIB} \
-  -I${WT_INC} \
-  -L${WT_LIB} \
-  -o te-benchmark.wt \
-  benchmark.cpp \
-  -lwthttp -lwt \
-  -lwtdbo -lwtdbomysql \
-  -lboost_system \
-  -lboost_program_options \
-  -lboost_thread \
-  -lboost_filesystem \
-  -lpthread \
-  -lmysqlclient
-
-ENV DBHOST tfb-database
-
-EXPOSE 8080
-
-CMD ./te-benchmark.wt -c wt_config.xml -t $(nproc) --docroot . --approot . --http-listen 0.0.0.0:8080 --accesslog=- --no-compression

+ 0 - 6
frameworks/C++/wt/wt_config.xml

@@ -1,6 +0,0 @@
-<server>
-    <application-settings location="*">
-        <log-file></log-file>
-        <log-config>-*</log-config>
-    </application-settings>
-</server>

+ 1 - 1
frameworks/C/h2o/CMakeLists.txt

@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.0)
+cmake_minimum_required(VERSION 3.16.0)
 project(h2o_app)
 find_library(H2O_LIB h2o-evloop)
 find_library(MUSTACHE_C_LIB mustache_c)

+ 1 - 1
frameworks/C/h2o/benchmark_config.json

@@ -13,7 +13,7 @@
       "approach": "Realistic",
       "classification": "Platform",
       "database": "Postgres",
-      "framework": "None",
+      "framework": "libh2o",
       "language": "C",
       "flavor": "None",
       "orm": "Raw",

+ 3 - 1
frameworks/C/h2o/h2o.dockerfile

@@ -1,4 +1,4 @@
-FROM ubuntu:20.04
+FROM ubuntu:22.04
 
 WORKDIR /h2o_app_src
 COPY ./ ./
@@ -43,6 +43,8 @@ RUN mkdir -p "${H2O_BUILD_DIR}/build" && \
     cd ../.. && \
     rm -rf "$H2O_BUILD_DIR"
 
+ARG BENCHMARK_ENV
+ENV BENCHMARK_ENV=$BENCHMARK_ENV
 EXPOSE 8080
 
 CMD ["./h2o.sh"]

+ 2 - 4
frameworks/C/h2o/h2o.sh

@@ -24,12 +24,9 @@ if [[ -z "$MUSTACHE_C_PREFIX" ]]; then
 	MUSTACHE_C_PREFIX=/opt/mustache-c
 fi
 
-# A hacky way to detect whether we are running in the physical hardware or the cloud environment.
-if [[ $(nproc) -gt 16 ]]; then
-	echo "Running h2o_app in the physical hardware environment."
+if [[ "$BENCHMARK_ENV" = "Azure" ]]; then
 	DB_CONN=5
 else
-	echo "Running h2o_app in the cloud environment."
 	DB_CONN=5
 fi
 
@@ -81,6 +78,7 @@ build_h2o_app "-fprofile-use"
 cmake --install .
 popd
 rm -rf "$H2O_APP_BUILD_DIR"
+echo "Running h2o_app in the $BENCHMARK_ENV environment."
 echo "Maximum database connections per thread: $DB_CONN"
 run_h2o_app 0 "${H2O_APP_PREFIX}/bin" "${H2O_APP_PREFIX}/share/h2o_app"
 wait

+ 7 - 7
frameworks/C/lwan/Makefile

@@ -4,15 +4,15 @@ CFLAGS = -mtune=native -march=native -O3 -fno-plt -flto -ffat-lto-objects -DNDEB
 	-falign-functions=32 -malign-data=abi \
 	-include /lwan/build/lwan-build-config.h \
 	-I /lwan/src/lib \
-	`pkg-config mariadb --cflags` \
-	`pkg-config sqlite3 --cflags` \
-	`pkg-config luajit --cflags`
+	$(shell pkg-config mariadb --cflags) \
+	$(shell pkg-config sqlite3 --cflags) \
+	$(shell pkg-config luajit --cflags)
 
 LDFLAGS = -mtune=native -march=native -O3 -flto -ffat-lto-objects -Wl,-z,now,-z,relro \
 	-Wl,-whole-archive /lwan/build/src/lib/liblwan.a -Wl,-no-whole-archive \
-	`pkg-config mariadb --libs` \
-	`pkg-config sqlite3 --libs` \
-	`pkg-config luajit --libs` \
+	$(shell pkg-config mariadb --libs) \
+	$(shell pkg-config sqlite3 --libs) \
+	$(shell pkg-config luajit --libs) \
 	-lpthread \
 	-lz
 
@@ -26,7 +26,7 @@ all: techempower
 	$(CC) $(CFLAGS) -c $< -o $@
 
 techempower: $(OBJS)
-	$(CC) $(LDFLAGS) $(OBJS) -o techempower
+	$(CC) -o techempower $(OBJS) $(LDFLAGS)
 
 clean:
 	rm -f techempower $(OBJS)

+ 5 - 10
frameworks/C/lwan/lwan-lua.dockerfile

@@ -1,24 +1,19 @@
-FROM ubuntu:21.10
+FROM ubuntu:22.04
 
 RUN apt-get update -yqq && \
 	apt-get install -yqq \
 		git pkg-config build-essential cmake zlib1g-dev \
-		libsqlite3-dev libmariadbclient-dev wget
+		libsqlite3-dev libmariadb-dev wget libluajit-5.1-dev
 
 ADD ./ /lwan
 WORKDIR /lwan
 
 RUN mkdir mimalloc && \
-    wget https://github.com/microsoft/mimalloc/archive/6e1ca96a4965c776c10698c24dae576523178ef5.tar.gz -O - | tar xz --strip-components=1 -C mimalloc && \
+    wget https://github.com/microsoft/mimalloc/archive/817569dfad79732233fb86649c89e04387ce02e9.tar.gz -O - | tar xz --strip-components=1 -C mimalloc && \
     cd mimalloc && mkdir build && cd build && \
     CFLAGS="-flto -ffat-lto-objects" cmake .. -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=OFF && make -j install
 
-RUN mkdir luajit && \
-    wget http://luajit.org/download/LuaJIT-2.0.5.tar.gz -O - | tar xz --strip-components=1 -C luajit && \
-    cd luajit && \
-    PREFIX=/usr CFLAGS="-O3 -mtune=native -march=native -flto -ffat-lto-objects" make -j install
-
-RUN wget https://github.com/lpereira/lwan/archive/3bb25e235e76028d7687ae4636a059474f42b19c.tar.gz -O - | tar xz --strip-components=1 && \
+RUN wget https://github.com/lpereira/lwan/archive/e637f1ea724389a36dcab02affb6ec3fe5ecb0b6.tar.gz -O - | tar xz --strip-components=1 && \
     mkdir build && cd build && \
     cmake /lwan -DCMAKE_BUILD_TYPE=Release -DUSE_ALTERNATIVE_MALLOC=mimalloc && \
     make lwan-static
@@ -26,7 +21,7 @@ RUN wget https://github.com/lpereira/lwan/archive/3bb25e235e76028d7687ae4636a059
 RUN make clean && make
 
 ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
-ENV LD_PRELOAD=/usr/local/lib/mimalloc-1.6/libmimalloc.so
+ENV LD_PRELOAD=/usr/local/lib/libmimalloc.so
 
 EXPOSE 8080
 

+ 5 - 10
frameworks/C/lwan/lwan.dockerfile

@@ -1,24 +1,19 @@
-FROM ubuntu:21.10
+FROM ubuntu:22.04
 
 RUN apt-get update -yqq && \
 	apt-get install -yqq \
 		git pkg-config build-essential cmake zlib1g-dev \
-		libsqlite3-dev libmariadbclient-dev wget
+		libsqlite3-dev libmariadb-dev wget libluajit-5.1-dev
 
 ADD ./ /lwan
 WORKDIR /lwan
 
 RUN mkdir mimalloc && \
-    wget https://github.com/microsoft/mimalloc/archive/6e1ca96a4965c776c10698c24dae576523178ef5.tar.gz -O - | tar xz --strip-components=1 -C mimalloc && \
+    wget https://github.com/microsoft/mimalloc/archive/817569dfad79732233fb86649c89e04387ce02e9.tar.gz -O - | tar xz --strip-components=1 -C mimalloc && \
     cd mimalloc && mkdir build && cd build && \
     CFLAGS="-flto -ffat-lto-objects" cmake .. -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=OFF && make -j install
 
-RUN mkdir luajit && \
-    wget http://luajit.org/download/LuaJIT-2.0.5.tar.gz -O - | tar xz --strip-components=1 -C luajit && \
-    cd luajit && \
-    PREFIX=/usr CFLAGS="-O3 -mtune=native -march=native -flto -ffat-lto-objects" make -j install
-
-RUN wget https://github.com/lpereira/lwan/archive/3bb25e235e76028d7687ae4636a059474f42b19c.tar.gz -O - | tar xz --strip-components=1 && \
+RUN wget https://github.com/lpereira/lwan/archive/e637f1ea724389a36dcab02affb6ec3fe5ecb0b6.tar.gz -O - | tar xz --strip-components=1 && \
     mkdir build && cd build && \
     cmake /lwan -DCMAKE_BUILD_TYPE=Release -DUSE_ALTERNATIVE_MALLOC=mimalloc && \
     make lwan-static
@@ -31,7 +26,7 @@ ENV MYSQL_USER=benchmarkdbuser
 ENV MYSQL_PASS=benchmarkdbpass
 ENV MYSQL_DB=hello_world
 ENV MYSQL_HOST=tfb-database
-ENV LD_PRELOAD=/usr/local/lib/mimalloc-1.6/libmimalloc.so
+ENV LD_PRELOAD=/usr/local/lib/libmimalloc.so
 
 EXPOSE 8080
 

+ 1 - 1
frameworks/C/lwan/src/database.c

@@ -1,6 +1,6 @@
 /*
  * lwan - simple web server
- * Copyright (c) 2014 Leandro A. F. Pereira <[email protected]>
+ * Copyright (c) 2022 L. A. F. Pereira <[email protected]>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License

+ 1 - 1
frameworks/C/lwan/src/database.h

@@ -1,6 +1,6 @@
 /*
  * lwan - simple web server
- * Copyright (c) 2014 Leandro A. F. Pereira <[email protected]>
+ * Copyright (c) 2022 L. A. F. Pereira <[email protected]>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License

+ 1 - 1
frameworks/C/lwan/src/json.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017 Intel Corporation
- * Copyright (c) 2020 Leandro A. F. Pereira <[email protected]>
+ * Copyright (c) 2022 L. A. F. Pereira <[email protected]>
  *
  * SPDX-License-Identifier: Apache-2.0
  */

+ 1 - 1
frameworks/C/lwan/src/techempower.c

@@ -1,6 +1,6 @@
 /*
  * lwan - simple web server
- * Copyright (c) 2014 Leandro A. F. Pereira <[email protected]>
+ * Copyright (c) 2022 L. A. F. Pereira <[email protected]>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License

+ 5 - 1
frameworks/C/lwan/techempower.conf

@@ -1,4 +1,6 @@
-listener *:8080 {
+listener *:8080
+
+site {
     # For main TWFB benchmarks
     &plaintext /plaintext
     &json /json
@@ -15,11 +17,13 @@ listener *:8080 {
 
                 function handle_get_plaintext(req)
                     req:set_response("Hello, World!")
+                    return nil
                 end
 
                 function handle_get_json(req)
                     req:set_headers({['Content-Type']='application/json'})
                     req:set_response(json.encode({message="Hello, World!"}))
+                    return nil
                 end'''
     }
 

+ 1 - 1
frameworks/C/nginx/nginx.dockerfile

@@ -1,4 +1,4 @@
-FROM ubuntu:21.10
+FROM ubuntu:22.04
 
 ARG DEBIAN_FRONTEND=noninteractive
 

+ 22 - 22
frameworks/CSharp/appmpower/appmpower-odbc-pg.dockerfile

@@ -8,20 +8,20 @@ RUN apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
 WORKDIR /odbc
 
 # To compile the latest postgresql odbc driver, postgresql itself needs to be installed
-RUN curl -L -o postgresql-14.1.tar.gz https://ftp.postgresql.org/pub/source/v14.1/postgresql-14.1.tar.gz
+#RUN curl -L -o postgresql-14.1.tar.gz https://ftp.postgresql.org/pub/source/v14.1/postgresql-14.1.tar.gz
 RUN curl -L -o unixODBC-2.3.9.tar.gz ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.9.tar.gz
-RUN curl -L -o psqlodbc-13.02.0000.tar.gz https://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-13.02.0000.tar.gz
+#RUN curl -L -o psqlodbc-13.02.0000.tar.gz https://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-13.02.0000.tar.gz
 
-RUN tar -xvf postgresql-14.1.tar.gz
+#RUN tar -xvf postgresql-14.1.tar.gz
 RUN tar -xvf unixODBC-2.3.9.tar.gz
-RUN tar -xvf psqlodbc-13.02.0000.tar.gz
+#RUN tar -xvf psqlodbc-13.02.0000.tar.gz
 
-WORKDIR /odbc/postgresql-14.1
-RUN ./configure
-RUN make
-RUN make install
+#WORKDIR /odbc/postgresql-14.1
+#RUN ./configure
+#RUN make
+#RUN make install
 
-ENV PATH=/usr/local/pgsql/bin:$PATH
+#ENV PATH=/usr/local/pgsql/bin:$PATH
 
 WORKDIR /odbc/unixODBC-2.3.9
 RUN ./configure --prefix=/usr/local/unixODBC
@@ -30,10 +30,10 @@ RUN make install
 
 ENV PATH=/usr/local/unixODBC/lib:$PATH
 
-WORKDIR /odbc/psqlodbc-13.02.0000
-RUN ./configure --with-unixodbc=/usr/local/unixODBC --with-libpq=/usr/local/pgsql --prefix=/usr/local/pgsqlodbc
-RUN make
-RUN make install
+#WORKDIR /odbc/psqlodbc-13.02.0000
+#RUN ./configure --with-unixodbc=/usr/local/unixODBC --with-libpq=/usr/local/pgsql --prefix=/usr/local/pgsqlodbc
+#RUN make
+#RUN make install
 
 WORKDIR /app
 COPY src .
@@ -44,19 +44,19 @@ FROM mcr.microsoft.com/dotnet/aspnet:6.0.0 AS runtime
 
 RUN apt-get update
 # The following installs standard versions unixodbc 2.3.6 and pgsqlodbc 11
-#RUN apt-get install -y unixodbc odbc-postgresql
+RUN apt-get install -y unixodbc odbc-postgresql
 # unixodbc still needs to be installed even if compiled locally
-RUN apt-get install -y unixodbc wget curl libpq-dev build-essential
+#RUN apt-get install -y unixodbc wget curl libpq-dev build-essential
 
 WORKDIR /odbc
 
-RUN curl -L -o pgpool-II-4.2.3.tar.gz https://www.pgpool.net/mediawiki/download.php?f=pgpool-II-4.2.3.tar.gz
-RUN tar -xvf pgpool-II-4.2.3.tar.gz
+#RUN curl -L -o pgpool-II-4.2.3.tar.gz https://www.pgpool.net/mediawiki/download.php?f=pgpool-II-4.2.3.tar.gz
+#RUN tar -xvf pgpool-II-4.2.3.tar.gz
 
-WORKDIR /odbc/pgpool-II-4.2.3
-RUN ./configure
-RUN make
-RUN make install
+#WORKDIR /odbc/pgpool-II-4.2.3
+#RUN ./configure
+#RUN make
+#RUN make install
 
 COPY --from=build /usr/local/unixODBC /usr/local/unixODBC
 
@@ -66,7 +66,7 @@ COPY --from=build /usr/local/unixODBC /usr/local/unixODBC
 
 ENV PATH=/usr/local/unixODBC/bin:$PATH
 
-COPY --from=build /usr/local/pgsqlodbc /usr/local/pgsqlodbc
+#COPY --from=build /usr/local/pgsqlodbc /usr/local/pgsqlodbc
 
 WORKDIR /etc/
 COPY odbcinst.ini .

+ 2 - 2
frameworks/CSharp/appmpower/odbcinst.ini

@@ -16,8 +16,8 @@ Description=ODBC for PostgreSQL
 ; in version 08.x. Note that the library can also be installed under an other
 ; path than /usr/local/lib/ following your installation.
 ; This is the standard location used by apt-get install -y unixodbc
-;Driver = /usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so
-Driver =/usr/local/pgsqlodbc/lib/psqlodbcw.so
+Driver = /usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so
+;Driver =/usr/local/pgsqlodbc/lib/psqlodbcw.so
 Threading = 0
 CPTimeout = 0
 

+ 34 - 24
frameworks/CSharp/appmpower/src/Db/PooledCommand.cs → frameworks/CSharp/appmpower/src/Data/DbCommand.cs

@@ -1,32 +1,36 @@
 using System.Data;
-using System.Data.Common;
 using System.Threading.Tasks;
 
-namespace appMpower.Db
+namespace appMpower.Data
 {
-   public class PooledCommand : IDbCommand
+   public class DbCommand : IDbCommand
    {
       private IDbCommand _dbCommand;
-      private PooledConnection _pooledConnection;
+      private DbConnection _dbConnection;
 
-      public PooledCommand(PooledConnection pooledConnection)
+      public DbCommand(DbConnection dbConnection)
       {
-         _dbCommand = pooledConnection.CreateCommand();
-         _pooledConnection = pooledConnection;
+         _dbCommand = dbConnection.CreateCommand();
+         _dbConnection = dbConnection;
       }
 
-      public PooledCommand(string commandText, PooledConnection pooledConnection)
+      public DbCommand(string commandText, DbConnection dbConnection)
       {
-         pooledConnection.GetCommand(commandText, this);
+         dbConnection.GetCommand(commandText, CommandType.Text, this);
       }
 
-      internal PooledCommand(IDbCommand dbCommand, PooledConnection pooledConnection)
+      public DbCommand(string commandText, CommandType commandType, DbConnection dbConnection)
+      {
+         dbConnection.GetCommand(commandText, commandType, this);
+      }
+
+      internal DbCommand(IDbCommand dbCommand, DbConnection dbConnection)
       {
          _dbCommand = dbCommand;
-         _pooledConnection = pooledConnection;
+         _dbConnection = dbConnection;
       }
 
-      internal IDbCommand DbCommand
+      internal IDbCommand Command
       {
          get
          {
@@ -38,15 +42,15 @@ namespace appMpower.Db
          }
       }
 
-      internal PooledConnection PooledConnection
+      internal DbConnection DbConnection
       {
          get
          {
-            return _pooledConnection;
+            return _dbConnection;
          }
          set
          {
-            _pooledConnection = value;
+            _dbConnection = value;
          }
       }
 
@@ -99,7 +103,6 @@ namespace appMpower.Db
       }
 #nullable disable
 
-
       public IDataParameterCollection Parameters
       {
          get
@@ -143,6 +146,11 @@ namespace appMpower.Db
          return _dbCommand.CreateParameter();
       }
 
+      public IDbDataParameter CreateParameter(string name, object value)
+      {
+         return CreateParameter(name, DbType.String, value);
+      }
+
       public IDbDataParameter CreateParameter(string name, DbType dbType, object value)
       {
          IDbDataParameter dbDataParameter = null;
@@ -177,12 +185,12 @@ namespace appMpower.Db
 
       public async Task<int> ExecuteNonQueryAsync()
       {
-         return await (_dbCommand as DbCommand).ExecuteNonQueryAsync();
+         return await (_dbCommand as System.Data.Common.DbCommand).ExecuteNonQueryAsync();
       }
 
-      public async Task<DbDataReader> ExecuteReaderAsync(CommandBehavior behavior)
+      public async Task<System.Data.Common.DbDataReader> ExecuteReaderAsync(CommandBehavior behavior)
       {
-         return await (_dbCommand as DbCommand).ExecuteReaderAsync(behavior);
+         return await (_dbCommand as System.Data.Common.DbCommand).ExecuteReaderAsync(behavior);
       }
 
       public IDataReader ExecuteReader(CommandBehavior behavior)
@@ -197,19 +205,21 @@ namespace appMpower.Db
       }
 #nullable disable
 
-      public void Prepare()
+#nullable enable
+      public async Task<object?> ExecuteScalarAsync()
       {
-         _dbCommand.Prepare();
+         return await ((System.Data.Common.DbCommand)_dbCommand).ExecuteScalarAsync();
       }
+#nullable disable
 
-      public void Release()
+      public void Prepare()
       {
-         _pooledConnection.ReleaseCommand(this);
+         _dbCommand.Prepare();
       }
 
       public void Dispose()
       {
-         _pooledConnection.ReleaseCommand(this);
+         _dbConnection.ReleaseCommand(this);
       }
    }
 }

+ 203 - 0
frameworks/CSharp/appmpower/src/Data/DbConnection.cs

@@ -0,0 +1,203 @@
+using System.Collections.Concurrent;
+using System.Data;
+using System.Threading.Tasks;
+
+namespace appMpower.Data
+{
+   public class DbConnection : IDbConnection
+   {
+      private string _connectionString;
+      internal InternalConnection _internalConnection;
+
+      public DbConnection()
+      {
+         _connectionString = DbProviderFactory.ConnectionString;
+      }
+
+      public DbConnection(string connectionString)
+      {
+         _connectionString = connectionString;
+      }
+
+      internal ConcurrentDictionary<string, DbCommand> DbCommands
+      {
+         get
+         {
+            return _internalConnection.DbCommands;
+         }
+         set
+         {
+            _internalConnection.DbCommands = value;
+         }
+      }
+
+      public short Number
+      {
+         get
+         {
+            return _internalConnection.Number;
+         }
+         set
+         {
+            _internalConnection.Number = value;
+         }
+      }
+
+      public IDbConnection Connection
+      {
+         get
+         {
+            return _internalConnection.DbConnection;
+         }
+         set
+         {
+            _internalConnection.DbConnection = value;
+         }
+      }
+
+      public string ConnectionString
+      {
+         get
+         {
+            return _internalConnection.DbConnection.ConnectionString;
+         }
+         set
+         {
+            _internalConnection.DbConnection.ConnectionString = value;
+         }
+      }
+
+      public int ConnectionTimeout
+      {
+         get
+         {
+            return _internalConnection.DbConnection.ConnectionTimeout;
+         }
+      }
+
+      public string Database
+      {
+         get
+         {
+            return _internalConnection.DbConnection.Database;
+         }
+      }
+
+      public ConnectionState State
+      {
+         get
+         {
+            if (_internalConnection is null) return ConnectionState.Closed;
+            return _internalConnection.DbConnection.State;
+         }
+      }
+
+      public IDbTransaction BeginTransaction()
+      {
+         return _internalConnection.DbConnection.BeginTransaction();
+      }
+
+      public IDbTransaction BeginTransaction(IsolationLevel il)
+      {
+         return _internalConnection.DbConnection.BeginTransaction(il);
+      }
+
+      public void ChangeDatabase(string databaseName)
+      {
+         _internalConnection.DbConnection.ChangeDatabase(databaseName);
+      }
+
+      public void Close()
+      {
+         _internalConnection.DbConnection.Close();
+      }
+
+      public async Task CloseAsync()
+      {
+         await (_internalConnection.DbConnection as System.Data.Common.DbConnection).CloseAsync();
+      }
+
+      public IDbCommand CreateCommand()
+      {
+         return _internalConnection.DbConnection.CreateCommand();
+      }
+
+      public void Open()
+      {
+         if (_internalConnection.DbConnection.State == ConnectionState.Closed)
+         {
+            _internalConnection.DbConnection.Open();
+         }
+      }
+
+      public void Dispose()
+      {
+#if ADO
+         _internalConnection.DbConnection.Dispose();
+         _internalConnection.Dispose();
+#else
+         DbConnections.Release(_internalConnection);
+#endif
+      }
+
+      public async Task OpenAsync()
+      {
+#if ADO && SQLSERVER
+         _internalConnection = new();
+         _internalConnection.DbConnection = new System.Data.SqlClient.SqlConnection(_connectionString);
+#elif ADO && POSTGRESQL
+         _internalConnection = new(); 
+         _internalConnection.DbConnection = new Npgsql.NpgsqlConnection(_connectionString);
+#else
+         if (_internalConnection is null)
+         {
+            _internalConnection = await DbConnections.GetConnection(_connectionString);
+         }
+#endif
+
+         if (_internalConnection.DbConnection.State == ConnectionState.Closed)
+         {
+            await (_internalConnection.DbConnection as System.Data.Common.DbConnection).OpenAsync();
+         }
+      }
+
+      internal DbCommand GetCommand(string commandText, CommandType commandType, DbCommand dbCommand)
+      {
+#if ADO
+         dbCommand.Command = _internalConnection.DbConnection.CreateCommand();
+         dbCommand.Command.CommandText = commandText;
+         dbCommand.Command.CommandType = commandType;
+         dbCommand.DbConnection = this;
+#else
+         DbCommand internalCommand;
+
+         if (_internalConnection.DbCommands.TryRemove(commandText, out internalCommand))
+         {
+            dbCommand.Command = internalCommand.Command;
+            dbCommand.DbConnection = internalCommand.DbConnection;
+         }
+         else
+         {
+            dbCommand.Command = _internalConnection.DbConnection.CreateCommand();
+            dbCommand.Command.CommandText = commandText;
+            dbCommand.Command.CommandType = commandType;
+            dbCommand.DbConnection = this;
+
+            //For non odbc drivers like Npgsql which do not support Prepare
+            dbCommand.Command.Prepare();
+
+            //Console.WriteLine("prepare pool connection: " + this._internalConnection.Number + " for command " + _internalConnection.DbCommands.Count);
+         }
+#endif
+
+         return dbCommand;
+      }
+
+      public void ReleaseCommand(DbCommand dbCommand)
+      {
+#if !ADO
+         _internalConnection.DbCommands.TryAdd(dbCommand.CommandText, dbCommand);
+#endif
+      }
+   }
+}

+ 67 - 0
frameworks/CSharp/appmpower/src/Data/DbConnections.cs

@@ -0,0 +1,67 @@
+using System.Collections.Concurrent;
+using System.Threading.Tasks;
+
+namespace appMpower.Data
+{
+   public static class DbConnections
+   {
+      private static bool _connectionsCreated = false;
+      private static short _createdConnections = 0;
+      private static short _maxConnections = 250;
+
+      private static ConcurrentStack<InternalConnection> _stack = new();
+      private static ConcurrentQueue<TaskCompletionSource<InternalConnection>> _waitingQueue = new();
+
+      public static async Task<InternalConnection> GetConnection(string connectionString)
+      {
+         InternalConnection internalConnection = null;
+
+         if (_connectionsCreated)
+         {
+            if (!_stack.TryPop(out internalConnection))
+            {
+               internalConnection = await GetDbConnectionAsync();
+            }
+
+            return internalConnection;
+         }
+         else
+         {
+            internalConnection = new InternalConnection();
+            internalConnection.DbConnection = new System.Data.Odbc.OdbcConnection(connectionString);
+
+            _createdConnections++;
+
+            if (_createdConnections == _maxConnections) _connectionsCreated = true;
+
+            internalConnection.Number = _createdConnections;
+            internalConnection.DbCommands = new ConcurrentDictionary<string, DbCommand>();
+            //Console.WriteLine("opened connection number: " + dbConnection.Number);
+
+            return internalConnection;
+         }
+      }
+
+      public static Task<InternalConnection> GetDbConnectionAsync()
+      {
+         var taskCompletionSource = new TaskCompletionSource<InternalConnection>(TaskCreationOptions.RunContinuationsAsynchronously);
+
+         _waitingQueue.Enqueue(taskCompletionSource);
+         return taskCompletionSource.Task;
+      }
+
+      public static void Release(InternalConnection internalConnection)
+      {
+         TaskCompletionSource<InternalConnection> taskCompletionSource;
+
+         if (_waitingQueue.TryDequeue(out taskCompletionSource))
+         {
+            taskCompletionSource.SetResult(internalConnection);
+         }
+         else
+         {
+            _stack.Push(internalConnection);
+         }
+      }
+   }
+}

+ 6 - 4
frameworks/CSharp/appmpower/src/Db/DataProvider.cs → frameworks/CSharp/appmpower/src/Data/DbProviderFactory.cs

@@ -1,12 +1,14 @@
-namespace appMpower.Db
+using System.Data;
+
+namespace appMpower.Data
 {
-   public static class DataProvider
+   public static class DbProviderFactory
    {
 #if MYSQL
       public const string ConnectionString = "Driver={MariaDB};Server=tfb-database;Database=hello_world;Uid=benchmarkdbuser;Pwd=benchmarkdbpass;Pooling=false;OPTIONS=67108864;FLAG_FORWARD_CURSOR=1"; 
 #elif ADO
-      public const string ConnectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;SSL Mode=Disable;Maximum Pool Size=8;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Buffer Threshold Bytes=1000";
-      //public const string ConnectionString = "Server=localhost;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;SSL Mode=Disable;Maximum Pool Size=9;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Buffer Threshold Bytes=1000";
+      public const string ConnectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;SSL Mode=Disable;Maximum Pool Size=18;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Buffer Threshold Bytes=1000"; 
+      //public const string ConnectionString = "Server=localhost;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;SSL Mode=Disable;Maximum Pool Size=18;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Buffer Threshold Bytes=1000"; 
 #else
       public const string ConnectionString = "Driver={PostgreSQL};Server=tfb-database;Database=hello_world;Uid=benchmarkdbuser;Pwd=benchmarkdbpass;UseServerSidePrepare=1;Pooling=false";
       //public const string ConnectionString = "Driver={PostgreSQL};Server=localhost;Database=hello_world;Uid=benchmarkdbuser;Pwd=benchmarkdbpass;UseServerSidePrepare=1;Pooling=false";

+ 16 - 0
frameworks/CSharp/appmpower/src/Data/InternalConnection.cs

@@ -0,0 +1,16 @@
+using System.Collections.Concurrent;
+using System.Data;
+
+namespace appMpower.Data
+{
+   public class InternalConnection : System.IDisposable
+   {
+      public short Number { get; set; }
+      public IDbConnection DbConnection { get; set; }
+      public ConcurrentDictionary<string, DbCommand> DbCommands { get; set; }
+
+      public void Dispose()
+      {
+      }
+   }
+}

+ 0 - 198
frameworks/CSharp/appmpower/src/Db/PooledConnection.cs

@@ -1,198 +0,0 @@
-using System.Collections.Concurrent;
-using System.Data;
-using System.Data.Common;
-using System.Threading.Tasks;
-
-namespace appMpower.Db
-{
-   public class PooledConnection : IDbConnection
-   {
-      private bool _released = false;
-      private short _number = 0;
-      private IDbConnection _dbConnection;
-      private ConcurrentDictionary<string, PooledCommand> _pooledCommands;
-
-      internal PooledConnection()
-      {
-      }
-
-      internal PooledConnection(IDbConnection dbConnection)
-      {
-         _dbConnection = dbConnection;
-         _pooledCommands = new ConcurrentDictionary<string, PooledCommand>();
-      }
-
-      internal ConcurrentDictionary<string, PooledCommand> PooledCommands
-      {
-         get
-         {
-            return _pooledCommands;
-         }
-         set
-         {
-            _pooledCommands = value;
-         }
-      }
-
-      public short Number
-      {
-         get
-         {
-            return _number;
-         }
-         set
-         {
-            _number = value;
-         }
-      }
-
-      public IDbConnection DbConnection
-      {
-         get
-         {
-            return _dbConnection;
-         }
-         set
-         {
-            _dbConnection = value;
-         }
-      }
-
-      public string ConnectionString
-      {
-         get
-         {
-            return _dbConnection.ConnectionString;
-         }
-         set
-         {
-            _dbConnection.ConnectionString = value;
-         }
-      }
-
-      public int ConnectionTimeout
-      {
-         get
-         {
-            return _dbConnection.ConnectionTimeout;
-         }
-      }
-
-      public string Database
-      {
-         get
-         {
-            return _dbConnection.Database;
-         }
-      }
-
-      public ConnectionState State
-      {
-         get
-         {
-            return _dbConnection.State;
-         }
-      }
-
-      public bool Released
-      {
-         get
-         {
-            return _released;
-         }
-         internal set
-         {
-            _released = value;
-         }
-      }
-
-      public IDbTransaction BeginTransaction()
-      {
-         return _dbConnection.BeginTransaction();
-      }
-
-      public IDbTransaction BeginTransaction(IsolationLevel il)
-      {
-         return _dbConnection.BeginTransaction(il);
-      }
-
-      public void ChangeDatabase(string databaseName)
-      {
-         _dbConnection.ChangeDatabase(databaseName);
-      }
-
-      public void Close()
-      {
-         _dbConnection.Close();
-         _released = true;
-      }
-
-      public IDbCommand CreateCommand()
-      {
-         return _dbConnection.CreateCommand();
-      }
-
-      public void Open()
-      {
-         if (_dbConnection.State == ConnectionState.Closed)
-         {
-            _dbConnection.Open();
-         }
-      }
-
-      public void Release()
-      {
-         if (!_released && _dbConnection.State == ConnectionState.Open)
-         {
-            PooledConnections.Release(this);
-         }
-      }
-
-      public void Dispose()
-      {
-         if (!_released && _dbConnection.State == ConnectionState.Open)
-         {
-            PooledConnections.Dispose(this);
-         }
-      }
-
-      public async Task OpenAsync()
-      {
-         if (_dbConnection.State == ConnectionState.Closed)
-         {
-            await (_dbConnection as DbConnection).OpenAsync();
-         }
-      }
-
-      internal PooledCommand GetCommand(string commandText, PooledCommand pooledCommand)
-      {
-         PooledCommand internalCommand;
-
-         if (_pooledCommands.TryRemove(commandText, out internalCommand))
-         {
-            pooledCommand.DbCommand = internalCommand.DbCommand;
-            pooledCommand.PooledConnection = internalCommand.PooledConnection;
-         }
-         else
-         {
-            pooledCommand.DbCommand = this.DbConnection.CreateCommand();
-            pooledCommand.DbCommand.CommandText = commandText;
-            pooledCommand.PooledConnection = this;
-
-            //For non odbc drivers like Npgsql which do not support Prepare
-#if !ADO
-            pooledCommand.DbCommand.Prepare();
-#endif            
-
-            //Console.WriteLine("prepare pool connection: " + this._number + " for command " + _pooledCommands.Count);
-         }
-
-         return pooledCommand;
-      }
-
-      public void ReleaseCommand(PooledCommand pooledCommand)
-      {
-         _pooledCommands.TryAdd(pooledCommand.CommandText, pooledCommand);
-      }
-   }
-}

+ 0 - 88
frameworks/CSharp/appmpower/src/Db/PooledConnections.cs

@@ -1,88 +0,0 @@
-using System.Collections.Concurrent;
-using System.Threading.Tasks;
-
-namespace appMpower.Db
-{
-   public static class PooledConnections
-   {
-      private static bool _connectionsCreated = false;
-      private static short _createdConnections = 0;
-      private static short _maxConnections = 240;
-
-      private static ConcurrentStack<PooledConnection> _stack = new ConcurrentStack<PooledConnection>();
-      private static ConcurrentQueue<TaskCompletionSource<PooledConnection>> _waitingQueue = new ConcurrentQueue<TaskCompletionSource<PooledConnection>>();
-
-      public static async Task<PooledConnection> GetConnection(string connectionString)
-      {
-         PooledConnection pooledConnection = null;
-
-         if (_connectionsCreated)
-         {
-            if (_stack.TryPop(out pooledConnection))
-            {
-               pooledConnection.Released = false;
-            }
-            else
-            {
-               pooledConnection = await GetPooledConnectionAsync();
-            }
-
-            return pooledConnection;
-         }
-         else
-         {
-            pooledConnection = new PooledConnection();
-
-#if ADO
-            pooledConnection.DbConnection = new Npgsql.NpgsqlConnection(connectionString);
-#else
-            pooledConnection.DbConnection = new System.Data.Odbc.OdbcConnection(connectionString);
-#endif               
-
-            _createdConnections++;
-
-            if (_createdConnections == _maxConnections) _connectionsCreated = true;
-
-            pooledConnection.Number = _createdConnections;
-            pooledConnection.PooledCommands = new ConcurrentDictionary<string, PooledCommand>();
-            //Console.WriteLine("opened connection number: " + pooledConnection.Number);
-
-            return pooledConnection;
-         }
-      }
-
-      public static Task<PooledConnection> GetPooledConnectionAsync()
-      {
-         var taskCompletionSource = new TaskCompletionSource<PooledConnection>(TaskCreationOptions.RunContinuationsAsynchronously);
-
-         _waitingQueue.Enqueue(taskCompletionSource);
-         return taskCompletionSource.Task;
-      }
-
-      public static void Dispose(PooledConnection pooledConnection)
-      {
-         PooledConnection newPooledConnection = new PooledConnection();
-
-         newPooledConnection.DbConnection = pooledConnection.DbConnection;
-         newPooledConnection.Number = pooledConnection.Number;
-         newPooledConnection.PooledCommands = pooledConnection.PooledCommands;
-
-         Release(newPooledConnection);
-      }
-
-      public static void Release(PooledConnection pooledConnection)
-      {
-         TaskCompletionSource<PooledConnection> taskCompletionSource;
-
-         if (_waitingQueue.TryDequeue(out taskCompletionSource))
-         {
-            taskCompletionSource.SetResult(pooledConnection);
-         }
-         else
-         {
-            pooledConnection.Released = true;
-            _stack.Push(pooledConnection);
-         }
-      }
-   }
-}

+ 65 - 74
frameworks/CSharp/appmpower/src/RawDb.cs

@@ -1,11 +1,10 @@
 using System;
 using System.Collections.Generic;
 using System.Data;
-using System.Data.Common;
 using System.Linq;
 using System.Threading.Tasks;
 using Microsoft.Extensions.Caching.Memory;
-using appMpower.Db;
+using appMpower.Data; 
 using PlatformBenchmarks;
 
 namespace appMpower
@@ -32,36 +31,37 @@ namespace appMpower
 
       public static async Task<World> LoadSingleQueryRow()
       {
-         var pooledConnection = await PooledConnections.GetConnection(DataProvider.ConnectionString);
-         pooledConnection.Open();
+         using var pooledConnection = new DbConnection(DbProviderFactory.ConnectionString);
+         await pooledConnection.OpenAsync();
 
-         var (pooledCommand, _) = CreateReadCommand(pooledConnection);
-         var world = await ReadSingleRow(pooledCommand);
+         var (dbCommand, _) = CreateReadCommand(pooledConnection);
 
-         pooledCommand.Release();
-         pooledConnection.Release();
+         using (dbCommand)
+         {
+            var world = await ReadSingleRow(dbCommand);
 
-         return world;
+            return world;
+         }
       }
 
       public static async Task<World[]> LoadMultipleQueriesRows(int count)
       {
          var worlds = new World[count];
 
-         var pooledConnection = await PooledConnections.GetConnection(DataProvider.ConnectionString);
-         pooledConnection.Open();
+         using var pooledConnection = new DbConnection(DbProviderFactory.ConnectionString);
+         await pooledConnection.OpenAsync();
 
-         var (pooledCommand, dbDataParameter) = CreateReadCommand(pooledConnection);
+         var (dbCommand, dbDataParameter) = CreateReadCommand(pooledConnection);
 
-         for (int i = 0; i < count; i++)
+         using (dbCommand)
          {
-            worlds[i] = await ReadSingleRow(pooledCommand);
-            dbDataParameter.Value = _random.Next(1, 10001);
+            for (int i = 0; i < count; i++)
+            {
+               worlds[i] = await ReadSingleRow(dbCommand);
+               dbDataParameter.Value = _random.Next(1, 10001);
+            }
          }
 
-         pooledCommand.Release();
-         pooledConnection.Release();
-
          return worlds;
       }
 
@@ -69,17 +69,20 @@ namespace appMpower
       {
          var fortunes = new List<Fortune>();
 
-         var pooledConnection = await PooledConnections.GetConnection(DataProvider.ConnectionString);
-         pooledConnection.Open();
+         using var pooledConnection = new DbConnection(DbProviderFactory.ConnectionString);
+         await pooledConnection.OpenAsync();
 
-         var pooledCommand = new PooledCommand("SELECT * FROM fortune", pooledConnection);
-         var dataReader = await pooledCommand.ExecuteReaderAsync(CommandBehavior.SingleResult & CommandBehavior.SequentialAccess);
+         var dbCommand = new DbCommand("SELECT * FROM fortune", pooledConnection);
 
-         while (dataReader.Read())
+         using (dbCommand)
          {
-            fortunes.Add(new Fortune
-            (
-                id: dataReader.GetInt32(0),
+            var dataReader = await dbCommand.ExecuteReaderAsync(CommandBehavior.SingleResult & CommandBehavior.SequentialAccess);
+
+            while (dataReader.Read())
+            {
+               fortunes.Add(new Fortune
+               (
+                   id: dataReader.GetInt32(0),
 #if MYSQL
                //MariaDB ODBC connector does not correctly support Japanese characters in combination with default ADO.NET;
                //as a solution we custom read this string
@@ -88,11 +91,10 @@ namespace appMpower
                 message: dataReader.GetString(1)
 #endif
             ));
-         }
+            }
 
-         dataReader.Close();
-         pooledCommand.Release();
-         pooledConnection.Release();
+            dataReader.Close();
+         }
 
          fortunes.Add(new Fortune(id: 0, message: "Additional fortune added at request time."));
          fortunes.Sort();
@@ -104,20 +106,21 @@ namespace appMpower
       {
          var worlds = new World[count];
 
-         var pooledConnection = await PooledConnections.GetConnection(DataProvider.ConnectionString);
-         pooledConnection.Open();
+         using var pooledConnection = new DbConnection(DbProviderFactory.ConnectionString);
+         await pooledConnection.OpenAsync();
 
          var (queryCommand, dbDataParameter) = CreateReadCommand(pooledConnection);
 
-         for (int i = 0; i < count; i++)
+         using (queryCommand)
          {
-            worlds[i] = await ReadSingleRow(queryCommand);
-            dbDataParameter.Value = _random.Next(1, 10001);
+            for (int i = 0; i < count; i++)
+            {
+               worlds[i] = await ReadSingleRow(queryCommand);
+               dbDataParameter.Value = _random.Next(1, 10001);
+            }
          }
 
-         queryCommand.Release();
-
-         var updateCommand = new PooledCommand(PlatformBenchmarks.BatchUpdateString.Query(count), pooledConnection);
+         using var updateCommand = new DbCommand(PlatformBenchmarks.BatchUpdateString.Query(count), pooledConnection);
 
          var ids = PlatformBenchmarks.BatchUpdateString.Ids;
          var randoms = PlatformBenchmarks.BatchUpdateString.Randoms;
@@ -145,26 +148,23 @@ namespace appMpower
 
          await updateCommand.ExecuteNonQueryAsync();
 
-         updateCommand.Release();
-         pooledConnection.Release();
-
          return worlds;
       }
 
-      private static (PooledCommand pooledCommand, IDbDataParameter dbDataParameter) CreateReadCommand(PooledConnection pooledConnection)
+      private static (DbCommand dbCommand, IDbDataParameter dbDataParameter) CreateReadCommand(DbConnection pooledConnection)
       {
 #if ADO         
-         var pooledCommand = new PooledCommand("SELECT * FROM world WHERE id=@Id", pooledConnection);
+         var dbCommand = new DbCommand("SELECT * FROM world WHERE id=@Id", pooledConnection);
 #else         
-         var pooledCommand = new PooledCommand("SELECT * FROM world WHERE id=?", pooledConnection);
+         var dbCommand = new DbCommand("SELECT * FROM world WHERE id=?", pooledConnection);
 #endif         
 
-         return (pooledCommand, pooledCommand.CreateParameter("Id", DbType.Int32, _random.Next(1, 10001)));
+         return (dbCommand, dbCommand.CreateParameter("Id", DbType.Int32, _random.Next(1, 10001)));
       }
 
-      private static async Task<World> ReadSingleRow(PooledCommand pooledCommand)
+      private static async Task<World> ReadSingleRow(DbCommand dbCommand)
       {
-         var dataReader = await pooledCommand.ExecuteReaderAsync(CommandBehavior.SingleRow & CommandBehavior.SequentialAccess);
+         var dataReader = await dbCommand.ExecuteReaderAsync(CommandBehavior.SingleRow & CommandBehavior.SequentialAccess);
 
          dataReader.Read();
 
@@ -202,17 +202,17 @@ namespace appMpower
             queryString = _queriesMultipleRows[count] = PlatformBenchmarks.StringBuilderCache.GetStringAndRelease(stringBuilder);
          }
 
-         var pooledConnection = await PooledConnections.GetConnection(DataProvider.ConnectionString);
-         pooledConnection.Open();
+         using var pooledConnection = new DbConnection(DbProviderFactory.ConnectionString);
+         await pooledConnection.OpenAsync();
 
-         var pooledCommand = new PooledCommand(queryString, pooledConnection);
+         using var dbCommand = new DbCommand(queryString, pooledConnection);
 
          for (int i = 0; i < count; i++)
          {
-            pooledCommand.CreateParameter(ids[i], DbType.Int32, _random.Next(1, 10001));
+            dbCommand.CreateParameter(ids[i], DbType.Int32, _random.Next(1, 10001));
          }
 
-         var dataReader = await pooledCommand.ExecuteReaderAsync(CommandBehavior.Default & CommandBehavior.SequentialAccess);
+         var dataReader = await dbCommand.ExecuteReaderAsync(CommandBehavior.Default & CommandBehavior.SequentialAccess);
 
          do
          {
@@ -228,15 +228,13 @@ namespace appMpower
          } while (await dataReader.NextResultAsync());
 
          dataReader.Close();
-         pooledCommand.Release();
-         pooledConnection.Release();
 
          return worlds;
       }
 
-      public static string ReadColumn(DbDataReader dbDataReader, int column)
+      public static string ReadColumn(IDataReader dataReader, int column)
       {
-         long size = dbDataReader.GetBytes(column, 0, null, 0, 0);  //get the length of data
+         long size = dataReader.GetBytes(column, 0, null, 0, 0);  //get the length of data
          byte[] values = new byte[size];
 
          int bufferSize = 64;
@@ -245,7 +243,7 @@ namespace appMpower
 
          while (bytesRead < size)
          {
-            bytesRead += dbDataReader.GetBytes(column, currentPosition, values, currentPosition, bufferSize);
+            bytesRead += dataReader.GetBytes(column, currentPosition, values, currentPosition, bufferSize);
             currentPosition += bufferSize;
          }
 
@@ -254,12 +252,12 @@ namespace appMpower
 
       public static async Task PopulateCache()
       {
-         var pooledConnection = await PooledConnections.GetConnection(DataProvider.ConnectionString);
-         pooledConnection.Open();
+         using var pooledConnection = new DbConnection(DbProviderFactory.ConnectionString);
+         await pooledConnection.OpenAsync();
 
-         var (pooledCommand, dbDataParameter) = CreateReadCommand(pooledConnection);
+         var (dbCommand, dbDataParameter) = CreateReadCommand(pooledConnection);
 
-         using (pooledCommand)
+         using (dbCommand)
          {
             var cacheKeys = _cacheKeys;
             var cache = _cache;
@@ -267,12 +265,9 @@ namespace appMpower
             for (var i = 1; i < 10001; i++)
             {
                dbDataParameter.Value = i;
-               cache.Set<CachedWorld>(cacheKeys[i], await ReadSingleRow(pooledCommand));
+               cache.Set<CachedWorld>(cacheKeys[i], await ReadSingleRow(dbCommand));
             }
          }
-
-         pooledCommand.Release();
-         pooledConnection.Release();
       }
 
       public static Task<CachedWorld[]> LoadCachedQueries(int count)
@@ -301,19 +296,18 @@ namespace appMpower
          return Task.FromResult(result);
       }
 
-      //static async Task<CachedWorld[]> LoadUncachedQueries(int id, int i, int count, RawDb rawdb, CachedWorld[] result)
       static async Task<CachedWorld[]> LoadUncachedQueries(int id, int i, int count, CachedWorld[] result)
       {
-         var pooledConnection = await PooledConnections.GetConnection(DataProvider.ConnectionString);
-         pooledConnection.Open();
+         using var pooledConnection = new DbConnection(DbProviderFactory.ConnectionString);
+         await pooledConnection.OpenAsync();
 
-         var (pooledCommand, dbDataParameter) = CreateReadCommand(pooledConnection);
+         var (dbCommand, dbDataParameter) = CreateReadCommand(pooledConnection);
 
-         using (pooledCommand)
+         using (dbCommand)
          {
             Func<ICacheEntry, Task<CachedWorld>> create = async (entry) =>
             {
-               return await ReadSingleRow(pooledCommand);
+               return await ReadSingleRow(dbCommand);
             };
 
             var cacheKeys = _cacheKeys;
@@ -329,9 +323,6 @@ namespace appMpower
                dbDataParameter.Value = id;
                key = cacheKeys[id];
             }
-
-            pooledCommand.Release();
-            pooledConnection.Release();
          }
 
          return result;

+ 4 - 1
frameworks/CSharp/appmpower/src/appMpower.ado

@@ -17,12 +17,15 @@
    </PropertyGroup>
 
    <ItemGroup>
-      <PackageReference Include="Npgsql" Version="6.0.2" />
+      <PackageReference Include="Npgsql" Version="6.0.5" />
+      <PackageReference Include="System.Data.SqlClient" Version="4.8.3" />
+      <PackageReference Include="System.Data.Odbc" Version="6.0.0" />
       <PackageReference Include="Microsoft.DotNet.ILCompiler" Version="7.0.0-*" />
    </ItemGroup>
 
    <PropertyGroup>
       <DefineConstants>$(DefineConstants);ADO</DefineConstants>
+      <DefineConstants>$(DefineConstants);POSTGRESQL</DefineConstants>
    </PropertyGroup>
 
 </Project>

+ 2 - 1
frameworks/CSharp/appmpower/src/appMpower.csproj

@@ -33,7 +33,8 @@
   </ItemGroup>
 
   <PropertyGroup>
-    <DefineConstants Condition=" '$(Database)' == 'mysql' ">$(DefineConstants);MYSQL</DefineConstants>
+      <DefineConstants>$(DefineConstants);ODBC</DefineConstants>
+      <DefineConstants Condition=" '$(Database)' == 'mysql' ">$(DefineConstants);MYSQL</DefineConstants>
   </PropertyGroup>
 
 </Project>

+ 17 - 17
frameworks/CSharp/aspnetcore/benchmark_config.json

@@ -65,7 +65,7 @@
       "approach": "Realistic",
       "classification": "Micro",
       "database": "None",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [Middleware]",
       "language": "C#",
       "orm": "Raw",
       "platform": ".NET",
@@ -83,7 +83,7 @@
       "approach": "Realistic",
       "classification": "Micro",
       "database": "None",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [Middleware]",
       "language": "C#",
       "orm": "Raw",
       "platform": ".NET",
@@ -103,7 +103,7 @@
       "approach": "Realistic",
       "classification": "Micro",
       "database": "Postgres",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [Middleware]",
       "language": "C#",
       "orm": "Raw",
       "platform": ".NET",
@@ -121,7 +121,7 @@
       "approach": "Realistic",
       "classification": "Micro",
       "database": "Postgres",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [Middleware]",
       "language": "C#",
       "orm": "Raw",
       "platform": ".NET",
@@ -141,7 +141,7 @@
       "approach": "Realistic",
       "classification": "Micro",
       "database": "Postgres",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [Middleware]",
       "language": "C#",
       "orm": "Full",
       "platform": ".NET",
@@ -161,7 +161,7 @@
       "approach": "Realistic",
       "classification": "Micro",
       "database": "Postgres",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [Middleware]",
       "language": "C#",
       "orm": "Micro",
       "platform": ".NET",
@@ -179,7 +179,7 @@
       "approach": "Realistic",
       "classification": "Micro",
       "database": "Postgres",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [Middleware]",
       "language": "C#",
       "orm": "Micro",
       "platform": ".NET",
@@ -200,7 +200,7 @@
       "approach": "Realistic",
       "classification": "Micro",
       "database": "MySQL",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [Middleware]",
       "language": "C#",
       "orm": "Raw",
       "platform": ".NET",
@@ -221,7 +221,7 @@
       "approach": "Realistic",
       "classification": "Micro",
       "database": "MySQL",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [Middleware]",
       "language": "C#",
       "orm": "Micro",
       "platform": ".NET",
@@ -240,7 +240,7 @@
       "approach": "Realistic",
       "classification": "Fullstack",
       "database": "None",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [MVC]",
       "language": "C#",
       "orm": "Raw",
       "platform": ".NET",
@@ -260,7 +260,7 @@
       "approach": "Realistic",
       "classification": "Fullstack",
       "database": "Postgres",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [MVC]",
       "language": "C#",
       "orm": "Raw",
       "platform": ".NET",
@@ -278,7 +278,7 @@
       "approach": "Realistic",
       "classification": "Fullstack",
       "database": "Postgres",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [MVC]",
       "language": "C#",
       "orm": "Raw",
       "platform": ".NET",
@@ -298,7 +298,7 @@
       "approach": "Realistic",
       "classification": "Fullstack",
       "database": "Postgres",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [MVC]",
       "language": "C#",
       "orm": "Full",
       "platform": ".NET",
@@ -318,7 +318,7 @@
       "approach": "Realistic",
       "classification": "Fullstack",
       "database": "Postgres",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [MVC]",
       "language": "C#",
       "orm": "Micro",
       "platform": ".NET",
@@ -336,7 +336,7 @@
       "approach": "Realistic",
       "classification": "Fullstack",
       "database": "Postgres",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [MVC]",
       "language": "C#",
       "orm": "Micro",
       "platform": ".NET",
@@ -357,7 +357,7 @@
       "approach": "Realistic",
       "classification": "Fullstack",
       "database": "MySQL",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [MVC]",
       "language": "C#",
       "orm": "Raw",
       "platform": ".NET",
@@ -378,7 +378,7 @@
       "approach": "Realistic",
       "classification": "Fullstack",
       "database": "MySQL",
-      "framework": "ASP.NET Core",
+      "framework": "ASP.NET Core [MVC]",
       "language": "C#",
       "orm": "Micro",
       "platform": ".NET",

+ 1 - 1
frameworks/CSharp/fastendpoints/Benchmarks/Benchmarks.csproj

@@ -8,7 +8,7 @@
     </PropertyGroup>
 
     <ItemGroup>
-        <PackageReference Include="FastEndpoints" Version="3.1.*" />
+        <PackageReference Include="FastEndpoints" Version="3.*" />
     </ItemGroup>
 
 </Project>

+ 0 - 25
frameworks/CSharp/fastendpoints/Benchmarks/Benchmarks.sln

@@ -1,25 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.0.32002.185
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Benchmarks", "Benchmarks.csproj", "{95F15ACC-FFB8-4C45-BF4E-6E2B602C1EBA}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Any CPU = Debug|Any CPU
-		Release|Any CPU = Release|Any CPU
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{95F15ACC-FFB8-4C45-BF4E-6E2B602C1EBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{95F15ACC-FFB8-4C45-BF4E-6E2B602C1EBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{95F15ACC-FFB8-4C45-BF4E-6E2B602C1EBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{95F15ACC-FFB8-4C45-BF4E-6E2B602C1EBA}.Release|Any CPU.Build.0 = Release|Any CPU
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-		SolutionGuid = {975848F3-00CE-49FC-A82F-86DDC0A3CC6F}
-	EndGlobalSection
-EndGlobal

+ 2 - 2
frameworks/CSharp/fastendpoints/Benchmarks/Endpoints/JsonEndpoint.cs

@@ -1,6 +1,6 @@
 namespace Benchmarks.Endpoints;
 
-public class JsonEndpoint : Endpoint<object, object>
+public class JsonEndpoint : Endpoint<EmptyRequest, object>
 {
     public override void Configure()
     {
@@ -8,7 +8,7 @@ public class JsonEndpoint : Endpoint<object, object>
         AllowAnonymous();
     }
 
-    public override Task HandleAsync(object _, CancellationToken __)
+    public override Task HandleAsync(EmptyRequest _, CancellationToken __)
     {
         HttpContext.Response.ContentLength = 27;
         return SendAsync(new { message = "Hello, World!" });

+ 2 - 2
frameworks/CSharp/fastendpoints/Benchmarks/Endpoints/PlainTextEndpoint.cs

@@ -1,6 +1,6 @@
 namespace Benchmarks.Endpoints;
 
-public class PlainTextEndpoint : Endpoint<object, object>
+public class PlainTextEndpoint : Endpoint<EmptyRequest, EmptyResponse>
 {
     private static readonly byte[] payload = System.Text.Encoding.UTF8.GetBytes("Hello, World!");
 
@@ -10,7 +10,7 @@ public class PlainTextEndpoint : Endpoint<object, object>
         AllowAnonymous();
     }
 
-    public override Task HandleAsync(object _, CancellationToken __)
+    public override Task HandleAsync(EmptyRequest _, CancellationToken __)
     {
         HttpContext.Response.StatusCode = StatusCodes.Status200OK;
         HttpContext.Response.ContentType = "text/plain";

+ 1 - 1
frameworks/CSharp/fastendpoints/Benchmarks/Program.cs

@@ -6,4 +6,4 @@ builder.Services.AddFastEndpoints();
 
 var app = builder.Build();
 app.UseFastEndpoints();
-app.Run();
+app.Run("http://0.0.0.0:8080");

+ 6 - 2
frameworks/CSharp/fastendpoints/fastendpoints.dockerfile

@@ -1,12 +1,16 @@
-FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
+FROM mcr.microsoft.com/dotnet/sdk:6.0.100 AS build
 WORKDIR /app
 COPY Benchmarks .
 RUN dotnet publish -c Release -o out
 
-FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
+FROM mcr.microsoft.com/dotnet/aspnet:6.0.0 AS runtime
 WORKDIR /app
 COPY --from=build /app/out ./
 
+ENV DOTNET_TieredPGO 1 
+ENV DOTNET_TC_QuickJitForLoops 1 
+ENV DOTNET_ReadyToRun 0
+
 EXPOSE 8080
 
 ENTRYPOINT ["dotnet", "Benchmarks.dll"]

+ 5 - 5
frameworks/CSharp/genhttp/Benchmarks/Benchmarks.csproj

@@ -26,11 +26,11 @@
   </ItemGroup>
     
   <ItemGroup>
-    <PackageReference Include="GenHTTP.Core" Version="6.3.0" />
-    <PackageReference Include="GenHTTP.Modules.Razor" Version="6.3.0" />
-    <PackageReference Include="GenHTTP.Modules.Webservices" Version="6.3.0" />
-    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.1" />
-    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.1" />
+    <PackageReference Include="GenHTTP.Core" Version="6.3.4" />
+    <PackageReference Include="GenHTTP.Modules.Razor" Version="6.3.4" />
+    <PackageReference Include="GenHTTP.Modules.Webservices" Version="6.3.4" />
+    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.4" />
+    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.4" />
   </ItemGroup>
   
 </Project>

+ 1 - 1
frameworks/CSharp/revenj/revenj.dockerfile

@@ -1,4 +1,4 @@
-FROM mono:5.12.0.226
+FROM mono:6.12.0.122
 RUN apt-get update -yqq && apt-get install -yqq unzip
 
 RUN mkdir /java

+ 37 - 0
frameworks/CSharp/servicestack-v6/.gitignore

@@ -0,0 +1,37 @@
+[Oo]bj/
+[Bb]in/
+TestResults/
+.nuget/
+*.sln.ide/
+_ReSharper.*/
+.idea/
+packages/
+artifacts/
+PublishProfiles/
+.vs/
+*.user
+*.suo
+*.cache
+*.docstates
+_ReSharper.*
+nuget.exe
+*net45.csproj
+*net451.csproj
+*k10.csproj
+*.psess
+*.vsp
+*.pidb
+*.userprefs
+*DS_Store
+*.ncrunchsolution
+*.*sdf
+*.ipch
+*.swp
+*~
+.build/
+.testPublish/
+launchSettings.json
+BenchmarkDotNet.Artifacts/
+BDN.Generated/
+binaries/
+global.json

+ 26 - 0
frameworks/CSharp/servicestack-v6/Benchmarks/Configure.AppHost.cs

@@ -0,0 +1,26 @@
+using Funq;
+using ServiceStack;
+using ServicestackV6.ServiceInterface;
+
+[assembly: HostingStartup(typeof(ServicestackV6.AppHost))]
+
+namespace ServicestackV6;
+
+public class AppHost : AppHostBase, IHostingStartup
+{
+    public void Configure(IWebHostBuilder builder) => builder.Configure(app =>
+    {
+        if (!HasInit)
+            app.UseServiceStack(new AppHost());
+    });
+
+    public AppHost() : base("ServicestackV6", typeof(MyServices).Assembly) { }
+
+    public override void Configure(Container container)
+    {
+        SetConfig(new HostConfig
+        {
+            UseSameSiteCookies = true,
+        });
+    }
+}

+ 11 - 0
frameworks/CSharp/servicestack-v6/Benchmarks/Models/Json.cs

@@ -0,0 +1,11 @@
+using ServiceStack;
+
+namespace ServicestackV6.ServiceModel;
+
+[Route("/json")]
+public class JsonRequest : IReturn<JsonResponse> { }
+
+public class JsonResponse
+{
+    public string message => "Hello, World!";
+}

+ 6 - 0
frameworks/CSharp/servicestack-v6/Benchmarks/Models/PlainText.cs

@@ -0,0 +1,6 @@
+using ServiceStack;
+
+namespace ServicestackV6.ServiceModel;
+
+[Route("/plaintext")]
+public class PlainTextRequest : IReturnVoid { }

+ 4 - 0
frameworks/CSharp/servicestack-v6/Benchmarks/Program.cs

@@ -0,0 +1,4 @@
+WebApplication
+    .CreateBuilder(args)
+    .Build()
+    .Run();

+ 22 - 0
frameworks/CSharp/servicestack-v6/Benchmarks/Services/MyServices.cs

@@ -0,0 +1,22 @@
+using ServiceStack;
+using ServicestackV6.ServiceModel;
+
+namespace ServicestackV6.ServiceInterface;
+
+public class MyServices : Service
+{
+    private static readonly byte[] payload = System.Text.Encoding.UTF8.GetBytes("Hello, World!");
+
+    public object Get(JsonRequest _)
+    {
+        Response.SetContentLength(27);
+        return new JsonResponse();
+    }
+
+    public byte[] Get(PlainTextRequest _)
+    {
+        Response.SetContentLength(payload.Length);
+        Response.ContentType = "text/plain";
+        return payload;
+    }
+}

+ 13 - 0
frameworks/CSharp/servicestack-v6/Benchmarks/ServicestackV6.csproj

@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk.Web">
+
+    <PropertyGroup>
+        <TargetFramework>net6.0</TargetFramework>
+        <Nullable>enable</Nullable>
+        <ImplicitUsings>enable</ImplicitUsings>
+    </PropertyGroup>
+
+    <ItemGroup>
+        <PackageReference Include="ServiceStack" Version="6.*" />
+    </ItemGroup>
+
+</Project>

+ 0 - 0
frameworks/CSharp/fastendpoints/Benchmarks/appsettings.Development.json → frameworks/CSharp/servicestack-v6/Benchmarks/appsettings.Development.json


+ 0 - 0
frameworks/CSharp/fastendpoints/Benchmarks/appsettings.json → frameworks/CSharp/servicestack-v6/Benchmarks/appsettings.json


+ 26 - 0
frameworks/CSharp/servicestack-v6/README.md

@@ -0,0 +1,26 @@
+# Servicestack-V6 Tests on Windows and Linux
+This includes tests for plaintext and json serialization.
+
+## Infrastructure Software Versions
+
+**Language**
+
+* C# 10.0
+
+**Platforms**
+
+* .NET 6.0 (Windows and Linux)
+
+**Web Servers**
+
+* [Kestrel](https://github.com/dotnet/aspnetcore/tree/main/src/Servers/Kestrel)
+
+**Web Stack**
+
+* [ServiceStack](https://servicestack.net/)
+* ASP.Net 6
+
+## Paths & Source for Tests
+
+* [Plaintext](Benchmarks/Services/MyServices.cs#L10): "http://localhost:8080/plaintext"
+* [JSON Serialization](Benchmarks/Services/MyServices.cs#16): "http://localhost:8080/json"

+ 26 - 0
frameworks/CSharp/servicestack-v6/benchmark_config.json

@@ -0,0 +1,26 @@
+{
+  "framework": "servicestack-v6",
+  "tests": [
+    {
+      "default": {
+        "plaintext_url": "/plaintext",
+        "json_url": "/json",
+        "port": 8080,
+        "approach": "Realistic",
+        "classification": "Micro",
+        "database": "None",
+        "framework": "ServiceStack-V6",
+        "language": "C#",
+        "orm": "Raw",
+        "platform": ".NET",
+        "flavor": "CoreCLR",
+        "webserver": "Kestrel",
+        "os": "Linux",
+        "database_os": "Linux",
+        "display_name": "ServiceStack-V6",
+        "notes": "",
+        "versus": "aspcore-mvc"
+      }
+    }
+  ]
+}

+ 5 - 5
frameworks/CSharp/servicestack/config.toml → frameworks/CSharp/servicestack-v6/config.toml

@@ -1,15 +1,15 @@
 [framework]
-name = "servicestack"
+name = "servicestack-v6"
 
 [main]
 urls.plaintext = "/plaintext"
 urls.json = "/json"
 approach = "Realistic"
-classification = "Fullstack"
+classification = "Micro"
 database = "None"
 database_os = "Linux"
 os = "Linux"
 orm = "Raw"
-platform = "None"
-webserver = "nginx"
-versus = "servicestack"
+platform = ".NET"
+webserver = "Kestrel"
+versus = "aspcore-mvc"

+ 12 - 0
frameworks/CSharp/servicestack-v6/servicestack-v6.dockerfile

@@ -0,0 +1,12 @@
+FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
+WORKDIR /app
+COPY Benchmarks .
+RUN dotnet publish -c Release -o out
+
+FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
+WORKDIR /app
+COPY --from=build /app/out ./
+
+EXPOSE 8080
+
+ENTRYPOINT ["dotnet", "ServicestackV6.dll"]

+ 0 - 105
frameworks/CSharp/servicestack/README.md

@@ -1,105 +0,0 @@
-# ServiceStack on Mono and Windows
-
-## Tests
-
-### JSON Response
-
-* `http://localhost:8080/json`
-
-### Plain Text Response
-
-* `http://localhost:8080/plaintext`
-
-### Database Responses
-
-**Microsoft SQL Server** using ORMLite
-
-* `http://localhost:8080/sqlserver/db`
-* `http://localhost:8080/sqlserver/queries/10`
-* `http://localhost:8080/sqlserver/fortunes`
-* `http://localhost:8080/sqlserver/updates/25`
-
-**MySQL** using ORMLite
-
-* `http://localhost:8080/mysql/db`
-* `http://localhost:8080/mysql/queries/10`
-* `http://localhost:8080/mysql/fortunes`
-* `http://localhost:8080/mysql/updates/25`
-
-**PostgreSQL** using ORMLite
-
-* `http://localhost:8080/postgresql/db`
-* `http://localhost:8080/postgresql/queries/10`
-* `http://localhost:8080/postgresql/fortunes`
-* `http://localhost:8080/postgresql/updates/25`
-
-**MongoDB**
-
-* `http://localhost:8080/mongodb/db`
-* `http://localhost:8080/mongodb/queries/10`
-* `http://localhost:8080/mongodb/fortunes`
-* `http://localhost:8080/mongodb/updates/25`
-
----
-
-## Mono Installation
-
-    sudo apt-get install build-essential autoconf automake libtool zlib1g-dev git
-
-    git clone git://github.com/mono/mono
-    cd mono
-    git checkout mono-3.0.10
-    ./autogen.sh --prefix=/usr/local
-    make get-monolite-latest
-    make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/basic.exe
-    sudo make install
-
-    cd ..
-
-    git clone git://github.com/mono/xsp
-    cd xsp
-    git checkout 3.0
-    ./autogen.sh --prefix=/usr/local
-    make
-    sudo make install
-
-## Versions
-
-**Language**
-
-* C# 5.0
-
-**Platforms**
-
-* .NET Framework 4.5 (Windows)
-* Mono 3.0.X (Linux)
-
-**Web Servers**
-
-* Self Hosting using HTTPListener (Windows/Linux)
-* IIS 8 (Windows) - includes [Swagger](http://www.nuget.org/packages/ServiceStack.Api.Swagger/)
-* nginx 1.4.0 & XSP FastCGI (Linux)
-
-**Web Stack**
-
-* ASP.NET 4.5
-* [ServiceStack](https://github.com/servicestack/servicestack/wiki)
-
-**Database Providers**
-
-* Microsoft SQL Server - [interface](http://www.nuget.org/packages/ServiceStack.OrmLite.SqlServer/)
-* MySQL - [driver](http://www.nuget.org/packages/MySql.Data/) + [interface](http://www.nuget.org/packages/ServiceStack.OrmLite.MySql/)
-* PostgreSQL - [driver](http://www.nuget.org/packages/Npgsql/) + [interface](http://www.nuget.org/packages/ServiceStack.OrmLite.PostgreSQL/)
-* MongoDB - [driver](http://www.nuget.org/packages/mongocsharpdriver/)
-
-**Caching Providers**
-
-* In-Memory
-* Redis NoSQL Db - [client w/interface](http://www.nuget.org/packages/ServiceStack.Redis)
-* MemCache - [client](http://www.nuget.org/packages/EnyimMemcached) + [interface](http://www.nuget.org/packages/ServiceStack.Caching.Memcached)
-* Amazon Web Services In-Memory DynamoDb DataCache - [client](http://www.nuget.org/packages/AWSSDK) + [interface](http://www.nuget.org/packages/ServiceStack.Caching.AwsDynamoDb)
-* Microsoft Azure In-Memory DataCache - [client](http://www.nuget.org/packages/WindowsAzure.Caching) + [interface](http://www.nuget.org/packages/ServiceStack.Caching.Azure)
-
-**Developer Tools**
-
-* Visual Studio 2012

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

@@ -1,24 +0,0 @@
-{
-  "framework": "servicestack",
-  "tests": [{
-    "default": {
-      "json_url": "/json",
-      "plaintext_url": "/plaintext",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Fullstack",
-      "database": "None",
-      "framework": "servicestack",
-      "language": "C#",
-      "flavor": "Mono",
-      "orm": "Raw",
-      "platform": "None",
-      "webserver": "nginx",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "servicestack",
-      "notes": "",
-      "versus": "servicestack"
-    }
-  }]
-}

+ 0 - 21
frameworks/CSharp/servicestack/nginx.conf

@@ -1,21 +0,0 @@
-pid /tmp/nginx.pid;
-error_log stderr error;
-
-events {
-    worker_connections 8192;
-}
-
-http {
-    access_log off;
-    include nginx.upstream.conf;
-
-    server {
-        listen 8080;
-
-        location / {
-            fastcgi_pass mono;
-            include /etc/nginx/fastcgi_params;
-            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
-        }
-    }
-}

+ 0 - 27
frameworks/CSharp/servicestack/run.sh

@@ -1,27 +0,0 @@
-#!/bin/bash
-
-CPU_COUNT=$(nproc)
-
-# one fastcgi instance for each thread
-# load balanced by nginx
-port_start=9001
-port_end=$(($port_start+$CPU_COUNT))
-
-# To debug, use --printlog --verbose --loglevels=All
-for port in $(seq $port_start $port_end); do
-	MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 --applications=/:/servicestack/src --socket=tcp:127.0.0.1:$port &
-done
-
-sleep 5s
-
-# nginx
-conf="upstream mono {\n"
-for port in $(seq $port_start $port_end); do
-  conf+="\tserver 127.0.0.1:${port};\n"
-done
-conf+="}"
-
-echo -e $conf > nginx.upstream.conf
-nginx -c /servicestack/nginx.conf -g "worker_processes ${CPU_COUNT};"
-
-wait

+ 0 - 17
frameworks/CSharp/servicestack/servicestack.dockerfile

@@ -1,17 +0,0 @@
-FROM mono:5.8.0.127
-RUN apt-get update -yqq && apt-get install -yqq nginx wget mono-fastcgi-server
-
-WORKDIR /servicestack
-COPY src src
-COPY nginx.conf nginx.conf
-COPY run.sh run.sh
-
-RUN mkdir lib
-RUN curl -sL -O https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
-RUN mono nuget.exe install src/packages.config -OutputDirectory lib/
-RUN xbuild src/ServiceStackBenchmark.csproj /t:Clean
-RUN xbuild src/ServiceStackBenchmark.csproj /t:Build
-
-EXPOSE 8080
-
-CMD bash run.sh

+ 0 - 64
frameworks/CSharp/servicestack/src/AppHost.cs

@@ -1,64 +0,0 @@
-using System;
-using System.Linq;
-using System.Collections.Generic;
-
-using ServiceStack;
-using ServiceStack.Api.Swagger;
-using ServiceStack.CacheAccess;
-using ServiceStack.CacheAccess.Providers;
-using ServiceStack.Common;
-using ServiceStack.Common.Web;
-using ServiceStack.Redis;
-using ServiceStack.ServiceHost;
-using ServiceStack.WebHost.Endpoints;
-using ServiceStack.WebHost.Endpoints.Formats;
-
-
-namespace ServiceStackBenchmark
-{
-
-	public class AppHost : AppHostBase
-	{
-		
-		public AppHost() : base("ServiceStackBenchmark", typeof(AppHost).Assembly) { }
-
-        public override void Configure(Funq.Container container)
-		{
-			ServiceStack.Text.JsConfig.EmitCamelCaseNames = true;
-
-            // Remove some unused features that by default are included
-            Plugins.RemoveAll(p => p is CsvFormat);
-            Plugins.RemoveAll(p => p is MetadataFeature);
-
-            // Add plugins
-            Plugins.Add(new SwaggerFeature());
-
-            // Get disable features specified in Config file (i.e. Soap, Metadata, etc.)
-            var disabled = AppHostConfigHelper.GetDisabledFeatures();
-
-            // Construct Service Endpoint Host Configuration store
-            var config = new EndpointHostConfig
-            {
-                DefaultRedirectPath = "/swagger-ui/index.html", // default to the Swagger page
-                DefaultContentType = ContentType.Json,
-                WriteErrorsToResponse = false,
-                EnableFeatures = Feature.All.Remove(disabled),
-                AppendUtf8CharsetOnContentTypes = new HashSet<string> { ContentType.Html },
-            };
-
-            // Apply configuration
-            SetConfig(config);
-
-            // Initialize Databases & associated Routes
-            container.InitDatabaseRoutes(Routes);
-
-            // Register Cache Clients
-            container.Register<ICacheClient>(new MemoryCacheClient());
-
-            // Register Redis Client Manager
-            container.Register<IRedisClientsManager>(c =>
-                new PooledRedisClientManager("localhost:6379"));
-		}
-
-	}
-}

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

@@ -1,208 +0,0 @@
-using System;
-using System.Linq;
-using System.Configuration;
-using System.Collections.Generic;
-using System.Threading;
-
-using MongoDB.Bson;
-using MongoDB.Bson.Serialization;
-using MongoDB.Driver;
-
-using ServiceStack.ServiceHost;
-using ServiceStackBenchmark.Model;
-
-namespace ServiceStackBenchmark
-{
-    public static class AppHostConfigHelper
-    {
-        public static bool InitMongoDB(this Funq.Container container)
-        {
-            try
-            {
-                // Register the MySql Database Connection Factory
-                var mongoDbConnectionString = ConfigurationManager.ConnectionStrings["MongoDB"].ConnectionString;
-                var client = new MongoClient(mongoDbConnectionString);
-                var server = client.GetServer();
-                var database = server.GetDatabase("hello_world");
-                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
-                return database.CreateWorldTable() && database.CreateFortuneTable();
-            }
-            catch
-            {
-                // Unregister failed database connection factory
-                container.Register<MongoDatabase>(c => null);
-
-                return false;
-            }
-
-        }
-
-        public static bool InitMySQL(this Funq.Container container)
-        {
-            try
-            {
-                // Register the MySql Database Connection Factory
-                var mySqlConnectionString = ConfigurationManager.ConnectionStrings["MySQL"];
-                var mySqlFactory = new MySqlOrmLiteConnectionFactory(mySqlConnectionString.ConnectionString);
-                mySqlFactory.DialectProvider.UseUnicode = true;
-                container.Register<IMySqlOrmLiteConnectionFactory>(c => mySqlFactory);
-
-                // Create needed tables in MySql Server if they do not exist
-                using (var conn = mySqlFactory.OpenDbConnection())
-                {
-                    return conn.CreateWorldTable() && conn.CreateFortuneTable();
-                }
-            }
-            catch (Exception ex)
-            {
-                // Unregister failed database connection factory
-                container.Register<IMySqlOrmLiteConnectionFactory>(c => null);
-
-                return false;
-            }
-
-        }
-
-        public static bool InitPostgreSQL(this Funq.Container container)
-        {
-            try
-            {
-                // Register the PostgreSQL Database Connection Factory
-                var postgreSqlConnectionString = ConfigurationManager.ConnectionStrings["PostgreSQL"];
-                var postgreSqlFactory = new PostgreSqlOrmLiteConnectionFactory(postgreSqlConnectionString.ConnectionString);
-                postgreSqlFactory.DialectProvider.UseUnicode = true;
-                container.Register<IPostgreSqlOrmLiteConnectionFactory>(c => postgreSqlFactory);
-
-                // Create needed tables in PostgreSql Server if they do not exist
-                using (var conn = postgreSqlFactory.OpenDbConnection())
-                {
-                    return conn.CreateWorldTable() && conn.CreateFortuneTable();
-                }
-            }
-            catch (Exception ex)
-            {
-                // Unregister failed database connection factory
-                container.Register<IPostgreSqlOrmLiteConnectionFactory>(c => null);
-
-                return false;
-            }
-
-        }
-
-        public static bool InitSQLServer(this Funq.Container container)
-        {
-            try
-            {
-                // Register the Microsoft Sql Server Database Connection Factory
-                var sqlServerConnectionString = ConfigurationManager.ConnectionStrings["SQLServer"];
-                var sqlServerFactory = new SqlServerOrmLiteConnectionFactory(sqlServerConnectionString.ConnectionString);
-                sqlServerFactory.DialectProvider.UseUnicode = true;
-                container.Register<ISqlServerOrmLiteConnectionFactory>(c => sqlServerFactory);
-
-                // Create needed tables in Microsoft Sql Server if they do not exist
-                using (var conn = sqlServerFactory.OpenDbConnection())
-                {
-                    return conn.CreateWorldTable() && conn.CreateFortuneTable();
-                }
-            }
-            catch (Exception ex)
-            {
-                // Unregister failed database connection factory
-                container.Register<ISqlServerOrmLiteConnectionFactory>(c => null);
-
-                return false;
-            }
-
-        }
-
-        public static void InitDatabaseRoutes(this Funq.Container container, IServiceRoutes routes)
-        {
-            if (container.InitMongoDB())
-            {
-                routes.Add<MongoDBDbRequest>("/mongodb/db", "GET");
-                routes.Add<MongoDBQueriesRequest>("/mongodb/queries/{queries}", "GET");
-                routes.Add<MongoDBFortunesRequest>("/mongodb/fortunes", "GET");
-                routes.Add<MongoDBUpdatesRequest>("/mongodb/updates/{queries}", "GET");
-                routes.Add<MongoDBCachedDbRequest>("/mongodb/cached/db", "GET");
-            }
-
-            if (container.InitMySQL())
-            {
-                routes.Add<MySqlDbRequest>("/mysql/db", "GET");
-                routes.Add<MySqlQueriesRequest>("/mysql/queries/{queries}", "GET");
-                routes.Add<MySqlFortunesRequest>("/mysql/fortunes", "GET");
-                routes.Add<MySqlUpdatesRequest>("/mysql/updates/{queries}", "GET");
-                routes.Add<MySqlCachedDbRequest>("/mysql/cached/db", "GET");
-            }
-
-            if (container.InitPostgreSQL())
-            {
-                routes.Add<PostgreSqlDbRequest>("/postgresql/db", "GET");
-                routes.Add<PostgreSqlQueriesRequest>("/postgresql/queries/{queries}", "GET");
-                routes.Add<PostgreSqlFortunesRequest>("/postgresql/fortunes", "GET");
-                routes.Add<PostgreSqlUpdatesRequest>("/postgresql/updates/{queries}", "GET");
-                routes.Add<PostgreSqlCachedDbRequest>("/postgresql/cached/db", "GET");
-            }
-
-            if (container.InitSQLServer())
-            {
-                routes.Add<SqlServerDbRequest>("/sqlserver/db", "GET");
-                routes.Add<SqlServerQueriesRequest>("/sqlserver/queries/{queries}", "GET");
-                routes.Add<SqlServerFortunesRequest>("/sqlserver/fortunes", "GET");
-                routes.Add<SqlServerUpdatesRequest>("/sqlserver/updates/{queries}", "GET");
-                routes.Add<SqlServerCachedDbRequest>("/sqlserver/cached/db", "GET");
-            }
-        }
-
-        public static Feature GetDisabledFeatures()
-        {
-            try
-            {
-                var disabled = ConfigurationManager.AppSettings.Get("DisabledFeatures");
-
-                Feature d;
-                if (Enum.TryParse(disabled, true, out d))
-                    return d;
-
-                return Feature.None;
-            }
-            catch
-            {
-                return Feature.None;
-            }
-
-        }
-
-        /// <summary>
-        /// Method to config the Minimum number of Worker Threads per Logical Processor Count.
-        /// </summary>
-        /// <remarks>the Completion Port Threads are set to their defaults as there is no IO concerrency in our app</remarks>
-        public static void ConfigThreadPool()
-        {
-            string minTPLPSetting = ConfigurationManager.AppSettings["minWorkerThreadsPerLogicalProcessor"];
-
-            if (minTPLPSetting == null)
-                return;
-
-            int sysMinWorkerThreads, sysMinCompletionPortThreads;
-            ThreadPool.GetMinThreads(out sysMinWorkerThreads, out sysMinCompletionPortThreads);
-
-            int newMinWorkerThreadsPerCPU = Math.Max(1, Convert.ToInt32(minTPLPSetting));
-                
-            var minWorkerThreads = Environment.ProcessorCount * newMinWorkerThreadsPerCPU;
-            ThreadPool.SetMinThreads(minWorkerThreads, sysMinCompletionPortThreads);
-        }
-    }
-}

+ 0 - 8
frameworks/CSharp/servicestack/src/DbFactories/IMySqlOrmLiteConnectionFactory.cs

@@ -1,8 +0,0 @@
-using System;
-
-using ServiceStack.OrmLite;
-
-namespace ServiceStackBenchmark
-{
-    public interface IMySqlOrmLiteConnectionFactory : IDbConnectionFactory { }
-}

+ 0 - 8
frameworks/CSharp/servicestack/src/DbFactories/IPostgreSqlOrmLiteConnectionFactory.cs

@@ -1,8 +0,0 @@
-using System;
-
-using ServiceStack.OrmLite;
-
-namespace ServiceStackBenchmark
-{
-    public interface IPostgreSqlOrmLiteConnectionFactory : IDbConnectionFactory { }
-}

+ 0 - 8
frameworks/CSharp/servicestack/src/DbFactories/ISqlServerOrmLiteConnectionFactory.cs

@@ -1,8 +0,0 @@
-using System;
-
-using ServiceStack.OrmLite;
-
-namespace ServiceStackBenchmark
-{
-    public interface ISqlServerOrmLiteConnectionFactory : IDbConnectionFactory { }
-}

+ 0 - 12
frameworks/CSharp/servicestack/src/DbFactories/MySqlOrmLiteConnectionFactory.cs

@@ -1,12 +0,0 @@
-using System;
-
-using ServiceStack.OrmLite;
-using ServiceStack.OrmLite.MySql;
-
-namespace ServiceStackBenchmark
-{
-    public class MySqlOrmLiteConnectionFactory : OrmLiteConnectionFactory, IMySqlOrmLiteConnectionFactory
-    {
-        public MySqlOrmLiteConnectionFactory(string s) : base(s, MySqlDialectProvider.Instance) { }
-    }
-}

+ 0 - 29
frameworks/CSharp/servicestack/src/DbFactories/PostgreSqlOrmLiteConnectionFactory.cs

@@ -1,29 +0,0 @@
-using System;
-
-using ServiceStack.OrmLite;
-using ServiceStack.OrmLite.PostgreSQL;
-
-namespace ServiceStackBenchmark
-{
-    public class PostgreSqlOrmLiteConnectionFactory : OrmLiteConnectionFactory, IPostgreSqlOrmLiteConnectionFactory
-    {
-        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();
-        }
-
-    }
-
-}

+ 0 - 12
frameworks/CSharp/servicestack/src/DbFactories/SqlServerOrmLiteConnectionFactory.cs

@@ -1,12 +0,0 @@
-using System;
-
-using ServiceStack.OrmLite;
-using ServiceStack.OrmLite.SqlServer;
-
-namespace ServiceStackBenchmark
-{
-    public class SqlServerOrmLiteConnectionFactory : OrmLiteConnectionFactory, ISqlServerOrmLiteConnectionFactory
-    {
-        public SqlServerOrmLiteConnectionFactory(string s) : base(s, SqlServerOrmLiteDialectProvider.Instance) { }
-    }
-}

+ 0 - 1
frameworks/CSharp/servicestack/src/Global.asax

@@ -1 +0,0 @@
-<%@ Application Codebehind="Global.asax.cs" Inherits="ServiceStackBenchmark.Global" Language="C#" %>

+ 0 - 22
frameworks/CSharp/servicestack/src/Global.asax.cs

@@ -1,22 +0,0 @@
-using System;
-using System.Threading;
-using System.Web;
-
-namespace ServiceStackBenchmark
-{
-    public class Global : HttpApplication
-    {
-        protected void Application_Start(object sender, EventArgs e)
-        {
-            AppHostConfigHelper.ConfigThreadPool();
-
-            new AppHost().Init();
-        }
-
-        protected void Application_BeginRequest(object src, EventArgs e)
-        { }
-
-        protected void Application_EndRequest(object src, EventArgs e)
-        { }
-    }
-}

+ 0 - 114
frameworks/CSharp/servicestack/src/Model/Fortune.cs

@@ -1,114 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Data;
-using System.Linq;
-
-using MongoDB.Driver;
-using MongoDB.Driver.Builders;
-
-using ServiceStack.DataAnnotations;
-using ServiceStack.Html;
-using ServiceStack.OrmLite;
-using ServiceStack.Text;
-
-namespace ServiceStackBenchmark.Model
-{
-    [Alias("Fortune")]
-    public class Fortune : IComparable<Fortune>
-    {
-        [PrimaryKey()]
-        public int id { get; set; }
-
-        [StringLength(100)]
-        public string message { get; set; }
-
-        public int CompareTo(Fortune fortune)
-        {
-            return message.CompareTo(fortune.message);
-        }
-
-    }
-
-    public static class FortuneMethods
-    {
-
-        public static List<Fortune> GetFortunes(this IDbConnection db)
-        {
-            return db.Select<Fortune>();
-        }
-
-        public static List<Fortune> GetFortunes(this MongoDatabase db)
-        {
-            var collection = db.GetCollection<Fortune>("Fortune");
-            return collection.FindAll().ToList();
-        }
-
-        public static bool CreateFortuneTable(this IDbConnection db)
-        {
-            if (db.TableExists("Fortune"))
-                return true;
-
-            try
-            {
-                db.CreateTable<Fortune>();
-
-                // Populate the collection
-                db.Insert<Fortune>(GetFortunes().ToArray());
-
-                return true;
-            }
-            catch
-            {
-                return false;
-            }
-        }
-
-        public static bool CreateFortuneTable(this MongoDatabase db)
-        {
-            if (db.CollectionExists("Fortune"))
-                return true;
-
-            try
-            {
-                // Populate the collection
-                var collection = db.GetCollection<Fortune>("Fortune");
-                collection.InsertBatch(GetFortunes());
-
-                return true;
-            }
-            catch
-            {
-                return false;
-            }
-        }
-
-        private static IEnumerable<Fortune> GetFortunes()
-        {
-            var fortunes = new List<Fortune>();
-            fortunes.Add(new Fortune() { id = 1, message = "fortune: No such file or directory" });
-            fortunes.Add(new Fortune() { id = 2, message = "A computer scientist is someone who fixes things that aren't broken." });
-            fortunes.Add(new Fortune() { id = 3, message = "After enough decimal places, nobody gives a damn." });
-            fortunes.Add(new Fortune() { id = 4, message = "A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1" });
-            fortunes.Add(new Fortune() { id = 5, message = "A computer program does what you tell it to do, not what you want it to do." });
-            fortunes.Add(new Fortune() { id = 6, message = "Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen" });
-            fortunes.Add(new Fortune() { id = 7, message = "Any program that runs right is obsolete." });
-            fortunes.Add(new Fortune() { id = 8, message = "A list is only as strong as its weakest link. — Donald Knuth" });
-            fortunes.Add(new Fortune() { id = 9, message = "Feature: A bug with seniority." });
-            fortunes.Add(new Fortune() { id = 10, message = "Computers make very fast, very accurate mistakes." });
-            fortunes.Add(new Fortune() { id = 11, message = "<script>alert(\"This should not be displayed in a browser alert box.\");</script>" });
-            fortunes.Add(new Fortune() { id = 12, message = "フレームワークのベンチマーク" });
-            return 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>";
-            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>";
-            return page;
-        }
-
-    }
-}

+ 0 - 211
frameworks/CSharp/servicestack/src/Model/World.cs

@@ -1,211 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-
-using ServiceStack.CacheAccess;
-using ServiceStack.Common;
-using ServiceStack.DataAnnotations;
-using ServiceStack.OrmLite;
-
-using MongoDB.Driver;
-using MongoDB.Driver.Builders;
-
-namespace ServiceStackBenchmark.Model
-{
-    [Alias("World")]
-    public class World
-    {
-        [PrimaryKey()]
-        public int id { get; set; }
-        public int randomNumber { get; set; }
-    }
-
-    public static class WorldMethods
-    {
-
-        public static World GetWorld(this IDbConnection db, int id)
-        {
-            // retrieve the World with passed id
-            return db.GetById<World>(id);
-        }
-
-        public static World GetWorld(this MongoDatabase db, int id)
-        {
-            // retrieve the World with passed id
-            var collection = db.GetCollection<World>("World");
-            return collection.FindOne(Query<World>.EQ(w => w.id, id));
-        }
-
-        public static List<World> GetWorlds(this IDbConnection db)
-        {
-            // retrieve all Worlds
-            return db.Select<World>();
-        }
-
-        public static List<World> GetWorlds(this MongoDatabase db)
-        {
-            // retrieve all Worlds
-            var collection = db.GetCollection<World>("World");
-            return collection.FindAll().ToList();
-        }
-
-        public static List<World> GetWorlds(this IDbConnection db, IEnumerable<int> ids)
-        {
-            // retrieve the Worlds included passed ids
-            return db.GetByIds<World>(ids);
-        }
-
-        public static List<World> GetWorlds(this MongoDatabase db, IEnumerable<int> ids)
-        {
-            // retrieve the Worlds included passed ids
-            var collection = db.GetCollection<World>("World");
-            return collection.Find(Query<World>.In(w => w.id, ids)).ToList();
-        }
-
-        public static List<World> UpdateWorlds(this IDbConnection db, IEnumerable<int> ids)
-        {
-            // get the worlds for the passed ids
-            var worlds = db.GetByIds<World>(ids);
-
-            // concurrently update each world with a new random number
-            Parallel.ForEach(worlds, w =>
-            {
-                lock (worlds)
-                {
-                    w.randomNumber = SafeRandom.Instance.Next(0, 10000) + 1;
-                }
-            });
-
-            // update the dataase with the above changes
-            db.UpdateAll<World>(worlds);
-
-            // return updated collection
-            return worlds;
-        }
-
-        public static List<World> UpdateWorlds(this MongoDatabase db, IEnumerable<int> ids, int recordCount)
-        {
-            var collection = db.GetCollection<World>("World");
-
-            // get the worlds for the passed ids
-            var worlds = collection.Find(Query<World>.In(w => w.id, ids)).ToList();
-
-            // concurrently update each world with a new random number
-            Parallel.ForEach(worlds, w =>
-            {
-                lock (worlds)
-                {
-                    w.randomNumber = SafeRandom.Instance.Next(0, recordCount) + 1;
-                }
-            });
-
-            // TODO: look into how to make this a single statement
-            foreach (var w in worlds)
-            {
-                // update the database with the above changes
-                collection.Update(
-                    Query<World>.EQ(t => t.id, w.id),
-                    Update<World>.Set(t => t.randomNumber, w.randomNumber));
-            }
-
-            // return updated collection
-            return worlds;
-        }
-
-        public static void CacheAllWorlds(this IDbConnection db, ICacheClient cache)
-        {
-            cache.FlushAll();
-
-            // concurrently create a list of world ids
-            var worlds = db.GetWorlds();
-
-            Parallel.ForEach<World>(worlds, w =>
-            {
-                var cacheKey = UrnId.Create<World>("Id", w.id.ToString());
-
-                cache.Set<World>(cacheKey, w);
-            });
-        }
-
-        public static void CacheAllWorlds(this MongoDatabase db, ICacheClient cache, string dbType)
-        {
-            cache.FlushAll();
-
-            // concurrently create a list of world ids
-            var worlds = db.GetWorlds();
-
-            Parallel.ForEach<World>(worlds, w =>
-            {
-                var cacheKey = UrnId.CreateWithParts<World>(new string[] { dbType, w.id.ToString() });
-
-                cache.Set<World>(cacheKey, w);
-            });
-        }
-
-        public static bool CreateWorldTable(this IDbConnection db)
-        {
-            // only create table if it does not already exist
-            if (db.TableExists("World"))
-                return true;
-
-            try
-            {
-                // create the database table based on model
-                db.CreateTable<World>();
-
-                // populate the table
-                var worlds = new List<World>(10000);
-                Parallel.For(0, 10000, i =>
-                    {
-                        lock (worlds)
-                        {
-                            worlds.Add(new World() { id = i, randomNumber = SafeRandom.Instance.Next(0, 10000) + 1 });
-                        }
-
-                    });
-
-                // insert new records into database
-                db.Insert<World>(worlds.ToArray());
-
-                return true;
-            }
-            catch
-            {
-                return false;
-            }
-        }
-
-        public static bool CreateWorldTable(this MongoDatabase db)
-        {
-            // only create table if it does not already exist
-            if (db.CollectionExists("World"))
-                return true;
-
-            try
-            {
-                // populate the table
-                var worlds = new List<World>(10000);
-                Parallel.For(0, 10000, i =>
-                {
-                    lock (worlds)
-                    {
-                        worlds.Add(new World() { id = i, randomNumber = SafeRandom.Instance.Next(0, 10000) + 1 });
-                    }
-
-                });
-
-                // insert new records into database
-                var collection = db.GetCollection<World>("World");
-                collection.InsertBatch(worlds);
-
-                return true;
-            }
-            catch
-            {
-                return false;
-            }
-        }
-    }
-}

+ 0 - 6
frameworks/CSharp/servicestack/src/NuGet.config

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
-  <config>
-    <add key="repositoryPath" value="..\lib" />
-  </config>
-</configuration>

+ 0 - 33
frameworks/CSharp/servicestack/src/Properties/AssemblyInfo.cs

@@ -1,33 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("ServiceStackBenchmark.Properties")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ServiceStackBenchmark.Properties")]
-[assembly: AssemblyCopyright("Copyright ©  2013")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible 
-// to COM components.  If you need to access a type in this assembly from 
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("b93603f5-a9d3-483e-b26b-1e6fc272c078")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 0 - 30
frameworks/CSharp/servicestack/src/Properties/PublishProfiles/IIS.pubxml

@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-This file is used by the publish/package process of your Web project. You can customize the behavior of this process
-by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121. 
--->
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <WebPublishMethod>MSDeploy</WebPublishMethod>
-    <MSDeployServiceURL>localhost</MSDeployServiceURL>
-    <DeployIisAppPath>Benchmarks</DeployIisAppPath>
-    <RemoteSitePhysicalPath />
-    <SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
-    <MSDeployPublishMethod>InProc</MSDeployPublishMethod>
-    <UserName />
-    <_SavePWD>False</_SavePWD>
-    <PublishDatabaseSettings>
-    </PublishDatabaseSettings>
-    <LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
-    <LastUsedPlatform>x64</LastUsedPlatform>
-    <ExcludeApp_Data>True</ExcludeApp_Data>
-    <EnableMSDeployBackup>False</EnableMSDeployBackup>
-    <SiteUrlToLaunchAfterPublish>/</SiteUrlToLaunchAfterPublish>
-    <PrecompileBeforePublish>True</PrecompileBeforePublish>
-    <EnableUpdateable>False</EnableUpdateable>
-    <DebugSymbols>False</DebugSymbols>
-    <WDPMergeOption>DonotMerge</WDPMergeOption>
-  </PropertyGroup>
-  <ItemGroup>
-  </ItemGroup>
-</Project>

+ 0 - 72
frameworks/CSharp/servicestack/src/SafeRandom.cs

@@ -1,72 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace ServiceStackBenchmark
-{
-    internal sealed class SafeRandom
-    {
-        private static volatile SafeRandom instance;
-
-        private static object syncRoot = new object();
-
-        private static Random random;
-
-        private SafeRandom()
-        {
-            random = new Random();
-        }
-
-        public int Next()
-        {
-            int result;
-
-            lock (random)
-            {
-                result = random.Next();
-            }
-            return result;
-        }
-
-        public int Next(int maxValue)
-        {
-            int result;
-
-            lock (random)
-            {
-                result = random.Next(maxValue);
-            }
-            return result;
-        }
-
-        public int Next(int minValue, int maxValue)
-        {
-            int result;
-
-            lock (random)
-            {
-                result = random.Next(minValue, maxValue);
-            }
-            return result;
-        }
-
-        public static SafeRandom Instance
-        {
-            get
-            {
-                if (instance == null)
-                {
-                    lock (syncRoot)
-                    {
-                        if (instance == null)
-                        {
-                            instance = new SafeRandom();
-                        }
-                    }
-                }
-
-                return instance;
-            }
-        }
-    }
-}

+ 0 - 38
frameworks/CSharp/servicestack/src/SelfHost/App.config

@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
-  <startup>
-    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
-  </startup>
-  <connectionStrings>
-    <add name="MongoDB" connectionString="mongodb://localhost" />
-    <add name="MySQL" connectionString="server=localhost; user id=benchmarkdbuser; password=benchmarkdbpass; database=hello_world" providerName="MySql.Data.MySqlClient" />
-    <add name="PostgreSQL" connectionString="server=localhost; user id=benchmarkdbuser; password=benchmarkdbpass; database=hello_world" providerName="Npgsql" />
-    <!-- Set max pool size to SQL Server's default max_connections value. In practice, we don't seem to be getting close to the max at all. -->
-    <add name="SQLServer" connectionString="server=localhost; user id=benchmarkdbuser; password=B3nchmarkDBPass; database=hello_world; max pool size=32767" providerName="System.Data.SqlClient" />
-  </connectionStrings>
-  <appSettings>
-    <!-- To fully saturate the CPUs, we need to allow the .NET thread pool to create many threads
-         when a large burst of requests come in. We do this by boosting the minWorkerThreads value
-         from the default of 1 per logical processor to 40 per logical processor. This seems to be
-         a little conservative as http://support.microsoft.com/kb/821268 recommends 50.-->
-    <add key="minWorkerThreadsPerLogicalProcessor" value="40" />
-    <!-- Disable ServiceStack features -->
-    <add key="DisabledFeatures" value="MetaData, Soap, Soap11, Soap12" />
-  </appSettings>
-  <runtime>
-    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
-      <dependentAssembly>
-        <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-6.7.4.0" newVersion="6.7.4.0" />
-      </dependentAssembly>
-      <dependentAssembly>
-        <assemblyIdentity name="Npgsql" publicKeyToken="5d8b90d52f46fda7" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-2.0.13.91" newVersion="2.0.13.91" />
-      </dependentAssembly>
-      <dependentAssembly>
-        <assemblyIdentity name="AWSSDK" publicKeyToken="9f476d3089b52be3" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-2.0.0.4" newVersion="2.0.0.4" />
-      </dependentAssembly>
-    </assemblyBinding>
-  </runtime>
-</configuration>

+ 0 - 85
frameworks/CSharp/servicestack/src/SelfHost/AppHostSelfHelper.cs

@@ -1,85 +0,0 @@
-using System;
-using System.Linq;
-using System.Net;
-using System.Collections.Generic;
-using System.Diagnostics;
-
-namespace ServiceStackBenchmark
-{
-    public static class AppHostSelfHelper
-    {
-        public static bool IsMono()
-        {
-            return Type.GetType("Mono.Runtime") != null;
-        }
-
-        public static void StartListening(this AppSelfHost appHost, string urlBase)
-        {
-            var addedURLToACL = false;
-
-            try
-            {
-                appHost.Start(urlBase);
-            }
-            catch (HttpListenerException ex)
-            {
-                if (IsMono())
-                    throw ex;
-
-                if (ex.ErrorCode == 5)
-                {
-                    AppHostSelfHelper.AddAddress(urlBase);
-                    addedURLToACL = true;
-                    appHost.Start(urlBase);
-                }
-            }
-
-            Console.WriteLine("AppHost Created at {0}, listening on {1}", DateTime.Now, urlBase);
-            Console.WriteLine("Press <Esc> to stop.");
-            do { } while (Console.ReadKey(true).Key != ConsoleKey.Escape);
-
-            if (addedURLToACL)
-                AppHostSelfHelper.DeleteAddress(urlBase);
-        }
-
-
-        #region Methods to Handle URL Listening with ACL Permissions
-
-        public static void AddAddress(string address)
-        {
-            AddAddress(address, Environment.UserDomainName, Environment.UserName);
-        }
-
-        public static void AddAddress(string address, string domain, string user)
-        {
-            string args = string.Format(@"http add urlacl url={0} user={1}\{2} listen=yes", address, domain, user);
-
-            var psi = new ProcessStartInfo("netsh", args)
-            {
-                Verb = "runas",
-                CreateNoWindow = true,
-                WindowStyle = ProcessWindowStyle.Hidden,
-                UseShellExecute = true
-            };
-
-            Process.Start(psi).WaitForExit();
-        }
-
-        public static void DeleteAddress(string address)
-        {
-            string args = string.Format(@"http delete urlacl url={0}", address);
-
-            var psi = new ProcessStartInfo("netsh", args)
-            {
-                CreateNoWindow = true,
-                WindowStyle = ProcessWindowStyle.Hidden,
-                UseShellExecute = true
-            };
-
-            Process.Start(psi).WaitForExit();
-        }
-
-
-        #endregion
-    }
-}

+ 0 - 55
frameworks/CSharp/servicestack/src/SelfHost/AppSelfHost.cs

@@ -1,55 +0,0 @@
-using System;
-using System.Linq;
-using System.Collections.Generic;
-using ServiceStack;
-using ServiceStack.CacheAccess;
-using ServiceStack.CacheAccess.Providers;
-using ServiceStack.Common;
-using ServiceStack.Common.Web;
-using ServiceStack.Redis;
-using ServiceStack.ServiceHost;
-using ServiceStack.WebHost.Endpoints;
-using ServiceStack.WebHost.Endpoints.Formats;
-
-namespace ServiceStackBenchmark
-{
-    public class AppSelfHost : AppHostHttpListenerBase
-    {
-
-        public AppSelfHost() : base("ServiceStackBenchmark", typeof(AppHost).Assembly) { }
-
-        public override void Configure(Funq.Container container)
-        {
-            ServiceStack.Text.JsConfig.EmitCamelCaseNames = true;
-
-            // Remove some unused features that by default are included
-            Plugins.RemoveAll(p => p is CsvFormat);
-            Plugins.RemoveAll(p => p is MetadataFeature);
-
-            // Get disable features specified in Config file (i.e. Soap, Metadata, etc.)
-            var disabled = AppHostConfigHelper.GetDisabledFeatures();
-
-            // Construct Service Endpoint Host Configuration store
-            var config = new EndpointHostConfig
-            {
-                DefaultContentType = ContentType.Json,
-                WriteErrorsToResponse = false,
-                EnableFeatures = Feature.All.Remove(disabled),
-                AppendUtf8CharsetOnContentTypes = new HashSet<string> { ContentType.Html },
-            };
-
-            // Apply configuration
-            SetConfig(config);
-
-            // Initialize Databases & associated Routes
-            container.InitDatabaseRoutes(Routes);
-
-            // Register Cache Clients
-            container.Register<ICacheClient>(new MemoryCacheClient());
-
-            // Register Redis Client Manager
-            container.Register<IRedisClientsManager>(c =>
-                new PooledRedisClientManager("localhost:6379"));
-        }
-    }
-}

+ 0 - 37
frameworks/CSharp/servicestack/src/SelfHost/Program.cs

@@ -1,37 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-using ServiceStackBenchmark;
-
-namespace ServiceStackBenchmark.SelfHost
-{
-    class Program
-    {
-        static void Main(string[] args)
-        {
-            var listeningOn = args.Length == 0 ? "http://*:1337/" : args[0];
-
-            using (var appHost = new AppSelfHost())
-            {
-                try
-                {
-                    appHost.Init();
-
-                    // TODO: switch to Start after the next ServiceStack deployment (added to framework on commit #806)
-                    appHost.StartListening(listeningOn);
-                }
-                catch (Exception ex)
-                {
-                    Console.WriteLine("ERROR: {0}: {1}", ex.GetType().Name, ex.Message);
-                }
-                finally
-                {
-                    appHost.Stop();
-                }
-            }
-
-            Console.WriteLine("AppHost has finished");
-        }
-    }
-}

+ 0 - 36
frameworks/CSharp/servicestack/src/SelfHost/Properties/AssemblyInfo.cs

@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("ServiceStackBenchmark.SelfHost")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ServiceStackBenchmark.SelfHost")]
-[assembly: AssemblyCopyright("Copyright ©  2013")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible 
-// to COM components.  If you need to access a type in this assembly from 
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("0c254029-d754-40d1-a2a6-4c0ef648417f")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers 
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 0 - 154
frameworks/CSharp/servicestack/src/SelfHost/ServiceStackBenchmark.SelfHost.csproj

@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{64B2E432-0D03-40CE-9086-81FC7190D9A3}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>ServiceStackBenchmark.SelfHost</RootNamespace>
-    <AssemblyName>ServiceStackBenchmark.SelfHost</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\src\</SolutionDir>
-    <RestorePackages>true</RestorePackages>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup>
-    <ApplicationManifest>app.manifest</ApplicationManifest>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>bin\x86\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x86</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <Prefer32Bit>true</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
-    <OutputPath>bin\x86\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x86</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <Prefer32Bit>true</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>bin\x64\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <Prefer32Bit>true</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
-    <OutputPath>bin\x64\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <Prefer32Bit>true</Prefer32Bit>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="ServiceStack, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\lib\ServiceStack.3.9.59\lib\net35\ServiceStack.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.Common, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\lib\ServiceStack.Common.3.9.59\lib\net35\ServiceStack.Common.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.Interfaces, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\lib\ServiceStack.Common.3.9.59\lib\net35\ServiceStack.Interfaces.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.OrmLite, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\lib\ServiceStack.OrmLite.SqlServer.3.9.59\lib\ServiceStack.OrmLite.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.OrmLite.SqlServer, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\lib\ServiceStack.OrmLite.SqlServer.3.9.59\lib\ServiceStack.OrmLite.SqlServer.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.Redis, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\lib\ServiceStack.Redis.3.9.59\lib\net35\ServiceStack.Redis.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.ServiceInterface, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\lib\ServiceStack.3.9.59\lib\net35\ServiceStack.ServiceInterface.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.Text, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\lib\ServiceStack.Text.3.9.59\lib\net35\ServiceStack.Text.dll</HintPath>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="AppHostSelfHelper.cs" />
-    <Compile Include="AppSelfHost.cs" />
-    <Compile Include="Program.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="App.config" />
-    <None Include="app.manifest" />
-    <None Include="packages.config" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\ServiceStackBenchmark.csproj">
-      <Project>{80cf41ab-455b-4eb9-bfcc-3f8c4e1d8354}</Project>
-      <Name>ServiceStackBenchmark</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <AvailableItemName Include="RootContent">
-      <Visible>false</Visible>
-    </AvailableItemName>
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
-  <Target Name="AfterBuild">
-    <Copy DestinationFolder="$(OutputPath)" SourceFiles="@(RootContent)" SkipUnchangedFiles="true" />
-  </Target>
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>

+ 0 - 55
frameworks/CSharp/servicestack/src/SelfHost/app.manifest

@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <assemblyIdentity version="1.0.0.0" name="ServiceStackBenchmark.SelfHost"/>
-  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
-    <security>
-      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
-        <!-- UAC Manifest Options
-            If you want to change the Windows User Account Control level replace the 
-            requestedExecutionLevel node with one of the following.
-
-        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
-        <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
-        <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />
-
-            Specifying requestedExecutionLevel node will disable file and registry virtualization.
-            If you want to utilize File and Registry Virtualization for backward 
-            compatibility then delete the requestedExecutionLevel node.
-        -->
-        <!-- requestedExecutionLevel level="requireAdministrator" uiAccess="true" / -->
-      </requestedPrivileges>
-    </security>
-  </trustInfo>
-
-  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
-    <application>
-      <!-- A list of all Windows versions that this application is designed to work with. 
-      Windows will automatically select the most compatible environment.-->
-
-      <!-- If your application is designed to work with Windows Vista, uncomment the following supportedOS node-->
-      <!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>-->
-
-      <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
-      <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
-
-      <!-- If your application is designed to work with Windows 8, uncomment the following supportedOS node-->
-      <!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>-->
-
-    </application>
-  </compatibility>
-
-  <!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
-  <!-- <dependency>
-    <dependentAssembly>
-      <assemblyIdentity
-          type="win32"
-          name="Microsoft.Windows.Common-Controls"
-          version="6.0.0.0"
-          processorArchitecture="*"
-          publicKeyToken="6595b64144ccf1df"
-          language="*"
-        />
-    </dependentAssembly>
-  </dependency>-->
-
-</asmv1:assembly>

+ 0 - 8
frameworks/CSharp/servicestack/src/SelfHost/packages.config

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="ServiceStack" version="5.9.2" targetFramework="net45" />
-  <package id="ServiceStack.Common" version="3.9.59" targetFramework="net45" />
-  <package id="ServiceStack.OrmLite.SqlServer" version="3.9.59" targetFramework="net45" />
-  <package id="ServiceStack.Redis" version="3.9.59" targetFramework="net45" />
-  <package id="ServiceStack.Text" version="3.9.59" targetFramework="net45" />
-</packages>

+ 0 - 172
frameworks/CSharp/servicestack/src/Service/MongoDBService.cs

@@ -1,172 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-using ServiceStack.Common;
-using ServiceStack.ServiceHost;
-using ServiceStack.ServiceInterface;
-
-using ServiceStackBenchmark.Model;
-
-using MongoDB.Bson;
-using MongoDB.Driver.Builders;
-using MongoDB.Driver;
-
-namespace ServiceStackBenchmark
-{
-
-    #region MongoDB Service Requests
-
-    [Api("Test #2 using Service Stack and MongoDB")]
-    public class MongoDBDbRequest : IReturn<World>
-    { }
-
-    [Api("Test #3 using Service Stack and MongoDB")]
-    public class MongoDBQueriesRequest : IReturn<List<World>>
-    {
-        [ApiMember(Name = "queries", Description = "Number of Queries to Execute", DataType = "int", IsRequired = true)]
-        [ApiAllowableValues("queries", 1, 500)]
-        public int queries { get; set; }
-    }
-
-    [Api("Test #4 using Service Stack, and MongoDB")]
-    public class MongoDBFortunesRequest : IReturn<List<Fortune>>
-    { }
-
-    [Api("Test #5 using Service Stack, and MongoDB")]
-    public class MongoDBUpdatesRequest : IReturn<List<World>>
-    {
-        [ApiMember(Name = "queries", Description = "Number of Queries to Execute", DataType = "int", IsRequired = true)]
-        [ApiAllowableValues("queries", 1, 500)]
-        public int queries { get; set; }
-    }
-
-    [Api("Test #7 using Service Stack, and MongoDB with Caching")]
-    public class MongoDBCachedDbRequest : IReturn<World>
-    { }
-
-    #endregion
-
-    /// <summary>Service Stack tests using MongoDB provider</summary>
-    public class MongoDBService : Service
-    {
-        private const string dbType = "MongoDB";
-
-        #region Public Properties
-
-        public MongoDatabase db { get; set; }
-
-        #endregion
-
-        #region Public Service Methods
-
-        public object Get(MongoDBDbRequest request)
-        {
-            // get a random world id
-            var id = SafeRandom.Instance.Next(0, 10000) + 1;
-
-            // retrieve world from database
-            return db.GetWorld(id);
-        }
-
-        public object Get(MongoDBQueriesRequest request)
-        {
-            // limit queries to be between 1 and 500 iterations
-            var worldCount = Math.Max(1, Math.Min(500, (int)request.queries));
-
-            // concurrently create a list of random world ids to retrieve
-            var ids = new List<int>();
-            Parallel.For(0, worldCount, i =>
-            {
-                lock (ids)
-                {
-                    ids.Add(SafeRandom.Instance.Next(0, 10000) + 1);
-                }
-            });
-
-            // retrieve worlds associated with ids
-            return db.GetWorlds(ids);
-        }
-
-        [AddHeader(ContentType = ServiceStack.Common.Web.ContentType.Html)]
-        public object Get(MongoDBFortunesRequest request)
-        {
-            // retrieve fortunes from database
-            var fortunes = db.GetFortunes();
-
-            // add additional fortune record
-            fortunes.Add(new Fortune { id = 0, message = "Additional fortune added at request time." });
-
-            // sort fortunes
-            fortunes.Sort();
-
-            // construct HTML page using template and return
-            return FortuneMethods.ToHtml(fortunes);
-        }
-
-        public object Get(MongoDBUpdatesRequest request)
-        {
-            // limit queries to be between 1 and 500 iterations
-            var worldCount = Math.Max(1, Math.Min(500, (int)request.queries));
-
-            // concurrently create a list of random world ids to update
-            var ids = new List<int>(worldCount);
-            Parallel.For(0, worldCount, i =>
-            {
-                lock (ids)
-                {
-                    ids.Add(SafeRandom.Instance.Next(0, 10000) + 1);
-                }
-            });
-
-            // purge cache client
-            Cache.FlushAll();
-
-            // update the worlds
-            return db.UpdateWorlds(ids, 10000);
-        }
-
-        public object Get(MongoDBCachedDbRequest request)
-        {
-            // get a random world id
-            var id = SafeRandom.Instance.Next(0, 10000) + 1;
-
-            // create the cache key for the random world id
-            var cacheKey = UrnId.CreateWithParts<World>(new string[] { dbType, id.ToString() });
-
-            // if world is cached, return it
-            var world = Cache.Get<World>(cacheKey);
-            if (world != null)
-                return world;
-
-            // get all of the worlds form the database            
-            var worlds = db.GetWorlds();
-
-            // construct a cache dictionary
-            var cacheDict = new Dictionary<string, World>();
-            Parallel.ForEach(worlds, w =>
-            {
-                // collect the current result
-                if (w.id == id)
-                    world = w;
-
-                // add world to cache dictionary
-                var key = UrnId.CreateWithParts<World>(new string[] { dbType, w.id.ToString() });
-                lock (cacheDict)
-                {
-                    cacheDict.Add(key, w);
-                }
-            });
-
-            // populate cache
-            Cache.SetAll<World>(cacheDict);
-
-            // return current request
-            return world;
-        }
-
-        #endregion
-    }
-
-}

+ 0 - 186
frameworks/CSharp/servicestack/src/Service/MySqlService.cs

@@ -1,186 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-using ServiceStack.Common;
-using ServiceStack.ServiceHost;
-using ServiceStack.ServiceInterface;
-
-using ServiceStackBenchmark.Model;
-
-namespace ServiceStackBenchmark
-{
-
-    #region MySQL Service Requests
-
-    [Api("Test #2 using Service Stack, ORMLite, and MySQL")]
-    public class MySqlDbRequest : IReturn<World>
-    { }
-
-    [Api("Test #3 using Service Stack, ORMLite, and MySQL")]
-    public class MySqlQueriesRequest : IReturn<List<World>>
-    {
-        [ApiMember(Name = "queries", Description = "Number of Queries to Execute", DataType = "int", IsRequired = true)]
-        [ApiAllowableValues("queries", 1, 500)]
-        public int queries { get; set; }
-    }
-
-    [Api("Test #4 using Service Stack, ORMLite, and MySQL")]
-    public class MySqlFortunesRequest : IReturn<List<Fortune>>
-    { }
-
-    [Api("Test #5 using Service Stack, ORMLite, and MySQL")]
-    public class MySqlUpdatesRequest : IReturn<List<World>>
-    {
-        [ApiMember(Name = "queries", Description = "Number of Queries to Execute", DataType = "int", IsRequired = true)]
-        [ApiAllowableValues("queries", 1, 500)]
-        public int queries { get; set; }
-    }
-
-    [Api("Test #7 using Service Stack, ORMLite, and MySQL with Caching")]
-    public class MySqlCachedDbRequest : IReturn<World>
-    { }
-
-    #endregion
-
-    /// <summary>Service Stack tests using MySQL provider and ORMLite</summary>
-    public class MySqlService : Service
-    {
-        private const string dbType = "MySql";
-
-        #region Public Properties
-
-        public IMySqlOrmLiteConnectionFactory dbFactory { get; set; }
-
-        #endregion
-
-        #region Public Service Methods
-
-        public object Get(MySqlDbRequest request)
-        {
-            // get a random world id
-            var id = SafeRandom.Instance.Next(0, 10000) + 1;
-
-            // retrieve world from database
-            using (var db = dbFactory.OpenDbConnection())
-            {
-                return db.GetWorld(id);
-            }
-        }
-
-        public object Get(MySqlQueriesRequest request)
-        {
-            // limit queries to be between 1 and 500 iterations
-            var worldCount = Math.Max(1, Math.Min(500, (int)request.queries));
-
-            // concurrently create a list of random world ids to retrieve
-            var ids = new List<int>();
-            Parallel.For(0, worldCount, i =>
-            {
-                lock (ids)
-                {
-                    ids.Add(SafeRandom.Instance.Next(0, 10000) + 1);
-                }
-            });
-
-            // retrieve worlds associated with ids
-            using (var db = dbFactory.OpenDbConnection())
-            {
-                return db.GetWorlds(ids);
-            }
-        }
-
-        [AddHeader(ContentType = ServiceStack.Common.Web.ContentType.Html)]
-        public object Get(MySqlFortunesRequest request)
-        {
-            var fortunes = new List<Fortune>();
-
-            // retrieve fortunes from database
-            using (var db = dbFactory.OpenDbConnection())
-            {
-                fortunes = db.GetFortunes();
-            }
-
-            // add additional fortune record
-            fortunes.Add(new Fortune { id = 0, message = "Additional fortune added at request time." });
-
-            // sort fortunes
-            fortunes.Sort();
-
-            // construct HTML page using template and return
-            return FortuneMethods.ToHtml(fortunes);
-        }
-
-        public object Get(MySqlUpdatesRequest request)
-        {
-            // limit queries to be between 1 and 500 iterations
-            var worldCount = Math.Max(1, Math.Min(500, (int)request.queries));
-
-            // concurrently create a list of random world ids to update
-            var ids = new List<int>(worldCount);
-            Parallel.For(0, worldCount, i =>
-            {
-                lock (ids)
-                {
-                    ids.Add(SafeRandom.Instance.Next(0, 10000) + 1);
-                }
-            });
-
-            // purge cache client
-            Cache.FlushAll();
-
-            // update the worlds
-            using (var db = dbFactory.OpenDbConnection())
-            {
-                return db.UpdateWorlds(ids);
-            }
-        }
-
-        public object Get(MySqlCachedDbRequest request)
-        {
-            // get a random world id
-            var id = SafeRandom.Instance.Next(0, 10000) + 1;
-
-            // create the cache key for the random world id
-            var cacheKey = UrnId.CreateWithParts<World>(new string[] { dbType, id.ToString() });
-
-            // if world is cached, return it
-            var world = Cache.Get<World>(cacheKey);
-            if (world != null)
-                return world;
-
-            // get all of the worlds form the database
-            List<World> worlds;
-            using (var db = dbFactory.OpenDbConnection())
-            {
-                worlds = db.GetWorlds();
-            }
-
-            // construct a cache dictionary
-            var cacheDict = new Dictionary<string, World>();
-            Parallel.ForEach(worlds, w =>
-            {
-                // collect the current result
-                if (w.id == id)
-                    world = w;
-
-                // add world to cache dictionary
-                var key = UrnId.CreateWithParts<World>(new string[] { dbType, w.id.ToString() });
-                lock (cacheDict)
-                {
-                    cacheDict.Add(key, w);
-                }
-            });
-
-            // populate cache
-            Cache.SetAll<World>(cacheDict);
-
-            // return current request
-            return world;
-        }
-
-        #endregion
-    }
-
-}

+ 0 - 187
frameworks/CSharp/servicestack/src/Service/PostgreSqlService.cs

@@ -1,187 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-using ServiceStack.CacheAccess;
-using ServiceStack.Common;
-using ServiceStack.ServiceHost;
-using ServiceStack.ServiceInterface;
-
-using ServiceStackBenchmark.Model;
-
-namespace ServiceStackBenchmark
-{
-
-    #region PostgreSQL Service Requests
-
-    [Api("Test #2 using Service Stack, ORMLite, and PostgreSQL")]
-    public class PostgreSqlDbRequest : IReturn<World>
-    { }
-
-    [Api("Test #3 using Service Stack, ORMLite, and PostgreSQL")]
-    public class PostgreSqlQueriesRequest : IReturn<List<World>>
-    {
-        [ApiMember(Name = "queries", Description = "Number of Queries to Execute", DataType = "int", IsRequired = true)]
-        [ApiAllowableValues("queries", 1, 500)]
-        public int queries { get; set; }
-    }
-
-    [Api("Test #4 using Service Stack, ORMLite, and PostgreSQL")]
-    public class PostgreSqlFortunesRequest : IReturn<List<Fortune>>
-    { }
-
-    [Api("Test #5 using Service Stack, ORMLite, and PostgreSQL")]
-    public class PostgreSqlUpdatesRequest : IReturn<List<World>>
-    {
-        [ApiMember(Name = "queries", Description = "Number of Queries to Execute", DataType = "int", IsRequired = true)]
-        [ApiAllowableValues("queries", 1, 500)]
-        public int queries { get; set; }
-    }
-
-    [Api("Test #7 using Service Stack, ORMLite, and PostgreSQL with Caching")]
-    public class PostgreSqlCachedDbRequest : IReturn<World>
-    { }
-
-    #endregion
-
-    /// <summary>Service Stack tests using PostgreSQL provider and ORMLite</summary>
-    public class PostgreSqlService : Service
-    {
-        private const string dbType = "PgSql";
-
-        #region Public Properties
-
-        public IPostgreSqlOrmLiteConnectionFactory dbFactory { get; set; }
-
-        #endregion
-
-        #region Public Service Methods
-
-        public object Get(PostgreSqlDbRequest request)
-        {
-            // get a random world id
-            var id = SafeRandom.Instance.Next(0, 10000) + 1;
-
-            // retrieve world from database
-            using (var db = dbFactory.OpenDbConnection())
-            {
-                return db.GetWorld(id);
-            }
-        }
-
-        public object Get(PostgreSqlQueriesRequest request)
-        {
-            // limit queries to be between 1 and 500 iterations
-            var worldCount = Math.Max(1, Math.Min(500, (int)request.queries));
-
-            // concurrently create a list of random world ids to retrieve
-            var ids = new List<int>();
-            Parallel.For(0, worldCount, i =>
-            {
-                lock (ids)
-                {
-                    ids.Add(SafeRandom.Instance.Next(0, 10000) + 1);
-                }
-            });
-
-            // retrieve worlds associated with ids
-            using (var db = dbFactory.OpenDbConnection())
-            {
-                return db.GetWorlds(ids);
-            }
-        }
-
-        [AddHeader(ContentType = ServiceStack.Common.Web.ContentType.Html)]
-        public object Get(PostgreSqlFortunesRequest request)
-        {
-            var fortunes = new List<Fortune>();
-
-            // retrieve fortunes from database
-            using (var db = dbFactory.OpenDbConnection())
-            {
-                fortunes = db.GetFortunes();
-            }
-
-            // add additional fortune record
-            fortunes.Add(new Fortune { id = 0, message = "Additional fortune added at request time." });
-
-            // sort fortunes
-            fortunes.Sort();
-
-            // construct HTML page using template and return
-            return FortuneMethods.ToHtml(fortunes);
-        }
-
-        public object Get(PostgreSqlUpdatesRequest request)
-        {
-            // limit queries to be between 1 and 500 iterations
-            var worldCount = Math.Max(1, Math.Min(500, (int)request.queries));
-
-            // concurrently create a list of random world ids to update
-            var ids = new List<int>(worldCount);
-            Parallel.For(0, worldCount, i =>
-            {
-                lock (ids)
-                {
-                    ids.Add(SafeRandom.Instance.Next(0, 10000) + 1);
-                }
-            });
-
-            // purge cache client
-            Cache.FlushAll();
-
-            // update the worlds
-            using (var db = dbFactory.OpenDbConnection())
-            {
-                return db.UpdateWorlds(ids);
-            }
-        }
-
-        public object Get(PostgreSqlCachedDbRequest request)
-        {
-            // get a random world id
-            var id = SafeRandom.Instance.Next(0, 10000) + 1;
-
-            // create the cache key for the random world id
-            var cacheKey = UrnId.CreateWithParts<World>(new string[] { dbType, id.ToString() });
-
-            // if world is cached, return it
-            var world = Cache.Get<World>(cacheKey);
-            if (world != null)
-                return world;
-
-            // get all of the worlds form the database
-            List<World> worlds;
-            using (var db = dbFactory.OpenDbConnection())
-            {
-                worlds = db.GetWorlds();
-            }
-
-            // construct a cache dictionary
-            var cacheDict = new Dictionary<string, World>();
-            Parallel.ForEach(worlds, w =>
-            {
-                // collect the current result
-                if (w.id == id)
-                    world = w;
-
-                // add world to cache dictionary
-                var key = UrnId.CreateWithParts<World>(new string[] { dbType, w.id.ToString() });
-                lock (cacheDict)
-                {
-                    cacheDict.Add(key, w);
-                }
-            });
-
-            // populate cache
-            Cache.SetAll<World>(cacheDict);
-
-            // return current request
-            return world;
-        }
-
-        #endregion
-    }
-
-}

+ 0 - 99
frameworks/CSharp/servicestack/src/Service/Services.cs

@@ -1,99 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-using ServiceStack.CacheAccess;
-using ServiceStack.CacheAccess.Providers;
-using ServiceStack.CacheAccess.Memcached;
-using ServiceStack.CacheAccess.AwsDynamoDb;
-using ServiceStack.CacheAccess.Azure;
-using ServiceStack.Common.Web;
-using ServiceStack.Redis;
-using ServiceStack.ServiceHost;
-using ServiceStack.ServiceInterface;
-
-namespace ServiceStackBenchmark
-{
-
-    #region Hello World Services
-
-    [Api("Test #1 (JSON serialization) using Service Stack")]
-    [Route("/json", "GET")]
-    public class JsonRequest { }
-
-    public class JsonService : Service
-    {
-        public object Get(JsonRequest request)
-        {
-            var response = new { message = "Hello, World!" };
-            return response;
-        }
-    }
-
-    [Api("Test #6 (Plaintext) using Service Stack")]
-    [Route("/plaintext", "GET")]
-    public class PlainTextRequest { }
-
-    public class PlainTextService : Service
-    {
-        public object Get(PlainTextRequest request)
-        {
-            var response = new HttpResult("Hello, World!", "text/plain");
-            return response;
-        }
-    }
-
-
-    [Api("Set Cache Provider")]
-    [Route("/cacheprovider/{provider}", "GET")]
-    public class SetCacheProviderRequest 
-    {
-        [ApiMember(Name ="provider", Description = "Cache Provider", DataType = "string", IsRequired = true)]
-        [ApiAllowableValues("provider", new string[] { "inmem", "memcache", "redis", "aws", "azure" })]
-        public string provider { get; set; }    
-    }
-
-    public class CacheProviderService : Service
-    {
-        public object Any(SetCacheProviderRequest request)
-        {
-            try
-            {
-                switch (request.provider)
-                {
-                    case "memcache":
-                        var memcache = new MemcachedClientCache();
-                        AppHost.Instance.Container.Register<ICacheClient>(memcache);
-                        return new HttpResult("Cache Provider switched to MemCache.");
-
-                    case "redis":
-                        AppHost.Instance.Container.Register<ICacheClient>(c => c.Resolve<IRedisClientsManager>().GetCacheClient());
-                        return new HttpResult("Cache Provider switched to Redis.");
-
-                    case "aws":
-                        var aws = new DynamoDbCacheClient("", "", Amazon.RegionEndpoint.APSoutheast1);
-                        AppHost.Instance.Container.Register<ICacheClient>(aws);
-                        return new HttpResult("Cache Provider switched to Amazon Web Service DynamoDb Cache Client.");
-
-                    case "azure":
-                        AppHost.Instance.Container.Register<ICacheClient>(new AzureCacheClient("default"));
-                        return new HttpResult("Cache Provider switched to Microsoft Azure Cache Client.");
-
-                    default:
-                        AppHost.Instance.Container.Register<ICacheClient>(new MemoryCacheClient());
-                        return new HttpResult("Cache Provider switched to In-Memory Cache Client.");
-                }
-            }
-            catch
-            {
-                throw;
-            }
-        }
-    }
-
-
-    #endregion
-
-
-
-}

+ 0 - 187
frameworks/CSharp/servicestack/src/Service/SqlServerService.cs

@@ -1,187 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-using ServiceStack.Common;
-using ServiceStack.ServiceHost;
-using ServiceStack.ServiceInterface;
-
-using ServiceStackBenchmark.Model;
-
-namespace ServiceStackBenchmark
-{
-
-    #region Microsoft SQL Server Service Requests
-
-    [Api("Test #2 using Service Stack, ORMLite, and Microsoft SQL Server")]
-    public class SqlServerDbRequest : IReturn<World>
-    { }
-
-    [Api("Test #3 using Service Stack, ORMLite, and Microsoft SQL Server")]
-    public class SqlServerQueriesRequest : IReturn<List<World>>
-    {
-        [ApiMember(Name = "queries", Description = "Number of Queries to Execute", DataType = "int", IsRequired = true)]
-        [ApiAllowableValues("queries", 1, 500)]
-        public int queries { get; set; }
-    }
-
-    [Api("Test #4 using Service Stack, ORMLite, and Microsoft SQL Server")]
-    public class SqlServerFortunesRequest : IReturn<List<Fortune>>
-    { }
-
-    [Api("Test #5 using Service Stack, ORMLite, and Microsoft SQL Server")]
-    public class SqlServerUpdatesRequest : IReturn<List<World>>
-    {
-        [ApiMember(Name = "queries", Description = "Number of Queries to Execute", DataType = "int", IsRequired = true)]
-        [ApiAllowableValues("queries", 1, 500)]
-        public int queries { get; set; }
-    }
-
-    [Api("Test #7 using Service Stack, ORMLite, and Microsoft SQL Server with Caching")]
-    public class SqlServerCachedDbRequest : IReturn<World>
-    { }
-
-    #endregion
-
-    /// <summary>Service Stack tests using Microsoft SQL Server provider and ORMLite</summary>
-    public class SqlServerService : Service
-    {
-        private const string dbType = "SqlSrvr";
-
-        #region Public Properties
-
-        public ISqlServerOrmLiteConnectionFactory dbFactory { get; set; }
-
-        #endregion
-
-        #region Public Service Methods
-
-        public object Get(SqlServerDbRequest request)
-        {
-            // get a random world id
-            var id = SafeRandom.Instance.Next(0, 10000) + 1;
-
-            // retrieve world from database
-            using (var db = dbFactory.OpenDbConnection())
-            {
-                return db.GetWorld(id);
-            }
-        }
-
-        public object Get(SqlServerQueriesRequest request)
-        {
-            // limit queries to be between 1 and 500 iterations
-            var worldCount = Math.Max(1, Math.Min(500, (int)request.queries));
-
-            // concurrently create a list of random world ids to retrieve
-            var ids = new List<int>();
-            Parallel.For(0, worldCount, i =>
-            {
-                lock (ids)
-                {
-                    ids.Add(SafeRandom.Instance.Next(0, 10000) + 1);
-                }
-            });
-
-            // retrieve worlds associated with ids
-            using (var db = dbFactory.OpenDbConnection())
-            {
-                return db.GetWorlds(ids);
-            }
-        }
-
-        [AddHeader(ContentType = ServiceStack.Common.Web.ContentType.Html)]
-        public object Get(SqlServerFortunesRequest request)
-        {
-            var fortunes = new List<Fortune>();
-
-            // retrieve fortunes from database
-            using (var db = dbFactory.OpenDbConnection())
-            {
-                fortunes = db.GetFortunes();
-            }
-
-            // add additional fortune record
-            fortunes.Add(new Fortune { id = 0, message = "Additional fortune added at request time." });
-
-            // sort fortunes
-            fortunes.Sort();
-
-            // construct HTML page using template and return
-            return FortuneMethods.ToHtml(fortunes);
-        }
-
-        public object Get(SqlServerUpdatesRequest request)
-        {
-            // limit queries to be between 1 and 500 iterations
-            var worldCount = Math.Max(1, Math.Min(500, (int)request.queries));
-
-            // concurrently create a list of random world ids to update
-            var ids = new List<int>(worldCount);
-            Parallel.For(0, worldCount, i =>
-            {
-                lock (ids)
-                {
-                    ids.Add(SafeRandom.Instance.Next(0, 10000) + 1);
-                }
-            });
-
-            // purge cache client
-            Cache.FlushAll();
-
-            // update the worlds
-            using (var db = dbFactory.OpenDbConnection())
-            {
-                return db.UpdateWorlds(ids);
-            }
-        }
-
-        public object Get(SqlServerCachedDbRequest request)
-        {
-            // get a random world id
-            var id = SafeRandom.Instance.Next(0, 10000) + 1;
-
-            // create the cache key for the random world id
-            var cacheKey = UrnId.CreateWithParts<World>(new string[] { dbType, id.ToString() });
-
-            // if world is cached, return it
-            var world = Cache.Get<World>(cacheKey);
-            if (world != null)
-                return world;
-
-            // get all of the worlds form the database
-            List<World> worlds;
-            using (var db = dbFactory.OpenDbConnection())
-            {
-                worlds = db.GetWorlds();
-            }
-
-            // construct a cache dictionary
-            var cacheDict = new Dictionary<string,World>();
-            Parallel.ForEach(worlds, w =>
-                {
-                    // collect the current result
-                    if (w.id == id)
-                        world = w;
-
-                    // add world to cache dictionary
-                    var key = UrnId.CreateWithParts<World>(new string[] { dbType, w.id.ToString() });
-                    lock (cacheDict)
-                    {
-                        cacheDict.Add(key, w);
-                    }
-                });
-
-            // populate cache
-            Cache.SetAll<World>(cacheDict);
-
-            // return current request
-            return world;
-        }
-
-        #endregion
-
-    }
-
-}

+ 0 - 282
frameworks/CSharp/servicestack/src/ServiceStackBenchmark.csproj

@@ -1,282 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}</ProjectGuid>
-    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>ServiceStackBenchmark</RootNamespace>
-    <AssemblyName>ServiceStackBenchmark</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <TargetFrameworkProfile />
-    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">.\</SolutionDir>
-    <RestorePackages>false</RestorePackages>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup>
-    <StartupObject />
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>bin\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x86</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
-    <OutputPath>bin\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x86</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>bin\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
-    <OutputPath>bin\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="AWSSDK, Version=2.0.0.4, Culture=neutral, PublicKeyToken=9f476d3089b52be3, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\AWSSDK.2.0.0.4-beta\lib\net45\AWSSDK.dll</HintPath>
-    </Reference>
-    <Reference Include="Enyim.Caching">
-      <HintPath>..\lib\EnyimMemcached.2.12\lib\net35\Enyim.Caching.dll</HintPath>
-    </Reference>
-    <Reference Include="Microsoft.ApplicationServer.Caching.Client">
-      <HintPath>..\lib\WindowsAzure.Caching.1.7.0.0\lib\net35-full\Microsoft.ApplicationServer.Caching.Client.dll</HintPath>
-    </Reference>
-    <Reference Include="Microsoft.ApplicationServer.Caching.Core">
-      <HintPath>..\lib\WindowsAzure.Caching.1.7.0.0\lib\net35-full\Microsoft.ApplicationServer.Caching.Core.dll</HintPath>
-    </Reference>
-    <Reference Include="Microsoft.Web.DistributedCache">
-      <HintPath>..\lib\WindowsAzure.Caching.1.7.0.0\lib\net35-full\Microsoft.Web.DistributedCache.dll</HintPath>
-    </Reference>
-    <Reference Include="Microsoft.WindowsFabric.Common">
-      <HintPath>..\lib\WindowsAzure.Caching.1.7.0.0\lib\net35-full\Microsoft.WindowsFabric.Common.dll</HintPath>
-    </Reference>
-    <Reference Include="Microsoft.WindowsFabric.Data.Common">
-      <HintPath>..\lib\WindowsAzure.Caching.1.7.0.0\lib\net35-full\Microsoft.WindowsFabric.Data.Common.dll</HintPath>
-    </Reference>
-    <Reference Include="MongoDB.Bson">
-      <HintPath>..\lib\mongocsharpdriver.1.8.2\lib\net35\MongoDB.Bson.dll</HintPath>
-    </Reference>
-    <Reference Include="MongoDB.Driver">
-      <HintPath>..\lib\mongocsharpdriver.1.8.2\lib\net35\MongoDB.Driver.dll</HintPath>
-    </Reference>
-    <Reference Include="Mono.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\Npgsql.2.0.13-beta1\lib\net45\Mono.Security.dll</HintPath>
-    </Reference>
-    <Reference Include="MySql.Data, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\MySql.Data.6.7.4\lib\net40\MySql.Data.dll</HintPath>
-    </Reference>
-    <Reference Include="Npgsql, Version=2.0.13.91, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\Npgsql.2.0.13-beta1\lib\net45\Npgsql.dll</HintPath>
-    </Reference>
-    <Reference Include="policy.2.0.Npgsql, Version=0.0.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\Npgsql.2.0.13-beta1\lib\net45\policy.2.0.Npgsql.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\ServiceStack.3.9.59\lib\net35\ServiceStack.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.Api.Swagger, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\ServiceStack.Api.Swagger.3.9.59\lib\net35\ServiceStack.Api.Swagger.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.CacheAccess.AwsDynamoDb">
-      <HintPath>..\lib\ServiceStack.Caching.AwsDynamoDb.3.9.55\lib\ServiceStack.CacheAccess.AwsDynamoDb.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.CacheAccess.Azure">
-      <HintPath>..\lib\ServiceStack.Caching.Azure.3.9.55\lib\ServiceStack.CacheAccess.Azure.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.CacheAccess.Memcached">
-      <HintPath>..\lib\ServiceStack.Caching.Memcached.3.9.55\lib\ServiceStack.CacheAccess.Memcached.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.Common, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\ServiceStack.Common.3.9.59\lib\net35\ServiceStack.Common.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.Interfaces, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\ServiceStack.Common.3.9.59\lib\net35\ServiceStack.Interfaces.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.OrmLite, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\ServiceStack.OrmLite.SqlServer.3.9.59\lib\ServiceStack.OrmLite.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.OrmLite.MySql, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\ServiceStack.OrmLite.MySql.3.9.59\lib\ServiceStack.OrmLite.MySql.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.OrmLite.PostgreSQL, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\ServiceStack.OrmLite.PostgreSQL.3.9.59\lib\ServiceStack.OrmLite.PostgreSQL.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.OrmLite.SqlServer, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\ServiceStack.OrmLite.SqlServer.3.9.59\lib\ServiceStack.OrmLite.SqlServer.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.Redis, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\ServiceStack.Redis.3.9.59\lib\net35\ServiceStack.Redis.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.ServiceInterface, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\ServiceStack.3.9.59\lib\net35\ServiceStack.ServiceInterface.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.Text, Version=3.9.59.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\ServiceStack.Text.3.9.59\lib\net35\ServiceStack.Text.dll</HintPath>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.ComponentModel.DataAnnotations" />
-    <Reference Include="System.Configuration" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="System.Runtime.Serialization" />
-    <Reference Include="System.Web" />
-    <Reference Include="System.Web.ApplicationServices" />
-    <Reference Include="System.Web.DynamicData" />
-    <Reference Include="System.Web.Entity" />
-    <Reference Include="System.Web.Extensions" />
-    <Reference Include="System.XML" />
-    <Reference Include="System.Xml.Linq" />
-  </ItemGroup>
-  <ItemGroup>
-    <Content Include="swagger-ui\css\hightlight.default.css" />
-    <Content Include="swagger-ui\css\screen.css" />
-    <Content Include="swagger-ui\images\logo_small.png" />
-    <Content Include="swagger-ui\images\pet_store_api.png" />
-    <Content Include="swagger-ui\images\throbber.gif" />
-    <Content Include="swagger-ui\images\wordnik_api.png" />
-    <Content Include="swagger-ui\index.html" />
-    <Content Include="swagger-ui\lib\backbone-min.js" />
-    <Content Include="swagger-ui\lib\handlebars-1.0.rc.1.js" />
-    <Content Include="swagger-ui\lib\highlight.7.3.pack.js" />
-    <Content Include="swagger-ui\lib\jquery-1.8.0.min.js" />
-    <Content Include="swagger-ui\lib\jquery.ba-bbq.min.js" />
-    <Content Include="swagger-ui\lib\jquery.slideto.min.js" />
-    <Content Include="swagger-ui\lib\jquery.wiggle.min.js" />
-    <Content Include="swagger-ui\lib\swagger.js" />
-    <Content Include="swagger-ui\lib\underscore-min.js" />
-    <Content Include="swagger-ui\swagger-ui.js" />
-    <Content Include="swagger-ui\swagger-ui.min.js" />
-    <Content Include="Web.config">
-      <SubType>Designer</SubType>
-    </Content>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="Properties\PublishProfiles\IIS.pubxml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="AppHostConfigHelper.cs" />
-    <Compile Include="Model\Fortune.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="SafeRandom.cs" />
-    <Compile Include="Service\MongoDBService.cs" />
-    <Compile Include="Service\MySqlService.cs" />
-    <Compile Include="Service\PostgreSqlService.cs" />
-    <Compile Include="Service\Services.cs" />
-    <Compile Include="DbFactories\MySqlOrmLiteConnectionFactory.cs" />
-    <Compile Include="DbFactories\PostgreSqlOrmLiteConnectionFactory.cs" />
-    <Compile Include="DbFactories\SqlServerOrmLiteConnectionFactory.cs" />
-    <Compile Include="Model\World.cs" />
-    <Compile Include="Service\SqlServerService.cs" />
-    <Content Include="Global.asax" />
-    <Compile Include="AppHost.cs" />
-    <Compile Include="Global.asax.cs">
-      <DependentUpon>Global.asax</DependentUpon>
-    </Compile>
-    <Compile Include="DbFactories\ISqlServerOrmLiteConnectionFactory.cs" />
-    <Compile Include="DbFactories\IMySqlOrmLiteConnectionFactory.cs" />
-    <Compile Include="DbFactories\IPostgreSqlOrmLiteConnectionFactory.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <Content Include="packages.config" />
-    <None Include="Web.Debug.config">
-      <DependentUpon>Web.config</DependentUpon>
-    </None>
-    <None Include="Web.Release.config">
-      <DependentUpon>Web.config</DependentUpon>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
-    <AvailableItemName Include="RootContent">
-      <Visible>false</Visible>
-    </AvailableItemName>
-  </ItemGroup>
-  <ItemGroup />
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <PropertyGroup>
-    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
-    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
-  </PropertyGroup>
-  <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != '' And Exists('$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets')" />
-  <Import Project="..\lib\VisualStudio.MsBuild.11.0\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' == '' Or !Exists('$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets')" />
-  <Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
-    <AspNetCompiler VirtualPath="/" PhysicalPath="$(WebProjectOutputDir)" />
-  </Target>
-  <Target Name="AfterBuild">
-    <Copy DestinationFolder="$(OutputPath)" SourceFiles="@(RootContent)" SkipUnchangedFiles="true" />
-  </Target>
-  <ProjectExtensions>
-    <VisualStudio>
-      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
-        <WebProjectProperties>
-          <SaveServerSettingsInUserFile>True</SaveServerSettingsInUserFile>
-        </WebProjectProperties>
-      </FlavorProperties>
-    </VisualStudio>
-  </ProjectExtensions>
-  <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
-  <PropertyGroup>
-    <PreBuildEvent>
-    </PreBuildEvent>
-  </PropertyGroup>
-</Project>

+ 0 - 58
frameworks/CSharp/servicestack/src/ServiceStackBenchmark.sln

@@ -1,58 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceStackBenchmark", "ServiceStackBenchmark.csproj", "{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0C24E4BD-94BD-4AFD-B912-00A5FF825E6B}"
-	ProjectSection(SolutionItems) = preProject
-		NuGet.config = NuGet.config
-	EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{E408A80A-0E70-4FD8-9441-76C90F37D955}"
-	ProjectSection(SolutionItems) = preProject
-		.nuget\NuGet.Config = .nuget\NuGet.Config
-		.nuget\NuGet.exe = .nuget\NuGet.exe
-		.nuget\NuGet.targets = .nuget\NuGet.targets
-	EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceStackBenchmark.SelfHost", "SelfHost\ServiceStackBenchmark.SelfHost.csproj", "{64B2E432-0D03-40CE-9086-81FC7190D9A3}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Any CPU = Debug|Any CPU
-		Debug|x64 = Debug|x64
-		Debug|x86 = Debug|x86
-		Release|Any CPU = Release|Any CPU
-		Release|x64 = Release|x64
-		Release|x86 = Release|x86
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Debug|x64.Build.0 = Debug|Any CPU
-		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Debug|x86.ActiveCfg = Debug|x86
-		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Debug|x86.Build.0 = Debug|x86
-		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Release|Any CPU.Build.0 = Release|Any CPU
-		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Release|x64.ActiveCfg = Release|x64
-		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Release|x64.Build.0 = Release|x64
-		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Release|x86.ActiveCfg = Release|Any CPU
-		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Release|x86.Build.0 = Release|Any CPU
-		{64B2E432-0D03-40CE-9086-81FC7190D9A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{64B2E432-0D03-40CE-9086-81FC7190D9A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{64B2E432-0D03-40CE-9086-81FC7190D9A3}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{64B2E432-0D03-40CE-9086-81FC7190D9A3}.Debug|x64.Build.0 = Debug|Any CPU
-		{64B2E432-0D03-40CE-9086-81FC7190D9A3}.Debug|x86.ActiveCfg = Debug|x86
-		{64B2E432-0D03-40CE-9086-81FC7190D9A3}.Debug|x86.Build.0 = Debug|x86
-		{64B2E432-0D03-40CE-9086-81FC7190D9A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{64B2E432-0D03-40CE-9086-81FC7190D9A3}.Release|Any CPU.Build.0 = Release|Any CPU
-		{64B2E432-0D03-40CE-9086-81FC7190D9A3}.Release|x64.ActiveCfg = Release|x64
-		{64B2E432-0D03-40CE-9086-81FC7190D9A3}.Release|x64.Build.0 = Release|x64
-		{64B2E432-0D03-40CE-9086-81FC7190D9A3}.Release|x86.ActiveCfg = Release|Any CPU
-		{64B2E432-0D03-40CE-9086-81FC7190D9A3}.Release|x86.Build.0 = Release|Any CPU
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio