summaryrefslogtreecommitdiffhomepage
path: root/net/interfaces/interfaces_linux_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'net/interfaces/interfaces_linux_test.go')
-rw-r--r--net/interfaces/interfaces_linux_test.go16
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)
+ }
+ }
+}