@@ -43,7 +43,7 @@ func TestParseLegacyFormatData(t *testing.T) {
4343 if err != nil {
4444 t .Fatalf (err .Error ())
4545 }
46- if len (hops ) != 545 {
46+ if len (hops ) != 9 {
4747 t .Fatalf ("Do not process hops correctly." )
4848 }
4949 if logTime != 1452559544 {
@@ -80,24 +80,24 @@ func TestPTParser(t *testing.T) {
8080 schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.232.136" , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae7.nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
8181 schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.232.136" , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae7.nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
8282 schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.232.136" , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae7.nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
83- schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.232.136 " , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae7 .nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
84- schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.232.136 " , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae7 .nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
85- schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.232.136 " , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae7 .nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
86- schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.232.136 " , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae7 .nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
87- schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.232.136 " , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae7 .nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
88- schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.232.136 " , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae7 .nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
89- schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.232.136 " , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae7 .nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
83+ schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "216.239.49.250 " , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae3 .nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
84+ schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "216.239.49.250 " , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae3 .nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
85+ schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "216.239.49.250 " , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae3 .nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
86+ schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "216.239.49.250 " , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae3 .nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
87+ schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "216.239.49.250 " , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae3 .nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
88+ schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "216.239.49.250 " , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae3 .nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
89+ schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "216.239.49.250 " , Src_af : 2 , Dest_ip : "64.233.174.109" , Dest_af : 2 , Src_hostname : "bb01-ae3 .nuq04.net.google.com" , Dest_hostname : "sr05-te1-8.nuq04.net.google.com" , Rtt : []float64 {1.614 }},
9090 schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.196.8" , Src_af : 2 , Dest_ip : "72.14.232.136" , Dest_af : 2 , Src_hostname : "pr02-xe-3-0-1.pao03.net.google.com" , Dest_hostname : "bb01-ae7.nuq04.net.google.com" , Rtt : []float64 {1.693 }},
9191 schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.196.8" , Src_af : 2 , Dest_ip : "72.14.232.136" , Dest_af : 2 , Src_hostname : "pr02-xe-3-0-1.pao03.net.google.com" , Dest_hostname : "bb01-ae7.nuq04.net.google.com" , Rtt : []float64 {1.693 }},
9292 schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.196.8" , Src_af : 2 , Dest_ip : "72.14.232.136" , Dest_af : 2 , Src_hostname : "pr02-xe-3-0-1.pao03.net.google.com" , Dest_hostname : "bb01-ae7.nuq04.net.google.com" , Rtt : []float64 {1.693 }},
9393 schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.196.8" , Src_af : 2 , Dest_ip : "72.14.232.136" , Dest_af : 2 , Src_hostname : "pr02-xe-3-0-1.pao03.net.google.com" , Dest_hostname : "bb01-ae7.nuq04.net.google.com" , Rtt : []float64 {1.693 }},
94- schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.196.8 " , Src_af : 2 , Dest_ip : "216.239.49.250" , Dest_af : 2 , Src_hostname : "pr02 -xe-3-0-1 .pao03.net.google.com" , Dest_hostname : "bb01-ae3.nuq04.net.google.com" , Rtt : []float64 {1.386 }},
95- schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.196.8 " , Src_af : 2 , Dest_ip : "216.239.49.250" , Dest_af : 2 , Src_hostname : "pr02 -xe-3-0-1 .pao03.net.google.com" , Dest_hostname : "bb01-ae3.nuq04.net.google.com" , Rtt : []float64 {1.386 }},
96- schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.196.8 " , Src_af : 2 , Dest_ip : "216.239.49.250" , Dest_af : 2 , Src_hostname : "pr02 -xe-3-0-1 .pao03.net.google.com" , Dest_hostname : "bb01-ae3.nuq04.net.google.com" , Rtt : []float64 {1.386 }},
97- schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.196.8 " , Src_af : 2 , Dest_ip : "216.239.49.250" , Dest_af : 2 , Src_hostname : "pr02 -xe-3-0-1 .pao03.net.google.com" , Dest_hostname : "bb01-ae3.nuq04.net.google.com" , Rtt : []float64 {1.386 }},
98- schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.196.8 " , Src_af : 2 , Dest_ip : "216.239.49.250" , Dest_af : 2 , Src_hostname : "pr02 -xe-3-0-1 .pao03.net.google.com" , Dest_hostname : "bb01-ae3.nuq04.net.google.com" , Rtt : []float64 {1.386 }},
99- schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.196.8 " , Src_af : 2 , Dest_ip : "216.239.49.250" , Dest_af : 2 , Src_hostname : "pr02 -xe-3-0-1 .pao03.net.google.com" , Dest_hostname : "bb01-ae3.nuq04.net.google.com" , Rtt : []float64 {1.386 }},
100- schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.196.8 " , Src_af : 2 , Dest_ip : "216.239.49.250" , Dest_af : 2 , Src_hostname : "pr02 -xe-3-0-1 .pao03.net.google.com" , Dest_hostname : "bb01-ae3.nuq04.net.google.com" , Rtt : []float64 {1.386 }},
94+ schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.218.190 " , Src_af : 2 , Dest_ip : "216.239.49.250" , Dest_af : 2 , Src_hostname : "pr01 -xe-7-1-0 .pao03.net.google.com" , Dest_hostname : "bb01-ae3.nuq04.net.google.com" , Rtt : []float64 {1.386 }},
95+ schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.218.190 " , Src_af : 2 , Dest_ip : "216.239.49.250" , Dest_af : 2 , Src_hostname : "pr01 -xe-7-1-0 .pao03.net.google.com" , Dest_hostname : "bb01-ae3.nuq04.net.google.com" , Rtt : []float64 {1.386 }},
96+ schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.218.190 " , Src_af : 2 , Dest_ip : "216.239.49.250" , Dest_af : 2 , Src_hostname : "pr01 -xe-7-1-0 .pao03.net.google.com" , Dest_hostname : "bb01-ae3.nuq04.net.google.com" , Rtt : []float64 {1.386 }},
97+ schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.218.190 " , Src_af : 2 , Dest_ip : "216.239.49.250" , Dest_af : 2 , Src_hostname : "pr01 -xe-7-1-0 .pao03.net.google.com" , Dest_hostname : "bb01-ae3.nuq04.net.google.com" , Rtt : []float64 {1.386 }},
98+ schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.218.190 " , Src_af : 2 , Dest_ip : "216.239.49.250" , Dest_af : 2 , Src_hostname : "pr01 -xe-7-1-0 .pao03.net.google.com" , Dest_hostname : "bb01-ae3.nuq04.net.google.com" , Rtt : []float64 {1.386 }},
99+ schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.218.190 " , Src_af : 2 , Dest_ip : "216.239.49.250" , Dest_af : 2 , Src_hostname : "pr01 -xe-7-1-0 .pao03.net.google.com" , Dest_hostname : "bb01-ae3.nuq04.net.google.com" , Rtt : []float64 {1.386 }},
100+ schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "72.14.218.190 " , Src_af : 2 , Dest_ip : "216.239.49.250" , Dest_af : 2 , Src_hostname : "pr01 -xe-7-1-0 .pao03.net.google.com" , Dest_hostname : "bb01-ae3.nuq04.net.google.com" , Rtt : []float64 {1.386 }},
101101 schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "172.25.253.46" , Src_af : 2 , Dest_ip : "72.14.196.8" , Dest_af : 2 , Src_hostname : "us-mtv-ply1-br1-xe-1-1-0-706.n.corp.google.com" , Dest_hostname : "pr02-xe-3-0-1.pao03.net.google.com" , Rtt : []float64 {0.556 }},
102102 schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "172.25.253.46" , Src_af : 2 , Dest_ip : "72.14.196.8" , Dest_af : 2 , Src_hostname : "us-mtv-ply1-br1-xe-1-1-0-706.n.corp.google.com" , Dest_hostname : "pr02-xe-3-0-1.pao03.net.google.com" , Rtt : []float64 {0.556 }},
103103 schema.ParisTracerouteHop {Protocol : "tcp" , Src_ip : "172.25.253.46" , Src_af : 2 , Dest_ip : "72.14.196.8" , Dest_af : 2 , Src_hostname : "us-mtv-ply1-br1-xe-1-1-0-706.n.corp.google.com" , Dest_hostname : "pr02-xe-3-0-1.pao03.net.google.com" , Rtt : []float64 {0.556 }},
@@ -117,8 +117,10 @@ func TestPTParser(t *testing.T) {
117117 if len (hops ) != len (expected_hops ) {
118118 t .Fatalf ("Wrong results for PT hops!" )
119119 }
120+
120121 for i := 0 ; i < len (hops ); i ++ {
121122 if ! reflect .DeepEqual (hops [i ], expected_hops [i ]) {
123+ fmt .Println (i )
122124 fmt .Printf ("Here is expected : %v\n " , expected_hops [i ])
123125 fmt .Printf ("Here is what is real: %v\n " , hops [i ])
124126 t .Fatalf ("Wrong results for PT hops!" )
0 commit comments