This function analyzes the compressability of the keys
using a single huffman tree. For example,
```
>debug POPULATE 1000000 keyabcdef 10
OK
> debug compression
1) max_symbol
2) (integer) 121
3) max_bits
4) (integer) 5
5) raw_size
6) (integer) 7861817
7) compressed_size
8) (integer) 4372270
9) ratio
10) "0.5561398847111297"
```
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* feat(namespaces): Initial support for multi-tenant #3050
This PR introduces a way to create multiple, separate and isolated
namespaces in Dragonfly. Each user can be associated with a single
namespace, and will not be able to interact with other namespaces.
This is still experimental, and lacks some important features, such as:
* Replication and RDB saving completely ignores non-default namespaces
* Defrag and statistics either use the default namespace or all
namespaces without separation
To associate a user with a namespace, use the `ACL` command with the
`TENANT:<namespace>` flag:
```
ACL SETUSER user TENANT:namespace1 ON >user_pass +@all ~*
```
For more examples and up to date info check
`tests/dragonfly/acl_family_test.py` - specifically the
`test_namespaces` function.
chore: add benchmarks showing single-threded performanc
In addition addressed some questions raised during HN discussions.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
docs(dashtable): Fix image URL for expiration
Replaces the `expiration.svg` image with a working URL.
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
Clarify docker command for macOS
I had issues when running the command on my m2 macbook air. [It turns
out][1] that apparently docker desktop on macOS doesn't really support
the host option.
Additionally, it looks like I had to explicitly pass the port mapping
options for the ports to be actually mapped.
There might be a better and more efficient solution, but this is what I
came up with and it finally worked.
[1]:https://github.com/docker/for-mac/issues/1031
feat(server): support monitor command - allowing user to debug commands
from all connections by using a connection as monitors for the this
(#344)
Signed-off-by: Boaz Sade <boaz@dragonflydb.io>
Also update dense_set.md with a reproducable test on how to see memory differences
of DenseSet vs RedisDict.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* feat(core): Added DenseSet & StringSet types with docs
- Improved documentation by adding labels to chain types & pointer tagging table
- Added potential improvements to the DenseSet types in the docs
- Added excalidraw save file for future editing
- Removed ambiguous overloading types
- Renamed iterators to be more clear
* feat(core): Cleaned up DenseSet and Docs
* feat(core): Made DenseSet more ergonomic
* feat(server): Integration of DenseSet into Server
- Integrated DenseSet with CompactObj and the Set Family commands
Signed-off-by: Braydn <braydn.moore@uwaterloo.ca>