kanshi 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/kanshi/scrolls_reporter.rb +6 -5
  2. metadata +1 -1
@@ -6,7 +6,7 @@ class Kanshi::ScrollsReporter
6
6
  @last_value = {}
7
7
  end
8
8
 
9
- ABSOLUTE = [:size, :numbackends]
9
+ ABSOLUTE = [:size, :numbackends, :locks_waiting, :total_open_xact_time, :xact_waiting, :xact_idle]
10
10
 
11
11
  def report(name, url, data)
12
12
  data = calculate_hit_rate(record_and_diff(name, data))
@@ -26,10 +26,11 @@ private
26
26
  if @last_value[name]
27
27
  diff = Hash.new
28
28
  data.keys.each do |key|
29
- diff[key] = data[key] - @last_value[name][key]
30
- end
31
- ABSOLUTE.each do |key|
32
- diff["absolute_#{key}"] = data[key]
29
+ if ABSOLUTE.include?(key)
30
+ diff[key] = data[key]
31
+ else
32
+ diff[key] = data[key] - @last_value[name][key]
33
+ end
33
34
  end
34
35
  end
35
36
  @last_value[name] = data
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kanshi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: