X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=redismodule%2FREADME.md;h=7bccee0c1c04ba99afe6ea12b20eda747ede1675;hb=c1df826a579f8d52abb7f7c5a490fec3f7a1c7cb;hp=a49c3da4c1318a707399b454d751768db8dceef8;hpb=473aa4ed7f319010a5a6f55669ebece78761b3f6;p=ric-plt%2Fdbaas.git diff --git a/redismodule/README.md b/redismodule/README.md index a49c3da..7bccee0 100755 --- a/redismodule/README.md +++ b/redismodule/README.md @@ -3,6 +3,31 @@ This subdirectory provides implementation for the commands which are implemented as a [Redis modules](https://redis.io/topics/modules-intro). +# Compiling and Unit Tests + +To compile, run unit tests and install use the commands: +``` +./autogen.sh +./configure +make +make test +make install +``` + +By default unit tests and valgrind memory checking are enabled. +This requires `cpputest` and `valgrind` as additional dependencies. +Unit test memory checking can be disabled with the `configure` option +`--disable-unit-test-memcheck` and the unit tests can be completely disabled +with the `configure` option `--disable-unit-test`. +For example to compile and install with unit tests completely disabled +one would run the commands: +``` +./autogen.sh +./configure --disable-unit-test +make +make install +``` + # Commands ## SETIE key value oldvalue [expiration EX seconds|PX milliseconds] @@ -159,6 +184,12 @@ Time complexity: O(N) where N is the number of keys that will be removed + O(N+M Removes the specified keys and post a message to the given channel if delete key successfully(return >0) +## DELMPUB number_of_keys number_of_channel_message_pairs key [ key ... ] channel message [ channel message ... ] + +Time complexity: O(N) where N is the number of keys that will be removed + O(N_1+M) [ + O(N_2+M) + ... ] where N_i are the number of clients subscribed to the receiving channel and M is the total number of subscribed patterns (by any client) + +Remove the specified keys. If any of the keys was deleted succesfully (delete return value > 0) then post given messages to the corresponding channels. + ## DELIEPUB key oldvalue channel message [channel message...] Time complexity: O(1) + O(1) + O(1) + O(N_1+M) [ + O(N_2+M) + ...] where N_i are the number of clients subscribed to the corrensponding receiving channel and M is the total number of subscribed patterns (by any client)