-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly cast Darwin memory info #1060
Conversation
This also fixes the following
|
collector/meminfo_darwin.go
Outdated
"inactive_bytes": ps * float64(vmstat.inactive_count), | ||
"wired_bytes": ps * float64(vmstat.wire_count), | ||
"free_bytes": ps * float64(vmstat.free_count), | ||
"swapped_in_pages": ps * float64(vmstat.pageins), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these two are counters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I came to the same conclusion.
* Cast stats to float64 before doing math on them to avoid integer wrapping. * Remove invalid `_total` suffix from gauge values. * Handle counters in `meminfo.go`. Signed-off-by: Ben Kochie <superq@gmail.com>
ac53a64
to
9372275
Compare
Fixed up the metric type handling. |
Signed-off-by: Ben Kochie <superq@gmail.com>
* Correctly cast Darwin memory info * Cast stats to float64 before doing math on them to avoid integer wrapping. * Remove invalid `_total` suffix from gauge values. * Handle counters in `meminfo.go`. Signed-off-by: Ben Kochie <superq@gmail.com>
wrapping.
_total
suffix from gauge values.Fixes: #855
Signed-off-by: Ben Kochie superq@gmail.com