lib/tabs/metrics/value.rb in tabs-0.6.3 vs lib/tabs/metrics/value.rb in tabs-0.7.0

- old
+ new

@@ -8,11 +8,11 @@ def initialize(key) @key = key end - def record(value) - timestamp = Time.now.utc + def record(value, timestamp=Time.now) + timestamp.utc Tabs::RESOLUTIONS.each do |resolution| formatted_time = Tabs::Resolution.serialize(resolution, timestamp) stat_key = "stat:value:#{key}:data:#{formatted_time}" sadd("stat:value:#{key}:keys:#{resolution}", stat_key) update_values(stat_key, value)