build: Update integration tests and add to build.go (#6744)

This commit is contained in:
Simon Frei
2020-06-16 14:33:17 +02:00
committed by GitHub
parent f310bbaaac
commit dbacef35c4
5 changed files with 82 additions and 8 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ func ftToDuration(ft *syscall.Filetime) time.Duration {
func printUsage(name string, proc *os.ProcessState, total int64) {
if rusage, ok := proc.SysUsage().(*syscall.Rusage); ok {
mib := total / 1024 / 1024
log.Printf("%s: Utime: %s / MiB", name, time.Duration(&rusage.UserTime/mib))
log.Printf("%s: Stime: %s / MiB", name, time.Duration(&rusage.KernelTime/mib))
log.Printf("%s: Utime: %s / MiB", name, time.Duration(rusage.UserTime.Nanoseconds()/mib))
log.Printf("%s: Stime: %s / MiB", name, time.Duration(rusage.KernelTime.Nanoseconds()/mib))
}
}