Browse Source

Fixed RTS options for Yesod and Snap, disabled client sessions for Yesod.

Steven Smith 12 years ago
parent
commit
a8f924f13a
3 changed files with 8 additions and 7 deletions
  1. 3 3
      snap/setup.py
  2. 1 0
      yesod/bench/Foundation.hs
  3. 4 4
      yesod/setup.py

+ 3 - 3
snap/setup.py

@@ -5,11 +5,11 @@ import os
 
 def start(args):
   setup_util.replace_text("snap/bench/cfg/db.cfg", "host=\".*\"", "host=\"" + args.database_host + "\"")
-  subprocess.check_call("cabal configure", shell=True, cwd="snap/bench")
+  subprocess.check_call("cabal update", shell=True, cwd="snap/bench")
+  subprocess.check_call("cabal install --only-dependencies", shell=True, cwd="snap/bench")
   subprocess.check_call("cabal build", shell=True, cwd="snap/bench")
 
-  t = str(args.max_threads)
-  subprocess.Popen("dist/build/snap-bench/snap-bench +RTS -A" + t + "M -N" + t + " > /dev/null", shell=True, cwd="snap/bench")
+  subprocess.Popen("dist/build/snap-bench/snap-bench +RTS -A4M -N -qg2 -I0 -G2 > /dev/null", shell=True, cwd="snap/bench")
   return 0
 
 def stop():

+ 1 - 0
yesod/bench/Foundation.hs

@@ -22,6 +22,7 @@ type Form x = Html -> MForm App App (FormResult x, Widget)
 
 instance Yesod App where
     approot = ApprootMaster $ appRoot . settings
+    makeSessionBackend _ = return Nothing
 
 instance YesodPersist App where
     type YesodPersistBackend App = SqlPersist

+ 4 - 4
yesod/setup.py

@@ -7,11 +7,11 @@ import os
 def start(args):
   setup_util.replace_text("yesod/bench/config/mysql.yml", "host: .*", "host: " + args.database_host)
   
-  subprocess.check_call("cabal configure", shell=True, cwd="yesod/bench")
+  subprocess.check_call("cabal update", shell=True, cwd="yesod/bench")
+  subprocess.check_call("cabal install --only-dependencies", shell=True, cwd="yesod/bench")
   subprocess.check_call("cabal build", shell=True, cwd="yesod/bench")
 
-  heap = args.max_threads
-  subprocess.Popen("dist/build/bench/bench Production +RTS -A"+str(heap)+"m -N" + str(args.max_threads) + " > /dev/null", shell=True, cwd="yesod/bench")
+  subprocess.Popen("dist/build/bench/bench Production +RTS -A4M -N -qg2 -I0 -G2 > /dev/null", shell=True, cwd="yesod/bench")
   return 0
 
 def stop():
@@ -25,4 +25,4 @@ def stop():
       except OSError:
         pass
 
-  return 0
+  return 0