Converting kubernetes kublet API usageNanoCore or usageCoreNanoSeconds to CPU utilization % Kubernetes kublet API
If a process were to run on one cpu continuously for a second, its usage will be 1e+9 nanoseconds. If it ran on
n
cores continuously its usage will n * 1e+9 nanoseconds.Percentage will be usage_in_nanoseconds / (capacity_in_absolute_cores * 1e+9).
*source: https://github.com/kubernetes/heapster/issues/650#issuecomment-147795824