Skip to content

Instantly share code, notes, and snippets.

View coryt's full-sized avatar
💡
Learning

Cory Taylor coryt

💡
Learning
  • Goodbit
  • Toronto, Canada
  • 19:42 (UTC -05:00)
  • X @cctaylor
View GitHub Profile
@joeyAghion
joeyAghion / simple_redis_profile.rb
Created October 13, 2010 16:00
By sampling keys from your redis databases, this script tries to identify what types of keys are occupying the most memory.
#!/usr/bin/env ruby
# Evaluates a sample of keys/values from each redis database, computing statistics for each key pattern:
# keys: number of keys matching the given pattern
# size: approximation of the associated memory occupied (based on size/length of value)
# percent: the proportion of this 'size' relative to the sample's total
#
# Copyright Weplay, Inc. 2010. Available for use under the MIT license.