Skip to content

Commit

Permalink
优化 TCPPing 延迟统计精度 (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
akiasprin authored Oct 20, 2024
1 parent 765f7d9 commit 134c8c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ func handleTcpPingTask(task *pb.Task, result *pb.TaskResult) {
result.Data = err.Error()
} else {
conn.Close()
result.Delay = float32(time.Since(start).Milliseconds())
result.Delay = float32(time.Since(start).Microseconds()) / 1000.0
result.Successful = true
}
}
Expand Down

0 comments on commit 134c8c5

Please sign in to comment.