diff mbox series

[PATH,i-g-t,09/13] media-bench: Update for engine=class:instance tracepoints

Message ID 20180905134939.2942-10-tvrtko.ursulin@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series Tracing & workload simulation misc patches | expand

Commit Message

Tvrtko Ursulin Sept. 5, 2018, 1:49 p.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 scripts/media-bench.pl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/scripts/media-bench.pl b/scripts/media-bench.pl
index 375844d9cdf6..a3619ceb34cc 100755
--- a/scripts/media-bench.pl
+++ b/scripts/media-bench.pl
@@ -187,7 +187,7 @@  sub trace_workload
 	open CMD, "$cmd |" or die;
 	while (<CMD>) {
 		chomp;
-		if (/Ring(\d+): (\d+) batches.*?(\d+\.?\d+)% idle,/) {
+		if (/Ring(\S+): (\d+) batches.*?(\d+\.?\d+)% idle,/) {
 			if ($2 >= $min_batches) {
 				$engines{$1} = $3;
 			} else {
@@ -542,7 +542,7 @@  foreach my $wrk (@workloads) {
 	my ($r, $error, $c, $wps, $swps);
 	my $saturated = 0;
 	my $result = 'Pass';
-	my $vcs2 = $gt2 ? '1' : '3';
+	my $vcs2 = $gt2 ? '1:0' : '2:1';
 	my %problem;
 	my $engines;
 
@@ -575,11 +575,11 @@  foreach my $wrk (@workloads) {
 	if ($saturated == 0) {
 		# Not a single saturated engine
 		$result = 'FAIL';
-	} elsif (not exists $engines->{'2'} or not exists $engines->{$vcs2}) {
+	} elsif (not exists $engines->{'2:0'} or not exists $engines->{$vcs2}) {
 		# VCS1 and VCS2 not present in a balancing workload
 		$result = 'FAIL';
 	} elsif ($saturated == 1 and
-		 ($engines->{'2'} < $idle_tolerance_pct or
+		 ($engines->{'2:0'} < $idle_tolerance_pct or
 		  $engines->{$vcs2} < $idle_tolerance_pct)) {
 		# Only one VCS saturated
 		$result = 'WARN';