Skip to content

Commit

Permalink
timing function for performance testing
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldfallen committed Sep 18, 2015
1 parent 1f6a8f8 commit 549734a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions radar-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ cwd=""
remote=""
rcfile_path="$HOME"

timethis() {
cmd="$@"
start=$(gdate +%s.%N)
eval $cmd
dur=$(echo "$(gdate +%s.%N) - $start" | bc)
echo "$1 - $dur" >> $HOME/duration.dat
}

prepare_bash_colors() {
if [ -f "$rcfile_path/.gitradarrc.bash" ]; then
source "$rcfile_path/.gitradarrc.bash"
Expand Down

0 comments on commit 549734a

Please sign in to comment.