redis pipeline|Request/Response protocols and RTT(python)
来源:互联网 发布:测量员软件使用说明书 编辑:程序博客网 时间:2024/05/26 05:51
redis pipeline:
http://redis.io/topics/pipelining
http://www.cnblogs.com/redcreen/archive/2011/02/15/1955517.html
redis-py:
https://github.com/antirez/redis
python代码实现
def without_pipelining(): start = datetime.datetime.now() r = redis.Redis() for i in range(10000): r.ping() print 'without pipeline ', datetime.datetime.now() - start def with_pipelining(): start = datetime.datetime.now() with redis.Redis().pipeline() as pipe: for i in range(10000): pipe.ping() pipe.execute() print 'with pipeline ', datetime.datetime.now() - start without_pipelining()with_pipelining()
测试输出:
@redis-py$ python pipeline.pywithout pipeline 0:00:00.578954with pipeline 0:00:00.175569
- redis pipeline|Request/Response protocols and RTT(python)
- python django rest framework request and response
- Request and Response objects
- Request and Response
- HTTP Request and Response
- Servlet-request and response
- Response And Request
- python_Django_1:Request and Response
- python redis pipeline报ConnectionError
- python使用pipeline读写redis
- Tomcat请求处理(四) -- Request, Response, 和Pipeline
- WebService SOAP request and response
- web测试--request and response
- laravel之 Request and response
- Advanced Request and Response HTTP Header Viewer
- Http Request and Http Response in Java
- Redis pipeline
- redis pipeline
- 使用对象序列化实现自定义配置文件管理
- 指针常量与常量指针
- c++中 .h .lib .dll文件的关联
- 编程开发人员最具有影响力的十一本书籍
- FibonacciSequence
- redis pipeline|Request/Response protocols and RTT(python)
- java 获取当前文件的路径+文件全名
- C++遇到问题了,编译正确,但运行不行啊
- Struts2常量的加载顺序
- 几个常用但容易忘记的命令(linux +uboot)
- hadoop文件系统分析
- 现代语言一些特性
- MFC之ADO数据库快速编程
- 深入剖析PE文件