jsdelivr / globalping-cli

A simple CLI tool to run networking commands remotely from hundreds of globally distributed servers
Mozilla Public License 2.0
118 stars 14 forks source link

Support --latency with --json #95

Closed jimaek closed 3 months ago

jimaek commented 6 months ago

Some users would find it useful if we supported these options at the same time. Currently --json does nothing when combined with --latency. Lets get it to work

radulucut commented 5 months ago

@jimaek do you mean something like this:

globalping ping google.com --latency --json --limit 3
> Amsterdam, NL, EU, Freedom Internet BV (AS206238)
{"min":4.584,"max":4.626,"avg":4.61,"total":3,"loss":0,"rcv":3,"drop":0}

> Valdivia, CL, SA, Zappie Host LLC (AS61138)
{"min":19.968,"max":20.694,"avg":20.251,"total":3,"loss":0,"rcv":3,"drop":0}

> San Jose (CA), US, NA, DAOport Internet Infrastructure Holdings Limited (AS210000)
{"min":1.677,"max":1.888,"avg":1.814,"total":3,"loss":0,"rcv":3,"drop":0}

or do you have something else in mind?

jimaek commented 3 months ago

Closing due to lack of feedback from the user