github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/contrib/cirrus/timestamp.awk (about) 1 2 3 # This script is intended to be piped into by automation, in order to 4 # mark output lines with timing information. For example: 5 # /path/to/command |& awk --file timestamp.awk 6 7 BEGIN { 8 STARTTIME=systime() 9 printf "[%s] START", strftime("%T") 10 printf " - All [+xxxx] lines that follow are relative to %s.\n", strftime("%FT%T") 11 } 12 13 { 14 printf "[%+05ds] %s\n", systime()-STARTTIME, $0 15 } 16 17 END { 18 printf "[%s] END", strftime("%T") 19 printf " - [%+05ds] total duration since %s\n", systime()-STARTTIME, strftime("%FT%T") 20 }