Removed Degree of Collocation logger.

This commit is contained in:
Pradyumna Kaushik 2018-10-05 14:11:49 -04:00
parent 39ba273d1a
commit bcc2b4e4cc
10 changed files with 6 additions and 179 deletions

View file

@ -3,8 +3,6 @@ package pcp
import (
"container/ring"
"math"
"strconv"
"strings"
)
var RAPLUnits = math.Pow(2, -32)
@ -49,27 +47,3 @@ func AverageClusterPowerHistory(history *ring.Ring) float64 {
return (total / count)
}
func utilization(used string, free string) float64 {
u, _ := strconv.ParseFloat(used, 64)
f, _ := strconv.ParseFloat(free, 64)
return u / (u + f)
}
func CpuUtilPerNode(text string) []float64 {
tokenSlice := strings.Split(text, ",")
cpuUtil := make([]float64, 8)
for i := 0; i < 8; i++ {
cpuUtil[i] = utilization(tokenSlice[8+i], tokenSlice[24+i])
}
return cpuUtil
}
func MemUtilPerNode(text string) []float64 {
tokenSlice := strings.Split(text, ",")
memUtil := make([]float64, 8)
for i := 0; i < 8; i++ {
memUtil[i] = utilization(tokenSlice[40+i], tokenSlice[32+i])
}
return memUtil
}