Skip to content

Big overload (json serializer) benchmark for Symfony JSON serializer 5.0.0 #14

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

Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 21 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: '2.1'

jobs:
ValidateBenchmark:
docker:
- image: phpbenchmarks/benchmark-kit:4
working_directory: /var/www/benchmark
steps:
- checkout
- run:
name: /var/entrypoint.sh
command: /var/entrypoint.sh --nginx-as-service
- run:
name: "benchmark:validate"
command: "/var/benchmark-kit/bin/console benchmark:validate:all"

workflows:
version: '2.1'
BenchmarkKit:
jobs:
- ValidateBenchmark
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/composer.lock
/vendor/
20 changes: 20 additions & 0 deletions .phpbenchmarks/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
component:
id: 16
benchmark:
type: 8
relativeUrl: /
sourceCode:
entryPoint: public/index.php
urls:
jsonSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-big-overload_0/public/index.php#L23'
integerSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-big-overload_0/public/index.php#L23'
floatSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-big-overload_0/public/index.php#L23'
stringSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-big-overload_0/public/index.php#L23'
booleanSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-big-overload_0/public/index.php#L23'
nullSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-big-overload_0/public/index.php#L23'
arraySerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-big-overload_0/public/index.php#L23'
objectSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-big-overload_0/src/Normalizer/ObjectToSerializeNormalizer.php'
customSerializers: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-big-overload_0/src/Normalizer'
coreDependency:
name: symfony/serializer
version: 5.0.0
15 changes: 15 additions & 0 deletions .phpbenchmarks/nginx/vhost.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
server {
listen ____PORT____;
server_name ____HOST____;
root ____INSTALLATION_PATH____/public;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ index.php(/|$) {
fastcgi_pass unix:/run/php/____PHP_FPM_SOCK____;
fastcgi_split_path_info ^(.+.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
}
32 changes: 31 additions & 1 deletion composer.lock → .phpbenchmarks/php/7.2/composer.lock

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

6 changes: 6 additions & 0 deletions .phpbenchmarks/php/7.2/initBenchmark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e

# add commands to initialize benchmark: clear cache and logs, warm up cache etc
composer install --no-dev --classmap-authoritative --ansi
30 changes: 30 additions & 0 deletions .phpbenchmarks/php/7.2/php.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
; ----------------------------------------------------------------------------------------------------------------------
; This file will be added to PHP ini files loaded before benchmarking.
; Configure what you need here.
;
; /!\ Do NOT configure opcache.enable: it will be configured automatically.
; ----------------------------------------------------------------------------------------------------------------------

; Examples of configuration you could change for your needs.

; The maximum number of keys (scripts) in the OPcache hash table.
; Only numbers between 200 and 1000000 are allowed.
;opcache.max_accelerated_files=10000

; If disabled, all PHPDoc comments are dropped from the code to reduce the
; size of the optimized code.
;opcache.save_comments=1

; A bitmask, where each bit enables or disables the appropriate OPcache
; passes
;opcache.optimization_level=0x7FFFBFFF

; Allows exclusion of large files from being cached. By default all files
; are cached.
;opcache.max_file_size=0

; Enables or disables opcode caching in shared memory.
;opcache.file_cache_only=0

; The OPcache shared memory storage size.
;opcache.memory_consumption=128
1 change: 1 addition & 0 deletions .phpbenchmarks/php/7.2/responseBody/responseBody.json

Large diffs are not rendered by default.

205 changes: 205 additions & 0 deletions .phpbenchmarks/php/7.3/composer.lock

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

6 changes: 6 additions & 0 deletions .phpbenchmarks/php/7.3/initBenchmark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e

# add commands to initialize benchmark: clear cache and logs, warm up cache etc
composer install --no-dev --classmap-authoritative --ansi
30 changes: 30 additions & 0 deletions .phpbenchmarks/php/7.3/php.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
; ----------------------------------------------------------------------------------------------------------------------
; This file will be added to PHP ini files loaded before benchmarking.
; Configure what you need here.
;
; /!\ Do NOT configure opcache.enable: it will be configured automatically.
; ----------------------------------------------------------------------------------------------------------------------

; Examples of configuration you could change for your needs.

; The maximum number of keys (scripts) in the OPcache hash table.
; Only numbers between 200 and 1000000 are allowed.
;opcache.max_accelerated_files=10000

; If disabled, all PHPDoc comments are dropped from the code to reduce the
; size of the optimized code.
;opcache.save_comments=1

; A bitmask, where each bit enables or disables the appropriate OPcache
; passes
;opcache.optimization_level=0x7FFFBFFF

; Allows exclusion of large files from being cached. By default all files
; are cached.
;opcache.max_file_size=0

; Enables or disables opcode caching in shared memory.
;opcache.file_cache_only=0

; The OPcache shared memory storage size.
;opcache.memory_consumption=128
1 change: 1 addition & 0 deletions .phpbenchmarks/php/7.3/responseBody/responseBody.json

Large diffs are not rendered by default.

Loading