Skip to content

Commit 14c919b

Browse files
authored
Merge pull request #10 from dragoonis/feat/look-at-latest-phpfpm-built-in-metrics-exporter-#4
2 parents 86e73d8 + fa319df commit 14c919b

36 files changed

+5862
-4305
lines changed

Makefile

Lines changed: 87 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ K6_SERVICE := k6
44
FRANKEN_URL := http://localhost:8080
55
FRANKEN_WORKER_URL := http://localhost:8081
66
FPM_URL := http://localhost:8088
7+
PRODUCT_ID := 105069
78

89
.PHONY: k6 clean
910

@@ -14,7 +15,7 @@ pull-docker:
1415
docker pull prom/prometheus:v2.53.4
1516
docker pull grafana/grafana:latest
1617
docker pull hipages/php-fpm_exporter:latest
17-
docker pull dunglas/frankenphp
18+
docker pull dunglas/frankenphp:php8.4-bookworm
1819
@echo "All Docker images pulled successfully!"
1920

2021
# Individual Docker image pull commands
@@ -114,7 +115,7 @@ franken-shell:
114115
docker-compose exec -it franken bash
115116

116117
worker-shell:
117-
docker-compose exec -it franken bash
118+
docker-compose exec -it franken-worker bash
118119

119120
migrate: ## Run database migrations
120121
docker-compose exec app php bin/console doctrine:migrations:migrate --no-interaction
@@ -283,6 +284,90 @@ k6-install:
283284
fi; \
284285
fi
285286

287+
# Product by ID benchmark targets (single ID)
288+
.PHONY: benchmark-product-by-id-franken
289+
benchmark-product-by-id-franken:
290+
@echo "Running product by ID benchmark against Franken (port 8080)..."
291+
BASE_URL=$(FRANKEN_URL) PRODUCT_ID=$(PRODUCT_ID) k6 run k6/get_product_by_id.js
292+
293+
.PHONY: benchmark-product-by-id-franken-worker
294+
benchmark-product-by-id-franken-worker:
295+
@echo "Running product by ID benchmark against Franken Worker (port 8081)..."
296+
BASE_URL=$(FRANKEN_WORKER_URL) PRODUCT_ID=$(PRODUCT_ID) k6 run k6/get_product_by_id.js
297+
298+
.PHONY: benchmark-product-by-id-fpm
299+
benchmark-product-by-id-fpm:
300+
@echo "Running product by ID benchmark against FPM (port 8088)..."
301+
BASE_URL=$(FPM_URL) PRODUCT_ID=$(PRODUCT_ID) k6 run k6/get_product_by_id.js
302+
303+
.PHONY: benchmark-product-by-id-all
304+
benchmark-product-by-id-all:
305+
@echo "Running product by ID benchmarks against all environments..."
306+
@echo ""
307+
$(MAKE) benchmark-product-by-id-franken
308+
@echo ""
309+
@echo ""
310+
$(MAKE) benchmark-product-by-id-franken-worker
311+
@echo ""
312+
@echo ""
313+
$(MAKE) benchmark-product-by-id-fpm
314+
315+
# Product by ID benchmark targets (random IDs from projection)
316+
.PHONY: benchmark-product-random-franken
317+
benchmark-product-random-franken:
318+
@echo "Running random product ID benchmark against Franken (port 8080)..."
319+
BASE_URL=$(FRANKEN_URL) k6 run k6/get_product_by_id_random.js
320+
321+
.PHONY: benchmark-product-random-franken-worker
322+
benchmark-product-random-franken-worker:
323+
@echo "Running random product ID benchmark against Franken Worker (port 8081)..."
324+
BASE_URL=$(FRANKEN_WORKER_URL) k6 run k6/get_product_by_id_random.js
325+
326+
.PHONY: benchmark-product-random-fpm
327+
benchmark-product-random-fpm:
328+
@echo "Running random product ID benchmark against FPM (port 8088)..."
329+
BASE_URL=$(FPM_URL) k6 run k6/get_product_by_id_random.js
330+
331+
.PHONY: benchmark-product-random-all
332+
benchmark-product-random-all:
333+
@echo "Running random product ID benchmarks against all environments..."
334+
@echo ""
335+
$(MAKE) benchmark-product-random-franken
336+
@echo ""
337+
@echo ""
338+
$(MAKE) benchmark-product-random-franken-worker
339+
@echo ""
340+
@echo ""
341+
$(MAKE) benchmark-product-random-fpm
342+
343+
# Product by ID benchmark targets (cycling through IDs from /projection)
344+
.PHONY: benchmark-product-projection-franken
345+
benchmark-product-projection-franken:
346+
@echo "Running cycling product ID benchmark (Projection) against Franken (port 8080)..."
347+
BASE_URL=$(FRANKEN_URL) k6 run k6/get_product_by_id_projection.js
348+
349+
.PHONY: benchmark-product-projection-franken-worker
350+
benchmark-product-projection-franken-worker:
351+
@echo "Running cycling product ID benchmark (Projection) against Franken Worker (port 8081)..."
352+
BASE_URL=$(FRANKEN_WORKER_URL) k6 run k6/get_product_by_id_projection.js
353+
354+
.PHONY: benchmark-product-projection-fpm
355+
benchmark-product-projection-fpm:
356+
@echo "Running cycling product ID benchmark (Projection) against FPM (port 8088)..."
357+
BASE_URL=$(FPM_URL) k6 run k6/get_product_by_id_projection.js
358+
359+
.PHONY: benchmark-product-projection-all
360+
benchmark-product-projection-all:
361+
@echo "Running cycling product ID benchmarks (Projection) against all environments..."
362+
@echo ""
363+
$(MAKE) benchmark-product-projection-franken
364+
@echo ""
365+
@echo ""
366+
$(MAKE) benchmark-product-projection-franken-worker
367+
@echo ""
368+
@echo ""
369+
$(MAKE) benchmark-product-projection-fpm
370+
286371
# Projection rebuild targets
287372
.PHONY: rebuild-projections
288373
rebuild-projections:

0 commit comments

Comments
 (0)