Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

Commit

Permalink
Export node cpu metrics in whole cores
Browse files Browse the repository at this point in the history
  • Loading branch information
serathius committed Mar 19, 2018
1 parent 9686c30 commit 615c48b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metrics/sinks/stackdriver/stackdriver.go
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,10 @@ func (sink *StackdriverSink) TranslateMetric(timestamp time.Time, labels map[str
nodeLabels := sink.getNodeResourceLabels(labels)
switch name {
case core.MetricNodeCpuCapacity.MetricDescriptor.Name:
point := sink.doublePoint(timestamp, timestamp, float64(value.FloatValue))
point := sink.doublePoint(timestamp, timestamp, float64(value.FloatValue)/1000)
return createTimeSeries("k8s_node", nodeLabels, cpuTotalCoresMD, point)
case core.MetricNodeCpuAllocatable.MetricDescriptor.Name:
point := sink.doublePoint(timestamp, timestamp, float64(value.FloatValue))
point := sink.doublePoint(timestamp, timestamp, float64(value.FloatValue)/1000)
return createTimeSeries("k8s_node", nodeLabels, cpuAllocatableCoresMD, point)
case core.MetricCpuUsage.MetricDescriptor.Name:
point := sink.doublePoint(timestamp, collectionStartTime, float64(value.IntValue)/float64(time.Second/time.Nanosecond))
Expand Down

0 comments on commit 615c48b

Please # to comment.