推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
herozem
V2EX  ›  Python

redis-benchmark 都测了哪些数据啊?

  •  
  •   herozem · Jun 24, 2015 · 3411 views
    This topic created in 4113 days ago, the information mentioned may be changed or developed.

    我用python做了一个redis: 地址点我

    但是目前测试性能的时候只能测试lpush,lpop,如果直接redis-benchmark的话python会报错, 所以我想知道redis-benchmark测试了哪些命令, 希望有人能回答一下。

    报错如下:

    hiredis.ProtocolError: Protocol error, got "P" as reply type byte
    Exception in callback _SelectorSocketTransport._read_ready()
    handle: <Handle _SelectorSocketTransport._read_ready()>
    Traceback (most recent call last):
      File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
        self._callback(*self._args)
      File "/usr/lib/python3.4/asyncio/selector_events.py", line 669, in _read_ready
        self._protocol.data_received(data)
      File "main.py", line 23, in data_received
        arglist = to_arglist(data)
      File "/home/jiajun/myredis/utils.py", line 10, in to_arglist
        return reader.gets()
    hiredis.ProtocolError: Protocol error, got "P" as reply type byte
    

    目前完成的功能还不多, 有aof, dump文件读取(还没有生成dump), 支持大部分对list的操作。

    1 replies  •  2015-06-24 14:40:18 +08:00
    herozem
        1
    herozem  
    OP
       Jun 24, 2015
    答案:

    src/redis-benchmark.c 702行开始到最后
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   865 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 18:57 · PVG 02:57 · LAX 11:57 · JFK 14:57
    ♥ Do have faith in what you're doing.