add some debug print statements
This commit is contained in:
14
.idea/workspace.xml
generated
14
.idea/workspace.xml
generated
@@ -2,7 +2,9 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="fc2840de-29dc-4fca-8e0e-a283562f60ca" name="Default Changelist" comment="">
|
<list default="true" id="fc2840de-29dc-4fca-8e0e-a283562f60ca" name="Default Changelist" comment="">
|
||||||
<change afterPath="$PROJECT_DIR$/reporter_darwin.go" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/reporter_linux.go" beforeDir="false" afterPath="$PROJECT_DIR$/reporter_linux.go" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/shared.go" beforeDir="false" afterPath="$PROJECT_DIR$/shared.go" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -56,45 +58,45 @@
|
|||||||
<module name="go-iperf" />
|
<module name="go-iperf" />
|
||||||
<working_directory value="$PROJECT_DIR$" />
|
<working_directory value="$PROJECT_DIR$" />
|
||||||
<kind value="PACKAGE" />
|
<kind value="PACKAGE" />
|
||||||
<filePath value="$PROJECT_DIR$/cmd/main.go" />
|
|
||||||
<package value="github.com/BGrewell/go-iperf/cmd" />
|
<package value="github.com/BGrewell/go-iperf/cmd" />
|
||||||
<directory value="$PROJECT_DIR$" />
|
<directory value="$PROJECT_DIR$" />
|
||||||
|
<filePath value="$PROJECT_DIR$/cmd/main.go" />
|
||||||
<method v="2" />
|
<method v="2" />
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="go build github.com/BGrewell/go-iperf/tests/client" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true">
|
<configuration name="go build github.com/BGrewell/go-iperf/tests/client" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true">
|
||||||
<module name="go-iperf" />
|
<module name="go-iperf" />
|
||||||
<working_directory value="$PROJECT_DIR$" />
|
<working_directory value="$PROJECT_DIR$" />
|
||||||
<kind value="PACKAGE" />
|
<kind value="PACKAGE" />
|
||||||
<filePath value="$PROJECT_DIR$/tests/client/client.go" />
|
|
||||||
<package value="github.com/BGrewell/go-iperf/tests/client" />
|
<package value="github.com/BGrewell/go-iperf/tests/client" />
|
||||||
<directory value="$PROJECT_DIR$" />
|
<directory value="$PROJECT_DIR$" />
|
||||||
|
<filePath value="$PROJECT_DIR$/tests/client/client.go" />
|
||||||
<method v="2" />
|
<method v="2" />
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="go build github.com/BGrewell/go-iperf/tests/controller" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true">
|
<configuration name="go build github.com/BGrewell/go-iperf/tests/controller" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true">
|
||||||
<module name="go-iperf" />
|
<module name="go-iperf" />
|
||||||
<working_directory value="$PROJECT_DIR$" />
|
<working_directory value="$PROJECT_DIR$" />
|
||||||
<kind value="PACKAGE" />
|
<kind value="PACKAGE" />
|
||||||
<filePath value="$PROJECT_DIR$/tests/controller/main.go" />
|
|
||||||
<package value="github.com/BGrewell/go-iperf/tests/controller" />
|
<package value="github.com/BGrewell/go-iperf/tests/controller" />
|
||||||
<directory value="$PROJECT_DIR$" />
|
<directory value="$PROJECT_DIR$" />
|
||||||
|
<filePath value="$PROJECT_DIR$/tests/controller/main.go" />
|
||||||
<method v="2" />
|
<method v="2" />
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="go build github.com/BGrewell/go-iperf/tests/extract" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true">
|
<configuration name="go build github.com/BGrewell/go-iperf/tests/extract" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true">
|
||||||
<module name="go-iperf" />
|
<module name="go-iperf" />
|
||||||
<working_directory value="$PROJECT_DIR$" />
|
<working_directory value="$PROJECT_DIR$" />
|
||||||
<kind value="PACKAGE" />
|
<kind value="PACKAGE" />
|
||||||
<filePath value="$PROJECT_DIR$/tests/extract/main.go" />
|
|
||||||
<package value="github.com/BGrewell/go-iperf/tests/extract" />
|
<package value="github.com/BGrewell/go-iperf/tests/extract" />
|
||||||
<directory value="$PROJECT_DIR$" />
|
<directory value="$PROJECT_DIR$" />
|
||||||
|
<filePath value="$PROJECT_DIR$/tests/extract/main.go" />
|
||||||
<method v="2" />
|
<method v="2" />
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="go build github.com/BGrewell/go-iperf/tests/server" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true">
|
<configuration name="go build github.com/BGrewell/go-iperf/tests/server" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true">
|
||||||
<module name="go-iperf" />
|
<module name="go-iperf" />
|
||||||
<working_directory value="$PROJECT_DIR$" />
|
<working_directory value="$PROJECT_DIR$" />
|
||||||
<kind value="PACKAGE" />
|
<kind value="PACKAGE" />
|
||||||
<filePath value="$PROJECT_DIR$/tests/server/server.go" />
|
|
||||||
<package value="github.com/BGrewell/go-iperf/tests/server" />
|
<package value="github.com/BGrewell/go-iperf/tests/server" />
|
||||||
<directory value="$PROJECT_DIR$" />
|
<directory value="$PROJECT_DIR$" />
|
||||||
|
<filePath value="$PROJECT_DIR$/tests/server/server.go" />
|
||||||
<method v="2" />
|
<method v="2" />
|
||||||
</configuration>
|
</configuration>
|
||||||
<recent_temporary>
|
<recent_temporary>
|
||||||
|
|||||||
@@ -63,10 +63,16 @@ func (r *Reporter) runLogProcessor() {
|
|||||||
if line == nil {
|
if line == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if DEBUG {
|
||||||
|
log.Printf("new line: %s\n", line)
|
||||||
|
}
|
||||||
if len(line.Text) > 5 {
|
if len(line.Text) > 5 {
|
||||||
id := line.Text[1:4]
|
id := line.Text[1:4]
|
||||||
stream, err := strconv.Atoi(strings.TrimSpace(id))
|
stream, err := strconv.Atoi(strings.TrimSpace(id))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if DEBUG {
|
||||||
|
log.Printf("error converting stream id to int: %v\n", err)
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
fields := strings.Fields(line.Text[5:])
|
fields := strings.Fields(line.Text[5:])
|
||||||
@@ -117,6 +123,9 @@ func (r *Reporter) runLogProcessor() {
|
|||||||
Omitted: omitted,
|
Omitted: omitted,
|
||||||
}
|
}
|
||||||
r.ReportingChannel <- report
|
r.ReportingChannel <- report
|
||||||
|
if DEBUG {
|
||||||
|
log.Println("added report to reporting channel")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case <-time.After(100 * time.Millisecond):
|
case <-time.After(100 * time.Millisecond):
|
||||||
|
|||||||
Reference in New Issue
Block a user