redis的pipeline测试分析
来源:互联网 发布:淘宝评价修改链接 编辑:程序博客网 时间:2024/05/21 12:46
先上程序:
<?php$redis = new Redis(); $redis->connect('127.0.0.1', 6379);$starttime = explode(" ",microtime());$pipe = $redis->multi(Redis::PIPELINE); for ($i = 0; $i < 10000; $i++) { $pipe->set("key::$i", str_pad($i, 4, '0', 0)); $pipe->get("key::$i"); } $replies = $pipe->exec(); //echo " "; print_r($replies);$endtime = explode(" ",microtime());$thistime = $endtime[0]+$endtime[1]-($starttime[0]+$starttime[1]);$thistime = round($thistime,3);echo $thistime;echo "\r\n";$a = array();$starttime1 = explode(" ",microtime());for($i= 0;$i<10000;$i++){$redis->set("key::$i", str_pad($i, 4, '0', 0));}for($i=0;$i<10000;$i++){array_push($a, $redis->get("key::$i"));}//print_r($a);$endtime1 = explode(" ",microtime());$thistime = $endtime1[0]+$endtime1[1]-($starttime1[0]+$starttime1[1]);$thistime = round($thistime,3);echo $thistime;echo "\r\n";
执行时间统计:
0 0
- redis的pipeline测试分析
- Redis测试分析(pipeline模式)
- Redis测试分析(pipeline模式推荐)
- Redis测试分析(pipeline模式推荐)
- Redis测试分析(pipeline模式推荐)
- Redis测试分析(pipeline模式推荐)
- Redis测试分析(pipeline模式推荐)
- Redis测试_推荐pipeline
- redis pipeline的使用
- Redis的pipeline
- Redis的pipeline方式
- redis的pipeline
- Redis的pipeline
- jedis redis pipeline的理解
- Redis pipeline
- redis pipeline
- redis pipeline
- Redis-pipeline
- Eclipse4.5.1 c++11 Operation not permitted异常解决方案
- 程序员如何预估工时之一
- Spark 性能相关参数配置详解-Storage篇
- BZOJ 2705 [SDOI2012]Longge的问题
- UVA - 550 Multiplying by Rotation
- redis的pipeline测试分析
- Skyline开发培训
- 《JAVA集合中的Map接口》
- Object转byte[]←→byte[]转Object
- 应用插件化实践--DroidPlugin插件 在Eclipse上开发Demo
- 每日下班试题
- GitHub上值得关注的iOS开源项目
- UVA - 568 Just the Facts
- 【Python学习笔记】IO编程