소스 검색

add debug

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);
+        }
     }