diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2020-08-10 12:40:00 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@tailscale.com> | 2020-08-10 13:01:49 -0700 |
| commit | c1024a5de2fc6695bc2acf1b3444ae6deda3fa2e (patch) | |
| tree | ee151fa8d8e63c92404fc7feb0718dc85b87371d /net/interfaces/interfaces_linux_test.go | |
| parent | d65e2632ab1940b9bae9fa14b012cf79161b9cbc (diff) | |
| download | tailscale-bradfitz/linux_default_route_interface.tar.xz tailscale-bradfitz/linux_default_route_interface.zip | |
net/netns, net/interfaces: move defaultRouteInterface, add Android fallbackbradfitz/linux_default_route_interface
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Diffstat (limited to 'net/interfaces/interfaces_linux_test.go')
| -rw-r--r-- | net/interfaces/interfaces_linux_test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/interfaces/interfaces_linux_test.go b/net/interfaces/interfaces_linux_test.go new file mode 100644 index 000000000..3aa69d2f6 --- /dev/null +++ b/net/interfaces/interfaces_linux_test.go @@ -0,0 +1,16 @@ +// Copyright (c) 2020 Tailscale Inc & AUTHORS All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package interfaces + +import "testing" + +func BenchmarkDefaultRouteInterface(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + if _, err := DefaultRouteInterface(); err != nil { + b.Fatal(err) + } + } +} |
