summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile.lock2
-rw-r--r--lib/oxidized/node/stats.rb15
2 files changed, 9 insertions, 8 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index ab52715..eda3963 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- oxidized (0.18.0)
+ oxidized (0.19.0)
asetus (~> 0.1)
net-ssh (~> 3.0.2)
net-telnet
diff --git a/lib/oxidized/node/stats.rb b/lib/oxidized/node/stats.rb
index 6b5719c..2f47419 100644
--- a/lib/oxidized/node/stats.rb
+++ b/lib/oxidized/node/stats.rb
@@ -6,14 +6,15 @@ module Oxidized
# @param [Job] job job whose information add to stats
# @return [void]
def add job
- stat = {
- :start => job.start,
- :end => job.end,
- :time => job.time,
+ status = job.stats.dup
+ stat = {
+ :start => job.start.dup,
+ :end => job.end.dup,
+ :time => job.time.dup,
}
- @stats[job.status] ||= []
- @stats[job.status].shift if @stats[job.status].size > MAX_STAT
- @stats[job.status].push stat
+ @stats[status] ||= []
+ @stats[status].shift if @stats[status].size > MAX_STAT
+ @stats[status].push stat
end
# @param [Symbol] status stats for specific status