Sha256: f5b580aa597b892486b52be2ec524891e8ae704d6530cd5b72a0ebc626a6d7f1
Contents?: true
Size: 396 Bytes
Versions: 1
Compression:
Stored size: 396 Bytes
Contents
require "redis" module Appstats class Benchmarker attr_accessor :redis def initialize(data = {}) @redis = data[:redis] || Redis.new end def record(title,legend,point) redis.multi do redis.sadd "benchmarks", title redis.sadd "benchmarks:#{title}", legend redis.rpush "benchmarks:#{title}:#{legend}", point end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
appstats-0.23.0 | lib/appstats/benchmarker.rb |