Unit testing for pcp module.
Added unit tests to test code in def/ module. Currently, AverageNodePowerHistory(...) assumes that the DRAM power readings are being monitored. In addition, it also assumes that the host servers are dual socket machines. However, this assumption might not always hold true. Thus, added a TODO to fix this.
This commit is contained in:
parent
b27966dc3a
commit
91e06fab4f
3 changed files with 100 additions and 0 deletions
|
@ -41,6 +41,7 @@ func AverageNodePowerHistory(history *ring.Ring) float64 {
|
|||
return 0.0
|
||||
}
|
||||
|
||||
// TODO (pkaushik) handle cases when DRAM power is not being monitored.
|
||||
count /= 4 // Two PKGs, two DRAM for all nodes currently.
|
||||
|
||||
return (total / count)
|
||||
|
|
Reference in a new issue