Browse Source

timing script

master
pvincent 2 years ago
parent
commit
31098e03c7
  1. 2
      install.sh
  2. 13
      tools/timing

2
install.sh

@ -1,7 +1,7 @@
#!/bin/bash
CURDIR=$PWD
REQUIRED_PKGS=(file git)
REQUIRED_PKGS=(file git bc)
function usage() {
echo 'usage: --host | --containers | --full | --one-container <CT_NAME>'

13
tools/timing

@ -0,0 +1,13 @@
#!/bin/bash
echo >&2 "time elapsed in seconds..."
START=$(date +%s.%N)
# do something #######################
$@
#######################################
END=$(date +%s.%N)
DIFF=$(echo "scale=2; (${END} - ${START}) / 1" | bc)
echo "${DIFF}"
Loading…
Cancel
Save