|
@@ -4,18 +4,20 @@ import os
|
|
|
import setup_util
|
|
|
import time
|
|
|
|
|
|
+CWD = 'revel-jet'
|
|
|
+
|
|
|
def start(args):
|
|
|
setup_util.replace_text("revel/src/benchmark/conf/app.conf", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)")
|
|
|
if os.name == 'nt':
|
|
|
env = os.environ.copy()
|
|
|
- env["GOPATH"] = r"C:\FrameworkBenchmarks\revel"
|
|
|
- subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd="revel", env=env)
|
|
|
- subprocess.call(r"go build -o bin\revel.exe github.com/robfig/revel/revel", shell=True, cwd="revel", env=env)
|
|
|
- subprocess.Popen(r"bin\revel.exe run benchmark prod".rsplit(" "), shell=True, cwd="revel", env=env)
|
|
|
+ env["GOPATH"] = "C:\\FrameworkBenchmarks\\" + CWD
|
|
|
+ subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd=CWD, env=env)
|
|
|
+ subprocess.call(r"go build -o bin\revel.exe github.com/robfig/revel/revel", shell=True, cwd=CWD, env=env)
|
|
|
+ subprocess.Popen(r"bin\revel.exe run benchmark prod".rsplit(" "), shell=True, cwd=CWD, env=env)
|
|
|
return 0
|
|
|
- subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd="revel")
|
|
|
- subprocess.call("go build -o bin/revel github.com/robfig/revel/revel", shell=True, cwd="revel")
|
|
|
- subprocess.Popen("bin/revel run benchmark prod".rsplit(" "), cwd="revel")
|
|
|
+ subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd=CWD)
|
|
|
+ subprocess.call("go build -o bin/revel github.com/robfig/revel/revel", shell=True, cwd=CWD)
|
|
|
+ subprocess.Popen("bin/revel run benchmark prod".rsplit(" "), cwd=CWD)
|
|
|
return 0
|
|
|
|
|
|
def stop():
|