Class: Kanshi::ScrollsReporter
- Inherits:
-
Object
- Object
- Kanshi::ScrollsReporter
- Defined in:
- lib/kanshi/scrolls_reporter.rb
Constant Summary collapse
- ABSOLUTE =
[:size, :numbackends, :locks_waiting, :total_open_xact_time, :xact_waiting, :xact_idle]
Instance Method Summary collapse
-
#initialize ⇒ ScrollsReporter
constructor
A new instance of ScrollsReporter.
- #report(name, url, data) ⇒ Object
Constructor Details
#initialize ⇒ ScrollsReporter
Returns a new instance of ScrollsReporter.
5 6 7 |
# File 'lib/kanshi/scrolls_reporter.rb', line 5 def initialize @last_value = {} end |
Instance Method Details
#report(name, url, data) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/kanshi/scrolls_reporter.rb', line 11 def report(name, url, data) data = calculate_hit_rate(record_and_diff(name, data)) if data Scrolls.context(:app => name, :measure => true) do data.each do |k, v| Scrolls.log(:at => k, :last => v) end end end end |