diff --git a/collectors/likwidMetric.go b/collectors/likwidMetric.go index 2fd1129..34e2364 100644 --- a/collectors/likwidMetric.go +++ b/collectors/likwidMetric.go @@ -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) diff --git a/metric-collector.go b/metric-collector.go index f6c8f5c..fd3b556 100644 --- a/metric-collector.go +++ b/metric-collector.go @@ -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 {