diff options
author | Chris Evich <cevich@redhat.com> | 2019-04-04 13:55:18 -0400 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2019-05-02 15:03:15 -0400 |
commit | 3ab67b9c30cf413c2b40f4b636418fec475c434a (patch) | |
tree | 18f158ae04ca9fd4b97a272307d4ab76a1c6bf99 /contrib/cirrus/timestamp.awk | |
parent | ccf28a89bdded86b044f2fd3aa3389b923a81988 (diff) | |
download | podman-3ab67b9c30cf413c2b40f4b636418fec475c434a.tar.gz podman-3ab67b9c30cf413c2b40f4b636418fec475c434a.tar.bz2 podman-3ab67b9c30cf413c2b40f4b636418fec475c434a.zip |
Cirrus: timestamp all output script output
Also remove direct time-stamping by CI scripts that would compete.
Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/timestamp.awk')
-rw-r--r-- | contrib/cirrus/timestamp.awk | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/cirrus/timestamp.awk b/contrib/cirrus/timestamp.awk new file mode 100644 index 000000000..95b312e51 --- /dev/null +++ b/contrib/cirrus/timestamp.awk @@ -0,0 +1,20 @@ + + +# This script is intended to be piped into by automation, in order to +# mark output lines with timing information. For example: +# /path/to/command |& awk --file timestamp.awk + +BEGIN { + STARTTIME=systime() + printf "[%s] START", strftime("%T") + printf " - All [+xxxx] lines that follow are relative to right now.\n" +} + +{ + printf "[%+05ds] %s\n", systime()-STARTTIME, $0 +} + +END { + printf "[%s] END", strftime("%T") + printf " - [%+05ds] total duration since START\n", systime()-STARTTIME +} |