diff options
author | Mario Trangoni <mario@mariotrangoni.de> | 2018-04-29 14:34:47 +0200 |
---|---|---|
committer | Johannes 'fish' Ziemke <github@freigeist.org> | 2018-04-29 14:34:47 +0200 |
commit | c9f421d0dd8699396b3fd94dc6e595475d28ad1e (patch) | |
tree | adb617ab040aedadc866056c205fc77356a30edb /collector/cpu_linux.go | |
parent | 7073dcdcb58de2697ee806da49d8a3297ee66184 (diff) | |
download | prometheus_node_collector-c9f421d0dd8699396b3fd94dc6e595475d28ad1e.tar.bz2 prometheus_node_collector-c9f421d0dd8699396b3fd94dc6e595475d28ad1e.tar.xz prometheus_node_collector-c9f421d0dd8699396b3fd94dc6e595475d28ad1e.zip |
Fix some golint issues (#927)
* collector/cpu_*: rename nodeCpuSecondsDesc to nodeCPUSecondsDesc
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
* collector/qdisc_linux.go: add NewQdiscStatCollector comment
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
* collector/cpu_linux.go: rename core_map to coreMap
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
Diffstat (limited to 'collector/cpu_linux.go')
-rw-r--r-- | collector/cpu_linux.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/collector/cpu_linux.go b/collector/cpu_linux.go index f935456..e79d00c 100644 --- a/collector/cpu_linux.go +++ b/collector/cpu_linux.go | |||
@@ -49,7 +49,7 @@ func init() { | |||
49 | // NewCPUCollector returns a new Collector exposing kernel/system statistics. | 49 | // NewCPUCollector returns a new Collector exposing kernel/system statistics. |
50 | func NewCPUCollector() (Collector, error) { | 50 | func NewCPUCollector() (Collector, error) { |
51 | return &cpuCollector{ | 51 | return &cpuCollector{ |
52 | cpu: nodeCpuSecondsDesc, | 52 | cpu: nodeCPUSecondsDesc, |
53 | cpuGuest: prometheus.NewDesc( | 53 | cpuGuest: prometheus.NewDesc( |
54 | prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "guest_seconds_total"), | 54 | prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "guest_seconds_total"), |
55 | "Seconds the cpus spent in guests (VMs) for each mode.", | 55 | "Seconds the cpus spent in guests (VMs) for each mode.", |
@@ -185,8 +185,8 @@ func (c *cpuCollector) updateCPUfreq(ch chan<- prometheus.Metric) error { | |||
185 | strconv.FormatUint(physicalPackageID, 10)) | 185 | strconv.FormatUint(physicalPackageID, 10)) |
186 | } | 186 | } |
187 | 187 | ||
188 | for physicalPackageID, core_map := range packageCoreThrottles { | 188 | for physicalPackageID, coreMap := range packageCoreThrottles { |
189 | for coreID, coreThrottleCount := range core_map { | 189 | for coreID, coreThrottleCount := range coreMap { |
190 | ch <- prometheus.MustNewConstMetric(c.cpuCoreThrottle, | 190 | ch <- prometheus.MustNewConstMetric(c.cpuCoreThrottle, |
191 | prometheus.CounterValue, | 191 | prometheus.CounterValue, |
192 | float64(coreThrottleCount), | 192 | float64(coreThrottleCount), |