Skip to content

Commit abbbe53

Browse files
committed
remove: phpbench
Regardless what I do I can't stabilize the benchmarks. The dream was to use phpbench to run benchmarks on each PR and commpare it with the baseline to early detect regressions. I even went through the trouble of creating dedicated github runner, with dedicated cpu, but even that didn't allowed me to make it work. Because of that I decided to abandon the idea of automated benchmarks, in the fugure we might want to investigate using a profiler similar to blackfire.
1 parent eaccf0a commit abbbe53

42 files changed

Lines changed: 0 additions & 14513 deletions

File tree

Some content is hidden

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

.github/dependabot.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ updates:
3737
schedule:
3838
interval: "daily"
3939

40-
- package-ecosystem: "composer"
41-
directory: "/tools/phpbench"
42-
schedule:
43-
interval: "daily"
44-
4540
- package-ecosystem: "composer"
4641
directory: "/tools/phpstan"
4742
schedule:

.github/workflows/baseline.yml

Lines changed: 0 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -90,119 +90,6 @@ jobs:
9090
path: build/flow.phar
9191
overwrite: true
9292

93-
benchmark-baseline:
94-
runs-on: benchmark
95-
96-
services:
97-
postgres:
98-
image: postgres:18-alpine
99-
env:
100-
POSTGRES_USER: postgres
101-
POSTGRES_PASSWORD: postgres
102-
POSTGRES_DB: postgres
103-
ports:
104-
- 5432/tcp
105-
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
106-
107-
strategy:
108-
fail-fast: false
109-
matrix:
110-
dependencies:
111-
- "locked"
112-
php-version:
113-
- "8.3"
114-
115-
steps:
116-
- name: "Set Git Ref"
117-
run: |
118-
if [[ "${{ github.event_name }}" == "push" || "${{ github.event_name }}" == "schedule" ]]; then
119-
echo "GIT_REF=${{ github.ref }}" >> $GITHUB_ENV
120-
elif [[ "${{ github.event.inputs.tag_name }}" != "" ]]; then
121-
echo "GIT_REF=refs/tags/${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
122-
else
123-
echo "GIT_REF=${{ github.event.inputs.branch_name }}" >> $GITHUB_ENV
124-
fi
125-
126-
- name: "Set Benchmark Tag"
127-
run: |
128-
if [[ "${{ github.event_name }}" == "push" || "${{ github.event_name }}" == "schedule" ]]; then
129-
echo "PHPBENCH_TAG=1.x" >> $GITHUB_ENV
130-
elif [[ "${{ github.event.inputs.tag_name }}" != "" ]]; then
131-
echo "PHPBENCH_TAG=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
132-
else
133-
echo "PHPBENCH_TAG=${{ github.event.inputs.branch_name }}" >> $GITHUB_ENV
134-
fi
135-
136-
- name: "Checkout to specific ref"
137-
uses: "actions/checkout@v5"
138-
with:
139-
ref: ${{ env.GIT_REF }}
140-
141-
- name: "Get Composer Cache Directory"
142-
id: composer-cache
143-
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
144-
145-
- name: "Cache Composer dependencies"
146-
uses: "actions/cache@v4"
147-
with:
148-
path: "${{ steps.composer-cache.outputs.dir }}"
149-
key: "php-${{ matrix.php-version }}-locked-composer-benchmark-${{ hashFiles('**/composer.lock') }}"
150-
restore-keys: |
151-
php-${{ matrix.php-version }}-locked-composer-benchmark-
152-
153-
- name: "Install dependencies"
154-
run: "composer install --no-interaction --no-progress"
155-
156-
- name: "Generate phpbench.json with dynamic port"
157-
run: |
158-
sed 's/127.0.0.1:5432/127.0.0.1:${{ job.services.postgres.ports[5432] }}/' phpbench.json.dist > phpbench.json
159-
160-
- name: "Start OpenTelemetry Collector"
161-
run: |
162-
docker rm -f otel-collector 2>/dev/null || true
163-
docker run -d --name otel-collector \
164-
-p 4317:4317 -p 4318:4318 -p 8888:8888 -p 13133:13133 \
165-
-v ${{ github.workspace }}/docker/otel-collector-test-config.yaml:/etc/otelcol-contrib/config.yaml:ro \
166-
otel/opentelemetry-collector-contrib:0.115.1
167-
# Wait for container to be ready
168-
for i in {1..30}; do
169-
if curl -sf http://localhost:13133/ > /dev/null 2>&1; then
170-
echo "OpenTelemetry Collector is ready"
171-
break
172-
fi
173-
echo "Waiting for OpenTelemetry Collector... ($i/30)"
174-
sleep 2
175-
done
176-
177-
- name: "Benchmark"
178-
env:
179-
OTEL_RECEIVER_HTTP_ENDPOINT: "http://localhost:4318"
180-
OTEL_RECEIVER_GRPC_ENDPOINT: "localhost:4317"
181-
OTEL_COLLECTOR_METRICS_ENDPOINT: "http://localhost:8888/metrics"
182-
run: |
183-
# Phase 1: Run with progress visible, store results
184-
tools/phpbench/vendor/bin/phpbench run \
185-
--progress=plain \
186-
--store \
187-
--tag=${{ env.PHPBENCH_TAG }}
188-
189-
# Phase 2: Generate clean report from stored results
190-
echo '# Flow PHP - Benchmark - ${{ env.PHPBENCH_TAG }}' >> $GITHUB_STEP_SUMMARY
191-
echo ' ' >> $GITHUB_STEP_SUMMARY
192-
echo '---' >> $GITHUB_STEP_SUMMARY
193-
echo '```' >> $GITHUB_STEP_SUMMARY
194-
tools/phpbench/vendor/bin/phpbench report \
195-
--ref=${{ env.PHPBENCH_TAG }} \
196-
--report=flow-report >> $GITHUB_STEP_SUMMARY
197-
echo '```' >> $GITHUB_STEP_SUMMARY
198-
199-
- name: "Store Benchmark baseline"
200-
uses: actions/upload-artifact@v6
201-
with:
202-
name: phpbench-baseline
203-
path: ./var/phpbench/
204-
overwrite: true
205-
20693
publish-website:
20794
runs-on: ubuntu-latest
20895
strategy:

.github/workflows/benchmarks.yml

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

.github/workflows/pr-comment.yml

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

0 commit comments

Comments
 (0)