Skip to content

Commit

Permalink
⚡️ Update Version
Browse files Browse the repository at this point in the history
  • Loading branch information
alivx committed Mar 23, 2023
1 parent ea47bde commit 70c4e27
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 26 deletions.
24 changes: 2 additions & 22 deletions Generator/fillRedis.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,50 +18,30 @@


# Config value for iteration
iterations = 1
sleepTime=0
iterations = 10

# Perform Redis operations
for i in tqdm(range(iterations), desc="Processing Redis commands"):
# UUID and timestamp for key name
key_uuid = str(uuid.uuid4())
key_timestamp = str(int(time.time()))
redis_connection.set(f"{key_uuid}_{key_timestamp}_json", json.dumps(json_data))
time.sleep(sleepTime)
redis_connection.set(f"{key_uuid}_{key_timestamp}_image_base64", image_data)
time.sleep(sleepTime)
# # Other Redis commands
redis_connection.mset({f"{key_uuid}_key1": "value1", f"{key_uuid}_key2": "value2"})
time.sleep(sleepTime)
redis_connection.setnx(f"{key_uuid}_setnx_key", "value")
time.sleep(sleepTime)
redis_connection.setex(f"{key_uuid}_setex_key", 10, "value")
time.sleep(sleepTime)
redis_connection.psetex(f"{key_uuid}_psetex_key", 10000, "value")
time.sleep(sleepTime)
redis_connection.getset(f"{key_uuid}_getset_key", "new_value")
time.sleep(sleepTime)
redis_connection.hset(f"{key_uuid}_hash", "field", "value")
time.sleep(sleepTime)
redis_connection.hset(f"{key_uuid}_hash_multi", mapping={"field1": "value1", "field2": "value2"})
time.sleep(sleepTime)
redis_connection.hsetnx(f"{key_uuid}_hash_setnx", "field", "value")
time.sleep(sleepTime)

# # Create a list before using lset
redis_connection.lpush(f"{key_uuid}_list", "initial_value")
time.sleep(sleepTime)
redis_connection.lset(f"{key_uuid}_list", 0, "value")
time.sleep(sleepTime)

redis_connection.lpush(f"{key_uuid}_list_push", "value")
time.sleep(sleepTime)
redis_connection.sadd(f"{key_uuid}_set", "value")
time.sleep(sleepTime)
redis_connection.zadd(f"{key_uuid}_zset", {"value": 1})
time.sleep(sleepTime)
redis_connection.pfadd(f"{key_uuid}_pfadd", "value")
time.sleep(sleepTime)
redis_connection.geoadd(f"{key_uuid}_geoadd", 0, 0, "location")
time.sleep(sleepTime)
time.sleep(sleepTime)
redis_connection.pfadd(f"{key_uuid}_pfadd", "value")
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ virtualenv:
@echo

test:
python -m pytest \
python3 -m pytest \
-v \
--cov=redismirror \
--cov-report=term \
Expand All @@ -24,8 +24,8 @@ docker: clean

dist: clean
rm -rf dist/*
python setup.py sdist
python setup.py bdist_wheel
python3 setup.py sdist
python3 setup.py bdist_wheel

dist-upload:
twine upload dist/*
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.0.2

0 comments on commit 70c4e27

Please sign in to comment.