Fixed CPU units
Change-Id: I632529ca092bd9ffedff4dea5a4a5e608d7499b7
There is a slight misinterpretation of CPU units from the query
sum by(pod) (rate(container_cpu_usage_seconds_total{namespace=‘default’,container!=‘’,container!=‘POD’}[%sm])) * 100
here is a good explanation what this query gives:
https://stackoverflow.com/a/48872951/11185618
so actually each 1 indicates a pod load for 1 second for 1 CPU core (1000 milliCPUs),rather than "CPU rate"
diff --git a/tests/scale/sizing.py b/tests/scale/sizing.py
index f00dbe6..4f3a9d4 100644
--- a/tests/scale/sizing.py
+++ b/tests/scale/sizing.py
@@ -61,7 +61,7 @@
container_mem_query = "sum by(pod) (container_memory_working_set_bytes{namespace='default',container!='',container!='POD'})"
- container_cpu_query = "sum by(pod) (rate(container_cpu_usage_seconds_total{namespace='default',container!='',container!='POD'}[%sm])) * 100" % since
+ container_cpu_query = "sum by(pod) (rate(container_cpu_usage_seconds_total{namespace='default',container!='',container!='POD'}[%sm]))" % since
now = time.time()
cpu_params = {
@@ -139,7 +139,7 @@
plt.title("CPU Usage per POD")
plt.xlabel("Timestamp")
- plt.ylabel("% used")
+ plt.ylabel("CPU cores used")
for c in containers:
name = c["metric"]["pod"]