-
Notifications
You must be signed in to change notification settings - Fork 56
/
pipe_pool_linux_test.go
55 lines (42 loc) · 1.11 KB
/
pipe_pool_linux_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package tcp
import "testing"
func BenchmarkPipePoolDummyOK(b *testing.B) {
c, cancel := _newChecker(b)
defer cancel()
c.pipePool = newPipePoolDummy()
addr, stop := _startTestServer()
defer stop()
_benchmarkChecker(b, c, addr)
}
func BenchmarkPipePoolSyncPoolOK(b *testing.B) {
c, cancel := _newChecker(b)
defer cancel()
c.pipePool = newPipePoolSyncPool()
addr, stop := _startTestServer()
defer stop()
_benchmarkChecker(b, c, addr)
}
func BenchmarkPipePoolDummyErr(b *testing.B) {
c, cancel := _newChecker(b)
defer cancel()
c.pipePool = newPipePoolDummy()
_benchmarkChecker(b, c, AddrDead)
}
func BenchmarkPipePoolSyncPoolErr(b *testing.B) {
c, cancel := _newChecker(b)
defer cancel()
c.pipePool = newPipePoolSyncPool()
_benchmarkChecker(b, c, AddrDead)
}
func BenchmarkPipePoolDummyTimeout(b *testing.B) {
c, cancel := _newChecker(b)
defer cancel()
c.pipePool = newPipePoolDummy()
_benchmarkChecker(b, c, AddrTimeout)
}
func BenchmarkPipePoolSyncPoolTimeout(b *testing.B) {
c, cancel := _newChecker(b)
defer cancel()
c.pipePool = newPipePoolSyncPool()
_benchmarkChecker(b, c, AddrTimeout)
}