summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/checker/checker.go
diff options
context:
space:
mode:
authorBhasker Hariharan <bhaskerh@google.com>2020-03-17 19:09:24 -0700
committergVisor bot <gvisor-bot@google.com>2020-03-17 19:10:53 -0700
commiteddd6ce514e3bbcc08ce9d8435c7dac12715989c (patch)
treebdb678f41a203afc9db4783164c10fb64908b4ce /pkg/tcpip/checker/checker.go
parent1cc5a71a0e2100c89c97ffd12a38143907b33630 (diff)
Wrap rand.Reader in a bufio.Reader.
rand.Read() results in a syscall to the host on every call instead we can wrap it with a bufio.Reader to buffer and reduce number of syscalls. This is especially important for TCP where every newly created endpoint reads random data to initialize the timestamp offsets for the endpoint. Updates #231 PiperOrigin-RevId: 301501607
Diffstat (limited to 'pkg/tcpip/checker/checker.go')
0 files changed, 0 insertions, 0 deletions