[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
Please add comment why it's special treated.
message => .message Please also support .log
- 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
-- 2.23.0
On Fri, Jan 22, 2021 at 08:46:47PM +0800, Wu Fengguang wrote:
Please add comment why it's special treated.
ok
message => .message
ok
Please also support .log
ok
Thanks, Weitao
- 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
-- 2.23.0