Skip to content

Commit

Permalink
Scale packet drops
Browse files Browse the repository at this point in the history
The formated string suggests the argument should be scaled as two values
are expected.
  • Loading branch information
dpino committed Jun 22, 2018
1 parent 25a5e5d commit e649e60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/program/top/top.lua
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ function compute_display_tree.interface(tree, prev, dt, t)
lchars('%.3f %sPPS', scale(pps)),
lchars('%.3f %sbps', scale(bps)),
lchars('%.2f%%', bps/max*100),
drops > 0 and rchars('%.3f %sPPS dropped', drops) or nil)
drops > 0 and rchars('%.3f %sPPS dropped', scale(drops)) or nil)
end
local function show_pci(addr, pci, prev)
local bps, tag = scale(tonumber(pci.speed and pci.speed.value) or 0)
Expand Down

0 comments on commit e649e60

Please sign in to comment.