
[Example] { "iperf.tcp.sender.bps": [ 34804801216.197174 ], "iperf.tcp.receiver.bps": [ 34804762215.18231 ], "iperf.run.message": "error message xxx", "iperf.run.log": "error log xxx" } Signed-off-by: Lu Weitao <luweitaobe@163.com> --- sbin/dump-stat | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sbin/dump-stat b/sbin/dump-stat index b5abf5a9b..6e10e432d 100755 --- a/sbin/dump-stat +++ b/sbin/dump-stat @@ -59,6 +59,13 @@ while (line = STDIN.gets) exit 1 end + + # keep message | log line which key end with .message|.log + if k.end_with?('.message', '.log') + result[k] = v + next + end + # only number is valid unless v.numeric? invalid_records.push record_index @@ -84,6 +91,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 -- 2.23.0