Browse Source

merge revel-jet and revel-qbs files into revel

INADA Naoki 9 years ago
parent
commit
544b89a26a
30 changed files with 93 additions and 350 deletions
  1. 0 2
      .travis.yml
  2. 0 1
      frameworks/Go/revel-jet/.gitignore
  3. 0 26
      frameworks/Go/revel-jet/benchmark_config.json
  4. 0 8
      frameworks/Go/revel-jet/setup.sh
  5. 0 10
      frameworks/Go/revel-jet/source_code
  6. 0 14
      frameworks/Go/revel-jet/src/benchmark/app/views/App/Fortune.html
  7. 0 2
      frameworks/Go/revel-jet/src/benchmark/app/views/footer.html
  8. 0 6
      frameworks/Go/revel-jet/src/benchmark/app/views/header.html
  9. 0 28
      frameworks/Go/revel-jet/src/benchmark/conf/app.conf
  10. 0 7
      frameworks/Go/revel-jet/src/benchmark/conf/routes
  11. 0 26
      frameworks/Go/revel-qbs/benchmark_config.json
  12. BIN
      frameworks/Go/revel-qbs/bin/revel
  13. 0 8
      frameworks/Go/revel-qbs/setup.sh
  14. 0 10
      frameworks/Go/revel-qbs/source_code
  15. 0 14
      frameworks/Go/revel-qbs/src/benchmark/app/views/App/Fortune.html
  16. 0 2
      frameworks/Go/revel-qbs/src/benchmark/app/views/footer.html
  17. 0 6
      frameworks/Go/revel-qbs/src/benchmark/app/views/header.html
  18. 0 28
      frameworks/Go/revel-qbs/src/benchmark/conf/app.conf
  19. 0 7
      frameworks/Go/revel-qbs/src/benchmark/conf/routes
  20. 1 0
      frameworks/Go/revel/.gitignore
  21. 42 0
      frameworks/Go/revel/benchmark_config.json
  22. 3 0
      frameworks/Go/revel/setup.sh
  23. 5 8
      frameworks/Go/revel/source_code
  24. 8 4
      frameworks/Go/revel/src/benchmark/app/controllers/app.go
  25. 6 62
      frameworks/Go/revel/src/benchmark/app/controllers/jet.go
  26. 5 52
      frameworks/Go/revel/src/benchmark/app/controllers/qbs.go
  27. 6 7
      frameworks/Go/revel/src/benchmark/app/db/jet.go
  28. 9 10
      frameworks/Go/revel/src/benchmark/app/db/qbs.go
  29. 6 0
      frameworks/Go/revel/src/benchmark/conf/routes
  30. 2 2
      toolset/benchmark/framework_test.py

+ 0 - 2
.travis.yml

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

+ 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/
+bin/

+ 42 - 0
frameworks/Go/revel/benchmark_config.json

@@ -23,6 +23,48 @@
       "display_name": "revel",
       "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": "",
+      "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
 
 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 &

+ 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 (
 	"database/sql"
 	"math/rand"
-	"runtime"
 	"sort"
 
+	dbm "benchmark/app/db"
+
 	"github.com/revel/modules/db/app"
 	"github.com/revel/revel"
 )
@@ -15,12 +16,12 @@ type MessageStruct struct {
 }
 
 type World struct {
-	Id           uint16 `json:"id"`
+	Id           uint16 `json:"id" qbs:"pk"`
 	RandomNumber uint16 `json:"randomNumber"`
 }
 
 type Fortune struct {
-	Id      uint16 `json:"id"`
+	Id      uint16 `json:"id" qbs:"pk"`
 	Message string `json:"message"`
 }
 
@@ -46,9 +47,12 @@ func init() {
 	}
 	revel.OnAppStart(func() {
 		var err error
-		runtime.GOMAXPROCS(runtime.NumCPU())
 		db.Init()
 		db.Db.SetMaxIdleConns(MaxConnectionCount)
+		dbm.InitJet()
+		dbm.Jet.SetMaxIdleConns(MaxConnectionCount)
+		dbm.InitQbs(MaxConnectionCount)
+
 		if worldStatement, err = db.Db.Prepare(WorldSelect); err != nil {
 			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 (
 	"math/rand"
-	"runtime"
 	"sort"
 
 	"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 {
 		var w World
 		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)
 }
 
-func (c App) Update(queries int) revel.Result {
+func (c App) JetUpdate(queries int) revel.Result {
 	if queries <= 1 {
 		var w World
 		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)
 }
 
-func (c App) Fortune() revel.Result {
+func (c App) JetFortune() revel.Result {
 	var fortunes Fortunes
 	err := db.Jet.Query(FortuneSelect).Rows(&fortunes)
 	if err != nil {
@@ -113,14 +65,6 @@ func (c App) Fortune() revel.Result {
 	}
 	fortunes = append(fortunes, &Fortune{Message: "Additional fortune added at request time."})
 	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 (
 	"math/rand"
-	"runtime"
 	"sort"
 
-	"benchmark/app/db"
-
 	"github.com/coocood/qbs"
 	"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()
 	defer qbs.Close()
 
@@ -71,7 +32,7 @@ func (c App) Db(queries int) revel.Result {
 	return c.RenderJson(ww)
 }
 
-func (c App) Update(queries int) revel.Result {
+func (c App) QbsUpdate(queries int) revel.Result {
 	qbs, _ := qbs.GetQbs()
 	defer qbs.Close()
 
@@ -102,7 +63,7 @@ func (c App) Update(queries int) revel.Result {
 	return c.RenderJson(ww)
 }
 
-func (c App) Fortune() revel.Result {
+func (c App) QbsFortune() revel.Result {
 	qbs, _ := qbs.GetQbs()
 	defer qbs.Close()
 
@@ -111,14 +72,6 @@ func (c App) Fortune() revel.Result {
 	fortunes = append(fortunes,
 		&Fortune{Message: "Additional fortune added at request time."})
 	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 (
-	Jet    *jet.Db
-	Driver string
-	Spec   string
+	Jet *jet.Db
 )
 
-func Init() {
+func InitJet() {
 	// Read configuration.
 	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.")
 	}
-	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.")
 	}
 
 	// Open a connection.
 	var err error
-	Jet, err = jet.Open(Driver, Spec)
+	Jet, err = jet.Open(driver, spec)
 	if err != nil {
 		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"
 )
 
-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.")
 	}
-	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.")
 	}
 
@@ -25,7 +23,8 @@ func Init() {
 	qbs.TableNameToStructName = 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 }

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

@@ -7,3 +7,9 @@ GET     /json                                   App.Json
 GET     /db                                     App.Db
 GET     /fortune                                App.Fortune
 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

+ 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:
         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)])
         fullerr = msg + helpinfo + "\n"
         raise Exception(fullerr)
     
     elif not has_predefined_acceptables and val == "":
       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']
       fullerr = msg + helpinfo + '\n'
       raise Exception(fullerr)