mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -08:00
Correct the ClocksPerSec scaling factor on Darwin (#846)
* Update cpu_darwin.go Change the definition of ClocksPerSec to read from limits.h * Update cpu_darwin.go
This commit is contained in:
parent
84719ef59a
commit
098f975b48
|
@ -31,6 +31,7 @@ import (
|
|||
/*
|
||||
#cgo LDFLAGS:
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/mount.h>
|
||||
#include <mach/mach_init.h>
|
||||
|
@ -45,7 +46,7 @@ import (
|
|||
import "C"
|
||||
|
||||
// ClocksPerSec default value. from time.h
|
||||
const ClocksPerSec = float64(128)
|
||||
const ClocksPerSec = float64(C.CLK_TCK)
|
||||
|
||||
type statCollector struct {
|
||||
cpu *prometheus.Desc
|
||||
|
|
Loading…
Reference in a new issue