Sha256: b97be75afc62714fdd37df7a132c20cdbeb77e43054b62d7a23d9e8b44da4843
Contents?: true
Size: 722 Bytes
Versions: 1
Compression:
Stored size: 722 Bytes
Contents
module Simple module Metrics module Meter include Simple::Metrics # Create a new meter # # @param [String] name The name of the meter # @param [Hash] options A hash containing keys/value pairs to override defaults. Defaults to # `{}` def define_meter(name, options={}) klass_name = options[:name] || self.class.name time_unit = options[:time_unit] || Simple::Metrics::DEFAULT_RATE_UNIT type = "meter" metric_name = new_metric_name(klass_name, name, type) meter = Java::ComYammerMetrics::Metrics.new_meter(metric_name, name.to_s, time_unit) define_method("#{name}") do meter end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kb-simple-metrics-0.0.13-java | lib/simple/metrics/meter.rb |