Running multiple commands with different types?
chakaz opened this issue · 2 comments
Hello memtier experts!
I'd like to use memtier for running multiple commands using multiple data types (like SET
, ZADD
, LPUSH
, etc). While memtier does support multiple --command
arguments (which is awesome!), since keys use a common generation technique (like using --key-prefix
), this can't be done, as the same key may once be used for SET
and then randomly for ZADD
, for example.
Is there a way that I'm missing to specify per-command key prefix, or some other way of getting this to work?
BTW, I'd also propose a way to generate random numbers (in addition to __key__
and __data_
), as this may be useful for ZADD
scores. Maybe __random__
or even better: __random__[0-100]
?
Thanks in advance!
Hi @chakaz you are right, currently --key-prefix
is shared between all the arbitrary commands.
Can --command-key-pattern=S (Sequential)
help in your case? it will set a different key for each command?
Anyway, we will work to improve the --command
option and will take your suggestion (__random__
) into consideration.
Thanks for your quick reply!
Can --command-key-pattern=S (Sequential) help in your case? it will set a different key for each command?
I'm afraid not, as that will never create, for example, lists with 2 entries. Nor will it ever read from an existing list (again, example).
Anyway, we will work to improve the
--command
option and will take your suggestion (__random__
) into consideration.
Awesome, thanks a lot!