forked from ReactiveX/RxPY
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
a0bc447
commit 40b7b95
Showing
3 changed files
with
42 additions
and
3 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 |
---|---|---|
|
@@ -43,4 +43,5 @@ install: | |
|
||
script: | ||
- python3 setup.py test | ||
|
||
after_success: | ||
- ./.travis/bench.sh |
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,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
testargs="--cache-clear --ignore=tests/test_concurrency" | ||
rounds=8 | ||
|
||
head=$(git status | head -n 1 | grep -o "[^ ]*$") | ||
|
||
git remote add upstream https://github.com/erikkemperman/RxPY.git | ||
git fetch upstream master | ||
|
||
for branch in "upstream/master" "$head" | ||
do | ||
echo "" | ||
git checkout $branch | ||
echo "" | ||
echo "On branch $branch ..." | ||
|
||
sum=0 | ||
for round in $(seq $rounds) | ||
do | ||
sec=$(pytest $testargs | grep -o "passed in .* s") | ||
ret=$? | ||
|
||
echo -n " - Round $round of $rounds | $sec" | ||
sec=$(echo $sec | sed -e "s/[^0-9]//g") | ||
sum=$(($sum + $sec)) | ||
avg=$((($sum * 10) / $round)) | ||
avg=$((($avg + 5) / 10)) | ||
echo -n " | total $(echo $sum | sed -e "s/\([0-9]\{2\}\)$/.\1/") s" | ||
echo -n " | average $(echo $avg | sed -e "s/\([0-9]\{2\}\)$/.\1/") s" | ||
|
||
if [[ $ret == 0 ]]; then echo " | OK"; else echo " | FAIL"; fi | ||
done | ||
done | ||
|