Merge latest fixed from develop to main (#85)

* InfiniBandCollector: Scale raw readings from octets to bytes

* Fix clock frequency coming from LikwidCollector and update docs
This commit is contained in:
Thomas Gruber
2022-09-12 12:54:40 +02:00
committed by GitHub
parent 3438972237
commit 5b6a2b9018
3 changed files with 16 additions and 9 deletions

View File

@@ -159,7 +159,8 @@ func getBaseFreq() float64 {
data := strings.Replace(string(buffer), "\n", "", -1)
x, err := strconv.ParseInt(data, 0, 64)
if err == nil {
freq = float64(x) * 1e6
freq = float64(x)
break
}
}
}
@@ -168,11 +169,11 @@ func getBaseFreq() float64 {
C.power_init(0)
info := C.get_powerInfo()
if float64(info.baseFrequency) != 0 {
freq = float64(info.baseFrequency) * 1e6
freq = float64(info.baseFrequency)
}
C.power_finalize()
}
return freq
return freq * 1e3
}
func (m *LikwidCollector) Init(config json.RawMessage) error {