Browse Source

Merge branch 'verify'

Mike Smith 11 years ago
parent
commit
4b5ed9263a
100 changed files with 320 additions and 335 deletions
  1. 2 1
      .gitignore
  2. 1 1
      aspnet/nginx.conf
  3. 2 2
      beego/src/hello/hello.go
  4. 4 4
      bottle/app.py
  5. 1 1
      cake/deploy/nginx.conf
  6. 2 2
      compojure/benchmark_config
  7. 6 7
      compojure/hello/project.clj
  8. 12 10
      compojure/hello/src/hello/handler.clj
  9. 6 0
      config/benchmark_profile
  10. 2 2
      config/create-postgres.sql
  11. 1 1
      config/nginx_uwsgi.conf
  12. 2 3
      cowboy/benchmark_config
  13. 1 1
      cowboy/src/db_handler.erl
  14. 2 1
      cowboy/src/hello_world_app.erl
  15. 29 0
      cowboy/src/query_handler.erl
  16. 24 0
      cpoll_cppsp/cppsp_rel0.2.3/cppsp/stringutils.C
  17. 1 0
      cpoll_cppsp/setup.py
  18. 1 1
      cpoll_cppsp/www/json
  19. 7 2
      dancer/app.pl
  20. 1 1
      dancer/nginx.conf
  21. 3 3
      dart-start/server.dart
  22. 1 1
      dart-start/setup.py
  23. 1 1
      dart-stream/setup.py
  24. 1 1
      dart/server.dart
  25. 1 1
      dart/setup.py
  26. 1 0
      django/hello/templates/base.html
  27. 6 2
      django/hello/world/views.py
  28. 2 3
      elli/benchmark_config
  29. 14 0
      elli/src/elli_bench_cb.erl
  30. 7 1
      express/app.js
  31. 3 3
      flask/app.py
  32. 4 1
      flask/templates/fortunes.html
  33. BIN
      gemini/Docroot/WEB-INF/lib/mustache-compiler-0.8.0.jar
  34. BIN
      gemini/Docroot/WEB-INF/lib/mustache-compiler-0.8.13.jar
  35. 1 1
      gemini/source_code
  36. 1 0
      go/setup.py
  37. 3 3
      grails/hello/grails-app/controllers/hello/HelloController.groovy
  38. 1 1
      grails/hello/grails-app/views/hello/fortunes.gsp
  39. 1 1
      grizzly-jersey/src/main/java/hello/DbResource.java
  40. 7 1
      hapi/app.js
  41. 2 2
      http-kit/hello/project.clj
  42. 3 2
      http-kit/hello/src/hello/handler.clj
  43. 1 1
      jester/config/nginx.conf
  44. 7 2
      kelp/app.pl
  45. 1 1
      kelp/nginx.conf
  46. 1 1
      lapis/nginx.conf
  47. 8 1
      lift-stateless/setup.py
  48. 1 1
      lift-stateless/src/main/scala/Benchmark.scala
  49. 2 2
      luminus/benchmark_config
  50. 8 8
      luminus/hello/project.clj
  51. 6 6
      luminus/hello/src/hello/models/db.clj
  52. 2 0
      luminus/hello/src/hello/routes/home.clj
  53. 6 32
      luminus/hello/src/hello/views/templates/base.html
  54. 10 3
      mojolicious/app.pl
  55. 1 1
      mojolicious/nginx.conf
  56. 1 1
      nancy/nginx.conf
  57. 1 1
      nancy/nginx.conf.libevent
  58. 1 1
      ninja-standalone/src/main/java/hello/controllers/HelloJsonController.java
  59. 1 1
      ninja/src/main/java/hello/controllers/HelloJsonController.java
  60. 1 1
      ninja/src/main/java/hello/views/HelloFortuneController/index.ftl.html
  61. 13 1
      nodejs/hello.js
  62. 0 1
      onion/base.html
  63. 15 3
      onion/hello.c
  64. 2 0
      onion/setup.py
  65. 5 1
      php-codeigniter/application/controllers/bench.php
  66. 2 3
      php-codeigniter/application/views/fortunes.php
  67. 1 1
      php-codeigniter/deploy/nginx.conf
  68. 1 1
      php-fuel/deploy/nginx.conf
  69. 5 1
      php-fuel/fuel/app/classes/controller/bench.php
  70. 2 2
      php-fuel/fuel/app/config/config.php
  71. 0 3
      php-fuel/fuel/app/logs/2013/01/20.php
  72. 0 52
      php-fuel/fuel/app/logs/2013/04/12.php
  73. 1 2
      php-fuel/fuel/app/views/bench/fortunes.php
  74. 1 1
      php-fuel/fuel/packages/oil/classes/console.php
  75. 1 1
      php-kohana/application/bootstrap.php
  76. 5 1
      php-kohana/application/classes/Controller/Bench.php
  77. 0 26
      php-kohana/application/logs/2012/03/26.php
  78. 0 19
      php-kohana/application/logs/2012/06/25.php
  79. 0 59
      php-kohana/application/logs/2012/10/22.php
  80. 2 3
      php-kohana/application/views/bench/fortunes.php
  81. 1 1
      php-kohana/deploy/nginx.conf
  82. 1 1
      php-laravel/application/routes.php
  83. 1 2
      php-laravel/application/views/layouts/main.blade.php
  84. 1 1
      php-laravel/deploy/nginx.conf
  85. 1 1
      php-lithium/app/controllers/BenchController.php
  86. 2 2
      php-lithium/app/controllers/HelloWorldController.php
  87. 1 1
      php-lithium/deploy/nginx.conf
  88. 4 0
      php-micromvc/Class/Controller/Benchmark/Db.php
  89. 1 1
      php-micromvc/Class/Controller/Benchmark/Json.php
  90. 2 1
      php-micromvc/Common.php
  91. 1 1
      php-micromvc/deploy/nginx.conf
  92. 1 1
      php-phalcon-micro/compiled-templates/_home_tfb_frameworkbenchmarks_php-phalcon-micro_views_layouts_bench.volt.c
  93. 1 1
      php-phalcon-micro/deploy/nginx.conf
  94. 5 1
      php-phalcon-micro/public/index.php
  95. 1 1
      php-phalcon-micro/views/layouts/bench.volt
  96. 1 1
      php-phalcon/app/compiled-templates/_home_tfb_frameworkbenchmarks_php-phalcon_app_views_layouts_bench.volt.compiled
  97. 7 2
      php-phalcon/app/controllers/BenchController.php
  98. 1 1
      php-phalcon/app/views/layouts/bench.volt
  99. 1 1
      php-phalcon/deploy/nginx.conf
  100. 1 1
      php-phpixie/deploy/nginx.conf

+ 2 - 1
.gitignore

@@ -67,4 +67,5 @@ benchmark.cfg
 *.war
 
 # go
-go/pkg/
+go/pkg/*
+beego/pkg/*

+ 1 - 1
aspnet/nginx.conf

@@ -1,6 +1,6 @@
 # worker_processes n;
 pid /tmp/nginx.pid;
-error_log /dev/null crit;
+error_log stderr error;
 
 events {
     worker_connections 8192;

+ 2 - 2
beego/src/hello/hello.go

@@ -6,7 +6,7 @@ import (
 )
 
 type MessageStruct struct {
-	Message string
+	Message string `json:"message"`
 }
 
 type JsonController struct {
@@ -14,7 +14,7 @@ type JsonController struct {
 }
 
 func (this *JsonController) Get() {
-	m := MessageStruct{"Hello, world"}
+	m := MessageStruct{"Hello, World!"}
 	this.Data["json"] = &m
 	this.ServeJson()
 }

+ 4 - 4
bottle/app.py

@@ -62,9 +62,9 @@ def get_random_world(db):
 @app.route("/dbs")
 def get_random_world_single(db):
     wid = randint(1, 10000)
-    worlds = [db.query(World).get(wid).serialize]
+    world = db.query(World).get(wid).serialize
     response.content_type = 'application/json'
-    return json.dumps(worlds)
+    return json.dumps(world)
   
 @app.route("/dbraw")
 def get_random_world_raw():
@@ -84,7 +84,7 @@ def get_random_world_single_raw():
     connection = db_engine.connect()
     wid = randint(1, 10000)
     result = connection.execute("SELECT * FROM world WHERE id = " + str(wid)).fetchone()
-    worlds = [{'id': result[0], 'randomNumber': result[1]}]
+    worlds = {'id': result[0], 'randomNumber': result[1]}
     connection.close()
     response.content_type = 'application/json'
     return json.dumps(worlds)
@@ -92,7 +92,7 @@ def get_random_world_single_raw():
 @app.route("/fortune")
 def fortune_orm(db):
   fortunes=db.query(Fortune).all()
-  fortunes.append(Fortune(message="Additional fortune added at request time."))
+  fortunes.append(Fortune(id=0, message="Additional fortune added at request time."))
   fortunes=sorted(fortunes, key=attrgetter('message'))
   return template('fortune-obj', fortunes=fortunes)
 

+ 1 - 1
cake/deploy/nginx.conf

@@ -1,6 +1,6 @@
 #user  nobody;
 worker_processes  8;
-error_log /dev/null crit;
+error_log stderr error;
 
 #error_log  logs/error.log;
 #error_log  logs/error.log  notice;

+ 2 - 2
compojure/benchmark_config

@@ -4,7 +4,7 @@
     "default": {
       "setup_file": "setup",
       "json_url": "/compojure/json",
-      "db_url": "/compojure/db/1",
+      "db_url": "/compojure/db",
       "query_url": "/compojure/db/",
       "fortune_url": "/compojure/fortune-hiccup",
       "plaintext_url": "/compojure/plaintext",
@@ -25,7 +25,7 @@
     },
     "raw": {
       "setup_file": "setup",
-      "db_url": "/compojure/dbraw/1",
+      "db_url": "/compojure/dbraw",
       "query_url": "/compojure/dbraw/",
       "port": 8080,
       "approach": "Realistic",

+ 6 - 7
compojure/hello/project.clj

@@ -1,18 +1,17 @@
 (defproject hello "compojure"
   :description "JSON/Database tests"
-  :url "http://example.com/FIXME"
+  :url "http://localhost:3000/"
   :dependencies [[org.clojure/clojure "1.5.1"]
-                 [compojure "1.1.5"]
+                 [compojure "1.1.6"]
                  [ring/ring-json "0.2.0"]
-                 [korma "0.3.0-RC5"]
+                 [korma "0.3.0-RC6"]
                  [log4j "1.2.15" :exclusions [javax.mail/mail javax.jms/jms com.sun.jdmk/jmxtools com.sun.jmx/jmxri]]
                  [mysql/mysql-connector-java "5.1.6"]
                  [org.clojure/java.jdbc "0.3.0-alpha1"]
                  [c3p0/c3p0 "0.9.1.2"]
-                 [hiccup "1.0.3"]
-                 [enlive "1.1.1"]
+                 [hiccup "1.0.4"]
                  ]
-  :plugins [[lein-ring "0.8.2"]]
+  :plugins [[lein-ring "0.8.10"]]
   :ring {:handler hello.handler/app}
   :profiles
-  {:dev {:dependencies [[ring-mock "0.1.3"]]}})
+  {:dev {:dependencies [[ring-mock "0.1.5"]]}})

+ 12 - 10
compojure/hello/src/hello/handler.clj

@@ -6,12 +6,12 @@
         korma.db
         korma.core
         hiccup.core
-        hiccup.util)
+        hiccup.util
+        hiccup.page)
   (:require [compojure.handler :as handler]
             [compojure.route :as route]
             [clojure.java.jdbc :as jdbc]
-            [clojure.java.jdbc.sql :as sql]
-            [net.cgrand.enlive-html :as html]))
+            [clojure.java.jdbc.sql :as sql]))
 
 ; Database connection
 (defdb db (mysql {:subname "//localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true"
@@ -38,11 +38,10 @@
 
 ; Run the specified number of queries, return the results
 (defn run-queries [queries]
-  (vec ; Return as a vector
    (flatten ; Make it a list of maps
     (take
      queries ; Number of queries to run
-     (repeatedly get-world)))))
+     (repeatedly get-world))))
 
 ; Database connection for java.jdbc "raw"
 ; https://github.com/clojure/java.jdbc/blob/master/doc/clojure/java/jdbc/ConnectionPooling.md
@@ -74,16 +73,17 @@
 (defn get-world-raw []
   (let [id (inc (rand-int 9999))] ; Num between 1 and 10,000
     (jdbc/with-connection (db-raw)
-      (jdbc/with-query-results rs [(str "select * from world where id = ?") id]
-        (doall rs)))))
+      ; Set a naming strategy to preserve column name case
+      (jdbc/with-naming-strategy {:keyword identity}
+        (jdbc/with-query-results rs [(str "select * from world where id = ?") id]
+          (doall rs))))))
 
 ; Run the specified number of queries, return the results
 (defn run-queries-raw [queries]
-  (vec ; Return as a vector
    (flatten ; Make it a list of maps
     (take
      queries ; Number of queries to run
-     (repeatedly get-world-raw)))))
+     (repeatedly get-world-raw))))
 
 (defn get-query-count [queries]
   "Parse provided string value of query count, clamping values to between 1 and 500."
@@ -116,7 +116,7 @@ message text, and then return the results."
 
 (defn fortunes-hiccup [fortunes]
   "Render the given fortunes to simple HTML using Hiccup."
-  (html
+  (html5
    [:head
     [:title "Fortunes"]]
    [:body
@@ -142,7 +142,9 @@ message text, and then return the results."
         :headers {"Content-Type" "text/plain; charset=utf-8"}
         :body "Hello, World!"})
   (GET "/json" [] (response {:message "Hello, World!"}))
+  (GET "/db" [] (response (first (run-queries (get-query-count 1)))))
   (GET "/db/:queries" [queries] (response (run-queries (get-query-count queries))))
+  (GET "/dbraw" [] (response (first (run-queries-raw (get-query-count 1)))))
   (GET "/dbraw/:queries" [queries] (response (run-queries-raw (get-query-count queries))))
   (GET "/fortune" [] (response (get-fortunes)))
   (GET "/fortune-hiccup" [] (fortunes-hiccup (get-fortunes)))

+ 6 - 0
config/benchmark_profile

@@ -17,4 +17,10 @@ export PATH="$JAVA_HOME/bin:$GRAILS_HOME/bin:$PLAY_HOME:$PLAY1_HOME:$VERTX_HOME/
 
 export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/usr/local/apr/lib'
 
+export TFB_SERVER_HOST=172.16.98.122'
+export TFB_CLIENT_HOST='172.16.98.98'
+export TFB_CLIENT_USER='tfb'
+export TFB_CLIENT_IDENTITY_FILE='/home/tfb/.ssh/id_rsa-tfb-1'
+export TFB_DATABASE_HOST='172.16.98.118'
+
 source ~/.rvm/scripts/'rvm'

+ 2 - 2
config/create-postgres.sql

@@ -2,11 +2,11 @@
 DROP TABLE IF EXISTS World;
 CREATE TABLE  World (
   id integer NOT NULL,
-  "randomNumber" integer NOT NULL default 0,
+  randomnumber integer NOT NULL default 0,
   PRIMARY KEY  (id)
 );
 
-INSERT INTO World (id, randomNumber)
+INSERT INTO World (id, randomnumber)
 SELECT x.id, random() * 10000 + 1 FROM generate_series(1,10000) as x(id);
 
 DROP TABLE IF EXISTS Fortune;

+ 1 - 1
config/nginx_uwsgi.conf

@@ -2,7 +2,7 @@
 
 # One worker process per core
 worker_processes auto;
-error_log /dev/null crit;
+error_log stderr error;
 
 events {
     # This needed to be increased because the nginx error log said so.

+ 2 - 3
cowboy/benchmark_config

@@ -5,7 +5,7 @@
       "setup_file": "setup_erlang",
       "json_url": "/json",
       "db_url": "/db",
-      "query_url": "/db?queries=",
+      "query_url": "/query?queries=",
       "port": 8080,
       "approach": "Realistic",
       "classification": "Platform",
@@ -19,7 +19,6 @@
       "database_os": "Linux",
       "display_name": "cowboy",
       "notes": "",
-      "versus": "",
-      "skip": "true"
+      "versus": ""
   }}]
 }

+ 1 - 1
cowboy/src/db_handler.erl

@@ -22,7 +22,7 @@ handle(Req, State) ->
 			        {result_packet, _, _, [[ID, Rand]], _} <- [emysql:execute(test_pool, db_stmt, [random:uniform(10000)]) || _ <- lists:seq(1, I) ]],
 			{Res, Req1}
 		end,
-	{ok, Req3} = cowboy_req:reply(200, [{<<"Content-Type">>, <<"application/json">>}], jiffy:encode(JSON), Req2),
+	{ok, Req3} = cowboy_req:reply(200, [{<<"Content-Type">>, <<"application/json">>}], jiffy:encode(lists:nth(1,JSON)), Req2),
 	{ok, Req3, State}.
 
 terminate(_Reason, _Req, _State) ->

+ 2 - 1
cowboy/src/hello_world_app.erl

@@ -20,7 +20,8 @@ start(_Type, _Args) ->
 	Dispatch = cowboy_router:compile([
 		{'_', [
 			{"/json", json_handler, []},
-			{"/db", db_handler, []}
+			{"/db", db_handler, []},
+      {"/query", query_handler, []}
 		]}
 	]),
 	{ok, _} = cowboy:start_http(http, 5000, [{port, 8080}], [

+ 29 - 0
cowboy/src/query_handler.erl

@@ -0,0 +1,29 @@
+%% Feel free to use, reuse and abuse the code in this file.
+
+%% @doc Hello world handler.
+-module(query_handler).
+
+-export([init/3]).
+-export([handle/2]).
+-export([terminate/3]).
+
+init(_Transport, Req, []) ->
+  {ok, Req, undefined}.
+
+handle(Req, State) ->
+        random:seed(erlang:now()),
+        {JSON, Req2} = case cowboy_req:qs_val(<<"queries">>, Req) of
+    {undefined, Req1} ->
+      {result_packet, _, _, [[ID, Rand]], _} = emysql:execute(test_pool, db_stmt, [random:uniform(10000)]),
+      {[{[{<<"id">>, ID}, {<<"randomNumber">>, Rand}]}], Req1};
+    {N, Req1} ->
+      I = list_to_integer(binary_to_list(N)),
+      Res = [ {[{<<"id">>, ID}, {<<"randomNumber">>, Rand}]} || 
+              {result_packet, _, _, [[ID, Rand]], _} <- [emysql:execute(test_pool, db_stmt, [random:uniform(10000)]) || _ <- lists:seq(1, I) ]],
+      {Res, Req1}
+    end,
+  {ok, Req3} = cowboy_req:reply(200, [{<<"Content-Type">>, <<"application/json">>}], jiffy:encode(JSON), Req2),
+  {ok, Req3, State}.
+
+terminate(_Reason, _Req, _State) ->
+  ok.

+ 24 - 0
cpoll_cppsp/cppsp_rel0.2.3/cppsp/stringutils.C

@@ -182,6 +182,12 @@ namespace cppsp
 				case '>':
 					sz += 4;
 					break;
+				case '"':
+				  sz += 6;
+				  break;
+				case '\'':
+					sz += 6;
+					break;
 				default:
 					sz++;
 					break;
@@ -214,6 +220,24 @@ namespace cppsp
 					c[3] = ';';
 					c += 4;
 					break;
+				case '"':
+					c[0] = '&';
+					c[1] = 'q';
+					c[2] = 'u';
+					c[3] = 'o';
+					c[4] = 't';
+					c[5] = ';';
+					c += 6;
+					break;
+				case '\'':
+					c[0] = '&';
+					c[1] = 'a';
+					c[2] = 'p';
+					c[3] = 'o';
+					c[4] = 's';
+					c[5] = ';';
+					c += 6;
+					break;
 				default:
 					*(c++) = in[i];
 			}

+ 1 - 0
cpoll_cppsp/setup.py

@@ -5,6 +5,7 @@ import setup_util
 
 def start(args, logfile, errfile):
   setup_util.replace_text("cpoll_cppsp/www/connectioninfo.H", "\\#define BENCHMARK_DB_HOST \".*\"", "#define BENCHMARK_DB_HOST \"" + args.database_host + "\"")
+  subprocess.check_call("make clean", shell=True, cwd="cpoll_cppsp", stderr=errfile, stdout=logfile)
   subprocess.check_call("make", shell=True, cwd="cpoll_cppsp", stderr=errfile, stdout=logfile)
   subprocess.Popen("./run_application \"$(pwd)\"/www -g g++-4.8 -m /forcedynamic.cppsm", shell=True, cwd="cpoll_cppsp", stderr=errfile, stdout=logfile);
   return 0

+ 1 - 1
cpoll_cppsp/www/json

@@ -8,7 +8,7 @@ int64_t fib(int64_t n){
 %><%
 
 json_object *hello=json_object_new_object();
-json_object_object_add(hello, "message", json_object_new_string("Hello, world"));
+json_object_object_add(hello, "message", json_object_new_string("Hello, World!"));
 
 const char *hello_str=json_object_to_json_string(hello);
 

+ 7 - 2
dancer/app.pl

@@ -22,8 +22,13 @@ get '/db' => sub {
         my $id = int rand 10000 + 1;
         $sth->execute($id);
         if ( my $row = $sth->fetchrow_hashref ) {
-            push @response,
-              { id => $id, randomNumber => $row->{randomNumber} };
+            if ( $queries == 1 ) {
+                return { id => $id, randomNumber => $row->{randomNumber} };
+            }
+            else {
+                push @response,
+                  { id => $id, randomNumber => $row->{randomNumber} };
+            }
         }
     }
     return \@response;

+ 1 - 1
dancer/nginx.conf

@@ -1,5 +1,5 @@
 user tfb;
-error_log /dev/null crit;
+error_log stderr error;
 
 worker_processes 2;
 

+ 3 - 3
dart-start/server.dart

@@ -50,7 +50,7 @@ class World {
 
   World(this.id, this.randomnumber);
 
-  toJson() => { "id": id, "randomnumber": randomnumber };
+  toJson() => { "id": id, "randomNumber": randomnumber };
 }
 
 main(List<String> args) {
@@ -225,7 +225,7 @@ main(List<String> args) {
           _mongoQuery().then((data) {
             request.response.json({
               "id": data["_id"],
-              "randomnumber": data["randomNumber"]
+              "randomNumber": data["randomNumber"]
             });
           });
         });
@@ -248,7 +248,7 @@ main(List<String> args) {
               var results = response.map((world) {
                 return {
                   "id": world["_id"],
-                  "randomnumber": world["randomNumber"]
+                  "randomNumber": world["randomNumber"]
                 };
               });
               request.response.send(JSON.encode(results.toList()));

+ 1 - 1
dart-start/setup.py

@@ -21,7 +21,7 @@ def start(args, logfile, errfile):
     #
     conf = []
     conf.append('worker_processes ' + str(args.max_threads) + ';')
-    conf.append('error_log /dev/null crit;')
+    conf.append('error_log /dev/null error;')
     conf.append('events {')
     conf.append('    worker_connections 1024;')
     conf.append('}')

+ 1 - 1
dart-stream/setup.py

@@ -21,7 +21,7 @@ def start(args, logfile, errfile):
     #
     conf = []
     conf.append('worker_processes ' + str(args.max_threads) + ';')
-    conf.append('error_log /dev/null crit;')
+    conf.append('error_log /dev/null error;')
     conf.append('events {')
     conf.append('    worker_connections 1024;')
     conf.append('}')

+ 1 - 1
dart/server.dart

@@ -32,7 +32,7 @@ class World {
 
   World(this.id, this.randomnumber);
 
-  toJson() => { 'id': id, 'randomnumber': randomnumber };
+  toJson() => { 'id': id, 'randomNumber': randomnumber };
 }
 
 /// The entity used in the fortunes test.

+ 1 - 1
dart/setup.py

@@ -20,7 +20,7 @@ def start(args, logfile, errfile):
     #
     conf = []
     conf.append('worker_processes ' + str(args.max_threads) + ';')
-    conf.append('error_log /dev/null crit;')
+    conf.append('error_log stderr error;')
     conf.append('events {')
     conf.append('    worker_connections 1024;')
     conf.append('}')

+ 1 - 0
django/hello/templates/base.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
+<title>Fortunes</title>
 </head>
 <body>
   {% block content %}{% endblock %}

+ 6 - 2
django/hello/world/views.py

@@ -43,12 +43,16 @@ def db(request):
   # by creating dicts, we don't need to user the model serializer, which is probably slow and only appropriate
   # for complicated serializations of joins and crazy query sets etc
   # test xrange vs range if the query number is gigantic
-  worlds = uj_dumps([{'id' : r, 'randomNumber' : g(id=r).randomnumber} for r in [rp() for q in xrange(queries)]])  
+  if queries == 1:
+    r = random.randint(1,10000)
+    worlds = uj_dumps({'id' : r, 'randomNumber' : g(id=r).randomnumber})
+  else:
+    worlds = uj_dumps([{'id' : r, 'randomNumber' : g(id=r).randomnumber} for r in [rp() for q in xrange(queries)]])
   return HttpResponse(worlds, mimetype="application/json")
 
 def fortunes(request):
   fortunes = list(Fortune.objects.all())
-  fortunes.append(Fortune(id=0, message="Additional message added at runtime."))
+  fortunes.append(Fortune(id=0, message="Additional fortune added at request time."))
 
   fortunes = sorted(fortunes, key=attrgetter('message'))
 

+ 2 - 3
elli/benchmark_config

@@ -5,7 +5,7 @@
       "setup_file": "setup_erlang",
       "json_url": "/json",
       "db_url": "/db",
-      "query_url": "/db?queries=",
+      "query_url": "/query?queries=",
       "port": 8080,
       "approach": "Realistic",
       "classification": "Platform",
@@ -19,7 +19,6 @@
       "database_os": "Linux",
       "display_name": "elli",
       "notes": "",
-      "versus": "",
-      "skip": "true"
+      "versus": ""
   }}]
 }

+ 14 - 0
elli/src/elli_bench_cb.erl

@@ -25,6 +25,20 @@ handle('GET',[<<"db">>], Req) ->
 			        {result_packet, _, _, [[ID, Rand]], _} <- [emysql:execute(test_pool, db_stmt, [random:uniform(10000)]) || _ <- lists:seq(1, I) ]],
 			Res
 		end,
+    {ok, [{<<"Content-Type">>, <<"application/json">>}], jiffy:encode(lists:nth(1,JSON))};
+
+handle('GET',[<<"query">>], Req) ->
+        random:seed(erlang:now()),
+        JSON = case elli_request:get_arg(<<"queries">>, Req) of
+        undefined ->
+            {result_packet, _, _, [[ID, Rand]], _} = emysql:execute(test_pool, db_stmt, [random:uniform(10000)]),
+            [{[{<<"id">>, ID}, {<<"randomNumber">>, Rand}]}];
+        N ->
+            I = list_to_integer(binary_to_list(N)),
+            Res = [ {[{<<"id">>, ID}, {<<"randomNumber">>, Rand}]} || 
+                    {result_packet, _, _, [[ID, Rand]], _} <- [emysql:execute(test_pool, db_stmt, [random:uniform(10000)]) || _ <- lists:seq(1, I) ]],
+            Res
+        end,
     {ok, [{<<"Content-Type">>, <<"application/json">>}], jiffy:encode(JSON)};
 
 handle(_, _, _Req) ->

+ 7 - 1
express/app.js

@@ -61,7 +61,7 @@ if (cluster.isMaster) {
   // Routes
 
   app.get('/json', function(req, res) {
-    res.send({ message: 'Hello World!' })
+    res.send({ message: 'Hello, World!' })
   });
   
   app.get('/mongoose', function(req, res) {
@@ -79,6 +79,9 @@ if (cluster.isMaster) {
     }
 
     async.parallel(queryFunctions, function(err, results) {
+      if (queries == 1) {
+        worlds = worlds[0];
+      }
       res.send(worlds);
     });
   });
@@ -100,6 +103,9 @@ if (cluster.isMaster) {
     }
 
     async.parallel(queryFunctions, function(err, results) {
+      if (queries == 1) {
+        worlds = worlds[0];
+      }
       res.send(worlds);
     });
   });

+ 3 - 3
flask/app.py

@@ -6,7 +6,7 @@ from random import randint
 import sys
 
 import flask
-from flask import Flask, request, render_template, make_response
+from flask import Flask, request, render_template, make_response, jsonify
 from flask.ext.sqlalchemy import SQLAlchemy
 from sqlalchemy import create_engine
 
@@ -75,7 +75,7 @@ def get_random_world():
 @app.route("/dbs")
 def get_random_world_single():
     wid = randint(1, 10000)
-    worlds = [World.query.get(wid).serialize]
+    worlds = World.query.get(wid).serialize
     return json_response(worlds)
 
 
@@ -97,7 +97,7 @@ def get_random_world_single_raw():
     connection = dbraw_engine.connect()
     wid = randint(1, 10000)
     result = connection.execute("SELECT * FROM World WHERE id = " + str(wid)).fetchone()
-    worlds = [{'id': result[0], 'randomNumber': result[1]}]
+    worlds = {'id': result[0], 'randomNumber': result[1]}
     connection.close()
     return json_response(worlds)
 

+ 4 - 1
flask/templates/fortunes.html

@@ -1,5 +1,8 @@
 <!DOCTYPE html>
-<html><head></head>
+<html>
+<head>
+<title>Fortunes</title>
+</head>
 <body>
 <table>
 <tr>

BIN
gemini/Docroot/WEB-INF/lib/mustache-compiler-0.8.0.jar


BIN
gemini/Docroot/WEB-INF/lib/mustache-compiler-0.8.13.jar


+ 1 - 1
gemini/source_code

@@ -24,7 +24,7 @@
 ./gemini/Docroot/WEB-INF/lib
 ./gemini/Docroot/WEB-INF/lib/kryonet-1.04-all.jar
 ./gemini/Docroot/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar
-./gemini/Docroot/WEB-INF/lib/mustache-compiler-0.8.0.jar
+./gemini/Docroot/WEB-INF/lib/mustache-compiler-0.8.13.jar
 ./gemini/Docroot/WEB-INF/lib/mail.jar
 ./gemini/Docroot/WEB-INF/lib/activation.jar
 ./gemini/Docroot/WEB-INF/lib/guava-14.0.1.jar

+ 1 - 0
go/setup.py

@@ -12,6 +12,7 @@ def start(args, logfile, errfile):
     subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\go&& go get ./...", shell=True, cwd="go", stderr=errfile, stdout=logfile)
     subprocess.Popen("setup.bat", shell=True, cwd="go", stderr=errfile, stdout=logfile) 
     return 0
+  os.environ["GOPATH"] = os.path.expanduser('~/FrameworkBenchmarks/go')
   subprocess.call("go get ./...", shell=True, cwd="go", stderr=errfile, stdout=logfile) 
   subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="go", stderr=errfile, stdout=logfile)
   return 0

+ 3 - 3
grails/hello/grails-app/controllers/hello/HelloController.groovy

@@ -22,7 +22,7 @@ class HelloController {
     // Test type 1: JSON serialization
     def json() {
         def msg = [
-            message: "Hello, world"
+            message: "Hello, World!"
         ]
         render msg as JSON
     }
@@ -78,7 +78,7 @@ class HelloController {
     @Transactional(readOnly=true)
     def fortunes() {
         def fortunes = Fortune.getAll()
-        fortunes << new Fortune(message: 'Additional fortune added at request time.')
+        fortunes << new Fortune(id: 0, message: 'Additional fortune added at request time.')
         fortunes.sort(true){Fortune it -> it.message}
         [fortunes: fortunes]
     }
@@ -96,6 +96,6 @@ class HelloController {
     
     // Test type 6: Plaintext
     def plaintext() {
-        render text:'Hello, world', contentType:'text/plain'
+        render text:'Hello, World!', contentType:'text/plain'
     }
 }

+ 1 - 1
grails/hello/grails-app/views/hello/fortunes.gsp

@@ -4,7 +4,7 @@
 <body>
 <table>
 <tr><th>id</th><th>message</th></tr>
-<g:each var="fortune" in="${fortunes}"><tr><td>${fortune.id}</td><td>${fortune.message}</td></tr></g:each>
+<g:each var="fortune" in="${fortunes}"><tr><td><g:if test="${fortune.id > 0}">${fortune.id}</g:if><g:else>0</g:else></td><td>${fortune.message}</td></tr></g:each>
 </table>
 </body>
 </html>

+ 1 - 1
grizzly-jersey/src/main/java/hello/DbResource.java

@@ -39,7 +39,7 @@ public class DbResource {
     }
     
     session.close();
-    return worlds;
+    return queries == 1 ? worlds[0] : worlds;
   }
   
 }

+ 7 - 1
hapi/app.js

@@ -49,7 +49,7 @@ if (cluster.isMaster) {
 		method: 'GET',
 		path: '/json',
 		handler: function(req) {
-			req.reply({ message: 'Hello World!' })
+			req.reply({ message: 'Hello, World!' })
 		}
 	});
 
@@ -69,6 +69,9 @@ if (cluster.isMaster) {
 			}
 
 			async.parallel(queryFunctions, function(err, results){
+				if (queries == 1) {
+					results = results[0];
+				}
 				req.reply(results).header('Server', 'hapi');
 			});
 		}
@@ -92,6 +95,9 @@ if (cluster.isMaster) {
 			}
 
 			async.parallel(queryFunctions, function(err, results){
+				if (queries == 1) {
+					results = results[0];
+				}
 				req.reply(results).header('Server', 'hapi');
 			});
 		}

+ 2 - 2
http-kit/hello/project.clj

@@ -2,7 +2,7 @@
   :description "JSON/Database tests"
   :url "http://example.com/FIXME"
   :dependencies [[org.clojure/clojure "1.5.1"]
-                 [compojure "1.1.5"]
+                 [compojure "1.1.6"]
                  [ring/ring-json "0.2.0"]
                  [org.clojure/tools.cli "0.2.1"]
                  [http-kit/dbcp "0.1.0"]
@@ -12,4 +12,4 @@
   :main hello.handler
   :aot [hello.handler]
   :uberjar-name "http-kit-standalone.jar"
-  :profiles {:dev {:dependencies [[ring-mock "0.1.3"]]}})
+  :profiles {:dev {:dependencies [[ring-mock "0.1.5"]]}})

+ 3 - 2
http-kit/hello/src/hello/handler.clj

@@ -23,16 +23,17 @@
 
 ;; Run the specified number of queries, return the results
 (defn run-queries [queries]
-  (vec ; Return as a vector
    (flatten ; Make it a list of maps
     (take
      queries ; Number of queries to run
-     (repeatedly get-world)))))
+     (repeatedly get-world))))
 
 ;; Define route handlers
 (defroutes app-routes
   (GET "/http-kit/" [] "Hello, World!")
   (GET "/http-kit/json" [] (response {:message "Hello, World!"}))
+  (GET "/http-kit/db" []
+       (response (first (run-queries 1))))
   (GET "/http-kit/db/:queries" [queries]
        (response (run-queries (Integer/parseInt queries))))
   (route/not-found "Not Found"))

+ 1 - 1
jester/config/nginx.conf

@@ -14,7 +14,7 @@ worker_processes 8;
 # Feel free to change all paths to suite your needs here, of course
 # pid /tmp/nginx.pid;
 #error_log /tmp/nginx.error.log;
-error_log /dev/null crit;
+error_log stderr error;
 
 events {
   worker_connections 4096; # increase if you have lots of clients

+ 7 - 2
kelp/app.pl

@@ -18,8 +18,13 @@ get '/db' => sub {
         my $id = int rand 10000 + 1;
         $sth->execute($id);
         if ( my $row = $sth->fetchrow_hashref ) {
-            push @response,
-              { id => $id, randomNumber => $row->{randomNumber} };
+            if ( $queries == 1 ) {
+                return { id => $id, randomNumber => $row->{randomNumber} };
+            }
+            else {
+                push @response,
+                  { id => $id, randomNumber => $row->{randomNumber} };
+            }
         }
     }
     return \@response;

+ 1 - 1
kelp/nginx.conf

@@ -1,5 +1,5 @@
 user tfb;
-error_log /dev/null crit;
+error_log stderr error;
 
 worker_processes 2;
 

+ 1 - 1
lapis/nginx.conf

@@ -1,6 +1,6 @@
 #worker_processes  1;
 pid        /tmp/nginx.pid;
-error_log /dev/null crit;
+error_log stderr error;
 #error_log /tmp/test.log error;
 env LAPIS_ENVIRONMENT;
 

+ 8 - 1
lift-stateless/setup.py

@@ -26,5 +26,12 @@ def stop(logfile, errfile):
     for line in out.splitlines():
       if 'lift-stateless-assembly' in line and 'java' in line:
         pid = int(line.split(None, 2)[1])
-        os.kill(pid, 9)
+        os.kill(pid, 15)
+
+  # Takes up so much disk space
+  if os.name == 'nt':
+    subprocess.check_call("del /f /s /q target", shell=True, cwd="lift-stateless", stderr=errfile, stdout=logfile)
+  else:
+    subprocess.check_call("rm -rf target", shell=True, cwd="lift-stateless", stderr=errfile, stdout=logfile)
+    
   return 0

+ 1 - 1
lift-stateless/src/main/scala/Benchmark.scala

@@ -23,7 +23,7 @@ object JsonBenchmark {
     }
 
   def sayHello() = Full(JsonResponse(
-    JObject(List(JField("message", JString("Hello World!"))))
+    JObject(List(JField("message", JString("Hello, World!"))))
   ))
 }
 

+ 2 - 2
luminus/benchmark_config

@@ -4,7 +4,7 @@
     "default": {
       "setup_file": "setup",
       "json_url": "/luminus/json",
-      "db_url": "/luminus/db/1",
+      "db_url": "/luminus/db",
       "query_url": "/luminus/db/",
       "fortune_url": "/luminus/fortune",
       "port": 8080,
@@ -24,7 +24,7 @@
     },
     "raw": {
       "setup_file": "setup",
-      "db_url": "/luminus/dbraw/1",
+      "db_url": "/luminus/dbraw",
       "query_url": "/luminus/dbraw/",
       "port": 8080,
       "approach": "Realistic",

+ 8 - 8
luminus/hello/project.clj

@@ -4,16 +4,16 @@
   :dependencies
   [[org.clojure/clojure "1.5.1"]
    [lib-noir "0.6.6"]
-   [compojure "1.1.5"]
-   [ring-server "0.2.8"]
-   [selmer "0.4.0"]
+   [compojure "1.1.6"]
+   [ring-server "0.3.1"]
+   [selmer "0.5.6"]
    [com.taoensso/timbre "1.6.0"]
    [com.postspectacular/rotor "0.1.0"]
    [com.taoensso/tower "1.5.1"]
-   [markdown-clj "0.9.29"]
-   [org.clojure/java.jdbc "0.2.3"]
+   [markdown-clj "0.9.38"]
+   [org.clojure/java.jdbc "0.3.0-alpha1"]
    [mysql/mysql-connector-java "5.1.6"]
-   [korma "0.3.0-RC5"]
+   [korma "0.3.0-RC6"]
    [log4j
     "1.2.15"
     :exclusions
@@ -30,11 +30,11 @@
    {:ring
     {:open-browser? false, :stacktraces? false, :auto-reload? false}},
    :dev
-   {:dependencies [[ring-mock "0.1.3"] [ring/ring-devel "1.1.8"]]}}
+   {:dependencies [[ring-mock "0.1.5"] [ring/ring-devel "1.1.8"]]}}
   :url
   "http://example.com/FIXME"
   :plugins
-  [[lein-ring "0.8.5"]]
+  [[lein-ring "0.8.10"]]
   :description
   "FIXME: write description"
   :min-lein-version "2.0.0")

+ 6 - 6
luminus/hello/src/hello/models/db.clj

@@ -23,24 +23,24 @@
 (defn get-world-raw []
   (let [id (inc (rand-int 9999))] ; Num between 1 and 10,000
     (jdbc/with-connection (db-raw)
-      (jdbc/with-query-results rs [(str "select * from world where id = ?") id]
-        (doall rs)))))
+      ; Set a naming strategy to preserve column name case
+      (jdbc/with-naming-strategy {:keyword identity}
+        (jdbc/with-query-results rs [(str "select * from world where id = ?") id]
+          (doall rs))))))
 
 ; Run the specified number of queries, return the results
 (defn run-queries [queries]
-  (vec ; Return as a vector
    (flatten ; Make it a list of maps
     (take
      queries ; Number of queries to run
-     (repeatedly get-world)))))
+     (repeatedly get-world))))
 
 ; Run the specified number of queries, return the results
 (defn run-queries-raw [queries]
-  (vec ; Return as a vector
    (flatten ; Make it a list of maps
     (take
      queries ; Number of queries to run
-     (repeatedly get-world-raw)))))
+     (repeatedly get-world-raw))))
 
 (defn get-query-count [queries]
   "Parse provided string value of query count, clamping values to between 1 and 500."

+ 2 - 0
luminus/hello/src/hello/routes/home.clj

@@ -7,7 +7,9 @@
 (defroutes home-routes
   (GET "/" [] "Hello, World!")
   (GET "/json" [] (response/json {:message "Hello, World!"}))
+  (GET "/db" [] (response/json (first (run-queries 1))))
   (GET "/db/:queries" [queries] (response/json (run-queries (get-query-count queries))))
+  (GET "/dbraw" [] (response/json (first (run-queries-raw 1))))
   (GET "/dbraw/:queries" [queries] (response/json (run-queries-raw (get-query-count queries))))  
   (GET "/fortune" [] (layout/render "home.html" {:messages (get-fortunes)})))
 

+ 6 - 32
luminus/hello/src/hello/views/templates/base.html

@@ -1,35 +1,9 @@
 <!DOCTYPE html>
 <html>
-<head>
-	<title>Welcome to hello</title>
-	<link href="{{context}}/css/screen.css" rel="stylesheet" type="text/css"></link>
-	<script type="text/javascript">
-	var context = "{{context}}";
-	</script>
-</head>
-<body>
-    <div id="wrap">
-		<div class="navbar navbar-fixed-top navbar-inverse">
-			<div class="navbar-inner">
-				<ul class="nav">
-					<li><a href="{{context}}/">Home</a></li>
-					<li><a href="{{context}}/about">About</a></li>
-				</ul>
-			</div>
-		</div>
-		<div class="container">		
-			
-{% block content %}
-
-{% endblock %}
-
-		</div>		
-	    <div id="push"></div>
-	</div>
-	<div id="footer">
-         <div class="container">                
-             <p class="muted footer-text">Footer content.</p>
-         </div>
-    </div>        
-</body>
+  <head>
+    <title>Fortunes</title>
+  </head>
+  <body>
+    {% block content %}{% endblock %}
+  </body>
 </html>

+ 10 - 3
mojolicious/app.pl

@@ -19,11 +19,18 @@ get '/db' => sub {
         my $id = int rand 10000 + 1;
         $sth->execute($id);
         if ( my $row = $sth->fetchrow_hashref ) {
-            push @response,
-              { id => $id, randomNumber => $row->{randomNumber} };
+            if ( $queries == 1 ) {
+                $self->render( json => { id => $id, randomNumber => $row->{randomNumber} } );
+            }
+            else {
+                push @response,
+                  { id => $id, randomNumber => $row->{randomNumber} };
+            }
         }
     }
-    $self->render( json => \@response );
+    if ( $queries > 1 ) {
+        $self->render( json => \@response );
+    }
 };
 
 app->start;

+ 1 - 1
mojolicious/nginx.conf

@@ -1,5 +1,5 @@
 user tfb;
-error_log /dev/null crit;
+error_log stderr error;
 
 worker_processes 2;
 

+ 1 - 1
nancy/nginx.conf

@@ -1,6 +1,6 @@
 # worker_processes n;
 pid /tmp/nginx.pid;
-error_log /dev/null crit;
+error_log stderr error;
 
 events {
     worker_connections 8192;

+ 1 - 1
nancy/nginx.conf.libevent

@@ -1,6 +1,6 @@
 # worker_processes n;
 pid /tmp/nginx.pid;
-error_log /dev/null crit;
+error_log stderr error;
 
 events {
     worker_connections 8192;

+ 1 - 1
ninja-standalone/src/main/java/hello/controllers/HelloJsonController.java

@@ -9,7 +9,7 @@ import com.google.inject.Singleton;
 public class HelloJsonController {
 
     public Result index() {
-	return Results.json().render(new Message("Hello, world"));
+	return Results.json().render(new Message("Hello, World!"));
     }
 
     public static class Message {

+ 1 - 1
ninja/src/main/java/hello/controllers/HelloJsonController.java

@@ -9,7 +9,7 @@ import com.google.inject.Singleton;
 public class HelloJsonController {
 
     public Result index() {
-	return Results.json().render(new Message("Hello, world"));
+	return Results.json().render(new Message("Hello, World!"));
     }
 
     public static class Message {

+ 1 - 1
ninja/src/main/java/hello/views/HelloFortuneController/index.ftl.html

@@ -12,7 +12,7 @@
 		<#list fortunes as fortune>
 		<tr>
 			<td>${fortune.id}</td>
-			<td>${fortune.message?html}</td>
+			<td>${fortune.message}</td>
 		</tr>
 		</#list>
 	</table>

+ 13 - 1
nodejs/hello.js

@@ -78,7 +78,7 @@ function sequelizeQuery(callback) {
 
 http.createServer(function (req, res) {
   // JSON response object
-  var hello = {message: "Hello, world"};
+  var hello = {message: "Hello, World!"};
   var helloStr = "Hello, World!";
   var path = url.parse(req.url).pathname;
   
@@ -115,6 +115,9 @@ http.createServer(function (req, res) {
     res.writeHead(200, {'Content-Type': 'application/json; charset=UTF-8'});
 
     async.parallel(queryFunctions, function(err, results) {
+      if (queries == 1) {
+        results = results[0];
+      }
       res.end(JSON.stringify(results));
     });
     break;
@@ -132,6 +135,9 @@ http.createServer(function (req, res) {
     res.writeHead(200, {'Content-Type': 'application/json; charset=UTF-8'});
 
     async.parallel(queryFunctions, function(err, results) {
+      if (queries == 1) {
+        results = results[0];
+      }
       res.end(JSON.stringify(results));
     });
     break;
@@ -148,6 +154,9 @@ http.createServer(function (req, res) {
     res.writeHead(200, {'Content-Type': 'application/json'});
 
     async.parallel(queryFunctions, function(err, results) {
+      if (queries == 1) {
+        results = results[0];
+      }
       res.end(JSON.stringify(results));
     });
     break;
@@ -184,6 +193,9 @@ http.createServer(function (req, res) {
         res.writeHead(500);
         return res.end('MYSQL CONNECTION ERROR.');
       }
+      if (queries == 1) {
+        results = results[0];
+      }
       res.end(JSON.stringify(results));
     });
     break;

+ 0 - 1
onion/base.html

@@ -1,7 +1,6 @@
 <!DOCTYPE html>
 <html>
   <head>
-    <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
     <title>{{title}}</title>
   </head>
   <body>

+ 15 - 3
onion/hello.c

@@ -72,7 +72,7 @@ onion_connection_status return_json(onion_dict *json, onion_request *req, onion_
 /// Gets the dict and converts it to JSON and writes it into the response. 
 onion_connection_status return_json_libjson(void *_, onion_request *req, onion_response *res){
 	json_object *hello=json_object_new_object();
-	json_object_object_add(hello, "message", json_object_new_string("Hello, world"));
+	json_object_object_add(hello, "message", json_object_new_string("Hello, World!"));
 	
 	const char *hello_str=json_object_to_json_string(hello);
 	int size=strlen(hello_str);
@@ -102,11 +102,23 @@ onion_connection_status return_db(MYSQL *db, onion_request *req, onion_response
 		MYSQL_RES *sqlres = mysql_store_result(db);
 		MYSQL_ROW row = mysql_fetch_row(sqlres);
 		
+		json_object_object_add(obj, "id", json_object_new_int( atoi(row[0]) ));
 		json_object_object_add(obj, "randomNumber", json_object_new_int( atoi(row[1]) ));
-		json_object_array_add(array, obj);
+		//json_object_array_add(array, obj);
+
+		if (queries > 1){
+			json_object_array_add(array, obj);
+		}
+		else {
+			json = obj;
+		}
+
 		mysql_free_result(sqlres);
 	}
-	json_object_object_add(json,"json",array);
+	if (queries > 1){
+		json = array;
+	}
+	//json_object_object_add(json,"json",array);
 	const char *str=json_object_to_json_string(json);
 	int size=strlen(str);
 	onion_response_set_header(res,"Content-Type","application/json");

+ 2 - 0
onion/setup.py

@@ -6,6 +6,8 @@ import setup_util
 def start(args, logfile, errfile):
   setup_util.replace_text("onion/hello.c", "mysql_real_connect\(data.db\[i\], \".*\",", "mysql_real_connect(data.db[i], \"" + args.database_host + "\",")
   os.putenv("ONION_LOG","noinfo")
+  subprocess.call("rm *.o", cwd="onion", shell=True, stderr=errfile, stdout=logfile)
+  subprocess.call("cp -R installs/onion/* onion/onion", shell=True, stderr=errfile, stdout=logfile)
   subprocess.Popen("make && ./hello", shell=True, cwd="onion", stderr=errfile, stdout=logfile)
   return 0
 

+ 5 - 1
php-codeigniter/application/controllers/bench.php

@@ -12,7 +12,7 @@ class Bench extends CI_Controller {
     public function json() {
         $this->output
             ->set_content_type('application/json')
-            ->set_output(json_encode(array('message' => 'Hello World!')));
+            ->set_output(json_encode(array('message' => 'Hello, World!')));
     }
 
     public function db($queries = 1) {
@@ -24,6 +24,10 @@ class Bench extends CI_Controller {
                 ->row();
         }
 
+        if ($queries == 1) {
+            $worlds = $worlds[0];
+        }
+
         $this->output
             ->set_content_type('application/json')
             ->set_output(json_encode($worlds));

+ 2 - 3
php-codeigniter/application/views/fortunes.php

@@ -1,8 +1,7 @@
 <!DOCTYPE html>
-<html lang="en">
+<html>
 <head>
-    <meta charset="utf-8">
-    <title>Welcome to CodeIgniter</title>
+    <title>Fortunes</title>
 </head>
 <body>
 

+ 1 - 1
php-codeigniter/deploy/nginx.conf

@@ -4,7 +4,7 @@ worker_processes  8;
 #error_log  logs/error.log;
 #error_log  logs/error.log  notice;
 #error_log  logs/error.log  info;
-error_log /dev/null crit;
+error_log stderr error;
 
 #pid        logs/nginx.pid;
 

+ 1 - 1
php-fuel/deploy/nginx.conf

@@ -4,7 +4,7 @@ worker_processes  8;
 #error_log  logs/error.log;
 #error_log  logs/error.log  notice;
 #error_log  logs/error.log  info;
-error_log /dev/null crit;
+error_log stderr error;
 
 #pid        logs/nginx.pid;
 

+ 5 - 1
php-fuel/fuel/app/classes/controller/bench.php

@@ -4,7 +4,7 @@ class Controller_Bench extends Controller
 {
     public function action_json()
     {
-        return new Response(json_encode(array('message' => 'Hello World!')), 200, array(
+        return new Response(json_encode(array('message' => 'Hello, World!')), 200, array(
             'Content-Type' => 'application/json'
         ));
     }
@@ -18,6 +18,10 @@ class Controller_Bench extends Controller
             $worlds[] = Model_World::find(mt_rand(1, 10000))->toJson();
         }
 
+        if($queries == 1) {
+            $worlds = $worlds[0];
+        }
+
         return new Response(json_encode($worlds), 200, array(
             'Content-Type' => 'application/json'
         ));

+ 2 - 2
php-fuel/fuel/app/config/config.php

@@ -108,8 +108,8 @@ return array(
 	 * Fuel::L_INFO
 	 * Fuel::L_ALL
 	 */
-	// 'log_threshold'    => Fuel::L_WARNING,
-	// 'log_path'         => APPPATH.'logs/',
+	 'log_threshold'    => Fuel::L_ERROR,
+	 'log_path'         => 'stderr',
 	// 'log_date_format'  => 'Y-m-d H:i:s',
 
 	/**

+ 0 - 3
php-fuel/fuel/app/logs/2013/01/20.php

@@ -1,3 +0,0 @@
-<?php defined('COREPATH') or exit('No direct script access allowed'); ?>
-
-ERROR - 2013-01-20 14:56:15 --> Error - Call to undefined function Oil\bool() in /data/www/fuelphp/1.5/develop/fuel/packages/oil/classes/generate.php on line 682

+ 0 - 52
php-fuel/fuel/app/logs/2013/04/12.php

@@ -1,52 +0,0 @@
-<?php defined('COREPATH') or exit('No direct script access allowed'); ?>
-
-WARNING - 2013-04-12 09:01:16 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 09:01:45 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 09:01:54 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 09:02:35 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 09:03:36 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 09:03:49 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 09:04:55 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 09:05:04 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 09:07:12 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 09:07:19 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 09:07:53 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-ERROR - 2013-04-12 09:07:53 --> Error - Class 'Orm\Model' not found in C:\xampp\htdocs\php-bench\fuel\app\classes\model\world.php on line 4
-WARNING - 2013-04-12 09:26:26 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-ERROR - 2013-04-12 09:26:26 --> Error - Call to undefined method Model_World::find() in C:\xampp\htdocs\php-bench\fuel\app\classes\controller\bench.php on line 20
-WARNING - 2013-04-12 09:27:46 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-ERROR - 2013-04-12 09:27:46 --> Error - Class 'model\Orm\Model' not found in C:\xampp\htdocs\php-bench\fuel\app\classes\model\world.php on line 6
-WARNING - 2013-04-12 09:29:15 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-ERROR - 2013-04-12 09:29:15 --> Error - Class 'Orm\Model' not found in C:\xampp\htdocs\php-bench\fuel\app\classes\model\world.php on line 4
-WARNING - 2013-04-12 09:29:51 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-ERROR - 2013-04-12 09:29:51 --> Error - Call to undefined method Model_World::find() in C:\xampp\htdocs\php-bench\fuel\app\classes\controller\bench.php on line 20
-WARNING - 2013-04-12 09:33:03 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-ERROR - 2013-04-12 09:33:05 --> 2002 - SQLSTATE[HY000] [2002] Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte.
- in C:\xampp\htdocs\php-bench\fuel\core\classes\database\pdo\connection.php on line 94
-WARNING - 2013-04-12 09:34:23 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-ERROR - 2013-04-12 09:34:23 --> Error - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'hello_world.myarticles' doesn't exist with query: "SELECT `t0`.`id` AS `t0_c0`, `t0`.`randomNumber` AS `t0_c1` FROM `myarticles` AS `t0` WHERE `t0`.`id` = 720 LIMIT 1" in C:\xampp\htdocs\php-bench\fuel\core\classes\database\pdo\connection.php on line 175
-WARNING - 2013-04-12 09:34:49 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-ERROR - 2013-04-12 09:34:51 --> 2002 - SQLSTATE[HY000] [2002] Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte.
- in C:\xampp\htdocs\php-bench\fuel\core\classes\database\pdo\connection.php on line 94
-WARNING - 2013-04-12 09:35:30 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-ERROR - 2013-04-12 09:35:30 --> Error - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'hello_world.myarticles' doesn't exist with query: "SELECT `t0`.`id` AS `t0_c0`, `t0`.`randomNumber` AS `t0_c1` FROM `myarticles` AS `t0` WHERE `t0`.`id` = 7936 LIMIT 1" in C:\xampp\htdocs\php-bench\fuel\core\classes\database\pdo\connection.php on line 175
-WARNING - 2013-04-12 09:35:56 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 09:36:12 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-ERROR - 2013-04-12 09:36:12 --> Error - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'hello_world.world' doesn't exist with query: "SELECT `t0`.`id` AS `t0_c0`, `t0`.`randomNumber` AS `t0_c1` FROM `world` AS `t0` WHERE `t0`.`id` = 325 LIMIT 1" in C:\xampp\htdocs\php-bench\fuel\core\classes\database\pdo\connection.php on line 175
-WARNING - 2013-04-12 09:36:31 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 09:38:37 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 09:42:37 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 09:43:12 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 10:03:13 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 10:08:26 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-ERROR - 2013-04-12 10:08:26 --> Error - Call to undefined method Controller_Bench::request() in C:\xampp\htdocs\php-bench\fuel\app\classes\controller\bench.php on line 14
-WARNING - 2013-04-12 10:10:34 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-ERROR - 2013-04-12 10:10:34 --> 2048 - Non-static method Fuel\Core\Request::param() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\php-bench\fuel\app\classes\controller\bench.php on line 14
-WARNING - 2013-04-12 10:10:53 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-ERROR - 2013-04-12 10:10:53 --> Error - Call to undefined method Controller_Bench::request() in C:\xampp\htdocs\php-bench\fuel\app\classes\controller\bench.php on line 14
-WARNING - 2013-04-12 10:13:11 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 10:13:16 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 10:13:20 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 10:13:38 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 10:13:45 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
-WARNING - 2013-04-12 10:13:48 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.

+ 1 - 2
php-fuel/fuel/app/views/bench/fortunes.php

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

+ 1 - 1
php-fuel/fuel/packages/oil/classes/console.php

@@ -28,7 +28,7 @@ class Console
 	{
 		error_reporting(E_ALL | E_STRICT);
 
-		ini_set("error_log", NULL);
+		ini_set("error_log", stderr);
 		ini_set("log_errors", 1);
 		ini_set("html_errors", 0);
 		ini_set("display_errors", 0);

+ 1 - 1
php-kohana/application/bootstrap.php

@@ -104,7 +104,7 @@ Kohana::init(array(
 /**
  * Attach the file write to logging. Multiple writers are supported.
  */
-Kohana::$log->attach(new Log_File(APPPATH.'logs'));
+//Kohana::$log->attach(new Log_File(APPPATH.'logs'));
 
 /**
  * Attach a file reader to config. Multiple readers are supported.

+ 5 - 1
php-kohana/application/classes/Controller/Bench.php

@@ -6,7 +6,7 @@ Class Controller_Bench extends Controller
     {
         $this->response
             ->headers(array('Content-Type' => 'application/json'))
-            ->body(json_encode(array('message' => 'Hello World!')));
+            ->body(json_encode(array('message' => 'Hello, World!')));
     }
 
     public function action_db()
@@ -24,6 +24,10 @@ Class Controller_Bench extends Controller
             $worlds[] = $query->param(':id', mt_rand(1, 10000))->execute()->current();
         }
 
+        if ($queries == 1) {
+            $worlds = $worlds[0];
+        }
+
         $this->response
             ->headers(array('Content-Type' => 'application/json'))
             ->body(json_encode($worlds));

+ 0 - 26
php-kohana/application/logs/2012/03/26.php

@@ -1,26 +0,0 @@
-<?php defined('SYSPATH') or die('No direct script access.'); ?>
-
-2012-03-26 09:13:53 --- ERROR: Kohana_Exception [ 0 ]: Attempted to load an invalid or missing module 'minion' at 'MODPATH/minion' ~ SYSPATH/classes/kohana/core.php [ 542 ]
-2012-03-26 09:13:53 --- STRACE: Kohana_Exception [ 0 ]: Attempted to load an invalid or missing module 'minion' at 'MODPATH/minion' ~ SYSPATH/classes/kohana/core.php [ 542 ]
---
-#0 /Volumes/Code/kohana/kohana-3.3/application/bootstrap.php(109): Kohana_Core::modules(Array)
-#1 /Volumes/Code/kohana/kohana-3.3/index.php(102): require('/Volumes/Code/k...')
-#2 {main}
-2012-03-26 09:14:48 --- EMERGENCY: ErrorException [ 1 ]: Class 'CLI' not found ~ DOCROOT/index.php [ 109 ] in :
-2012-03-26 09:14:48 --- ALERT: #0 [internal function]: Kohana_Core::shutdown_handler()
-#1 {main} in :
-2012-03-26 09:14:52 --- EMERGENCY: ErrorException [ 1 ]: Class 'CLI' not found ~ DOCROOT/index.php [ 109 ] in :
-2012-03-26 09:14:52 --- ALERT: #0 [internal function]: Kohana_Core::shutdown_handler()
-#1 {main} in :
-2012-03-26 09:15:13 --- EMERGENCY: ErrorException [ 1 ]: Class 'CLI' not found ~ DOCROOT/index.php [ 109 ] in :
-2012-03-26 09:15:13 --- ALERT: #0 [internal function]: Kohana_Core::shutdown_handler()
-#1 {main} in :
-2012-03-26 09:16:42 --- EMERGENCY: ErrorException [ 1 ]: Class 'Minion_Util' not found ~ MODPATH/minion/classes/Task/Help.php [ 20 ] in :
-2012-03-26 09:16:42 --- ALERT: #0 [internal function]: Kohana_Core::shutdown_handler()
-#1 {main} in :
-2012-03-26 09:18:10 --- EMERGENCY: ErrorException [ 1 ]: Call to undefined method Minion_Task::compile_task_list() ~ MODPATH/minion/classes/Task/Help.php [ 20 ] in :
-2012-03-26 09:18:10 --- ALERT: #0 [internal function]: Kohana_Core::shutdown_handler()
-#1 {main} in :
-2012-03-26 09:18:12 --- EMERGENCY: ErrorException [ 1 ]: Call to undefined method Minion_Task::compile_task_list() ~ MODPATH/minion/classes/Task/Help.php [ 20 ] in :
-2012-03-26 09:18:12 --- ALERT: #0 [internal function]: Kohana_Core::shutdown_handler()
-#1 {main} in :

+ 0 - 19
php-kohana/application/logs/2012/06/25.php

@@ -1,19 +0,0 @@
-<?php defined('SYSPATH') OR die('No direct script access.'); ?>
-
-2012-06-25 14:45:57 --- EMERGENCY: Kohana_Exception [ 0 ]: Cannot create instances of abstract Controller_Template ~ SYSPATH/classes/Kohana/Request/Client/Internal.php [ 87 ] in /home/vagrant/web-app/kohana-3.3/system/classes/Kohana/Request/Client.php:114
-2012-06-25 14:45:57 --- DEBUG: #0 /home/vagrant/web-app/kohana-3.3/system/classes/Kohana/Request/Client.php(114): Kohana_Request_Client_Internal->execute_request(Object(Mock_Request_92742025), Object(Response))
-#1 /home/vagrant/web-app/kohana-3.3/system/tests/kohana/request/client/InternalTest.php(64): Kohana_Request_Client->execute(Object(Mock_Request_92742025))
-#2 [internal function]: Kohana_Request_Client_InternalTest->test_response_failure_status('', 'Template', 'missing_action', 'kohana3/Templat...', 500)
-#3 /home/vagrant/web-app/kohana-3.3/modules/unittest/vendor/phpunit/PHPUnit/Framework/TestCase.php(738): ReflectionMethod->invokeArgs(Object(Kohana_Request_Client_InternalTest), Array)
-#4 /home/vagrant/web-app/kohana-3.3/modules/unittest/vendor/phpunit/PHPUnit/Framework/TestCase.php(628): PHPUnit_Framework_TestCase->runTest()
-#5 /home/vagrant/web-app/kohana-3.3/modules/unittest/vendor/phpunit/PHPUnit/Framework/TestResult.php(666): PHPUnit_Framework_TestCase->runBare()
-#6 /home/vagrant/web-app/kohana-3.3/modules/unittest/vendor/phpunit/PHPUnit/Framework/TestCase.php(576): PHPUnit_Framework_TestResult->run(Object(Kohana_Request_Client_InternalTest))
-#7 /home/vagrant/web-app/kohana-3.3/modules/unittest/vendor/phpunit/PHPUnit/Framework/TestSuite.php(757): PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult))
-#8 /home/vagrant/web-app/kohana-3.3/modules/unittest/vendor/phpunit/PHPUnit/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->runTest(Object(Kohana_Request_Client_InternalTest), Object(PHPUnit_Framework_TestResult))
-#9 /home/vagrant/web-app/kohana-3.3/modules/unittest/vendor/phpunit/PHPUnit/Framework/TestSuite.php(693): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
-#10 /home/vagrant/web-app/kohana-3.3/modules/unittest/vendor/phpunit/PHPUnit/Framework/TestSuite.php(693): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
-#11 /home/vagrant/web-app/kohana-3.3/modules/unittest/vendor/phpunit/PHPUnit/TextUI/TestRunner.php(305): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
-#12 /home/vagrant/web-app/kohana-3.3/modules/unittest/vendor/phpunit/PHPUnit/TextUI/Command.php(188): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
-#13 /home/vagrant/web-app/kohana-3.3/modules/unittest/vendor/phpunit/PHPUnit/TextUI/Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
-#14 /home/vagrant/web-app/kohana-3.3/modules/unittest/phpunit(68): PHPUnit_TextUI_Command::main()
-#15 {main} in /home/vagrant/web-app/kohana-3.3/system/classes/Kohana/Request/Client.php:114

+ 0 - 59
php-kohana/application/logs/2012/10/22.php

@@ -1,59 +0,0 @@
-<?php defined('SYSPATH') OR die('No direct script access.'); ?>
-
-2012-10-22 20:30:54 --- EMERGENCY: ErrorException [ 1 ]: Call to undefined method Kohana_HTTPTest::assertType() ~ SYSPATH/tests/kohana/HTTPTest.php [ 79 ] in :
-2012-10-22 20:30:54 --- DEBUG: #0 [internal function]: Kohana_Core::shutdown_handler()
-#1 {main} in :
-2012-10-22 20:32:59 --- EMERGENCY: Kohana_Exception [ 0 ]: Cannot create instances of abstract Controller_Template ~ SYSPATH/classes/Kohana/Request/Client/Internal.php [ 87 ] in /home/vagrant/web-app/kohana-3.3/system/classes/Kohana/Request/Client.php:114
-2012-10-22 20:32:59 --- DEBUG: #0 /home/vagrant/web-app/kohana-3.3/system/classes/Kohana/Request/Client.php(114): Kohana_Request_Client_Internal->execute_request(Object(Mock_Request_bb22a015), Object(Response))
-#1 /home/vagrant/web-app/kohana-3.3/system/tests/kohana/request/client/InternalTest.php(64): Kohana_Request_Client->execute(Object(Mock_Request_bb22a015))
-#2 [internal function]: Kohana_Request_Client_InternalTest->test_response_failure_status('', 'Template', 'missing_action', 'kohana3/Templat...', 500)
-#3 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php(969): ReflectionMethod->invokeArgs(Object(Kohana_Request_Client_InternalTest), Array)
-#4 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php(824): PHPUnit_Framework_TestCase->runTest()
-#5 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestResult.php(648): PHPUnit_Framework_TestCase->runBare()
-#6 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php(769): PHPUnit_Framework_TestResult->run(Object(Kohana_Request_Client_InternalTest))
-#7 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(775): PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult))
-#8 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(745): PHPUnit_Framework_TestSuite->runTest(Object(Kohana_Request_Client_InternalTest), Object(PHPUnit_Framework_TestResult))
-#9 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(705): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
-#10 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(705): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
-#11 /home/vagrant/web-app/kohana-3.3/modules/unittest/classes/Kohana/Unittest/TestSuite.php(51): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
-#12 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php(346): Kohana_Unittest_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
-#13 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(Unittest_TestSuite), Array)
-#14 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
-#15 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/composer/bin/phpunit(65): PHPUnit_TextUI_Command::main()
-#16 {main} in /home/vagrant/web-app/kohana-3.3/system/classes/Kohana/Request/Client.php:114
-2012-10-22 20:40:28 --- EMERGENCY: Kohana_Exception [ 0 ]: Cannot create instances of abstract Controller_Template ~ SYSPATH/classes/Kohana/Request/Client/Internal.php [ 87 ] in /home/vagrant/web-app/kohana-3.3/system/classes/Kohana/Request/Client.php:114
-2012-10-22 20:40:28 --- DEBUG: #0 /home/vagrant/web-app/kohana-3.3/system/classes/Kohana/Request/Client.php(114): Kohana_Request_Client_Internal->execute_request(Object(Mock_Request_c7f572f0), Object(Response))
-#1 /home/vagrant/web-app/kohana-3.3/system/tests/kohana/request/client/InternalTest.php(64): Kohana_Request_Client->execute(Object(Mock_Request_c7f572f0))
-#2 [internal function]: Kohana_Request_Client_InternalTest->test_response_failure_status('', 'Template', 'missing_action', 'kohana3/Templat...', 500)
-#3 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php(969): ReflectionMethod->invokeArgs(Object(Kohana_Request_Client_InternalTest), Array)
-#4 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php(824): PHPUnit_Framework_TestCase->runTest()
-#5 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestResult.php(648): PHPUnit_Framework_TestCase->runBare()
-#6 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php(769): PHPUnit_Framework_TestResult->run(Object(Kohana_Request_Client_InternalTest))
-#7 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(775): PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult))
-#8 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(745): PHPUnit_Framework_TestSuite->runTest(Object(Kohana_Request_Client_InternalTest), Object(PHPUnit_Framework_TestResult))
-#9 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(705): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
-#10 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(705): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
-#11 /home/vagrant/web-app/kohana-3.3/modules/unittest/classes/Kohana/Unittest/TestSuite.php(51): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
-#12 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php(346): Kohana_Unittest_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
-#13 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(Unittest_TestSuite), Array)
-#14 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
-#15 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/composer/bin/phpunit(65): PHPUnit_TextUI_Command::main()
-#16 {main} in /home/vagrant/web-app/kohana-3.3/system/classes/Kohana/Request/Client.php:114
-2012-10-22 20:46:06 --- EMERGENCY: Kohana_Exception [ 0 ]: Cannot create instances of abstract Controller_Template ~ SYSPATH/classes/Kohana/Request/Client/Internal.php [ 87 ] in /home/vagrant/web-app/kohana-3.3/system/classes/Kohana/Request/Client.php:114
-2012-10-22 20:46:06 --- DEBUG: #0 /home/vagrant/web-app/kohana-3.3/system/classes/Kohana/Request/Client.php(114): Kohana_Request_Client_Internal->execute_request(Object(Mock_Request_1b920cf9), Object(Response))
-#1 /home/vagrant/web-app/kohana-3.3/system/tests/kohana/request/client/InternalTest.php(64): Kohana_Request_Client->execute(Object(Mock_Request_1b920cf9))
-#2 [internal function]: Kohana_Request_Client_InternalTest->test_response_failure_status('', 'Template', 'missing_action', 'kohana3/Templat...', 500)
-#3 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php(969): ReflectionMethod->invokeArgs(Object(Kohana_Request_Client_InternalTest), Array)
-#4 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php(824): PHPUnit_Framework_TestCase->runTest()
-#5 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestResult.php(648): PHPUnit_Framework_TestCase->runBare()
-#6 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php(769): PHPUnit_Framework_TestResult->run(Object(Kohana_Request_Client_InternalTest))
-#7 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(775): PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult))
-#8 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(745): PHPUnit_Framework_TestSuite->runTest(Object(Kohana_Request_Client_InternalTest), Object(PHPUnit_Framework_TestResult))
-#9 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(705): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
-#10 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(705): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
-#11 /home/vagrant/web-app/kohana-3.3/modules/unittest/classes/Kohana/Unittest/TestSuite.php(51): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
-#12 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php(346): Kohana_Unittest_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
-#13 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(Unittest_TestSuite), Array)
-#14 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
-#15 /home/vagrant/web-app/kohana-3.3/vendor/phpunit/phpunit/composer/bin/phpunit(65): PHPUnit_TextUI_Command::main()
-#16 {main} in /home/vagrant/web-app/kohana-3.3/system/classes/Kohana/Request/Client.php:114

+ 2 - 3
php-kohana/application/views/bench/fortunes.php

@@ -1,8 +1,7 @@
 <!DOCTYPE html>
-<html lang="en">
+<html>
 <head>
-    <meta charset="utf-8">
-    <title>Benchmark</title>
+    <title>Fortunes</title>
 </head>
 <body>
 

+ 1 - 1
php-kohana/deploy/nginx.conf

@@ -4,7 +4,7 @@ worker_processes  8;
 #error_log  logs/error.log;
 #error_log  logs/error.log  notice;
 #error_log  logs/error.log  info;
-error_log /dev/null crit;
+error_log stderr error;
 
 #pid        logs/nginx.pid;
 

+ 1 - 1
php-laravel/application/routes.php

@@ -35,7 +35,7 @@ Route::controller(Controller::detect());
 
 Route::get('/json', function()
 {
-    return Response::json(array('message' => 'Hello World!'));
+    return Response::json(array('message' => 'Hello, World!'));
 });
 
 Route::get('/db', function()

+ 1 - 2
php-laravel/application/views/layouts/main.blade.php

@@ -2,8 +2,7 @@
 
 <html>
 <head>
-    <title>Benchmark</title>
-    <meta charset=utf-8>
+    <title>Fortunes</title>
 </head>
 <body>
 {{ $content }}

+ 1 - 1
php-laravel/deploy/nginx.conf

@@ -4,7 +4,7 @@ worker_processes  8;
 #error_log  logs/error.log;
 #error_log  logs/error.log  notice;
 #error_log  logs/error.log  info;
-error_log /dev/null crit;
+error_log stderr error;
 
 #pid        logs/nginx.pid;
 

+ 1 - 1
php-lithium/app/controllers/BenchController.php

@@ -9,7 +9,7 @@ class BenchController extends Controller {
 
     public function json() {
         return $this->render(array(
-            'json' => array('message' => 'Hello World!')
+            'json' => array('message' => 'Hello, World!')
         ));
     }
 

+ 2 - 2
php-lithium/app/controllers/HelloWorldController.php

@@ -15,11 +15,11 @@ class HelloWorldController extends \lithium\action\Controller {
 	}
 
 	public function to_string() {
-		return "Hello World";
+		return "Hello, World!";
 	}
 
 	public function to_json() {
-		return $this->render(array('json' => 'Hello World'));
+		return $this->render(array('json' => 'Hello, World!'));
 	}
 }
 

+ 1 - 1
php-lithium/deploy/nginx.conf

@@ -4,7 +4,7 @@ worker_processes  8;
 #error_log  logs/error.log;
 #error_log  logs/error.log  notice;
 #error_log  logs/error.log  info;
-error_log /dev/null crit;
+error_log stderr error;
 
 #pid        logs/nginx.pid;
 

+ 4 - 0
php-micromvc/Class/Controller/Benchmark/Db.php

@@ -15,6 +15,10 @@ class Db extends \MyController
         for ($i = 0; $i < $queries; ++$i) {
             $this->worlds[] = World::row(array('id' => mt_rand(1, 10000)))->to_array();
         }
+
+        if ($queries == 1) {
+            $this->worlds = $this->worlds[0];
+        }
     }
 
     public function send() {

+ 1 - 1
php-micromvc/Class/Controller/Benchmark/Json.php

@@ -9,6 +9,6 @@ class Json extends \MyController
     public function send()
     {
         headers_sent() OR header('Content-type: application/json');
-        echo json_encode(array('message' => 'Hello World'));
+        echo json_encode(array('message' => 'Hello, World!'));
     }
 }

+ 2 - 1
php-micromvc/Common.php

@@ -164,7 +164,8 @@ function token()
  */
 function log_message($message)
 {
-	$path = SP . 'Storage/Log/' . date('Y-m-d') . '.log';
+	//$path = SP . 'Storage/Log/' . date('Y-m-d') . '.log';
+	$path = 'stderr';
 
 	// Append date and IP to log message
 	return error_log(date('H:i:s ') . getenv('REMOTE_ADDR') . " $message\n", 3, $path);

+ 1 - 1
php-micromvc/deploy/nginx.conf

@@ -4,7 +4,7 @@ worker_processes  8;
 #error_log  logs/error.log;
 #error_log  logs/error.log  notice;
 #error_log  logs/error.log  info;
-error_log /dev/null crit;
+error_log stderr error;
 
 #pid        logs/nginx.pid;
 

+ 1 - 1
php-phalcon-micro/compiled-templates/_home_tfb_frameworkbenchmarks_php-phalcon-micro_views_layouts_bench.volt.c

@@ -1 +1 @@
-<!DOCTYPE html><html><head><title>Fortunes</title><meta charset="utf-8"></head><body><?php echo $this->getContent(); ?></body></html>
+<!DOCTYPE html><html><head><title>Fortunes</title></head><body><?php echo $this->getContent(); ?></body></html>

+ 1 - 1
php-phalcon-micro/deploy/nginx.conf

@@ -4,7 +4,7 @@ worker_processes  8;
 #error_log  logs/error.log;
 #error_log  logs/error.log  notice;
 #error_log  logs/error.log  info;
-error_log /dev/null crit;
+error_log stderr error;
 
 #pid        logs/nginx.pid;
 

+ 5 - 1
php-phalcon-micro/public/index.php

@@ -42,7 +42,7 @@ try {
 
     $app->map('/json', function() {
         header("Content-Type: application/json");
-        echo json_encode(array('message' => 'Hello World!'));
+        echo json_encode(array('message' => 'Hello, World!'));
     });
 
     //
@@ -58,6 +58,10 @@ try {
             $worlds[] = $db->fetchOne('SELECT * FROM world WHERE id = ' . mt_rand(1, 10000), Phalcon\Db::FETCH_ASSOC);
         }
 
+        if ($queries == 1) {
+            $worlds = $worlds[0];
+        }
+
         echo json_encode($worlds);
     });
 

+ 1 - 1
php-phalcon-micro/views/layouts/bench.volt

@@ -1 +1 @@
-<!DOCTYPE html><html><head><title>Fortunes</title><meta charset="utf-8"></head><body>{{ content() }}</body></html>
+<!DOCTYPE html><html><head><title>Fortunes</title></head><body>{{ content() }}</body></html>

+ 1 - 1
php-phalcon/app/compiled-templates/_home_tfb_frameworkbenchmarks_php-phalcon_app_views_layouts_bench.volt.compiled

@@ -1 +1 @@
-<!DOCTYPE html><html><head><title>Fortunes</title><meta charset="utf-8"></head><body><?php echo $this->getContent(); ?></body></html>
+<!DOCTYPE html><html><head><title>Fortunes</title></head><body><?php echo $this->getContent(); ?></body></html>

+ 7 - 2
php-phalcon/app/controllers/BenchController.php

@@ -13,7 +13,7 @@ class BenchController extends \Phalcon\Mvc\Controller
 
     public function jsonAction() {
         return $this->sendContentAsJson(array(
-            'message' => 'Hello World!'
+            'message' => 'Hello, World!'
         ));
     }
 
@@ -27,7 +27,12 @@ class BenchController extends \Phalcon\Mvc\Controller
             $worlds[] = Worlds::findFirst(mt_rand(1, 10000));
         }
 
-        return $this->sendContentAsJson($worlds);
+        if (count($worlds) == 1) {
+            return $this->sendContentAsJson($worlds[0]);
+        }
+        else {
+            return $this->sendContentAsJson($worlds);
+        }
     }
 
     public function fortunesAction() {

+ 1 - 1
php-phalcon/app/views/layouts/bench.volt

@@ -1 +1 @@
-<!DOCTYPE html><html><head><title>Fortunes</title><meta charset="utf-8"></head><body>{{ content() }}</body></html>
+<!DOCTYPE html><html><head><title>Fortunes</title></head><body>{{ content() }}</body></html>

+ 1 - 1
php-phalcon/deploy/nginx.conf

@@ -4,7 +4,7 @@ worker_processes  8;
 #error_log  logs/error.log;
 #error_log  logs/error.log  notice;
 #error_log  logs/error.log  info;
-error_log /dev/null crit;
+error_log stderr error;
 
 #pid        logs/nginx.pid;
 

+ 1 - 1
php-phpixie/deploy/nginx.conf

@@ -4,7 +4,7 @@ worker_processes  8;
 #error_log  logs/error.log;
 #error_log  logs/error.log  notice;
 #error_log  logs/error.log  info;
-error_log /dev/null crit;
+error_log stderr error;
 
 #pid        logs/nginx.pid;
 

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