diff options
author | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2017-06-07 07:58:22 +0100 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2017-06-08 09:03:06 +0100 |
commit | c5ab34670d6ff2624e45067ade545add9696a1ed (patch) | |
tree | d90fa740de6b1e31315131196d012a41dd97d8d8 /scripts | |
parent | 424faaa6a9144695da845ae57ce90c1d0abda8db (diff) |
media-bench.pl: Verbose option
For time being just displays the saturation finding steps.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/media-bench.pl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/media-bench.pl b/scripts/media-bench.pl index 926ca2ca..19ab460c 100755 --- a/scripts/media-bench.pl +++ b/scripts/media-bench.pl @@ -35,6 +35,7 @@ my $tracepl = "$igt_root/scripts/trace.pl"; my $tolerance = 0.01; my $client_target_s = 10; my $idle_tolerance_pct = 2.0; +my $verbose = 0; my $show_cmds = 0; my $realtime_target = 0; my $wps_target = 0; @@ -240,7 +241,7 @@ sub calibrate_workload sub find_saturation_point { - my ($wrk, $rr, @args) = @_; + my ($wrk, $rr, $verbose, @args) = @_; my ($last_wps, $c, $swps); my $target = $realtime_target > 0 ? $realtime_target : $wps_target; my $r = $rr; @@ -262,6 +263,8 @@ sub find_saturation_point ($time, $wps) = run_workload((@args, ($warg, "-r $r", "-c $c"))); + say " $c clients is $wps wps." if $verbose; + if ($c > 1) { my $delta; @@ -297,13 +300,14 @@ sub find_saturation_point } } -getopts('hxn:b:W:B:r:t:i:R:T:w:', \%opts); +getopts('hvxn:b:W:B:r:t:i:R:T:w:', \%opts); if (defined $opts{'h'}) { print <<ENDHELP; Supported options: -h Help text. + -v Be verbose. -x Show external commands. -n num Nop calibration. -b str Balancer to pre-select. @@ -321,7 +325,8 @@ ENDHELP exit 0; } -$show_cmds = $opts{'x'} if defined $opts{'x'}; +$verbose = 1 if defined $opts{'v'}; +$show_cmds = 1 if defined $opts{'x'}; $balancer = $opts{'b'} if defined $opts{'b'}; if (defined $opts{'B'}) { @balancers = split /,/, $opts{'B'}; @@ -424,6 +429,7 @@ foreach my $wrk (@workloads) { } ($c, $w, $s) = find_saturation_point($wrk, $r, + 0, (@args, @xargs)); @@ -526,7 +532,7 @@ foreach my $wrk (@workloads) { ($r, $error) = calibrate_workload($wrk); say " ${client_target_s}s is $r workloads. (error=$error)"; - ($c, $wps, $swps) = find_saturation_point($wrk, $r, @args); + ($c, $wps, $swps) = find_saturation_point($wrk, $r, $verbose, @args); say " Saturation at $c clients ($wps workloads/s)."; push @args, "-c $c"; |