You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gopsutil/load
Lomanic 974d52d412 [load][darwin] Remove calls to sysctl binary in load/load_darwin.go #639
Again, a simple benchmark:

Lomanics-iMac:~ lomanic$ time ./load_avg.old ; time ./load_avg
{load1:0.89,load5:0.99,load15:1.01} <nil>

real    0m0.019s
user    0m0.008s
sys     0m0.013s
{load1:0.8876953125,load5:0.98828125,load15:1.0146484375} <nil>

real    0m0.011s
user    0m0.004s
sys     0m0.006s

This is faster and yields more precise results.
6 years ago
..
load.go Use static initialisation for invoke instances, instead of init funcs 7 years ago
load_bsd.go change to use CommandContext. 7 years ago
load_darwin.go [load][darwin] Remove calls to sysctl binary in load/load_darwin.go #639 6 years ago
load_fallback.go Add WithContext functions. 7 years ago
load_linux.go Add WithContext functions. 7 years ago
load_test.go [load] freebsd: change to use x/sys/unix.SysctlRaw. 8 years ago
load_windows.go Add WithContext functions. 7 years ago