From e7bcd377d358bd3c016f0bcee9d34c12174c7278 Mon Sep 17 00:00:00 2001 From: Aaro Altonen Date: Tue, 5 May 2020 11:31:42 +0300 Subject: [PATCH] Try to infer iter from file name in parse_csv() --- benchmarks/parse.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/benchmarks/parse.pl b/benchmarks/parse.pl index 1421975..2f6eabe 100755 --- a/benchmarks/parse.pl +++ b/benchmarks/parse.pl @@ -180,11 +180,13 @@ sub print_send { sub parse_csv { my ($lib, $iter, $path, $pkt_loss, $frame_loss) = @_; - my ($tgp, $tgp_k, $sgp, $sgp_k, $threads, $fps, $ofps, %a) = (0) x 7; + my ($threads, $fps, $ofps, $fiter, %a) = (0) x 4; opendir my $dir, realpath($path); foreach my $fh (grep /(recv|send)/, readdir $dir) { - ($threads, $ofps) = ($fh =~ /(\d+)threads_(\d+)/g); + ($threads, $ofps, $fiter) = ($fh =~ /(\d+)threads_(\d+)fps_(\d+)iter/g); + $iter = $fiter if $fiter; + print "unable to determine iter, skipping file $fh\n" and next if !$iter; $fps = sprintf("%05d", $ofps); my @values;