[Example] { "iperf.tcp.sender.bps": [ 34804801216.197174 ], "iperf.tcp.receiver.bps": [ 34804762215.18231 ], "iperf.run.message": "error xxx" }
Signed-off-by: Lu Weitao luweitaobe@163.com --- sbin/dump-stat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sbin/dump-stat b/sbin/dump-stat index b5abf5a9b..6ebda1f29 100755 --- a/sbin/dump-stat +++ b/sbin/dump-stat @@ -61,10 +61,8 @@ while (line = STDIN.gets) end # only number is valid unless v.numeric? - invalid_records.push record_index - warn_stat "invalid stats value: #{v}", monitor - - exit 1 + result[k] = v + next end
v = v.index('.') ? v.to_f : v.to_i @@ -84,6 +82,8 @@ min_cols_stat = '' max_cols_stat = '' zero_stats = [] result.each do |key, val| + next if val.is_a?(String) + if max_cols < val.size max_cols = val.size max_cols_stat = key