Index: lib/MTT/DoCommand.pm =================================================================== --- lib/MTT/DoCommand.pm (revision 1084) +++ lib/MTT/DoCommand.pm (working copy) @@ -20,6 +20,7 @@ use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK); use MTT::Messages; use Data::Dumper; +use Benchmark; #-------------------------------------------------------------------------- @@ -169,6 +170,8 @@ my ($merge_output, $cmd, $timeout, $max_stdout_lines, $max_stderr_lines) = @_; + my $start = new Benchmark; + Debug("Running command: $cmd\n"); # Perl kills me here. It does its own buffering of pipes which @@ -429,6 +432,12 @@ $msg .= "\n"; Debug($msg); + # Display benchmark info + + my $finish = new Benchmark; + my $timediff = timediff($finish, $start); + Timing($cmd, timestr($timediff)); + # Return an anonymous hash containing the relevant data $ret->{result_stdout} = join('', @out);