Browse Source

Changed RTS options for Snap/Yesod, disabled client session and logging for Yesod

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

+ 1 - 2
snap/setup.py

@@ -9,8 +9,7 @@ def start(args):
   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():

+ 2 - 0
yesod/bench/Foundation.hs

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

+ 2 - 2
yesod/setup.py

@@ -11,7 +11,7 @@ def start(args):
   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