[PATCH lkp-tests] stats/crystal/iozone.cr: keep the changes consistent with iozone

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| -- 2.23.0

On Fri, Dec 04, 2020 at 10:09:31AM +0800, Lu Kaiyi wrote:
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+$/
why modify the regular, it's better give an example in change log Thanks, Weitao
data = line.split data.each_index do |i| -- 2.23.0
participants (2)
-
Lu Kaiyi
-
Lu Weitao