stanley-king 4 роки тому
батько
коміт
a3d64c8cea
1 змінених файлів з 5 додано та 2 видалено
  1. 5 2
      test/TestRedis.php

+ 5 - 2
test/TestRedis.php

@@ -8,6 +8,7 @@ require_once(BASE_CORE_PATH . '/lrlz.php');
 require_once(BASE_ROOT_PATH . '/fooder.php');
 
 require_once (BASE_ROOT_PATH . '/helper/util_helper.php');
+require_once(BASE_HELPER_PATH . '/refill/RefillFactory.php');
 
 
 function sub_callback($redis, $chan, $msg)
@@ -143,8 +144,10 @@ class TestRedis extends TestCase
 
     public function testSpeed()
     {
-        $this->incr_order('lingzh',1,100,1,true);
-        $ret = $this->hget_order_sec('lingzh',1,100,1,time(),true);
+        for ($i = 0; $i < 1000000; ++$i) {
+            refill\util::incr_commit('lingzh',1,100,1,true);
+            $ret = refill\util::hget_commit_sec('lingzh',1,100,1,time(),true);
+        }
     }