[Redis-benchmark] Support zset type#7618
Conversation
itamarhaber
left a comment
There was a problem hiding this comment.
Thanks @ShooterIT - good addition and the implementation's good :) One request: please add ZADD to the '-r' usage line
I can do that @itamarhaber |
|
@itamarhaber @filipecosta90 hi, I think I should remove zrem test because I can't have a good idea to handle deleting inexistent members, do you think so? |
|
I guess that makes sense... we could benchmark ZMINPOP instead :) |
|
Thanks @itamarhaber I haven't learned redis commands too long time, I didn't know ZPOPMIN just now :). ZPOPMIN can make sense just like SPOP,LPOP. |
|
@ShooterIT @itamarhaber this looks like a good change, I just have one concern, the default benchmark test takes a very long time to run, if we adding more tests should this causing it takes longer time? Redis Benchmark also can run with custom command if we append the test directly in the parameter, such as redis-benchmark -n 100000 -q script load "redis.call('set','foo','bar')" do we leave zadd or zrem as default benchmark to run or leave it to be custom? thanks |
|
@daidaotong good point about time, but I don't see that as a real issue because adding two..eight more tests isn't going to change the run's time by orders of magnitude. I would guess that this wouldn't really affect anyone who's running the benchmark with the defaults... for whatever purpose. I support the initiative because it seems strange that ZADD isn't present in the default suite - probably an omission rather than intentional. I'm not bent on using ZPOP, but I have nothing against it either. |
|
Thanks for your concern @daidaotong I think we should add zrem and zpopmin as defult benchmark. Firstly, zset is the basic data type of redis, we should know its' performace, otherwise, we should test the performace of zadd/zpopmin when we make the size of zset(skiplist actually) bigger/smaller. |
|
This remind me about #4895, but never mind just go on. BTW, in |
|
thanks @soloestoy I also found this, i think we may want to test performance of
|
Sure, but that's a different "test" altogether - i.e. populating the DB vs populating a nested type. |
|
Yes, but i think 'SET' test already is for populating the DB actually |
|
Hi @itamarhaber I see there is a pending review request from you, could we just merge this PR and then I can make another new one to discuss the |
|
Sure - merging & thanks @ShooterIT :) |
[Redis-benchmark] Support zset type
I notice that
redis-benchmarkdoesn't supportzsettype. Butzsetis basic data type of redis, so I addzaddandzremtests.BTW,
redis-benchmarkalso is useful to test performance for some key/value servers that support redis protocol.