internal/deepprint: improve benchmark

This more closely matches our real usage of deepprint.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
Josh Bleecher Snyder 2021-05-11 09:45:12 -07:00 committed by Josh Bleecher Snyder
parent 712774a697
commit 6ab2176dc7

View File

@ -8,6 +8,8 @@
"testing" "testing"
"inet.af/netaddr" "inet.af/netaddr"
"tailscale.com/tailcfg"
"tailscale.com/util/dnsname"
"tailscale.com/wgengine/router" "tailscale.com/wgengine/router"
"tailscale.com/wgengine/wgcfg" "tailscale.com/wgengine/wgcfg"
) )
@ -44,16 +46,17 @@ func getVal() []interface{} {
netaddr.MustParseIPPrefix("1234::/64"), netaddr.MustParseIPPrefix("1234::/64"),
}, },
}, },
map[string]string{ map[dnsname.FQDN][]netaddr.IP{
"key1": "val1", dnsname.FQDN("a."): {netaddr.MustParseIP("1.2.3.4"), netaddr.MustParseIP("4.3.2.1")},
"key2": "val2", dnsname.FQDN("b."): {netaddr.MustParseIP("8.8.8.8"), netaddr.MustParseIP("9.9.9.9")},
"key3": "val3", },
"key4": "val4", map[dnsname.FQDN][]netaddr.IPPort{
"key5": "val5", dnsname.FQDN("a."): {netaddr.MustParseIPPort("1.2.3.4:11"), netaddr.MustParseIPPort("4.3.2.1:22")},
"key6": "val6", dnsname.FQDN("b."): {netaddr.MustParseIPPort("8.8.8.8:11"), netaddr.MustParseIPPort("9.9.9.9:22")},
"key7": "val7", },
"key8": "val8", map[tailcfg.DiscoKey]bool{
"key9": "val9", {1: 1}: true,
{1: 2}: false,
}, },
} }
} }