Sha256: f474fabf1500111e87480d8a2a580dfb56d66f930e1768b499794e850db7e73f
Contents?: true
Size: 426 Bytes
Versions: 6
Compression:
Stored size: 426 Bytes
Contents
require 'json' # Static counter to count unique values module PulseMeter module Sensor class UniqCounter < Counter # Processes event # @param name [String] value to be counted def event(name) redis.sadd(value_key, name) end # Returs number of unique values ever sent to counter # @return [Fixnum] def value redis.scard(value_key) end end end end
Version data entries
6 entries across 6 versions & 2 rubygems