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>
This commit is contained in:
parent
7073dcdcb5
commit
c9f421d0dd
7 changed files with 9 additions and 8 deletions
|
|
@ -49,7 +49,7 @@ func init() {
|
|||
// NewCPUCollector returns a new Collector exposing kernel/system statistics.
|
||||
func NewCPUCollector() (Collector, error) {
|
||||
return &cpuCollector{
|
||||
cpu: nodeCpuSecondsDesc,
|
||||
cpu: nodeCPUSecondsDesc,
|
||||
cpuGuest: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "guest_seconds_total"),
|
||||
"Seconds the cpus spent in guests (VMs) for each mode.",
|
||||
|
|
@ -185,8 +185,8 @@ func (c *cpuCollector) updateCPUfreq(ch chan<- prometheus.Metric) error {
|
|||
strconv.FormatUint(physicalPackageID, 10))
|
||||
}
|
||||
|
||||
for physicalPackageID, core_map := range packageCoreThrottles {
|
||||
for coreID, coreThrottleCount := range core_map {
|
||||
for physicalPackageID, coreMap := range packageCoreThrottles {
|
||||
for coreID, coreThrottleCount := range coreMap {
|
||||
ch <- prometheus.MustNewConstMetric(c.cpuCoreThrottle,
|
||||
prometheus.CounterValue,
|
||||
float64(coreThrottleCount),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue