kanshi 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/kanshi/scrolls_reporter.rb +6 -5
- 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
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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
|