summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2017-05-17 12:04:09 +0100
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2017-05-17 12:37:00 +0100
commit36d97824afb1256ecfa8381a135b6cba11dcb04f (patch)
tree12dc4a0b94951cfeff66c3960c505921e7e65365 /scripts
parent6126b12383ab0c62c21e7298566b24ed2904a36d (diff)
media-bench: Fix evaluating with no balancing
Code just didn't expect '<none>' as the selected balancer. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/media-bench.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/media-bench.pl b/scripts/media-bench.pl
index 1949b497..fff0d1bd 100755
--- a/scripts/media-bench.pl
+++ b/scripts/media-bench.pl
@@ -152,12 +152,13 @@ sub run_workload
sub trace_workload
{
my ($wrk, $b, $r, $c) = @_;
- my @args = ( "-n $nop", "-w $wrk_root/$wrk", $balancer, "-r $r", "-c $c");
+ my @args = ( "-n $nop", "-w $wrk_root/$wrk", "-r $r", "-c $c");
my $min_batches = 16 + $r * $c / 2;
my @skip_engine;
my %engines;
my $cmd;
+ unshift @args, $b unless $b eq '<none>';
unshift @args, '-q';
unshift @args, "$tracepl --trace $wsim";
$cmd = join ' ', @args;
@@ -182,7 +183,7 @@ sub trace_workload
$cmd = "perf script | $tracepl --html -x ctxsave -s --squash-ctx-id ";
$cmd .= join ' ', map("-i $_", @skip_engine);
$wrk =~ s/ /_/g;
- $b =~ s/ /_/g;
+ $b =~ s/[ <>]/_/g;
$cmd .= " > ${wrk}_${b}_-r${r}_-c${c}.html";
show_cmd($cmd);
system($cmd);
@@ -448,7 +449,7 @@ say "\nBalancer is '$balancer'.";
say "Idleness tolerance is $idle_tolerance_pct%.";
foreach my $wrk (@workloads) {
- my @args = ( "-n $nop", "-w $wrk_root/$wrk", $balancer);
+ my @args = ( "-n $nop", "-w $wrk_root/$wrk");
my ($r, $error, $c, $wps, $swps);
my $saturated = 0;
my $result = 'Pass';
@@ -457,6 +458,8 @@ foreach my $wrk (@workloads) {
next unless can_balance_workload($wrk);
+ push @args, $balancer unless $balancer eq '<none>';
+
if (scalar(keys %results)) {
$r = $results{$wrk}->{$balancer} / $best_bal{$wrk} * 100.0;
} else {