Skip to content

Commit

Permalink
优化 TCPPing 延迟统计精度
Browse files Browse the repository at this point in the history
  • Loading branch information
akiasprin committed Oct 19, 2024
1 parent 765f7d9 commit 4ef1e05
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 4ef1e05

Please sign in to comment.