我用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
herozem OP 答案:
src/redis-benchmark.c 702行开始到最后 |