https://github.com/rollbar/pylibmc-hashring-compat-test
https://github.com/rollbar/pylibmc-hashring-compat-test
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rollbar/pylibmc-hashring-compat-test
- Owner: rollbar
- Created: 2023-02-17T19:58:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-28T18:20:41.000Z (about 3 years ago)
- Last Synced: 2025-03-05T16:11:58.185Z (over 1 year ago)
- Language: Python
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Running the test
Start up the memcached servers
```bash
docker compose run --rm memcached
```
Seed data both with pylibmc and hashring
```bash
docker compose run --rm -e NUMBER_ITEMS_TO_SEED=1000 seed_with_hashring
docker compose run --rm -e NUMBER_ITEMS_TO_SEED=1000 seed_with_pylibmc
```
This will add + create a json dump of the added data in `added_data/`, which will be used when trying to pull up the keys later.
Try to get data with hashring/python-memcached client and with the pylibmc client
```bash
memcache-test git:(main) docker compose run -e NUMBER_ITEMS_TO_SEED=1000 hashring
Searching with hash_ring memcached client
[PYLIBMC SEEDED] Searched for 1000 keys, found 312
[HASHRING SEEDED] Searched for 1000 keys, found 1000
----------
```
```bash
docker compose run -e NUMBER_ITEMS_TO_SEED=1000 pylibmc
Searching with pylibmc client
[PYLIBMC SEEDED] Searched for 1000 keys, found 1000
[HASHRING SEEDED] Searched for 1000 keys, found 332
----------
```