Skip to content

Commit

Permalink
run_workload(): return number of benchmarks run
Browse files Browse the repository at this point in the history
Previously returned 1 if any benchmarks were run, or undef otherwise; that
seems fairly useless.
  • Loading branch information
arc committed Jan 7, 2012
1 parent bda8bb5 commit d4853c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Benchmark/PriorityQueue.pm
Expand Up @@ -40,7 +40,7 @@ sub all_tasks {

sub run_workload {
my ($task, $max_rank_exponent, $timeout, @backends) = @_;
my $result;
my $result = 0;
if (@backends == 0) {
# If no backends specified, test them all.
@backends = all_backends();
Expand All @@ -52,7 +52,7 @@ sub run_workload {
next unless $shim->supports($task);
$shim->timeout($timeout);
print $shim->backend, ", ";
$result = $shim->print_benchmark($task, $max_rank_exponent);
$result += $shim->print_benchmark($task, $max_rank_exponent);
}
say "";
return $result;
Expand Down

0 comments on commit d4853c7

Please sign in to comment.