~samwhited/xmpp

ref: e8c09b3ff1c1489c21d96a0f7f8f0e8728fc095a xmpp/stream/benchmark_test.go -rw-r--r-- 416 bytes
e8c09b3fSam Whited design: fix typo in design doc template 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2020 The Mellium Contributors.
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

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)
	}
}