V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2015-06-24 14:27:10 +08:00 · 2507 次点击
    这是一个创建于 3222 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我用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 条回复    2015-06-24 14:40:18 +08:00
    herozem
        1
    herozem  
    OP
       2015-06-24 14:40:18 +08:00
    答案:

    src/redis-benchmark.c 702行开始到最后
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3174 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 10:52 · PVG 18:52 · LAX 03:52 · JFK 06:52
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.