Skip to content

Commit

Permalink
Add packet loss value
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Foerster <tim.foerster@hetzner.de>
  • Loading branch information
tonobo committed Dec 19, 2017
1 parent 6c5b090 commit 9e3f3a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hop.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ func (h *HopStatistic) MarshalJSON() ([]byte, error) {
Last float64 `json:"last_ms"`
Best float64 `json:"best_ms"`
Worst float64 `json:"worst_ms"`
Loss float64 `json:"loss_percent"`
Avg float64 `json:"avg_ms"`
PacketBufferSize int `json:"packet_buffer_size"`
TTL int `json:"ttl"`
Packets []*packet `json:"packet_list_ms"`
}{
Sent: h.Sent,
TTL: h.TTL,
Loss: h.Loss(),
Target: h.Target,
Last: h.Last.Elapsed.Seconds() * 1000,
Best: h.Best.Elapsed.Seconds() * 1000,
Expand Down

0 comments on commit 9e3f3a7

Please sign in to comment.