github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/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 }