[why] original iozone tool can match the line like:
64 4 1599680 3057153 4274062 4897948 3588436 2892445 2772930 3057153 3958892 3057153 3022727 3363612 4564786
but cannot match the line as below(there are extra whitespace after 2892445):
64 4 1599680 3057153 4274062 4897948 3588436 2892445
Signed-off-by: Lu Kaiyi 2392863668@qq.com --- stats/crystal/iozone.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/stats/crystal/iozone.cr b/stats/crystal/iozone.cr index 7ea6e4b7..2a3ffbe2 100644 --- a/stats/crystal/iozone.cr +++ b/stats/crystal/iozone.cr @@ -8,7 +8,8 @@ per_record = Hash(String | String, Int32).new all_sum = 0 nr_records = 0 while (line = STDIN.gets) - next unless line =~ /^\s*\d+.*\d+$/ + line = line.strip + next unless line =~ /^\d+.*\d+$/
data = line.split data.each_index do |i|