Skip to content

Instantly share code, notes, and snippets.

View sherin's full-sized avatar

Sherin Kurian sherin

View GitHub Profile
@sherin
sherin / redis_usage.py
Last active April 10, 2019 03:34
redis space usage report grouped by prefixes on keys
#!/usr/bin/env python
# production friendly
# slow if there are too many keys but the script will print partial outputs
# usage is an approximation for complex objects
import math
import redis
import urlparse
import os