Browse Source

Merge branch 'round-14' of github.com:TechEmpower/FrameworkBenchmarks into round-14

mfirry 9 years ago
parent
commit
f1127fb06f
42 changed files with 139 additions and 368 deletions
  1. 0 2
      .travis.yml
  2. 1 1
      README.md
  3. 0 1
      frameworks/Go/revel-jet/.gitignore
  4. 0 26
      frameworks/Go/revel-jet/benchmark_config.json
  5. 0 8
      frameworks/Go/revel-jet/setup.sh
  6. 0 10
      frameworks/Go/revel-jet/source_code
  7. 0 14
      frameworks/Go/revel-jet/src/benchmark/app/views/App/Fortune.html
  8. 0 2
      frameworks/Go/revel-jet/src/benchmark/app/views/footer.html
  9. 0 6
      frameworks/Go/revel-jet/src/benchmark/app/views/header.html
  10. 0 28
      frameworks/Go/revel-jet/src/benchmark/conf/app.conf
  11. 0 7
      frameworks/Go/revel-jet/src/benchmark/conf/routes
  12. 0 26
      frameworks/Go/revel-qbs/benchmark_config.json
  13. BIN
      frameworks/Go/revel-qbs/bin/revel
  14. 0 8
      frameworks/Go/revel-qbs/setup.sh
  15. 0 10
      frameworks/Go/revel-qbs/source_code
  16. 0 14
      frameworks/Go/revel-qbs/src/benchmark/app/views/App/Fortune.html
  17. 0 2
      frameworks/Go/revel-qbs/src/benchmark/app/views/footer.html
  18. 0 6
      frameworks/Go/revel-qbs/src/benchmark/app/views/header.html
  19. 0 28
      frameworks/Go/revel-qbs/src/benchmark/conf/app.conf
  20. 0 7
      frameworks/Go/revel-qbs/src/benchmark/conf/routes
  21. 1 0
      frameworks/Go/revel/.gitignore
  22. 61 2
      frameworks/Go/revel/benchmark_config.json
  23. 3 0
      frameworks/Go/revel/setup.sh
  24. 5 8
      frameworks/Go/revel/source_code
  25. 8 4
      frameworks/Go/revel/src/benchmark/app/controllers/app.go
  26. 6 62
      frameworks/Go/revel/src/benchmark/app/controllers/jet.go
  27. 5 52
      frameworks/Go/revel/src/benchmark/app/controllers/qbs.go
  28. 6 7
      frameworks/Go/revel/src/benchmark/app/db/jet.go
  29. 9 10
      frameworks/Go/revel/src/benchmark/app/db/qbs.go
  30. 6 0
      frameworks/Go/revel/src/benchmark/conf/routes
  31. 7 1
      frameworks/Ruby/sinatra/hello_world.rb
  32. 1 1
      frameworks/Ruby/sinatra/run_jruby_puma.sh
  33. 1 1
      frameworks/Ruby/sinatra/run_mri_puma.sh
  34. 1 1
      frameworks/Ruby/sinatra/run_rbx_puma.sh
  35. 1 1
      frameworks/Ruby/sinatra/run_thin.sh
  36. 1 1
      frameworks/Ruby/sinatra/run_torqbox.sh
  37. 1 1
      frameworks/Ruby/sinatra/run_trinidad.sh
  38. 1 1
      frameworks/Ruby/sinatra/run_unicorn.sh
  39. 2 2
      toolset/benchmark/framework_test.py
  40. 3 2
      toolset/setup/linux/frameworks/silicon.sh
  41. 4 1
      toolset/setup/linux/languages/nim.sh
  42. 5 4
      toolset/setup/linux/webservers/mongrel2.sh

+ 0 - 2
.travis.yml

@@ -64,8 +64,6 @@ env:
     - "TESTDIR=Go/go-std-mysql"
     - "TESTDIR=Go/go-std-mysql"
     - "TESTDIR=Go/go-std-postgresql"
     - "TESTDIR=Go/go-std-postgresql"
     - "TESTDIR=Go/revel"
     - "TESTDIR=Go/revel"
-    - "TESTDIR=Go/revel-jet"
-    - "TESTDIR=Go/revel-qbs"
     - "TESTDIR=Go/webgo"
     - "TESTDIR=Go/webgo"
     - "TESTDIR=Groovy/grails"
     - "TESTDIR=Groovy/grails"
     - "TESTDIR=Haskell/snap"
     - "TESTDIR=Haskell/snap"

+ 1 - 1
README.md

@@ -74,4 +74,4 @@ can be found in the [TFB documentation](http://frameworkbenchmarks.readthedocs.o
 
 
 Join in the conversation at our 
 Join in the conversation at our 
 [Google Group](https://groups.google.com/forum/?fromgroups=#!forum/framework-benchmarks), 
 [Google Group](https://groups.google.com/forum/?fromgroups=#!forum/framework-benchmarks), 
-or chat with us on [Freenode](https://freenode.net/faq.shtml#whatwhy) at `#techempower-fwbm`. 
+or chat with us on [Freenode](https://webchat.freenode.net/) at `#techempower-fwbm`. 

+ 0 - 1
frameworks/Go/revel-jet/.gitignore

@@ -1 +0,0 @@
-src/github.com/

+ 0 - 26
frameworks/Go/revel-jet/benchmark_config.json

@@ -1,26 +0,0 @@
-{
-  "framework": "revel-jet",
-  "tests": [{
-    "default": {
-      "setup_file": "setup",
-      "db_url": "/db",
-      "query_url": "/db?queries=",
-      "fortune_url": "/fortune",
-      "update_url": "/update?queries=",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Fullstack",
-      "database": "MySQL",
-      "framework": "revel",
-      "language": "Go",
-      "orm": "Raw",
-      "platform": "Go",
-      "webserver": "None",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "revel-jet",
-      "notes": "",
-      "versus": "go"
-    }
-  }]
-}

+ 0 - 8
frameworks/Go/revel-jet/setup.sh

@@ -1,8 +0,0 @@
-#!/bin/bash
-
-fw_depends go
-
-sed -i 's|tcp(.*:3306)|tcp('"${DBHOST}"':3306)|g' src/benchmark/conf/app.conf
-
-go get -u github.com/revel/cmd/revel github.com/eaigner/jet
-bin/revel run benchmark prod &

+ 0 - 10
frameworks/Go/revel-jet/source_code

@@ -1,10 +0,0 @@
-./revel-jet/src/benchmark/app/
-./revel-jet/src/benchmark/app/db
-./revel-jet/src/benchmark/app/db/jet.go
-./revel-jet/src/benchmark/app/controllers
-./revel-jet/src/benchmark/app/controllers/app.go
-./revel-jet/src/benchmark/app/views
-./revel-jet/src/benchmark/app/views/footer.html
-./revel-jet/src/benchmark/app/views/App
-./revel-jet/src/benchmark/app/views/App/Fortune.html
-./revel-jet/src/benchmark/app/views/header.html

+ 0 - 14
frameworks/Go/revel-jet/src/benchmark/app/views/App/Fortune.html

@@ -1,14 +0,0 @@
-{{template "header.html" .}}
-<table>
-<tr>
-<th>id</th>
-<th>message</th>
-</tr>
-{{range .fortunes}}
-<tr>
-<td>{{.Id}}</td>
-<td>{{.Message}}</td>
-</tr>
-{{end}}
-</table>
-{{template "footer.html" .}}

+ 0 - 2
frameworks/Go/revel-jet/src/benchmark/app/views/footer.html

@@ -1,2 +0,0 @@
-</body>
-</html>

+ 0 - 6
frameworks/Go/revel-jet/src/benchmark/app/views/header.html

@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>Fortunes</title>
-</head>
-<body>

+ 0 - 28
frameworks/Go/revel-jet/src/benchmark/conf/app.conf

@@ -1,28 +0,0 @@
-app.name=benchmark
-http.addr=
-http.port=8080
-
-db.driver = mysql
-db.import = github.com/go-sql-driver/mysql
-db.spec = benchmarkdbuser:benchmarkdbpass@tcp(localhost:3306)/hello_world
-
-results.pretty=false
-results.chunked=false
-
-[dev]
-mode.dev=true
-watch=true
-
-log.trace.output = stderr
-log.info.output  = stderr
-log.warn.output  = stderr
-log.error.output = stderr
-
-[prod]
-mode.dev=false
-watch=false
-
-log.trace.output = stderr
-log.info.output  = stderr
-log.warn.output  = stderr
-log.error.output = stderr

+ 0 - 7
frameworks/Go/revel-jet/src/benchmark/conf/routes

@@ -1,7 +0,0 @@
-# Routes
-# This file defines all application routes (Higher priority routes first)
-# ~~~~
-
-GET     /db                                     App.Db
-GET     /fortune                                App.Fortune
-GET     /update                                 App.Update

+ 0 - 26
frameworks/Go/revel-qbs/benchmark_config.json

@@ -1,26 +0,0 @@
-{
-  "framework": "revel-qbs",
-  "tests": [{
-    "default": {
-      "setup_file": "setup",
-      "db_url": "/db",
-      "query_url": "/db?queries=",
-      "fortune_url": "/fortune",
-      "update_url": "/update?queries=",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Fullstack",
-      "database": "MySQL",
-      "framework": "revel",
-      "language": "Go",
-      "orm": "Raw",
-      "platform": "Go",
-      "webserver": "None",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "revel-qbs",
-      "notes": "",
-      "versus": "go"
-    }
-  }]
-}

BIN
frameworks/Go/revel-qbs/bin/revel


+ 0 - 8
frameworks/Go/revel-qbs/setup.sh

@@ -1,8 +0,0 @@
-#!/bin/bash
-
-fw_depends go
-
-sed -i 's|tcp(.*:3306)|tcp('"${DBHOST}"':3306)|g' src/benchmark/conf/app.conf
-
-go get -u github.com/revel/cmd/revel github.com/coocood/qbs
-bin/revel run benchmark prod &

+ 0 - 10
frameworks/Go/revel-qbs/source_code

@@ -1,10 +0,0 @@
-./revel-qbs/src/benchmark/app/
-./revel-qbs/src/benchmark/app/db
-./revel-qbs/src/benchmark/app/db/qbs.go
-./revel-qbs/src/benchmark/app/controllers
-./revel-qbs/src/benchmark/app/controllers/app.go
-./revel-qbs/src/benchmark/app/views
-./revel-qbs/src/benchmark/app/views/footer.html
-./revel-qbs/src/benchmark/app/views/App
-./revel-qbs/src/benchmark/app/views/App/Fortune.html
-./revel-qbs/src/benchmark/app/views/header.html

+ 0 - 14
frameworks/Go/revel-qbs/src/benchmark/app/views/App/Fortune.html

@@ -1,14 +0,0 @@
-{{template "header.html" .}}
-<table>
-<tr>
-<th>id</th>
-<th>message</th>
-</tr>
-{{range .fortunes}}
-<tr>
-<td>{{.Id}}</td>
-<td>{{.Message}}</td>
-</tr>
-{{end}}
-</table>
-{{template "footer.html" .}}

+ 0 - 2
frameworks/Go/revel-qbs/src/benchmark/app/views/footer.html

@@ -1,2 +0,0 @@
-</body>
-</html>

+ 0 - 6
frameworks/Go/revel-qbs/src/benchmark/app/views/header.html

@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>Fortunes</title>
-</head>
-<body>

+ 0 - 28
frameworks/Go/revel-qbs/src/benchmark/conf/app.conf

@@ -1,28 +0,0 @@
-app.name=benchmark
-http.addr=
-http.port=8080
-
-db.driver = mysql
-db.import = github.com/go-sql-driver/mysql
-db.spec = benchmarkdbuser:benchmarkdbpass@tcp(localhost:3306)/hello_world
-
-results.pretty=false
-results.chunked=false
-
-[dev]
-mode.dev=true
-watch=true
-
-log.trace.output = stderr
-log.info.output  = stderr
-log.warn.output  = stderr
-log.error.output = stderr
-
-[prod]
-mode.dev=false
-watch=false
-
-log.trace.output = off
-log.info.output  = off
-log.warn.output  = off
-log.error.output = %(app.name)s.log

+ 0 - 7
frameworks/Go/revel-qbs/src/benchmark/conf/routes

@@ -1,7 +0,0 @@
-# Routes
-# This file defines all application routes (Higher priority routes first)
-# ~~~~
-
-GET     /db                                     App.Db
-GET     /fortune                                App.Fortune
-GET     /update                                 App.Update

+ 1 - 0
frameworks/Go/revel/.gitignore

@@ -1 +1,2 @@
 /src/github.com/
 /src/github.com/
+bin/

+ 61 - 2
frameworks/Go/revel/benchmark_config.json

@@ -4,11 +4,28 @@
     "default": {
     "default": {
       "setup_file": "setup",
       "setup_file": "setup",
       "json_url": "/json",
       "json_url": "/json",
+      "plaintext_url": "/plaintext",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Fullstack",
+      "database": "MySQL",
+      "framework": "revel",
+      "language": "Go",
+      "orm": "Raw",
+      "platform": "Go",
+      "webserver": "None",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "revel",
+      "notes": "",
+      "versus": "go"
+    },
+    "raw": {
+      "setup_file": "setup",
       "db_url": "/db",
       "db_url": "/db",
       "query_url": "/db?queries=",
       "query_url": "/db?queries=",
       "fortune_url": "/fortune",
       "fortune_url": "/fortune",
       "update_url": "/update?queries=",
       "update_url": "/update?queries=",
-      "plaintext_url": "/plaintext",
       "port": 8080,
       "port": 8080,
       "approach": "Realistic",
       "approach": "Realistic",
       "classification": "Fullstack",
       "classification": "Fullstack",
@@ -20,7 +37,49 @@
       "webserver": "None",
       "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
-      "display_name": "revel",
+      "display_name": "revel-raw",
+      "notes": "",
+      "versus": "go"
+    },
+    "jet": {
+      "setup_file": "setup",
+      "db_url": "/jet-db",
+      "query_url": "/jet-db?queries=",
+      "fortune_url": "/jet-fortune",
+      "update_url": "/jet-update?queries=",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Fullstack",
+      "database": "MySQL",
+      "framework": "revel",
+      "language": "Go",
+      "orm": "micro",
+      "platform": "Go",
+      "webserver": "None",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "revel-jet",
+      "notes": "",
+      "versus": "go"
+    },
+    "qbs": {
+      "setup_file": "setup",
+      "db_url": "/qbs-db",
+      "query_url": "/qbs-db?queries=",
+      "fortune_url": "/qbs-fortune",
+      "update_url": "/qbs-update?queries=",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Fullstack",
+      "database": "MySQL",
+      "framework": "revel",
+      "language": "Go",
+      "orm": "micro",
+      "platform": "Go",
+      "webserver": "None",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "revel-qbs",
       "notes": "",
       "notes": "",
       "versus": "go"
       "versus": "go"
     }
     }

+ 3 - 0
frameworks/Go/revel/setup.sh

@@ -5,4 +5,7 @@ fw_depends go
 sed -i 's|tcp(.*:3306)|tcp('"${DBHOST}"':3306)|g' src/benchmark/conf/app.conf
 sed -i 's|tcp(.*:3306)|tcp('"${DBHOST}"':3306)|g' src/benchmark/conf/app.conf
 
 
 go get -u github.com/revel/cmd/revel
 go get -u github.com/revel/cmd/revel
+go get -u github.com/coocood/qbs
+go get -u github.com/eaigner/jet
+
 bin/revel run benchmark prod &
 bin/revel run benchmark prod &

+ 5 - 8
frameworks/Go/revel/source_code

@@ -1,8 +1,5 @@
-./revel/src/benchmark/app/
-./revel/src/benchmark/app/controllers
-./revel/src/benchmark/app/controllers/app.go
-./revel/src/benchmark/app/views
-./revel/src/benchmark/app/views/footer.html
-./revel/src/benchmark/app/views/App
-./revel/src/benchmark/app/views/App/Fortune.html
-./revel/src/benchmark/app/views/header.html
+revel/src/benchmark/app/controllers/jet.go
+revel/src/benchmark/app/controllers/qbs.go
+revel/src/benchmark/app/controllers/app.go
+revel/src/benchmark/app/db/jet.go
+revel/src/benchmark/app/db/qbs.go

+ 8 - 4
frameworks/Go/revel/src/benchmark/app/controllers/app.go

@@ -3,9 +3,10 @@ package controllers
 import (
 import (
 	"database/sql"
 	"database/sql"
 	"math/rand"
 	"math/rand"
-	"runtime"
 	"sort"
 	"sort"
 
 
+	dbm "benchmark/app/db"
+
 	"github.com/revel/modules/db/app"
 	"github.com/revel/modules/db/app"
 	"github.com/revel/revel"
 	"github.com/revel/revel"
 )
 )
@@ -15,12 +16,12 @@ type MessageStruct struct {
 }
 }
 
 
 type World struct {
 type World struct {
-	Id           uint16 `json:"id"`
+	Id           uint16 `json:"id" qbs:"pk"`
 	RandomNumber uint16 `json:"randomNumber"`
 	RandomNumber uint16 `json:"randomNumber"`
 }
 }
 
 
 type Fortune struct {
 type Fortune struct {
-	Id      uint16 `json:"id"`
+	Id      uint16 `json:"id" qbs:"pk"`
 	Message string `json:"message"`
 	Message string `json:"message"`
 }
 }
 
 
@@ -46,9 +47,12 @@ func init() {
 	}
 	}
 	revel.OnAppStart(func() {
 	revel.OnAppStart(func() {
 		var err error
 		var err error
-		runtime.GOMAXPROCS(runtime.NumCPU())
 		db.Init()
 		db.Init()
 		db.Db.SetMaxIdleConns(MaxConnectionCount)
 		db.Db.SetMaxIdleConns(MaxConnectionCount)
+		dbm.InitJet()
+		dbm.Jet.SetMaxIdleConns(MaxConnectionCount)
+		dbm.InitQbs(MaxConnectionCount)
+
 		if worldStatement, err = db.Db.Prepare(WorldSelect); err != nil {
 		if worldStatement, err = db.Db.Prepare(WorldSelect); err != nil {
 			revel.ERROR.Fatalln(err)
 			revel.ERROR.Fatalln(err)
 		}
 		}

+ 6 - 62
frameworks/Go/revel-jet/src/benchmark/app/controllers/app.go → frameworks/Go/revel/src/benchmark/app/controllers/jet.go

@@ -2,62 +2,14 @@ package controllers
 
 
 import (
 import (
 	"math/rand"
 	"math/rand"
-	"runtime"
 	"sort"
 	"sort"
 
 
 	"benchmark/app/db"
 	"benchmark/app/db"
-	"github.com/revel/revel"
-)
-
-type MessageStruct struct {
-	Message string `json:"message"`
-}
-
-type World struct {
-	Id           uint16 `json:"id"`
-	RandomNumber uint16 `json:"randomNumber"`
-}
 
 
-type Fortune struct {
-	Id      uint16 `json:"id"`
-	Message string `json:"message"`
-}
-
-const (
-	WorldSelect        = `SELECT id, randomNumber FROM World WHERE id = ?`
-	WorldUpdate        = `UPDATE World SET randomNumber = ? WHERE id = ?`
-	FortuneSelect      = `SELECT id, message FROM Fortune`
-	WorldRowCount      = 10000
-	MaxConnectionCount = 260
+	"github.com/revel/revel"
 )
 )
 
 
-func init() {
-	revel.Filters = []revel.Filter{
-		revel.RouterFilter,
-		revel.ParamsFilter,
-		revel.ActionInvoker,
-	}
-	revel.OnAppStart(func() {
-		runtime.GOMAXPROCS(runtime.NumCPU())
-		db.Init()
-		db.Jet.SetMaxIdleConns(MaxConnectionCount)
-	})
-}
-
-type App struct {
-	*revel.Controller
-}
-
-func (c App) Json() revel.Result {
-	c.Response.ContentType = "application/json"
-	return c.RenderJson(MessageStruct{"Hello, world"})
-}
-
-func (c App) Plaintext() revel.Result {
-	return c.RenderText("Hello, World!")
-}
-
-func (c App) Db(queries int) revel.Result {
+func (c App) JetDb(queries int) revel.Result {
 	if queries <= 1 {
 	if queries <= 1 {
 		var w World
 		var w World
 		err := db.Jet.Query(WorldSelect, rand.Intn(WorldRowCount)+1).Rows(&w)
 		err := db.Jet.Query(WorldSelect, rand.Intn(WorldRowCount)+1).Rows(&w)
@@ -77,7 +29,7 @@ func (c App) Db(queries int) revel.Result {
 	return c.RenderJson(ww)
 	return c.RenderJson(ww)
 }
 }
 
 
-func (c App) Update(queries int) revel.Result {
+func (c App) JetUpdate(queries int) revel.Result {
 	if queries <= 1 {
 	if queries <= 1 {
 		var w World
 		var w World
 		err := db.Jet.Query(WorldSelect, rand.Intn(WorldRowCount)+1).Rows(&w)
 		err := db.Jet.Query(WorldSelect, rand.Intn(WorldRowCount)+1).Rows(&w)
@@ -105,7 +57,7 @@ func (c App) Update(queries int) revel.Result {
 	return c.RenderJson(ww)
 	return c.RenderJson(ww)
 }
 }
 
 
-func (c App) Fortune() revel.Result {
+func (c App) JetFortune() revel.Result {
 	var fortunes Fortunes
 	var fortunes Fortunes
 	err := db.Jet.Query(FortuneSelect).Rows(&fortunes)
 	err := db.Jet.Query(FortuneSelect).Rows(&fortunes)
 	if err != nil {
 	if err != nil {
@@ -113,14 +65,6 @@ func (c App) Fortune() revel.Result {
 	}
 	}
 	fortunes = append(fortunes, &Fortune{Message: "Additional fortune added at request time."})
 	fortunes = append(fortunes, &Fortune{Message: "Additional fortune added at request time."})
 	sort.Sort(ByMessage{fortunes})
 	sort.Sort(ByMessage{fortunes})
-	return c.Render(fortunes)
+	c.RenderArgs["fortunes"] = fortunes
+	return c.RenderTemplate("App/Fortune.html")
 }
 }
-
-type Fortunes []*Fortune
-
-func (s Fortunes) Len() int      { return len(s) }
-func (s Fortunes) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-
-type ByMessage struct{ Fortunes }
-
-func (s ByMessage) Less(i, j int) bool { return s.Fortunes[i].Message < s.Fortunes[j].Message }

+ 5 - 52
frameworks/Go/revel-qbs/src/benchmark/app/controllers/app.go → frameworks/Go/revel/src/benchmark/app/controllers/qbs.go

@@ -2,52 +2,13 @@ package controllers
 
 
 import (
 import (
 	"math/rand"
 	"math/rand"
-	"runtime"
 	"sort"
 	"sort"
 
 
-	"benchmark/app/db"
-
 	"github.com/coocood/qbs"
 	"github.com/coocood/qbs"
 	"github.com/revel/revel"
 	"github.com/revel/revel"
 )
 )
 
 
-type MessageStruct struct {
-	Message string `json:"message"`
-}
-
-type World struct {
-	Id           uint16 `json:"id" qbs:"pk"`
-	RandomNumber uint16 `json:"randomNumber"`
-}
-
-type Fortune struct {
-	Id      uint16 `json:"id" qbs:"pk"`
-	Message string `json:"message"`
-}
-
-const (
-	WorldRowCount      = 10000
-	MaxConnectionCount = 256
-)
-
-func init() {
-	revel.Filters = []revel.Filter{
-		revel.RouterFilter,
-		revel.ParamsFilter,
-		revel.ActionInvoker,
-	}
-	revel.OnAppStart(func() {
-		runtime.GOMAXPROCS(runtime.NumCPU())
-		db.Init()
-		qbs.ChangePoolSize(MaxConnectionCount)
-	})
-}
-
-type App struct {
-	*revel.Controller
-}
-
-func (c App) Db(queries int) revel.Result {
+func (c App) QbsDb(queries int) revel.Result {
 	qbs, _ := qbs.GetQbs()
 	qbs, _ := qbs.GetQbs()
 	defer qbs.Close()
 	defer qbs.Close()
 
 
@@ -71,7 +32,7 @@ func (c App) Db(queries int) revel.Result {
 	return c.RenderJson(ww)
 	return c.RenderJson(ww)
 }
 }
 
 
-func (c App) Update(queries int) revel.Result {
+func (c App) QbsUpdate(queries int) revel.Result {
 	qbs, _ := qbs.GetQbs()
 	qbs, _ := qbs.GetQbs()
 	defer qbs.Close()
 	defer qbs.Close()
 
 
@@ -102,7 +63,7 @@ func (c App) Update(queries int) revel.Result {
 	return c.RenderJson(ww)
 	return c.RenderJson(ww)
 }
 }
 
 
-func (c App) Fortune() revel.Result {
+func (c App) QbsFortune() revel.Result {
 	qbs, _ := qbs.GetQbs()
 	qbs, _ := qbs.GetQbs()
 	defer qbs.Close()
 	defer qbs.Close()
 
 
@@ -111,14 +72,6 @@ func (c App) Fortune() revel.Result {
 	fortunes = append(fortunes,
 	fortunes = append(fortunes,
 		&Fortune{Message: "Additional fortune added at request time."})
 		&Fortune{Message: "Additional fortune added at request time."})
 	sort.Sort(ByMessage{fortunes})
 	sort.Sort(ByMessage{fortunes})
-	return c.Render(fortunes)
+	c.RenderArgs["fortunes"] = fortunes
+	return c.RenderTemplate("App/Fortune.html")
 }
 }
-
-type Fortunes []*Fortune
-
-func (s Fortunes) Len() int      { return len(s) }
-func (s Fortunes) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-
-type ByMessage struct{ Fortunes }
-
-func (s ByMessage) Less(i, j int) bool { return s.Fortunes[i].Message < s.Fortunes[j].Message }

+ 6 - 7
frameworks/Go/revel-jet/src/benchmark/app/db/jet.go → frameworks/Go/revel/src/benchmark/app/db/jet.go

@@ -6,24 +6,23 @@ import (
 )
 )
 
 
 var (
 var (
-	Jet    *jet.Db
-	Driver string
-	Spec   string
+	Jet *jet.Db
 )
 )
 
 
-func Init() {
+func InitJet() {
 	// Read configuration.
 	// Read configuration.
 	var found bool
 	var found bool
-	if Driver, found = revel.Config.String("db.driver"); !found {
+	var driver, spec string
+	if driver, found = revel.Config.String("db.driver"); !found {
 		revel.ERROR.Fatal("No db.driver found.")
 		revel.ERROR.Fatal("No db.driver found.")
 	}
 	}
-	if Spec, found = revel.Config.String("db.spec"); !found {
+	if spec, found = revel.Config.String("db.spec"); !found {
 		revel.ERROR.Fatal("No db.spec found.")
 		revel.ERROR.Fatal("No db.spec found.")
 	}
 	}
 
 
 	// Open a connection.
 	// Open a connection.
 	var err error
 	var err error
-	Jet, err = jet.Open(Driver, Spec)
+	Jet, err = jet.Open(driver, spec)
 	if err != nil {
 	if err != nil {
 		revel.ERROR.Fatal(err)
 		revel.ERROR.Fatal(err)
 	}
 	}

+ 9 - 10
frameworks/Go/revel-qbs/src/benchmark/app/db/qbs.go → frameworks/Go/revel/src/benchmark/app/db/qbs.go

@@ -5,17 +5,15 @@ import (
 	"github.com/revel/revel"
 	"github.com/revel/revel"
 )
 )
 
 
-var (
-	Driver string
-	Spec   string
-)
-
-func Init() {
-	var found bool
-	if Driver, found = revel.Config.String("db.driver"); !found {
+func InitQbs(maxConn int) {
+	var (
+		found        bool
+		driver, spec string
+	)
+	if driver, found = revel.Config.String("db.driver"); !found {
 		revel.ERROR.Fatal("No db.driver found.")
 		revel.ERROR.Fatal("No db.driver found.")
 	}
 	}
-	if Spec, found = revel.Config.String("db.spec"); !found {
+	if spec, found = revel.Config.String("db.spec"); !found {
 		revel.ERROR.Fatal("No db.spec found.")
 		revel.ERROR.Fatal("No db.spec found.")
 	}
 	}
 
 
@@ -25,7 +23,8 @@ func Init() {
 	qbs.TableNameToStructName = noConvert
 	qbs.TableNameToStructName = noConvert
 	qbs.StructNameToTableName = noConvert
 	qbs.StructNameToTableName = noConvert
 
 
-	qbs.Register(Driver, Spec, "", qbs.NewMysql())
+	qbs.Register(driver, spec, "", qbs.NewMysql())
+	qbs.ChangePoolSize(maxConn)
 }
 }
 
 
 func noConvert(s string) string { return s }
 func noConvert(s string) string { return s }

+ 6 - 0
frameworks/Go/revel/src/benchmark/conf/routes

@@ -7,3 +7,9 @@ GET     /json                                   App.Json
 GET     /db                                     App.Db
 GET     /db                                     App.Db
 GET     /fortune                                App.Fortune
 GET     /fortune                                App.Fortune
 GET     /update                                 App.Update
 GET     /update                                 App.Update
+GET     /jet-db                                 App.JetDb
+GET     /jet-fortune                            App.JetFortune
+GET     /jet-update                             App.JetUpdate
+GET     /qbs-db                                 App.QbsDb
+GET     /qbs-fortune                            App.QbsFortune
+GET     /qbs-update                             App.QbsUpdate

+ 7 - 1
frameworks/Ruby/sinatra/hello_world.rb

@@ -28,6 +28,12 @@ set :database, db_config.merge(:adapter => adapter, :host => ENV['DB_HOST'])
 settings.filters[:before].clear
 settings.filters[:before].clear
 settings.filters[:after].clear
 settings.filters[:after].clear
 
 
+after do
+  # Add mandatory HTTP headers to every response
+  response['Server'] ||= ENV['WEB_SERVER'].freeze
+  response['Date'] ||= Time.now.to_s
+end
+
 class World < ActiveRecord::Base
 class World < ActiveRecord::Base
   self.table_name = "World"
   self.table_name = "World"
 end
 end
@@ -41,7 +47,7 @@ get '/json' do
 end
 end
 
 
 get '/plaintext' do
 get '/plaintext' do
-  content_type 'text/plain'
+  response['Content-type'] = 'text/plain'
   'Hello, World!'
   'Hello, World!'
 end
 end
 
 

+ 1 - 1
frameworks/Ruby/sinatra/run_jruby_puma.sh

@@ -4,4 +4,4 @@ fw_depends rvm jruby-1.7
 
 
 rvm jruby-$JRUBY_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 rvm jruby-$JRUBY_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 
 
-DB_HOST=${DBHOST} rvm jruby-$JRUBY_VERSION do bundle exec puma -C config/puma.rb &
+WEB_SERVER=Puma DB_HOST=${DBHOST} rvm jruby-$JRUBY_VERSION do bundle exec puma -C config/puma.rb &

+ 1 - 1
frameworks/Ruby/sinatra/run_mri_puma.sh

@@ -4,4 +4,4 @@ fw_depends rvm ruby-2.0
 
 
 rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 
 
-DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec puma -C config/puma.rb -w 8 --preload &
+WEB_SERVER=Puma DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec puma -C config/puma.rb -w 8 --preload &

+ 1 - 1
frameworks/Ruby/sinatra/run_rbx_puma.sh

@@ -4,4 +4,4 @@ fw_depends rvm rbx-2.4
 
 
 rvm rbx-$RBX_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 rvm rbx-$RBX_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 
 
-DB_HOST=${DBHOST} rvm rbx-$RBX_VERSION do bundle exec puma &
+WEB_SERVER=Puma DB_HOST=${DBHOST} rvm rbx-$RBX_VERSION do bundle exec puma &

+ 1 - 1
frameworks/Ruby/sinatra/run_thin.sh

@@ -4,4 +4,4 @@ fw_depends rvm ruby-2.0
 
 
 rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 
 
-DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec thin start -C config/thin.yml &
+WEB_SERVER=Thin DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec thin start -C config/thin.yml &

+ 1 - 1
frameworks/Ruby/sinatra/run_torqbox.sh

@@ -4,4 +4,4 @@ fw_depends rvm jruby-1.7
 
 
 rvm jruby-$JRUBY_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 rvm jruby-$JRUBY_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 
 
-DB_HOST=${DBHOST} rvm jruby-$JRUBY_VERSION do bundle exec torqbox -b 0.0.0.0 -E production &
+WEB_SERVER=Torqbox DB_HOST=${DBHOST} rvm jruby-$JRUBY_VERSION do bundle exec torqbox -b 0.0.0.0 -E production &

+ 1 - 1
frameworks/Ruby/sinatra/run_trinidad.sh

@@ -4,4 +4,4 @@ fw_depends rvm jruby-1.7
 
 
 rvm jruby-$JRUBY_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 rvm jruby-$JRUBY_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 
 
-DB_HOST=${DBHOST} rvm jruby-$JRUBY_VERSION do bundle exec trinidad --config config/trinidad.yml &
+WEB_SERVER=Trinidad DB_HOST=${DBHOST} rvm jruby-$JRUBY_VERSION do bundle exec trinidad --config config/trinidad.yml &

+ 1 - 1
frameworks/Ruby/sinatra/run_unicorn.sh

@@ -8,4 +8,4 @@ rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path
 
 
 nginx -c $TROOT/config/nginx.conf
 nginx -c $TROOT/config/nginx.conf
 
 
-DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec unicorn -E production -c config/unicorn.rb &
+WEB_SERVER=Unicorn DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec unicorn -E production -c config/unicorn.rb &

+ 2 - 2
toolset/benchmark/framework_test.py

@@ -992,14 +992,14 @@ def validate_test(test_name, test_keys, directory):
       
       
       if val not in acceptable_values:
       if val not in acceptable_values:
         msg = ("Invalid `%s` value specified for test \"%s\" in framework \"%s\"; suggestions:\n"
         msg = ("Invalid `%s` value specified for test \"%s\" in framework \"%s\"; suggestions:\n"
-          % (key, test_name, config['framework']))
+          % (key, test_name, test_keys['framework']))
         helpinfo = ('\n').join(["  `%s` -- %s" % (v, desc) for (v, desc) in zip(acceptable_values, descriptors)])
         helpinfo = ('\n').join(["  `%s` -- %s" % (v, desc) for (v, desc) in zip(acceptable_values, descriptors)])
         fullerr = msg + helpinfo + "\n"
         fullerr = msg + helpinfo + "\n"
         raise Exception(fullerr)
         raise Exception(fullerr)
     
     
     elif not has_predefined_acceptables and val == "":
     elif not has_predefined_acceptables and val == "":
       msg = ("Value for `%s` in test \"%s\" in framework \"%s\" was missing:\n"
       msg = ("Value for `%s` in test \"%s\" in framework \"%s\" was missing:\n"
-        % (key, test_name, config['framework']))
+        % (key, test_name, test_keys['framework']))
       helpinfo = "  %s -- %s" % schema[key]['help']
       helpinfo = "  %s -- %s" % schema[key]['help']
       fullerr = msg + helpinfo + '\n'
       fullerr = msg + helpinfo + '\n'
       raise Exception(fullerr)
       raise Exception(fullerr)

+ 3 - 2
toolset/setup/linux/frameworks/silicon.sh

@@ -5,12 +5,13 @@ RETCODE=$(fw_exists ${IROOT}/silicon.installed)
   # Load environment variables
   # Load environment variables
   source $IROOT/silicon.installed
   source $IROOT/silicon.installed
   return 0; }
   return 0; }
-  
+
 SILICON=$IROOT/silicon
 SILICON=$IROOT/silicon
 
 
 git clone https://github.com/matt-42/silicon.git
 git clone https://github.com/matt-42/silicon.git
 cd silicon;
 cd silicon;
-git checkout a2b930696a72aa963056f21b1605adfe8ec1a8a7
+# May 18th, 2016
+git checkout 73dac7f3c8dcd4f9c53713456e8b73165006e968
 CXX=clang++-3.5 ./install.sh $IROOT
 CXX=clang++-3.5 ./install.sh $IROOT
 
 
 echo "" > $IROOT/silicon.installed
 echo "" > $IROOT/silicon.installed

+ 4 - 1
toolset/setup/linux/languages/nim.sh

@@ -4,8 +4,9 @@ RETCODE=$(fw_exists ${IROOT}/nim.installed)
 [ ! "$RETCODE" == 0 ] || { \
 [ ! "$RETCODE" == 0 ] || { \
   source $IROOT/nim.installed
   source $IROOT/nim.installed
   return 0; }
   return 0; }
-  
+
 NIM_VERSION="0.11.2"
 NIM_VERSION="0.11.2"
+NIM_CSOURCES="6bf2282"
 
 
 fw_get -O https://github.com/nim-lang/Nim/archive/v$NIM_VERSION.tar.gz
 fw_get -O https://github.com/nim-lang/Nim/archive/v$NIM_VERSION.tar.gz
 fw_untar v$NIM_VERSION.tar.gz
 fw_untar v$NIM_VERSION.tar.gz
@@ -14,6 +15,7 @@ cd nim
 
 
 git clone git://github.com/nim-lang/csources.git
 git clone git://github.com/nim-lang/csources.git
 cd csources
 cd csources
+git checkout $NIM_CSOURCES
 sh build.sh
 sh build.sh
 cd ..
 cd ..
 
 
@@ -26,3 +28,4 @@ echo "export NIM_HOME=${IROOT}/nim" > $IROOT/nim.installed
 echo -e "export PATH=\$NIM_HOME/bin:\$PATH" >> $IROOT/nim.installed
 echo -e "export PATH=\$NIM_HOME/bin:\$PATH" >> $IROOT/nim.installed
 
 
 source $IROOT/nim.installed
 source $IROOT/nim.installed
+

+ 5 - 4
toolset/setup/linux/webservers/mongrel2.sh

@@ -8,6 +8,7 @@ RETCODE=$(fw_exists ${IROOT}/mongrel2.installed)
   return 0; }
   return 0; }
 
 
 MONGREL2=$IROOT/mongrel2
 MONGREL2=$IROOT/mongrel2
+MONGREL2_VERSION="v1.8.1"
 
 
 # TODO: Get away from apt-get
 # TODO: Get away from apt-get
 # Dependencies
 # Dependencies
@@ -16,14 +17,14 @@ sudo apt-get install -y sqlite3 libsqlite3-dev uuid uuid-runtime uuid-dev
 # Update linker cache
 # Update linker cache
 sudo ldconfig -v
 sudo ldconfig -v
 
 
-fw_get -o mongrel2.tar.gz https://github.com/zedshaw/mongrel2/tarball/v1.8.1
+fw_get -o mongrel2.tar.gz https://github.com/mongrel2/mongrel2/tarball/$MONGREL2_VERSION
 fw_untar mongrel2.tar.gz
 fw_untar mongrel2.tar.gz
 
 
-# mongrel2 untars into this folder 
-mv zedshaw-mongrel2-aa2ecf8 mongrel2-install
+# mongrel2 untars into this folder
+mv mongrel2-mongrel2-aa2ecf8 mongrel2-install
 
 
 # for zmq4, we update the following file manually (not in v1.8.1)
 # for zmq4, we update the following file manually (not in v1.8.1)
-fw_get -O https://raw.github.com/zedshaw/mongrel2/9b565eeea003783c47502c2d350b99c9684ce97c/src/zmq_compat.h
+fw_get -O https://raw.githubusercontent.com/mongrel2/mongrel2/2cbf31de625b3476dfa541d6409f24364026f63a/src/zmq_compat.h
 mv -f zmq_compat.h mongrel2-install/src/
 mv -f zmq_compat.h mongrel2-install/src/
 
 
 cd mongrel2-install
 cd mongrel2-install