Added degcol logger to extrema and prog-extrema.

Degree of collocation logger (or task share variance logger) was
only present in pcp.go. Copied that code into extrema and prog-extrema.
Also, exposed visibility of pcp/utils.go#cpuUtilsPerNode(...) and
pcp/utils.go#memUtilsPerNode(...) to public.
This commit is contained in:
Pradyumna Kaushik 2018-10-05 00:38:24 -04:00
parent d9780a6a9f
commit aca9dcd185
4 changed files with 92 additions and 9 deletions

View file

@ -55,10 +55,10 @@ func Start(quit chan struct{}, logging *bool, logMType chan elekLogDef.LogMessag
seconds++
memUtils := memUtilPerNode(text)
memUtils := MemUtilPerNode(text)
memTaskShares := make([]float64, len(memUtils))
cpuUtils := cpuUtilPerNode(text)
cpuUtils := CpuUtilPerNode(text)
cpuTaskShares := make([]float64, len(cpuUtils))
for i := 0; i < 8; i++ {

View file

@ -56,7 +56,7 @@ func utilization(used string, free string) float64 {
return u / (u + f)
}
func cpuUtilPerNode(text string) []float64 {
func CpuUtilPerNode(text string) []float64 {
tokenSlice := strings.Split(text, ",")
cpuUtil := make([]float64, 8)
for i := 0; i < 8; i++ {
@ -65,7 +65,7 @@ func cpuUtilPerNode(text string) []float64 {
return cpuUtil
}
func memUtilPerNode(text string) []float64 {
func MemUtilPerNode(text string) []float64 {
tokenSlice := strings.Split(text, ",")
memUtil := make([]float64, 8)
for i := 0; i < 8; i++ {