From a805ed17500821858437aca3f499adf3bb564624 Mon Sep 17 00:00:00 2001 From: Chaitanya Akkineni Date: Fri, 5 Sep 2014 15:04:41 -0500 Subject: [PATCH] update cAdvisor 0.2.2 Signed-off-by: Gary Paige --- app/models/host_health.rb | 2 +- spec/models/host_health_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/host_health.rb b/app/models/host_health.rb index 38335169..4d55c99b 100644 --- a/app/models/host_health.rb +++ b/app/models/host_health.rb @@ -23,7 +23,7 @@ def overall_cpu(stats) sample = stats.pop(2) raw = sample[1].attributes[:cpu].attributes[:usage].attributes[:total] - sample[0].attributes[:cpu].attributes[:usage].attributes[:total] - spec = sample[1].attributes[:cpu].attributes[:usage].attributes[:per_cpu].length + spec = sample[1].attributes[:cpu].attributes[:usage].attributes[:per_cpu_usage].length usage = (raw / 1000000000.0).round(3) percent = ((usage / spec) * 100).round(2) end diff --git a/spec/models/host_health_spec.rb b/spec/models/host_health_spec.rb index 7fb73fbd..ec6c7a52 100644 --- a/spec/models/host_health_spec.rb +++ b/spec/models/host_health_spec.rb @@ -9,7 +9,7 @@ cpu: { usage: { total: 0, - per_cpu: [100] + per_cpu_usage: [100] } }, memory: { @@ -20,7 +20,7 @@ cpu: { usage: { total: 10000000, - per_cpu: [100] + per_cpu_usage: [100] } }, memory: {