logger: migrate rusage syscall use to x/sys/unix

This will be helpful for illumos (#697) and should be safe
everywhere else.

Signed-off-by: Nahum Shalman <nahamu@gmail.com>
pull/5406/head
Nahum Shalman 2 years ago committed by Brad Fitzpatrick
parent d20392d413
commit 66d7d2549f

@ -9,12 +9,13 @@ package logger
import (
"runtime"
"syscall"
"golang.org/x/sys/unix"
)
func rusageMaxRSS() float64 {
var ru syscall.Rusage
err := syscall.Getrusage(syscall.RUSAGE_SELF, &ru)
var ru unix.Rusage
err := unix.Getrusage(unix.RUSAGE_SELF, &ru)
if err != nil {
return 0
}

Loading…
Cancel
Save