V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · 3085 views
    This topic created in 3969 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   ·   Solana   ·   944 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 20:07 · PVG 04:07 · LAX 13:07 · JFK 16:07
    ♥ Do have faith in what you're doing.