#! /usr/bin/perl #------------------------------------------------------------------------------- # Run streamtest over a range of message sizes # # Irv.Elshoff@deltares.nl # 5 dec 04 #------------------------------------------------------------------------------- use strict; use warnings; my $pwd = `/bin/pwd`; chomp $pwd; my $streamtest = "$pwd/../02-streamtest/stream02test.exe"; my $factor = 1.05; my $maxsize = 10*1024*1024; my $args = join ' ', @ARGV; my $lasti = 0; for (my $i = 1 ; $i <= $maxsize * $factor ; $i *= $factor) { if (int ($i) != $lasti) { printf "%6.2f ", log ($i) / log (2); my $command = sprintf "$streamtest -s -T -b %d %s\n", int ($i), $args; $ENV{"_"} = "$streamtest"; system $command; } $lasti = int ($i); }