1
1
Fork 0
mirror of https://github.com/containers/udica synced 2024-05-26 02:06:12 +02:00
udica/contrib/cirrus/timestamp.awk
Chris Evich 706e0e8775 Add initial support for Cirrus-CI testing
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-29 18:15:58 +02:00

21 lines
512 B
Awk

# 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
}