-
-
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.
Merge pull request #21 from Crell/explicit-optimize-compiler
Opt-in optimization for the compiled provider
- Loading branch information
Showing
13 changed files
with
331 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Crell\Tukio\Benchmarks; | ||
|
||
use Crell\Tukio\CollectingEvent; | ||
use Crell\Tukio\DummyEvent; | ||
use PhpBench\Benchmark\Metadata\Annotations\Groups; | ||
|
||
/** | ||
* @Groups({"Providers"}) | ||
*/ | ||
class OptimizedCompiledProviderBench extends CompiledProviderBench | ||
{ | ||
protected static array $optimizeClasses = [CollectingEvent::class, DummyEvent::class]; | ||
} |
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 |
---|---|---|
@@ -1,10 +1,8 @@ | ||
FROM php:7.4.28-cli | ||
FROM php:7.4-cli | ||
WORKDIR /usr/src/myapp | ||
|
||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer | ||
|
||
RUN apt-get update && apt-get install zip unzip git -y \ | ||
&& pecl install xdebug \ | ||
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ | ||
&& php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \ | ||
&& php composer-setup.php --install-dir=/usr/bin --filename=composer \ | ||
&& php -r "unlink('composer-setup.php');" \ | ||
&& mkdir /.composer && chmod 777 /.composer | ||
&& pecl install pcov |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so | ||
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so | ||
xdebug.output_dir=profiles |
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 |
---|---|---|
@@ -1,13 +1,7 @@ | ||
{ | ||
"bootstrap": "vendor/autoload.php", | ||
"path": "benchmarks", | ||
"retry_threshold": 5, | ||
"reports": { | ||
"short": { | ||
"title": "Short summary", | ||
"extends": "aggregate", | ||
"cols": ["benchmark", "subject", "mode", "mean", "stdev", "rstdev", "mem_peak"], | ||
"break": ["benchmark"] | ||
} | ||
} | ||
"runner.path": "benchmarks", | ||
"$schema":"./vendor/phpbench/phpbench/phpbench.schema.json", | ||
"runner.bootstrap": "vendor/autoload.php", | ||
"runner.php_disable_ini": true, | ||
"runner.file_pattern": "*Bench.php" | ||
} |
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
Oops, something went wrong.