Skip to content

Instantly share code, notes, and snippets.

View dongyuwei's full-sized avatar
💭
天天听儿歌

dongyuwei dongyuwei

💭
天天听儿歌
View GitHub Profile
require 'rubygems'
require 'redis'
def main(opts={})
r = Redis.new(opts)
um = 0
while true do
newum = r.info[:used_memory]
if newum != um && um != 0
diff = newum.to_i-um.to_i