mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-10 04:27:25 +01:00
Cast collector measurement duration to seconds. Thanks to KIT
This commit is contained in:
parent
15cf16b46f
commit
830b7de9ea
@ -200,7 +200,7 @@ func (m *LikwidCollector) Read(interval time.Duration, out *[]lp.MutableMetric)
|
||||
res := C.perfmon_getLastResult(gid, eidx, C.int(tid))
|
||||
m.results[i][tid][gctr] = float64(res)
|
||||
}
|
||||
m.results[i][tid]["time"] = float64(interval)
|
||||
m.results[i][tid]["time"] = interval.Seconds()
|
||||
m.results[i][tid]["inverseClock"] = float64(1.0 / m.basefreq)
|
||||
for _, metric := range evset.Metrics {
|
||||
expression, err := govaluate.NewEvaluableExpression(metric.Calc)
|
||||
|
@ -281,7 +281,7 @@ func main() {
|
||||
// storage locations
|
||||
for _, c := range config.Collectors {
|
||||
col := Collectors[c]
|
||||
col.Read(time.Duration(config.Duration), &tmpPoints)
|
||||
col.Read(time.Duration(config.Duration)*time.Second, &tmpPoints)
|
||||
|
||||
for {
|
||||
if len(tmpPoints) == 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user