Closed achille-roussel closed 7 years ago
Why do we care about darwin? Is there a darwin host which needs to read these?
If we don't need to support it, we should just fill the functions with mocks and state that it's not supported.
We don't need it... but it's nice to have, especially when testing programs locally that depend on this package (think something that exposes its metrics to a local prometheus or similar).
Sorry I mistakenly hit merge, feel free to leave more comments and I'll address them.
No biggie. You're right it's nice to have. I just dislike cgo. We can always remove it later if it's too much to bear.
Agree, CGO is only used of OSX tho, the linux version of the code doesn't depend on any C code.
There are three main changes in the PR:
getrusage
Those things are pretty hard to test because we can never predict how much resources a process is using (plus it's very dependent on the environment), here's a trace of the tests ran on OSX:
The values seem to make sense, let me know if anything should be changed!