summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--datalogger/logger.go11
-rw-r--r--networkQuality.go14
-rw-r--r--rpm/rpm.go18
3 files changed, 33 insertions, 10 deletions
diff --git a/datalogger/logger.go b/datalogger/logger.go
index 2e9e790..5129349 100644
--- a/datalogger/logger.go
+++ b/datalogger/logger.go
@@ -70,11 +70,18 @@ func doCustomFormatting(value reflect.Value, tag reflect.StructTag) (string, err
formatMethod := value.MethodByName(formatMethodName)
if formatMethod == reflect.ValueOf(0) {
- return "", fmt.Errorf("Type %v does not support a method named %v", value.Type(), formatMethodName)
+ return "", fmt.Errorf(
+ "Type %v does not support a method named %v",
+ value.Type(),
+ formatMethodName,
+ )
}
var formatMethodArgumentUsable []reflect.Value = make([]reflect.Value, 0)
if formatMethodArgument != "" {
- formatMethodArgumentUsable = append(formatMethodArgumentUsable, reflect.ValueOf(formatMethodArgument))
+ formatMethodArgumentUsable = append(
+ formatMethodArgumentUsable,
+ reflect.ValueOf(formatMethodArgument),
+ )
}
result := formatMethod.Call(formatMethodArgumentUsable)
if len(result) == 1 {
diff --git a/networkQuality.go b/networkQuality.go
index 53b2817..8cbf148 100644
--- a/networkQuality.go
+++ b/networkQuality.go
@@ -197,10 +197,18 @@ func main() {
*dataLoggerBaseFileName,
"-foreign-"+unique,
)
- dataLoggerDownloadThroughputFilename := utilities.FilenameAppend(*dataLoggerBaseFileName, "-throughput-download"+unique)
- dataLoggerUploadThroughputFilename := utilities.FilenameAppend(*dataLoggerBaseFileName, "-throughput-upload"+unique)
+ dataLoggerDownloadThroughputFilename := utilities.FilenameAppend(
+ *dataLoggerBaseFileName,
+ "-throughput-download"+unique,
+ )
+ dataLoggerUploadThroughputFilename := utilities.FilenameAppend(
+ *dataLoggerBaseFileName,
+ "-throughput-upload"+unique,
+ )
- selfDataLogger, err = datalogger.CreateCSVDataLogger[rpm.ProbeDataPoint](dataLoggerSelfFilename)
+ selfDataLogger, err = datalogger.CreateCSVDataLogger[rpm.ProbeDataPoint](
+ dataLoggerSelfFilename,
+ )
if err != nil {
fmt.Printf(
"Warning: Could not create the file for storing self probe results (%s). Disabling functionality.\n",
diff --git a/rpm/rpm.go b/rpm/rpm.go
index fe8184e..607cffa 100644
--- a/rpm/rpm.go
+++ b/rpm/rpm.go
@@ -62,10 +62,10 @@ type ProbeConfiguration struct {
}
type ProbeDataPoint struct {
- Time time.Time `Description:"Time of the generation of the data point." Formatter:"Format" FormatterArgument:"01-02-2006-15-04-05.000"`
+ Time time.Time `Description:"Time of the generation of the data point." Formatter:"Format" FormatterArgument:"01-02-2006-15-04-05.000"`
RoundTripCount uint64 `Description:"The number of round trips measured by this data point."`
- Duration time.Duration `Description:"The duration for this measurement." Formatter:"Seconds"`
- TCPRtt time.Duration `Description:"The underlying connection's RTT at probe time." Formatter:"Seconds"`
+ Duration time.Duration `Description:"The duration for this measurement." Formatter:"Seconds"`
+ TCPRtt time.Duration `Description:"The underlying connection's RTT at probe time." Formatter:"Seconds"`
TCPCwnd uint32 `Description:"The underlying connection's congestion window at probe time."`
}
@@ -200,7 +200,13 @@ func Probe(
fmt.Printf("Warning: Could not fetch the extended stats for a probe: %v\n", err)
}
}
- dataPoint := ProbeDataPoint{Time: time_before_probe, RoundTripCount: roundTripCount, Duration: totalDelay, TCPRtt: tcpRtt, TCPCwnd: tcpCwnd}
+ dataPoint := ProbeDataPoint{
+ Time: time_before_probe,
+ RoundTripCount: roundTripCount,
+ Duration: totalDelay,
+ TCPRtt: tcpRtt,
+ TCPCwnd: tcpCwnd,
+ }
if !utilities.IsInterfaceNil(logger) {
logger.LogRecord(dataPoint)
}
@@ -458,7 +464,9 @@ func LGCollectData(
)
if !utilities.IsInterfaceNil(throughputDataLogger) {
- throughputDataLogger.LogRecord(ThroughputDataPoint{time.Now(), currentMovingAverage})
+ throughputDataLogger.LogRecord(
+ ThroughputDataPoint{time.Now(), currentMovingAverage},
+ )
}
if debug.IsDebug(debugging.Level) {