logger: migrate rusage syscall use to x/sys/unix
This will be helpful for illumos and should be safe
everywhere else.
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
}
