]> xenbits.xensource.com Git - osstest.git/commitdiff
timing traces: cr-publish-flight-logs: Report more progress
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 10 Aug 2020 10:31:34 +0000 (11:31 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Mon, 10 Aug 2020 11:23:05 +0000 (12:23 +0100)
More tools to see where it is faffing too much.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: Fix ( ) syntax with +

cr-publish-flight-logs

index 717cb957aac566b6706ae1d3bafeaa80a293197a..63c47d9f4db812f0fc798f5beb892378e52aa081 100755 (executable)
@@ -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.";