mirror of
https://github.com/fluencelabs/redis
synced 2025-06-23 14:01:34 +00:00
objectComputeSize(): estimate collections sampling N elements.
For most tasks, we need the memory estimation to be O(1) by default. This commit also implements an initial MEMORY command. Note that objectComputeSize() takes the number of samples to check as argument, so MEMORY should be able to get the sample size as option to make precision VS CPU tradeoff tunable. Related to: PR #3223.
This commit is contained in:
@ -532,7 +532,7 @@ typedef struct RedisModuleIO {
|
||||
#define OBJ_ENCODING_INT 1 /* Encoded as integer */
|
||||
#define OBJ_ENCODING_HT 2 /* Encoded as hash table */
|
||||
#define OBJ_ENCODING_ZIPMAP 3 /* Encoded as zipmap */
|
||||
#define OBJ_ENCODING_LINKEDLIST 4 /* Encoded as regular linked list */
|
||||
#define OBJ_ENCODING_LINKEDLIST 4 /* No longer used: old list encoding. */
|
||||
#define OBJ_ENCODING_ZIPLIST 5 /* Encoded as ziplist */
|
||||
#define OBJ_ENCODING_INTSET 6 /* Encoded as intset */
|
||||
#define OBJ_ENCODING_SKIPLIST 7 /* Encoded as skiplist */
|
||||
@ -1792,6 +1792,7 @@ void readonlyCommand(client *c);
|
||||
void readwriteCommand(client *c);
|
||||
void dumpCommand(client *c);
|
||||
void objectCommand(client *c);
|
||||
void memoryCommand(client *c);
|
||||
void clientCommand(client *c);
|
||||
void evalCommand(client *c);
|
||||
void evalShaCommand(client *c);
|
||||
|
Reference in New Issue
Block a user