From 31b7cae19fe1d493d34c4d8951572dca9e238abd Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 10 Aug 2020 11:31:34 +0100 Subject: [PATCH] timing traces: cr-publish-flight-logs: Report more progress More tools to see where it is faffing too much. Signed-off-by: Ian Jackson --- v2: Fix ( ) syntax with + --- cr-publish-flight-logs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cr-publish-flight-logs b/cr-publish-flight-logs index 717cb95..63c47d9 100755 --- a/cr-publish-flight-logs +++ b/cr-publish-flight-logs @@ -43,6 +43,9 @@ die unless $flight =~ m/^\d*$/; die "usage: ./cr-publish-flight-logs [flight]" unless @ARGV==0; +sub progress { print +(show_abs_time time), @_, "\n" } + +progress("acquiring publish-lock..."); open LOCK, "> $c{GlobalLockDir}/publish-lock" or die $!; flock LOCK, LOCK_EX or die $!; @@ -51,6 +54,7 @@ if ($push_harness) { my $gitdir= $c{HarnessPublishGitRepoDir}; if ($githost && $gitdir) { + progress("pushing..."); eval { system_checked("git push $githost:$gitdir HEAD:refs/heads/flight-$flight"); system_checked("ssh $githost 'cd $gitdir && git update-server-info'"); @@ -72,9 +76,10 @@ sub copydir ($$) { push @cmd, '-e', join(' ', map { s/\'/''/g; "'$_'"; } @ssh); #--bwlimit=50 push @cmd, $src, $dst; - print "+ @cmd\n"; + progress "+ @cmd"; $!=0; $?=0; system @cmd; die "rsync $? $!" if $? or $!; } copydir(qw(Logs), "/$flight") if $flight; copydir(qw(Results), ''); +progress "complete."; -- 2.39.5