class Ravanello::Statistics::Item

Holds information about size and count of matched key group

Attributes

count[R]
samples[R]
size[R]

Public Class Methods

new() click to toggle source
# File lib/ravanello/statistics.rb, line 22
def initialize
  @count = 0
  @size = 0
  @samples = []
end

Public Instance Methods

inc(redis_key) click to toggle source
# File lib/ravanello/statistics.rb, line 28
def inc(redis_key)
  @count += 1
  @size += redis_key.size
  @samples.push(redis_key) if @samples.count < 100
end