Skip to content

Commit 93bce6f

Browse files
committed
Small overload (json serializer) benchmark for Symfony JSON serializer 5.0.0
1 parent d6225b6 commit 93bce6f

File tree

120 files changed

+2679
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+2679
-2
lines changed

.circleci/config.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: '2.1'
2+
3+
jobs:
4+
ValidateBenchmark:
5+
docker:
6+
- image: phpbenchmarks/benchmark-kit:4
7+
working_directory: /var/www/benchmark
8+
steps:
9+
- checkout
10+
- run:
11+
name: /var/entrypoint.sh
12+
command: /var/entrypoint.sh --nginx-as-service
13+
- run:
14+
name: "benchmark:validate"
15+
command: "/var/benchmark-kit/bin/console benchmark:validate:all"
16+
17+
workflows:
18+
version: '2.1'
19+
BenchmarkKit:
20+
jobs:
21+
- ValidateBenchmark

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
/composer.lock
12
/vendor/

.phpbenchmarks/config.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
component:
2+
id: 16
3+
benchmark:
4+
type: 7
5+
relativeUrl: /
6+
sourceCode:
7+
entryPoint: public/index.php
8+
urls:
9+
jsonSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-small-overload_0/public/index.php#23'
10+
integerSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-small-overload_0/public/index.php#23'
11+
floatSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-small-overload_0/public/index.php#23'
12+
stringSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-small-overload_0/public/index.php#23'
13+
booleanSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-small-overload_0/public/index.php#23'
14+
nullSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-small-overload_0/public/index.php#23'
15+
arraySerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-small-overload_0/public/index.php#23'
16+
objectSerialization: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-small-overload_0/src/Normalizer/ObjectToSerializeNormalizer.php'
17+
customSerializers: 'https://github.com/phpbenchmarks/symfony-json-serializer/blob/5.0.0_json-serialization-small-overload_0/src/Normalizer'
18+
coreDependency:
19+
name: symfony/serializer
20+
version: 5.0.0

.phpbenchmarks/nginx/vhost.conf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
server {
2+
listen ____PORT____;
3+
server_name ____HOST____;
4+
root ____INSTALLATION_PATH____/public;
5+
location / {
6+
try_files $uri /index.php$is_args$args;
7+
}
8+
location ~ index.php(/|$) {
9+
fastcgi_pass unix:/run/php/____PHP_FPM_SOCK____;
10+
fastcgi_split_path_info ^(.+.php)(/.*)$;
11+
include fastcgi_params;
12+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
13+
fastcgi_param HTTPS off;
14+
}
15+
}

composer.lock renamed to .phpbenchmarks/php/7.2/composer.lock

Lines changed: 31 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
# add commands to initialize benchmark: clear cache and logs, warm up cache etc
6+
composer install --no-dev --classmap-authoritative --ansi

.phpbenchmarks/php/7.2/php.ini

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
; ----------------------------------------------------------------------------------------------------------------------
2+
; This file will be added to PHP ini files loaded before benchmarking.
3+
; Configure what you need here.
4+
;
5+
; /!\ Do NOT configure opcache.enable: it will be configured automatically.
6+
; ----------------------------------------------------------------------------------------------------------------------
7+
8+
; Examples of configuration you could change for your needs.
9+
10+
; The maximum number of keys (scripts) in the OPcache hash table.
11+
; Only numbers between 200 and 1000000 are allowed.
12+
;opcache.max_accelerated_files=10000
13+
14+
; If disabled, all PHPDoc comments are dropped from the code to reduce the
15+
; size of the optimized code.
16+
;opcache.save_comments=1
17+
18+
; A bitmask, where each bit enables or disables the appropriate OPcache
19+
; passes
20+
;opcache.optimization_level=0x7FFFBFFF
21+
22+
; Allows exclusion of large files from being cached. By default all files
23+
; are cached.
24+
;opcache.max_file_size=0
25+
26+
; Enables or disables opcode caching in shared memory.
27+
;opcache.file_cache_only=0
28+
29+
; The OPcache shared memory storage size.
30+
;opcache.memory_consumption=128

.phpbenchmarks/php/7.2/responseBody/responseBody.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

.phpbenchmarks/php/7.3/composer.lock

Lines changed: 191 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
# add commands to initialize benchmark: clear cache and logs, warm up cache etc
6+
composer install --no-dev --classmap-authoritative --ansi

.phpbenchmarks/php/7.3/php.ini

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
; ----------------------------------------------------------------------------------------------------------------------
2+
; This file will be added to PHP ini files loaded before benchmarking.
3+
; Configure what you need here.
4+
;
5+
; /!\ Do NOT configure opcache.enable: it will be configured automatically.
6+
; ----------------------------------------------------------------------------------------------------------------------
7+
8+
; Examples of configuration you could change for your needs.
9+
10+
; The maximum number of keys (scripts) in the OPcache hash table.
11+
; Only numbers between 200 and 1000000 are allowed.
12+
;opcache.max_accelerated_files=10000
13+
14+
; If disabled, all PHPDoc comments are dropped from the code to reduce the
15+
; size of the optimized code.
16+
;opcache.save_comments=1
17+
18+
; A bitmask, where each bit enables or disables the appropriate OPcache
19+
; passes
20+
;opcache.optimization_level=0x7FFFBFFF
21+
22+
; Allows exclusion of large files from being cached. By default all files
23+
; are cached.
24+
;opcache.max_file_size=0
25+
26+
; Enables or disables opcode caching in shared memory.
27+
;opcache.file_cache_only=0
28+
29+
; The OPcache shared memory storage size.
30+
;opcache.memory_consumption=128

.phpbenchmarks/php/7.3/responseBody/responseBody.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)