summaryrefslogtreecommitdiff
path: root/contrib/cirrus/timestamp.awk
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-05-03 02:14:30 +0200
committerGitHub <noreply@github.com>2019-05-03 02:14:30 +0200
commitd9d9c82184ad6d7e3fad07dfe2e99b158560d3a8 (patch)
tree32f6ace3dafa6fc0c0897dfeb2161d3f8e12ae69 /contrib/cirrus/timestamp.awk
parentf3c494eb2824d6c12bdefe2266eab4f6d656005a (diff)
parent074a26f7a16770666095600d2dac252fbf2cb3e6 (diff)
downloadpodman-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.awk20
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
+}