Created
January 2, 2015 17:26
-
-
Save Stantheman/a1b5d1186f63b9e30492 to your computer and use it in GitHub Desktop.
Revisions
-
Stantheman created this gist
Jan 2, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #!/bin/bash echo "Testing Original" cp binary_orig.go.old binary.go for i in {1..5}; do go test -v -bench='[de]Ints' -run none | grep Read | tee /tmp/tmp.txt done echo "Original read ns/op average: $(tr -s ' ' < /tmp/tmp.txt | cut -d' ' -f3 | numaverage)" echo "Testing Fixed" cp fixed_binary.go.old binary.go for i in {1..5}; do go test -v -bench='[de]Ints' -run none | grep Read | tee /tmp/tmp.txt done echo "Fixed read ns/op average: $(tr -s ' ' < /tmp/tmp.txt | cut -d' ' -f3 | numaverage)" rm /tmp/tmp.txt