Commit Graph

16 Commits (110eb1f0828fb825d114a1e06155397892cdd4ae)

Author SHA1 Message Date
Hilko Bengen 832dcb96c8 cpu.Percent (Windows): Use the same implementation as on Unix
WMI is way too slow.
Ben Aldrich a76195e088 fixed imports and spelling error
Ben Aldrich c36f7ac8b0 rename var
Ben Aldrich fcc1747d9f Merge branch 'master' of https://github.com/shirou/gopsutil into calc_cpu_percent
Conflicts:
	cpu/cpu.go
Ben Aldrich c389989453 calculate cpu percentage compared to last call if 0 interval is given
Shirou WAKAYAMA 57f6aebc7e add Timeout to invoke command and use common.Invoke refs: #201
Shirou WAKAYAMA 4bb84648bf JSON representation is renamed to fit Google JSON style, camelCase.
Shirou WAKAYAMA ea152ea901 [BREAKING CHANGE] rename functions to pass golint. ex) net.NetIOCounters -> net.IOCounters
Johan Walles ebaa641e63 Make a public function for computing total CPU time
This function used to be a private part of process.go.

Since I needed that functionality however I think it's better to make it public
than for me to copy it into my own code.

As a side effect of this change, I also fixed a bug in the function where Stolen
was not part of the sum. Having the function close to the CPUTimesStat
declaration will make problems like this less likely to re-occur in the future.
Ryan J. O'Neil 2434a327b9 Removing race condition in CPUPercent calculation.
WAKAYAMA Shirou ead8393137 cpu: use wmic to get CPU usage on Windows.
Shirou WAKAYAMA 753ea1bb48 fix when converting CPUTimes to JSON, sometimes idel have exponent
Shirou WAKAYAMA 4b5bf22b88 change CPUTimes type from float32 to float64 to resolve precision issue.
Shirou WAKAYAMA 13cd195a7e change package name.
Shirou WAKAYAMA 16de570414 merge 039b9defab
Shirou WAKAYAMA a4671fcc2a move subdirectories. refer to issue #24