[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, 8 insertions(+)
diff --git a/sbin/dump-stat b/sbin/dump-stat index b5abf5a9b..5d565e36a 100755 --- a/sbin/dump-stat +++ b/sbin/dump-stat @@ -59,6 +59,12 @@ while (line = STDIN.gets)
exit 1 end + + if k.end_with?('message') + result[k] = v + next + end + # only number is valid unless v.numeric? invalid_records.push record_index @@ -84,6 +90,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