segmentio / stats

Go package for abstracting stats collection
https://godoc.org/github.com/segmentio/stats
MIT License
208 stars 32 forks source link

Add process delay statistics collection for Linux #87

Closed otterley closed 6 years ago

otterley commented 6 years ago

Add process delay statistics collection capability on Linux. This requires access to the taskstats Netlink generic family, which imposes a few limitations:

It's also currently dependent on https://github.com/mdlayher/taskstats/pull/5 which I hope will be merged soon.

otterley commented 6 years ago

Question on the design: Why not include the collection of delay metrics in the process stats that already existed? For example adding Delay time.Duration to the CPUInfo data structure.

Good question! It was considered, but the fact that collection of these stats requires elevated privileges and host networking means that a number (most?) of the programs we run won't be able to collect them, unless we significantly change their configuration.

Another option would be to collect them if it's possible by default, and maybe emit a warning if we can't. Would you prefer that?

otterley commented 6 years ago

Applied fixes per feedback.