-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #403 from jlledom/THREESCALE-11232-pipeline-benchm…
…arks THREESCALE-11232: Add benchmark to pipeline
- Loading branch information
Showing
4 changed files
with
92 additions
and
20 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
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,38 @@ | ||
#!/bin/bash | ||
|
||
function wait_redis() | ||
{ | ||
bundle exec rake connectivity:redis_storage_check | ||
bundle exec rake connectivity:redis_storage_queue_check | ||
} | ||
|
||
function do_benchmark() | ||
{ | ||
case $1 in | ||
sync) | ||
echo "==================== Running tests using the SYNC Redis driver ====================" | ||
CONFIG_REDIS_ASYNC=false bundle exec rake bench[worker/worker_bench.rb] | ||
;; | ||
async) | ||
echo "==================== Running tests using the ASYNC Redis driver ====================" | ||
CONFIG_REDIS_ASYNC=true bundle exec rake bench[worker/worker_bench.rb] | ||
;; | ||
*) | ||
echo "Invalid Redis driver option: $1" | ||
exit 1 | ||
esac | ||
} | ||
|
||
function run_benchmark() | ||
{ | ||
export RACK_ENV=test | ||
|
||
wait_redis | ||
|
||
do_benchmark "sync" && do_benchmark "async" | ||
} | ||
|
||
if ! run_benchmark; then | ||
echo "Tests failed" >&2 | ||
exit 1 | ||
fi |