diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-05-03 02:14:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-03 02:14:30 +0200 |
commit | d9d9c82184ad6d7e3fad07dfe2e99b158560d3a8 (patch) | |
tree | 32f6ace3dafa6fc0c0897dfeb2161d3f8e12ae69 /contrib/cirrus/timestamp.awk | |
parent | f3c494eb2824d6c12bdefe2266eab4f6d656005a (diff) | |
parent | 074a26f7a16770666095600d2dac252fbf2cb3e6 (diff) | |
download | podman-d9d9c82184ad6d7e3fad07dfe2e99b158560d3a8.tar.gz podman-d9d9c82184ad6d7e3fad07dfe2e99b158560d3a8.tar.bz2 podman-d9d9c82184ad6d7e3fad07dfe2e99b158560d3a8.zip |
Merge pull request #2849 from cevich/timestamps
Cirrus: timestamp all output script output
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 +} |