Permalink
Browse files

Added size measurement for hashes

  • Loading branch information...
1 parent d999ebf commit 6cfa3c69c27f504f10651881e4a8a68b7f09d5c4 @justinvt committed May 29, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 redis-summary
View
2 redis-summary 100755 → 100644
@@ -134,7 +134,7 @@ class RedisStats
when 'list' then db.lrange(k, 0, -1).size
when 'zset' then db.zrange(k, 0, -1).size
when 'set' then db.smembers(k).size
- when 'hash' then 0
+ when 'hash' then db.hgetall(k).to_a.flatten.join.size
else raise("Redis type '#{t}' not yet supported.") # TODO accommodate more types
end
end

0 comments on commit 6cfa3c6

Please sign in to comment.