~samwhited/xmpp

ref: 7b9310cb11358835c951d5f6a41be72dfc76cd49 xmpp/stream/benchmark_test.go -rw-r--r-- 267 bytes
7b9310cbSam Whited xmpp: use new JID API 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package stream_test

import (
	"net"
	"testing"

	"mellium.im/xmpp/stream"
)

func BenchmarkSeeOtherHostError(b *testing.B) {
	ip := &net.IPAddr{IP: net.ParseIP("2001:db8::68")}
	b.ResetTimer()
	for n := 0; n < b.N; n++ {
		_ = stream.SeeOtherHostError(ip, nil)
	}
}