summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/commands/hyperloglog.md4
-rw-r--r--readme.md1
2 files changed, 3 insertions, 2 deletions
diff --git a/docs/commands/hyperloglog.md b/docs/commands/hyperloglog.md
index 7421fce..6f8e849 100644
--- a/docs/commands/hyperloglog.md
+++ b/docs/commands/hyperloglog.md
@@ -15,11 +15,11 @@ PFINIT key precison [TIME window-milliseconds]
- precision -- The data of the HyperLogLog is stored in an array of m registers. m is 2^precision, e.g. precision=4, m=16. The precision should be between 4 to 16.
- TIME -- Optional. Creates a time-limited HyperLogLog. 'window-milliseconds' specifies the duration of the time window in milliseconds. This mode allows HyperLogLog to estimate the cardinality of items within the range (now - window-milliseconds, now].
-The HyperLogLog use 6 bits per register, so for precision=14, the data structure is ~12KB (2^14*6/8 bytes). The relative error of HLL is 1.04/sqrt(m).
+The HLL has a relative error of 1.04/sqrt(m), where m is the number of registers. The SwarmKV HLL implementation uses 6 bits per register, so for a key with precision=14, the memory size is ~12KB (2^14*6/8 bytes), and with a standard error of 0.81%.
Return
-- Simple String Reply: OK if the bloom filter created successfully.
+- Simple String Reply: OK if the HyperLogLog created successfully.
- Empty Array if key already exists.
Examples
diff --git a/readme.md b/readme.md
index 9b29960..549c2ce 100644
--- a/readme.md
+++ b/readme.md
@@ -158,6 +158,7 @@ Here are some specific details about the SwarmKV.
* [Token Bucket Types](./commands/token_bucket.md)
* [Bloom Filter Type](./commands/bloom_filter.md)
* [Count-Min Sketch Type](./commands/count_min_sketch.md)
+ * [HyperLogLog Type](./commands/hyperloglog.md)
* [Cluster Management](./commands/cluster.md)
* [Trouble Shooting](./commands/trouble_shooting.md)
* [Design](./docs/design.md)