misunderstand
This commit is contained in:
4
main.go
4
main.go
@@ -46,7 +46,7 @@ func run() error {
|
||||
fmt.Printf("%s,%d,%.0f%%,%dms,%dms,%dms\n",
|
||||
time.Now().UTC().Format("2006-01-02T15:04:05Z"),
|
||||
stat.PacketsRecv,
|
||||
100.0*(1.0-stat.PacketLoss),
|
||||
stat.PacketLoss,
|
||||
stat.MaxRtt.Milliseconds(),
|
||||
stat.AvgRtt.Milliseconds(),
|
||||
stat.StdDevRtt.Milliseconds(),
|
||||
@@ -55,7 +55,7 @@ func run() error {
|
||||
b, _ := json.Marshal(map[string]any{
|
||||
"ts": time.Now().UTC().Format("2006-01-02T15:04:05Z"),
|
||||
"n": stat.PacketsRecv,
|
||||
"ok_pct": 100.0 * (1.0 - stat.PacketLoss),
|
||||
"bad_pct": stat.PacketLoss,
|
||||
"max": stat.MaxRtt.Milliseconds(),
|
||||
"avg": stat.AvgRtt.Milliseconds(),
|
||||
"stddev": stat.StdDevRtt.Milliseconds(),
|
||||
|
||||
Reference in New Issue
Block a user