Sha256: aba637fff4485a8b486cfc7589ce71c066520af2b517f72bc688f90b620063dc
Contents?: true
Size: 383 Bytes
Versions: 3
Compression:
Stored size: 383 Bytes
Contents
require 'rubygems' require '../lib/ruby-metrics' @metrics = Metrics::Agent.new @metrics.start hit_count = 42 http_requests = 53 gauge = @metrics.gauge :my_gauge do { :hit_count => hit_count, :http_requests => http_requests } end puts "Gauge: #{gauge.to_s}" hit_count = 65 http_requests = 99 puts "Gauge: #{gauge.to_s}" result = gauge.get puts "Result: #{result}"
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ruby-metrics-0.7.0 | examples/gauge.rb |
ruby-metrics-0.6.0 | examples/gauge.rb |
ruby-metrics-0.5.0 | examples/gauge.rb |