mirror of
http://mpg123.de/trunk/.git
synced 2025-07-31 13:24:22 +03:00
Make the benchmark script check the return value.
git-svn-id: svn://scm.orgis.org/mpg123/trunk@3518 35dc7657-300d-0410-a2e5-dc2837fedb53
This commit is contained in:
@ -44,11 +44,16 @@ foreach my $cpu (@cpus)
|
||||
{
|
||||
# using user CPU time
|
||||
my @start_time = times();
|
||||
system($MPG123_CMD, '-q', '--cpu', $cpu, '-e', $e, '-t', @TEST_FILES );
|
||||
my $ret = system($MPG123_CMD, '-q', '--cpu', $cpu, '-e', $e, '-t', @TEST_FILES );
|
||||
my @end_time = times();
|
||||
|
||||
my $runtime = $end_time[2] - $start_time[2];
|
||||
if($ret)
|
||||
{
|
||||
print STDERR "Execution of $MPG123_CMD failed with code $ret!\n";
|
||||
$runtime = 0;
|
||||
}
|
||||
# third entry is child user time
|
||||
printf(" %4.2f", $end_time[2] - $start_time[2]);
|
||||
printf(" %4.2f", $runtime);
|
||||
}
|
||||
print("\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user