Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot get min/avg/max when stddev is nan #169

Open
elixiao opened this issue Oct 11, 2024 · 0 comments
Open

cannot get min/avg/max when stddev is nan #169

elixiao opened this issue Oct 11, 2024 · 0 comments

Comments

@elixiao
Copy link

elixiao commented Oct 11, 2024

Example:

$ ping -c 1 taobao.com
PING www.taobao.com.danuoyi.tbcache.com (122.225.217.183): 56 data bytes
64 bytes from 122.225.217.183: icmp_seq=0 ttl=53 kj=4.628 ms

--- www.taobao.com.danuoyi.tbcache.com ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 4.628/4.628/4.628/nan ms

Parsed result is:

{
  inputHost: "www.taobao.com",
  host: "www.taobao.com.danuoyi.tbcache.com",
  alive: true,
  output:
    "PING www.taobao.com.danuoyi.tbcache.com (122.225.217.183): 56 data bytes\n64 bytes from 122.225.217.183: icmp_seq=0 ttl=53 kj=4.628 ms\n\n--- www.taobao.com.danuoyi.tbcache.com ping statistics ---\n1 packets transmitted, 1 packets received, 0.0% packet loss\nround-trip min/avg/max/stddev = 4.628/4.628/4.628/nan ms\n",
  time: 4.628,
  times: [4.628],
  min: "unknown",
  max: "unknown",
  avg: "unknown",
  stddev: "NaN",
  packetLoss: "0.000",
  numeric_host: "122.225.217.183",
}

actually min/max/avg is 4.628, but got unknown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant