diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8b5523e..538f21e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,7 +2,9 @@ + + - + @@ -51,6 +53,15 @@ + + + + + + + + + @@ -78,6 +89,16 @@ + + + + + + + + + + diff --git a/reporter_linux.go b/reporter_linux.go index 47e2ec0..9b77571 100644 --- a/reporter_linux.go +++ b/reporter_linux.go @@ -57,6 +57,7 @@ func (r *Reporter) runLogProcessor() { } for line := range tailer.Lines { // TODO: For now this only cares about individual streams it ignores the sum lines + fmt.Println(line.Text) if len(line.Text) > 5 { id := line.Text[1:4] stream, err := strconv.Atoi(strings.TrimSpace(id)) @@ -64,7 +65,7 @@ func (r *Reporter) runLogProcessor() { continue } fields := strings.Fields(line.Text[5:]) - if len(fields) >= 6 { + if len(fields) >= 9 { if fields[0] == "local" { continue } @@ -85,7 +86,10 @@ func (r *Reporter) runLogProcessor() { if err != nil { log.Printf("failed to convert units: %s\n", err) } - retrans := strconv.Atoi(fields[6]) + retrans, err := strconv.Atoi(fields[6]) + if err != nil { + log.Printf("failed to convert units: %s\n", err) + } cwndStr := fmt.Sprintf("%s%s", fields[7], fields[8]) cwnd, err := conversions.StringBitRateToInt(cwndStr) if err != nil { @@ -104,7 +108,7 @@ func (r *Reporter) runLogProcessor() { Bytes: int(transferedBytes), BitsPerSecond: float64(rate), Retransmissions: retrans, - CongestionWindow: cwnd, + CongestionWindow: int(cwnd), Omitted: omitted, } r.ReportingChannel <- report diff --git a/tests/client/client.go b/tests/client/client.go index 867a3df..494549a 100644 --- a/tests/client/client.go +++ b/tests/client/client.go @@ -14,7 +14,7 @@ func main() { omitSec := 10 length := "65500" - c := iperf.NewClient("10.23.42.18") + c := iperf.NewClient("10.254.100.100") c.SetIncludeServer(includeServer) c.SetTimeSec(runTime) c.SetOmitSec(omitSec)