1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# get the delta in seconds in bash.

begin=$(date +%s)

# some command that takes a while and needs to be timed.

end=$(date +%s)

delta=$((end-begin))

echo $delta

curl -X POST -d "delta=$delta&metric-name=test.russell.a" https://46dtopqgp3.execute-api.us-east-1.amazonaws.com/LATEST/metrics