Browse Source

Fixed Urweb

msmith-techempower 10 years ago
parent
commit
789e424ca6

+ 0 - 27
frameworks/Ur/urweb/setup.py

@@ -1,27 +0,0 @@
-import subprocess
-import os
-
-def start(args, logfile, errfile):
-  conn_string = ('dbname=hello_world '
-                 'user=benchmarkdbuser '
-                 'password=benchmarkdbpass '
-                 'host=' + args.database_host)
-
-  subprocess.check_call("urweb -db \"" + conn_string + "\" bench", shell=True, cwd="urweb", stderr=errfile, stdout=logfile)
-
-  threads = str(args.max_threads * 2)
-  subprocess.Popen("./bench.exe -q -k -t " + threads,
-                   shell=True, cwd="urweb", stderr=errfile, stdout=logfile)
-  return 0
-
-def stop(logfile, errfile):
-  p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
-  out, err = p.communicate()
-  for line in out.splitlines():
-    if 'bench.exe' in line:
-      try:
-        pid = int(line.split(None, 2)[1])
-        os.kill(pid, 15)
-      except OSError:
-        pass
-  return 0

+ 1 - 1
frameworks/Ur/urweb/setup.sh

@@ -4,4 +4,4 @@ ${URWEB_HOME}/bin/urweb -db "dbname=hello_world user=benchmarkdbuser password=be
 
 
 export LD_LIBRARY_PATH=${URWEB_HOME}/lib
 export LD_LIBRARY_PATH=${URWEB_HOME}/lib
 
 
-./bench.exe -q -k -t ${MAX_THREADS} &
+./bench.exe -q -k -t ${MAX_THREADS} &

+ 0 - 27
frameworks/Ur/urweb/setup_mysql.py

@@ -1,27 +0,0 @@
-import subprocess
-import os
-
-def start(args, logfile, errfile):
-  conn_string = ('dbname=hello_world '
-                 'user=benchmarkdbuser '
-                 'password=benchmarkdbpass '
-                 'host=' + args.database_host)
-
-  subprocess.check_call("urweb -dbms mysql -db \"" + conn_string + "\" bench", shell=True, cwd="urweb", stderr=errfile, stdout=logfile)
-
-  threads = str(args.max_threads * 2)
-  subprocess.Popen("./bench.exe -q -k -t " + threads,
-                   shell=True, cwd="urweb", stderr=errfile, stdout=logfile)
-  return 0
-
-def stop(logfile, errfile):
-  p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
-  out, err = p.communicate()
-  for line in out.splitlines():
-    if 'bench.exe' in line:
-      try:
-        pid = int(line.split(None, 2)[1])
-        os.kill(pid, 15)
-      except OSError:
-        pass
-  return 0

+ 3 - 1
frameworks/Ur/urweb/setup_mysql.sh

@@ -2,4 +2,6 @@
 
 
 ${URWEB_HOME}/bin/urweb -dbms mysql -db "dbname=hello_world user=benchmarkdbuser password=benchmarkdbpass host=${DBHOST}" bench
 ${URWEB_HOME}/bin/urweb -dbms mysql -db "dbname=hello_world user=benchmarkdbuser password=benchmarkdbpass host=${DBHOST}" bench
 
 
-./bench.exe -q -k -t ${MAX_THREADS} &
+export LD_LIBRARY_PATH=${URWEB_HOME}/lib
+
+./bench.exe -q -k -t ${MAX_THREADS} &