Browse Source

Fixed revel-jet

Thanks to @ebramanti-techempower for doing the lifting
msmith-techempower 10 years ago
parent
commit
ee9fc92768

+ 6 - 0
frameworks/Go/revel-jet/bash_profile.sh

@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# Set the root of our go installation
+export GOROOT=${IROOT}/go
+
+export GOPATH=${TROOT}

+ 0 - 34
frameworks/Go/revel-jet/setup.py

@@ -1,34 +0,0 @@
-import subprocess
-import sys
-import os
-import setup_util
-import time
-
-CWD = 'revel-jet'
-
-def start(args, logfile, errfile):
-  setup_util.replace_text(CWD + "/src/benchmark/conf/app.conf", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)")
-  if os.name == 'nt':
-    env = os.environ.copy()
-    env["GOPATH"] = "C:\\FrameworkBenchmarks\\" + CWD
-    subprocess.call("go get -u github.com/robfig/revel/revel github.com/eaigner/jet", shell=True, cwd=CWD, env=env, stderr=errfile, stdout=logfile)
-    subprocess.call(r"go build -o bin\revel.exe github.com/robfig/revel/revel", shell=True, cwd=CWD, env=env, stderr=errfile, stdout=logfile)
-    subprocess.Popen(r"bin\revel.exe run benchmark prod".rsplit(" "), shell=True, cwd=CWD, env=env, stderr=errfile, stdout=logfile)
-    return 0
-  subprocess.call("go get -u github.com/robfig/revel/revel github.com/eaigner/jet", shell=True, cwd=CWD, stderr=errfile, stdout=logfile)
-  subprocess.call("go build -o bin/revel github.com/robfig/revel/revel", shell=True, cwd=CWD, stderr=errfile, stdout=logfile)
-  subprocess.Popen("bin/revel run benchmark prod".rsplit(" "), cwd=CWD, stderr=errfile, stdout=logfile)
-  return 0
-
-def stop(logfile, errfile):
-  if os.name == 'nt':
-    subprocess.call("taskkill /f /im benchmark.exe > NUL", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("taskkill /f /im revel.exe > NUL", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
-  out, err = p.communicate()
-  for line in out.splitlines():
-    if 'revel' in line and 'run-tests' not in line:
-      pid = int(line.split(None, 2)[1])
-      os.kill(pid, 15)
-  return 0

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

@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# here te find the go executable
+export PATH="$GOROOT/bin:$PATH"
+
+go get -u github.com/robfig/revel/revel github.com/eaigner/jet
+go build -o bin/revel github.com/robfig/revel/revel
+bin/revel run benchmark prod &

+ 1 - 1
frameworks/Go/revel-jet/src/benchmark/app/db/jet.go

@@ -7,7 +7,7 @@ import (
 )
 )
 
 
 var (
 var (
-	Jet    jet.Db
+	Jet    *jet.Db
 	Driver string
 	Driver string
 	Spec   string
 	Spec   string
 )
 )

+ 0 - 25
frameworks/Go/webgo/setup.py

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