Browse Source

make utf8 default and run in daemon mode

nareshv 11 years ago
parent
commit
b60c6d599a
2 changed files with 6 additions and 6 deletions
  1. 5 5
      hhvm/once.php.inc
  2. 1 1
      hhvm/setup.py

+ 5 - 5
hhvm/once.php.inc

@@ -3,7 +3,7 @@
 class Benchmark {
 class Benchmark {
     var $pdo;
     var $pdo;
 
 
-    public function setup_db($need_utf8 = false)
+    public function setup_db($need_utf8 = true)
     {
     {
         $attrs     = array(PDO::ATTR_PERSISTENT => true);
         $attrs     = array(PDO::ATTR_PERSISTENT => true);
         // hhvm doesn't support charset=utf8 in the DSN yet
         // hhvm doesn't support charset=utf8 in the DSN yet
@@ -28,7 +28,7 @@ class Benchmark {
 
 
     public function bench_db()
     public function bench_db()
     {
     {
-        $this->setup_db(false);
+        $this->setup_db();
 
 
         // Create an array with the response string.
         // Create an array with the response string.
         $arr = array();
         $arr = array();
@@ -50,7 +50,7 @@ class Benchmark {
 
 
     public function bench_queries($query_count=1)
     public function bench_queries($query_count=1)
     {
     {
-        $this->setup_db(false);
+        $this->setup_db();
 
 
         // Create an array with the response string.
         // Create an array with the response string.
         $arr = array();
         $arr = array();
@@ -76,7 +76,7 @@ class Benchmark {
 
 
     public function bench_updates($query_count)
     public function bench_updates($query_count)
     {
     {
-        $this->setup_db(false);
+        $this->setup_db();
 
 
         // Create an array with the response string.
         // Create an array with the response string.
         $arr = array();
         $arr = array();
@@ -112,7 +112,7 @@ class Benchmark {
 
 
     public function bench_fortunes()
     public function bench_fortunes()
     {
     {
-        $this->setup_db(true);
+        $this->setup_db();
 
 
         // Define query
         // Define query
         $statement = $this->pdo->query( 'SELECT id, message FROM Fortune' );
         $statement = $this->pdo->query( 'SELECT id, message FROM Fortune' );

+ 1 - 1
hhvm/setup.py

@@ -18,7 +18,7 @@ def start(args, logfile, errfile):
     if os.name == 'nt':
     if os.name == 'nt':
       # Not supported !
       # Not supported !
       return 0
       return 0
-    subprocess.check_call("hhvm --config " + home + "/FrameworkBenchmarks/hhvm/deploy/config.hdf -m server", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("hhvm --config " + home + "/FrameworkBenchmarks/hhvm/deploy/config.hdf -m daemon", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1