Skip to content

Commit e2997f0

Browse files
committed
Remove benchmarking classes and scripts
- Delete `HttpLoadRunner`, `RuntimeMatrixEnvironment`, `RuntimeMatrixReportWriter`, `RuntimeMatrixRunner`, and `RuntimeScenarioExecutor` classes. - Remove PHP scripts for runtime matrix benchmarking. - Clean up Docker files and configurations associated with benchmarking processes.
1 parent f4cd926 commit e2997f0

14 files changed

Lines changed: 88 additions & 1968 deletions

doc/OPERATIONS.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,6 @@ docker exec core-php-1 php scripts/security/hardening_gate.php
6161
docker exec core-php-1 php scripts/security/quality_gate.php
6262
```
6363

64-
### 2.4 Runtime matrix benchmark loop
65-
66-
<!-- validated -->
67-
```bash
68-
bash scripts/benchmark/runtime_matrix_loop.sh --env-file .env --quick
69-
```
70-
71-
Notes:
72-
73-
- Iterates runtime (`php -S`/`swoole`) x `debug` x `opcache` x `redis`.
74-
- Uses `docker compose up -> docker exec -> down` per scenario.
75-
- Enables benchmark endpoints only during each scenario (`PSFS_BENCHMARK_ENABLED=1`).
76-
- Writes JSON outputs into `cache/benchmark/runtime-matrix-loop/`.
77-
7864
<!-- example-only -->
7965
```bash
8066
# CI workflow emulation

docker-compose.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,67 @@ services:
6565
max-size: "10m"
6666
max-file: "3"
6767

68+
php-swoole-aot:
69+
image: c15k02k18/php:8.3-alpine${DEBUG:-}
70+
pull_policy: always
71+
restart: always
72+
tty: true
73+
profiles:
74+
- aot
75+
volumes:
76+
- .:/var/www
77+
- ./docker/php.ini:/usr/local/etc/php/php.ini
78+
networks:
79+
- psfs-network
80+
working_dir: "/var/www"
81+
ports:
82+
- "${HOST_PORT_SWOOLE_AOT:-8012}:8080"
83+
command: >
84+
sh -lc '
85+
if [ -z "$${PSFS_AOT_PHP_BIN:-}" ]; then
86+
echo "PSFS AOT runtime error: PSFS_AOT_PHP_BIN is required";
87+
exit 64;
88+
fi;
89+
if [ -z "$${PSFS_AOT_RUNTIME_SCRIPT:-}" ]; then
90+
echo "PSFS AOT runtime error: PSFS_AOT_RUNTIME_SCRIPT is required";
91+
exit 65;
92+
fi;
93+
if [ -z "$${PSFS_AOT_LOADER_SO:-}" ]; then
94+
echo "PSFS AOT runtime error: PSFS_AOT_LOADER_SO is required";
95+
exit 66;
96+
fi;
97+
if [ ! -f "$${PSFS_AOT_LOADER_SO}" ]; then
98+
echo "PSFS AOT runtime error: loader path not found: $${PSFS_AOT_LOADER_SO}";
99+
exit 67;
100+
fi;
101+
printf "zend_extension=%s\n" "$${PSFS_AOT_LOADER_SO}" > /tmp/psfs-aot-loader.ini;
102+
export PHP_INI_SCAN_DIR="/tmp:/usr/local/etc/php/conf.d";
103+
exec "$${PSFS_AOT_PHP_BIN}" "$${PSFS_AOT_RUNTIME_SCRIPT}" psfs:swoole:start
104+
--host=0.0.0.0
105+
--port=8080
106+
--workers=${PSFS_SWOOLE_WORKERS:-2}
107+
--max-request=${PSFS_SWOOLE_MAX_REQUEST:-1000}
108+
--pid-file=/tmp/psfs-swoole-aot.pid
109+
--log-file=/tmp/psfs-swoole-aot.log
110+
'
111+
environment:
112+
XDEBUG_CONFIG: "remote_host=localhost"
113+
PHP_IDE_CONFIG: "serverName=PSFSCore"
114+
PHP_TIMEZONE: "${PHP_TIMEZONE:-Europe/Madrid}"
115+
PHP_OPCACHE: "${PHP_OPCACHE:-0}"
116+
PSFS_RUNTIME: "swoole-aot"
117+
PSFS_BENCHMARK_ENABLED: "${PSFS_BENCHMARK_ENABLED:-0}"
118+
PSFS_AOT_PHP_BIN: "${PSFS_AOT_PHP_BIN:-}"
119+
PSFS_AOT_LOADER_SO: "${PSFS_AOT_LOADER_SO:-}"
120+
PSFS_AOT_RUNTIME_SCRIPT: "${PSFS_AOT_RUNTIME_SCRIPT:-}"
121+
depends_on:
122+
- redis
123+
logging:
124+
driver: "json-file"
125+
options:
126+
max-size: "10m"
127+
max-file: "3"
128+
68129
redis:
69130
restart: always
70131
image: valkey/valkey:latest

src/Dispatcher.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ class Dispatcher extends Singleton
5555
'/admin/config',
5656
'/admin/config/params',
5757
'/admin/routes/show',
58-
'/_bench/ping',
59-
'/_bench/metadata',
6058
];
6159

6260
/**

src/base/benchmark/HttpLoadRunner.php

Lines changed: 0 additions & 206 deletions
This file was deleted.

0 commit comments

Comments
 (0)