lib/connections: Add KCP support (fixes #804)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3489
This commit is contained in:
committed by
Jakob Borg
parent
151004d645
commit
0da0774ce4
@@ -11,8 +11,6 @@ package integration
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"runtime"
|
||||
"syscall"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
@@ -142,24 +140,6 @@ loop:
|
||||
log.Println("Result: Wall time:", t1.Sub(t0))
|
||||
log.Printf("Result: %.1f MiB/s synced", float64(total)/1024/1024/t1.Sub(t0).Seconds())
|
||||
|
||||
if rusage, ok := recvProc.SysUsage().(*syscall.Rusage); ok {
|
||||
log.Println("Receiver: Utime:", time.Duration(rusage.Utime.Nano()))
|
||||
log.Println("Receiver: Stime:", time.Duration(rusage.Stime.Nano()))
|
||||
if runtime.GOOS == "darwin" {
|
||||
// Darwin reports in bytes, Linux seems to report in KiB even
|
||||
// though the manpage says otherwise.
|
||||
rusage.Maxrss /= 1024
|
||||
}
|
||||
log.Println("Receiver: MaxRSS:", rusage.Maxrss, "KiB")
|
||||
}
|
||||
if rusage, ok := sendProc.SysUsage().(*syscall.Rusage); ok {
|
||||
log.Println("Sender: Utime:", time.Duration(rusage.Utime.Nano()))
|
||||
log.Println("Sender: Stime:", time.Duration(rusage.Stime.Nano()))
|
||||
if runtime.GOOS == "darwin" {
|
||||
// Darwin reports in bytes, Linux seems to report in KiB even
|
||||
// though the manpage says otherwise.
|
||||
rusage.Maxrss /= 1024
|
||||
}
|
||||
log.Println("Sender: MaxRSS:", rusage.Maxrss, "KiB")
|
||||
}
|
||||
printUsage("Receiver", recvProc)
|
||||
printUsage("Sender", sendProc)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user