File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 7
7
matrix :
8
8
include :
9
9
- php : 7.2
10
- env : PREFER_LOWEST="" DB=mysql RUN_PHPSTAN=1 RUN_CSCHECK=1 RUN_REQUIRECHECKER=1
10
+ env : PREFER_LOWEST="" DB=mysql RUN_PHPSTAN=1 RUN_CSCHECK=1 RUN_REQUIRECHECKER=1 RUN_PERF_TEST=1
11
11
services :
12
12
- mysql
13
13
- php : 7.3
@@ -98,6 +98,21 @@ script:
98
98
if [ "$RUN_REQUIRECHECKER" == "1" ] ; then
99
99
composer require-checker
100
100
fi
101
+ - |
102
+ if [ "$RUN_PERF_TEST" == "1" ] ; then
103
+ echo "***** Running PHPBENCH on current branch *****" && \
104
+ ./phpbench.dist.sh run --tag=current_pr --store
105
+ fi
106
+ after_success :
107
+ - |
108
+ if [ "$RUN_PERF_TEST" == "1" ] && [ "${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" != "master" ] ; then
109
+ git fetch --unshallow && \
110
+ git checkout master && \
111
+ composer update && \
112
+ echo "***** Running PHPBENCH on master branch for comparison *****" && \
113
+ ./phpbench.dist.sh run --tag=master --store && \
114
+ ./phpbench.dist.sh report --uuid=tag:current_pr --uuid=tag:master --report='{extends: compare, compare: tag}'
115
+ fi
101
116
after_script :
102
117
- if [ "$COVERALLS" = "true" ] ; then ./vendor/bin/php-coveralls -v; fi
103
118
- if [ "$COVERALLS" = "true" ] ; then vendor/bin/couscous travis-auto-deploy --php-version=7.1 -vvv; fi
Original file line number Diff line number Diff line change @@ -8,4 +8,4 @@ export DB_USERNAME=root
8
8
export DB_PASSWORD=
9
9
export DB_NAME=tdbm_benchmark
10
10
11
- vendor/bin/phpbench
11
+ vendor/bin/phpbench " $@ "
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ private static function recursiveDelete(string $str): bool
120
120
return false ;
121
121
}
122
122
123
- private function getConnection (): Connection
123
+ private static function getConnection (): Connection
124
124
{
125
125
return ConnectionFactory::createConnection (
126
126
getenv ('DB_DRIVER ' ) ?: null ,
You can’t perform that action at this time.
0 commit comments