Skip to content

Commit

Permalink
Add packet buffer size
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 9e3f3a7 commit 0b3e896
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions hop.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@ func (h *HopStatistic) MarshalJSON() ([]byte, error) {
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,
Worst: h.Worst.Elapsed.Seconds() * 1000,
Avg: h.Avg(),
Packets: h.packets(),
Sent: h.Sent,
TTL: h.TTL,
Loss: h.Loss(),
Target: h.Target,
PacketBufferSize: RING_BUFFER_SIZE,
Last: h.Last.Elapsed.Seconds() * 1000,
Best: h.Best.Elapsed.Seconds() * 1000,
Worst: h.Worst.Elapsed.Seconds() * 1000,
Avg: h.Avg(),
Packets: h.packets(),
})
}

Expand Down

0 comments on commit 0b3e896

Please sign in to comment.