-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env zsh | ||
|
||
# cwd is project root | ||
# $ scripts/create-benchmark-history.zsh | ||
# $ scripts/benchmark.zsh | ||
|
||
function benchmark-run { | ||
# https://stackoverflow.com/questions/11023929/using-the-alternate-screen-in-a-bash-script | ||
tput smcup | ||
for i in $(seq 1 ${1}); do | ||
bin/benchmark.js | ||
done | ||
tput rmcup | ||
} | ||
|
||
# init test data | ||
if [[ ! -f tests/benchmark-history.data ]]; then | ||
scripts/create-benchmark-history.zsh | ||
fi | ||
|
||
# run first for nodejs cache parse | ||
tput smcup | ||
bin/benchmark.js | ||
tput rmcup | ||
|
||
time ( benchmark-run 10 times ) |
This file contains 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 characters