Skip to content

Hello world (json serializer) benchmark for Symfony JSON serializer 5.0.6 #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
steps:
- checkout
- run:
name: /var/entrypoint.sh
command: /var/entrypoint.sh --nginx-as-service
name: entrypoint
command: entrypoint --nginx-as-service
- run:
name: "benchmark:validate"
command: "/var/benchmark-kit/bin/console benchmark:validate:all"
name: "validate:benchmark"
command: "phpbenchkit validate:benchmark -vvv"

workflows:
version: '2.1'
Expand Down
8 changes: 4 additions & 4 deletions .phpbenchmarks/config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
component:
id: 16
slug: symfony-json-serializer
benchmark:
type: 6
type: json-serialization-hello-world
relativeUrl: /
sourceCode:
entryPoint: public/index.php
urls:
jsonSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.5_json-serialization-hello-world_0/public/index.php'
jsonSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.6_json-serialization-hello-world_0/public/index.php'
coreDependency:
name: symfony/serializer
version: 5.0.5
version: 5.0.6
6 changes: 3 additions & 3 deletions .phpbenchmarks/nginx/vhost.conf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
server {
listen ____PORT____;
server_name ____HOST____;
root ____INSTALLATION_PATH____/public;
root ____INSTALLATION_PATH____/____ENTRY_POINT_FILE_PATH____;
location / {
try_files $uri /index.php$is_args$args;
try_files $uri /____ENTRY_POINT_FILE_NAME____$is_args$args;
}
location ~ index.php(/|$) {
location ~ ____ENTRY_POINT_FILE_NAME____(/|$) {
fastcgi_pass unix:/run/php/____PHP_FPM_SOCK____;
fastcgi_split_path_info ^(.+.php)(/.*)$;
include fastcgi_params;
Expand Down
52 changes: 26 additions & 26 deletions .phpbenchmarks/php/7.2/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 26 additions & 26 deletions .phpbenchmarks/php/7.3/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 26 additions & 26 deletions .phpbenchmarks/php/7.4/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 30 additions & 2 deletions .phpbenchmarks/php/7.4/preload.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
<?php

declare(strict_types=1);
$sourceCodePath = __DIR__ . '/../../../';
$files = [
"$sourceCodePath/public/index.php",
"$sourceCodePath/vendor/autoload.php",
"$sourceCodePath/vendor/composer/ClassLoader.php",
"$sourceCodePath/vendor/phpbenchmarks/benchmark-json-serialization-hello-world/src/BenchmarkService.php",
"$sourceCodePath/vendor/symfony/polyfill-ctype/bootstrap.php",
"$sourceCodePath/vendor/symfony/serializer/Encoder/ChainDecoder.php",
"$sourceCodePath/vendor/symfony/serializer/Encoder/ChainEncoder.php",
"$sourceCodePath/vendor/symfony/serializer/Encoder/ContextAwareDecoderInterface.php",
"$sourceCodePath/vendor/symfony/serializer/Encoder/ContextAwareEncoderInterface.php",
"$sourceCodePath/vendor/symfony/serializer/Encoder/DecoderInterface.php",
"$sourceCodePath/vendor/symfony/serializer/Encoder/EncoderInterface.php",
"$sourceCodePath/vendor/symfony/serializer/Encoder/JsonDecode.php",
"$sourceCodePath/vendor/symfony/serializer/Encoder/JsonEncode.php",
"$sourceCodePath/vendor/symfony/serializer/Encoder/JsonEncoder.php",
"$sourceCodePath/vendor/symfony/serializer/Normalizer/ContextAwareDenormalizerInterface.php",
"$sourceCodePath/vendor/symfony/serializer/Normalizer/ContextAwareNormalizerInterface.php",
"$sourceCodePath/vendor/symfony/serializer/Normalizer/DenormalizerInterface.php",
"$sourceCodePath/vendor/symfony/serializer/Normalizer/NormalizerInterface.php",
"$sourceCodePath/vendor/symfony/serializer/Serializer.php",
"$sourceCodePath/vendor/symfony/serializer/SerializerInterface.php",
];

require(__DIR__ . '/../../../public/index.php');
foreach ($files as $file) {
if (is_readable($file) === false) {
throw new \Exception('File "' . $file . '" is not readable.');
}

opcache_compile_file($file);
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"license": "proprietary",
"require": {
"php": "^7.2",
"symfony/serializer": "5.0.5",
"symfony/serializer": "5.0.6",
"phpbenchmarks/benchmark-json-serialization-hello-world": "1.0.0"
}
}