diff options
-rw-r--r-- | lib/oxidized/node/stats.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/oxidized/node/stats.rb b/lib/oxidized/node/stats.rb index 17b9a13..e37e07a 100644 --- a/lib/oxidized/node/stats.rb +++ b/lib/oxidized/node/stats.rb @@ -14,11 +14,7 @@ module Oxidized @stats[job.status] ||= [] @stats[job.status].shift if @stats[job.status].size > MAX_STAT @stats[job.status].push stat - if job.status.equal? :success - @stats[:success_count] += 1 - else - @stats[:failure_count] += 1 - end + @stats[:counter][job.status] += 1 end # @param [Symbol] status stats for specific status @@ -31,8 +27,7 @@ module Oxidized def initialize @stats = {} - @stats[:success_count] = 0 - @stats[:failure_count] = 0 + @stats[:counter] = Hash.new 0 end end end |