projects
/
gruntmaster-daemon.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Compute user program executon time instead of full test running time
[gruntmaster-daemon.git]
/
lib
/
Gruntmaster
/
Daemon
/
Format.pm
diff --git
a/lib/Gruntmaster/Daemon/Format.pm
b/lib/Gruntmaster/Daemon/Format.pm
index 7b6f77bcc6c24527021b095e04dbe58f55181897..6d6bd8fd1fc8e8f1ce03a2866743fc632e4df222 100644
(file)
--- a/
lib/Gruntmaster/Daemon/Format.pm
+++ b/
lib/Gruntmaster/Daemon/Format.pm
@@
-14,9
+14,10
@@
use File::Slurp qw/read_file write_file/;
use List::MoreUtils qw/natatime/;
use Log::Log4perl qw/get_logger/;
use String::ShellQuote qw/shell_quote/;
use List::MoreUtils qw/natatime/;
use Log::Log4perl qw/get_logger/;
use String::ShellQuote qw/shell_quote/;
+use Time::HiRes qw/time/;
use Try::Tiny;
use Try::Tiny;
-our $VERSION = '5999.000_00
4
';
+our $VERSION = '5999.000_00
5
';
our @EXPORT_OK = qw/prepare_files stopvms/;
##################################################
our @EXPORT_OK = qw/prepare_files stopvms/;
##################################################
@@
-45,12
+46,13
@@
sub execlist_finish {
my ($vm, $kill) = @_;
if ($vm{$vm}) {
my ($vm, $kill) = @_;
if ($vm{$vm}) {
- warn "Cannot kill VM" if $kill;
+ warn "Cannot kill VM
\n
" if $kill;
$vm{$vm}->expect(5, '# ');
} else {
kill KILL => $pid{$vm} if $kill;
waitpid $pid{$vm}, 0;
}
$vm{$vm}->expect(5, '# ');
} else {
kill KILL => $pid{$vm} if $kill;
waitpid $pid{$vm}, 0;
}
+ write_file "time-stop-$vm", time;
return if $kill;
my $er = "exec-result-$vm";
return if $kill;
my $er = "exec-result-$vm";
@@
-64,6
+66,7
@@
sub execlist_finish {
sub execlist {
my ($vm, @args) = @_;
sub execlist {
my ($vm, @args) = @_;
+ write_file "time-start-$vm", time;
my $er = "exec-result-$vm";
if ($vm{$vm}) {
my $cmd = ">$er " . shell_quote 'gruntmaster-exec', @args;
my $er = "exec-result-$vm";
if ($vm{$vm}) {
my $cmd = ">$er " . shell_quote 'gruntmaster-exec', @args;
This page took
0.010029 seconds
and
4
git commands to generate.