summaryrefslogtreecommitdiffhomepage
path: root/test/performance_test/main.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-12-28 21:02:03 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-12-28 21:02:03 +0900
commit58946b7924840f1effc993e95440266479c668d5 (patch)
treeac6fe1387af028f49a93f9f74f5bcf6ae694a376 /test/performance_test/main.go
parent7a2b3951160804c6895714621099168e8e56aa74 (diff)
config: make config/state variable name simple
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/performance_test/main.go')
-rw-r--r--test/performance_test/main.go15
1 files changed, 7 insertions, 8 deletions
diff --git a/test/performance_test/main.go b/test/performance_test/main.go
index b439c9a8..d005bcfa 100644
--- a/test/performance_test/main.go
+++ b/test/performance_test/main.go
@@ -17,7 +17,6 @@ package main
import (
"fmt"
- "net"
"os"
"time"
@@ -56,24 +55,24 @@ func main() {
for i := 0; i < num; i++ {
localAddr := fmt.Sprintf("10.10.%d.%d", (i+2)/255, (i+2)%255)
g := config.Global{
- GlobalConfig: config.GlobalConfig{
+ Config: config.GlobalConfig{
As: uint32(1001 + i),
- RouterId: net.ParseIP(localAddr),
+ RouterId: localAddr,
},
}
p := config.Neighbor{
- NeighborConfig: config.NeighborConfig{
+ Config: config.NeighborConfig{
PeerAs: 1000,
- NeighborAddress: net.ParseIP("10.10.0.1"),
+ NeighborAddress: "10.10.0.1",
},
Transport: config.Transport{
- TransportConfig: config.TransportConfig{
- LocalAddress: net.ParseIP(localAddr),
+ Config: config.TransportConfig{
+ LocalAddress: localAddr,
},
},
}
peer := newPeer(g, p, incoming)
- peerMap[p.Transport.TransportConfig.LocalAddress.String()] = peer
+ peerMap[p.Transport.Config.LocalAddress.String()] = peer
}
established := 0
ticker := time.NewTicker(time.Second * 5)