From c2a15894eae56b02849008fafc8f6785783d12b1 Mon Sep 17 00:00:00 2001 From: Tvrtko Ursulin Date: Wed, 17 May 2017 12:27:09 +0100 Subject: media-bench: Flag workloads which failed to balance Split out the flagging logic so to make it easier to read and so that the complete failure to balance is declared a failure instead of a warning. Signed-off-by: Tvrtko Ursulin --- scripts/media-bench.pl | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'scripts/media-bench.pl') diff --git a/scripts/media-bench.pl b/scripts/media-bench.pl index fff0d1bd..78f44522 100755 --- a/scripts/media-bench.pl +++ b/scripts/media-bench.pl @@ -482,11 +482,20 @@ foreach my $wrk (@workloads) { if $engines->{$key} < $idle_tolerance_pct; } - if ($saturated == 0 or - ($saturated == 1 and - ($engines->{'2'} < $idle_tolerance_pct or - $engines->{'3'} < $idle_tolerance_pct))) { - $result = $saturated == 0 ? 'FAIL' : 'WARN'; + if ($saturated == 0) { + # Not a single saturated engine + $result = 'FAIL'; + } elsif (not exists $engines->{'2'} or not exists $engines->{'3'}) { + # VCS1 and VCS2 not present in a balancing workload + $result = 'FAIL'; + } elsif ($saturated == 1 and + ($engines->{'2'} < $idle_tolerance_pct or + $engines->{'3'} < $idle_tolerance_pct)) { + # Only one VCS saturated + $result = 'WARN'; + } + + if ($result ne 'Pass') { $problem{'c'} = $c; $problem{'r'} = $r; $problem{'stats'} = $engines; -- cgit v1.2.3