Skip to content

Commit 1bbe376

Browse files
committed
Hello world (json serializer) benchmark for Symfony JSON serializer 5.0.0
1 parent 1e0dbc8 commit 1bbe376

20 files changed

+646
-4
lines changed

.circleci/config.yml

+21
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

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
/vendor/
1+
/composer.lock
2+
/vendor/

.phpbenchmarks/config.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
component:
2+
id: 16
3+
benchmark:
4+
type: 6
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-hello-world_0/public/index.php'
10+
coreDependency:
11+
name: symfony/serializer
12+
version: 5.0.0

.phpbenchmarks/nginx/vhost.conf

+15
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

+31-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+6
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

+30
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
["Hello World !"]

.phpbenchmarks/php/7.3/composer.lock

+191
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+6
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

+30
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
["Hello World !"]

0 commit comments

Comments
 (0)