From 4e2bcbed5159c4d46abae6629cd84bb0cacfe63f Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Mon, 26 May 2025 12:35:26 +0200 Subject: [PATCH 1/9] Update benchmarks --- README.md | 42 +++++++++++++++++++++--------------------- fpm/Dockerfile | 2 +- fpm/composer.json | 2 +- function/composer.json | 2 +- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 2f25d40..5c8c13b 100644 --- a/README.md +++ b/README.md @@ -11,22 +11,22 @@ Average execution time for a lambda that doesn't do anything. Number of samples: 900 -### Bref 2.x (PHP 8.3) +### Bref 3.x (PHP 8.3) | Memory | 128 | 512 | 1024 | 1769 | |------------------------------|------:|-----:|-----:|-----:| -| PHP function | 135ms | 27ms | 14ms | 14ms | +| PHP function | 200ms | 34ms | 16ms | 16ms | | PHP function (BREF_LOOP_MAX) | | | 1ms | 1ms | -| HTTP application | 1ms | 1ms | 1ms | 1ms | +| HTTP application | 2ms | 2ms | 2ms | 2ms | | Laravel | | | 7ms | | -### Bref 2.x ARM (PHP 8.3) +### Bref 3.x ARM (PHP 8.3) | Memory | 128 | 512 | 1024 | 1769 | |------------------------------|------:|-----:|-----:|-----:| -| PHP function | 135ms | 30ms | 14ms | 14ms | +| PHP function | 170ms | 30ms | 16ms | 16ms | | PHP function (BREF_LOOP_MAX) | | | 1ms | 1ms | -| HTTP application | 1ms | 1ms | 1ms | 1ms | +| HTTP application | 2ms | 2ms | 2ms | 2ms | | Laravel | | | 8ms | | For comparison on a 512M Digital Ocean droplet we get 1ms for "HTTP application" and 6ms for Symfony. @@ -56,12 +56,12 @@ Comparison (1024M): | | x86 container | x86 layer | ARM layer | |--------------------|--------------:|----------:|----------:| -| HTTP (duration) | 180ms | 300ms | 300ms | -| HTTP (latency) | 350ms | 540ms | 530ms | +| HTTP (duration) | 190ms | 355ms | 325ms | +| HTTP (latency) | 370ms | 600ms | 600ms | | Laravel (duration) | 850ms | 1190ms | 1160ms | -| Function | 160ms | 230ms | 220ms | +| Function | 175ms | 270ms | 235ms | -### Bref 2.x containers (PHP 8.3) +### Bref 3.x containers (PHP 8.3) Note: the first cold starts are much slower (see https://aaronstuyvenberg.com/posts/containers-on-lambda), e.g. 5s, because the container cache is warming up. In production warm up Lambda after deploying. @@ -69,8 +69,8 @@ Function duration: | Memory | 1024 | |------------------|------:| -| PHP function | 160ms | -| HTTP application | 180ms | +| PHP function | 175ms | +| HTTP application | 190ms | | Laravel | 850ms | Total latency (measured from API Gateway or X-Ray): @@ -78,17 +78,17 @@ Total latency (measured from API Gateway or X-Ray): | Memory | 1024 | |------------------|------:| | PHP function | | -| HTTP application | 350ms | +| HTTP application | 370ms | | Laravel | | -### Bref 2.x (PHP 8.3) +### Bref 3.x (PHP 8.3) Function duration: | Memory | 128 | 512 | 1024 | 1769 | |------------------|------:|------:|-------:|------:| -| PHP function | 500ms | 260ms | 230ms | 230ms | -| HTTP application | 430ms | 330ms | 300ms | 310ms | +| PHP function | 520ms | 300ms | 270ms | 250ms | +| HTTP application | 590ms | 380ms | 355ms | 350ms | | Laravel | | | 1190ms | | Total latency (measured from API Gateway or X-Ray): @@ -96,17 +96,17 @@ Total latency (measured from API Gateway or X-Ray): | Memory | 128 | 512 | 1024 | 1769 | |------------------|------:|------:|-------:|------:| | PHP function | 700ms | 430ms | 440ms | 410ms | -| HTTP application | 580ms | 450ms | 460ms | 450ms | +| HTTP application | 800ms | 600ms | 600ms | 600ms | | Laravel | | | 1400ms | | -### Bref 2.x ARM (PHP 8.3) +### Bref 3.x ARM (PHP 8.3) Function duration: | Memory | 128 | 512 | 1024 | 1769 | |------------------|------:|------:|-------:|------:| -| PHP function | 450ms | 240ms | 220ms | 210ms | -| HTTP application | 410ms | 310ms | 300ms | 300ms | +| PHP function | 490ms | 255ms | 235ms | 230ms | +| HTTP application | 520ms | 340ms | 325ms | 320ms | | Laravel | | | 1160ms | | Total latency (measured from API Gateway or X-Ray): @@ -114,7 +114,7 @@ Total latency (measured from API Gateway or X-Ray): | Memory | 128 | 512 | 1024 | 1769 | |------------------|------:|------:|-------:|------:| | PHP function | 670ms | 470ms | 430ms | 430ms | -| HTTP application | 620ms | 510ms | 540ms | 510ms | +| HTTP application | 730ms | 600ms | 600ms | 600ms | | Laravel | | | 1460ms | | Measuring cold starts in CloudWatch Logs Insights: diff --git a/fpm/Dockerfile b/fpm/Dockerfile index 8d950a6..0a2a594 100644 --- a/fpm/Dockerfile +++ b/fpm/Dockerfile @@ -1,4 +1,4 @@ -FROM bref/php-83-fpm:2 +FROM bref/php-83-fpm:3 COPY . /var/task diff --git a/fpm/composer.json b/fpm/composer.json index 1273041..0cee728 100644 --- a/fpm/composer.json +++ b/fpm/composer.json @@ -1,6 +1,6 @@ { "require": { - "bref/bref": "^2.0" + "bref/bref": "v3.x-dev" }, "config": { "platform": { diff --git a/function/composer.json b/function/composer.json index 1273041..0cee728 100644 --- a/function/composer.json +++ b/function/composer.json @@ -1,6 +1,6 @@ { "require": { - "bref/bref": "^2.0" + "bref/bref": "v3.x-dev" }, "config": { "platform": { From 81ca851df1624e2cdcb803e2bd30178122400b11 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Tue, 27 May 2025 16:52:10 +0200 Subject: [PATCH 2/9] Update benchmarks --- Makefile | 3 +-- README.md | 10 +++++----- fpm/Dockerfile | 4 +++- function/Dockerfile | 4 +++- laravel/Dockerfile | 4 +++- laravel/composer.json | 4 ++-- 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 19bbadc..d289642 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,6 @@ setup: cd function && composer update --no-dev --classmap-authoritative cd fpm && composer update --no-dev --classmap-authoritative cd laravel && composer update --no-dev --classmap-authoritative && php artisan config:clear && php artisan route:cache - docker pull bref/php-83:2 - docker pull bref/php-83-fpm:2 + docker pull bref/php-83:3 .PHONY: setup diff --git a/README.md b/README.md index 5c8c13b..08fef0d 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Comparison (1024M): |--------------------|--------------:|----------:|----------:| | HTTP (duration) | 190ms | 355ms | 325ms | | HTTP (latency) | 370ms | 600ms | 600ms | -| Laravel (duration) | 850ms | 1190ms | 1160ms | +| Laravel (duration) | 850ms | 1260ms | 1210ms | | Function | 175ms | 270ms | 235ms | ### Bref 3.x containers (PHP 8.3) @@ -89,7 +89,7 @@ Function duration: |------------------|------:|------:|-------:|------:| | PHP function | 520ms | 300ms | 270ms | 250ms | | HTTP application | 590ms | 380ms | 355ms | 350ms | -| Laravel | | | 1190ms | | +| Laravel | | | 1260ms | | Total latency (measured from API Gateway or X-Ray): @@ -97,7 +97,7 @@ Total latency (measured from API Gateway or X-Ray): |------------------|------:|------:|-------:|------:| | PHP function | 700ms | 430ms | 440ms | 410ms | | HTTP application | 800ms | 600ms | 600ms | 600ms | -| Laravel | | | 1400ms | | +| Laravel | | | 1520ms | | ### Bref 3.x ARM (PHP 8.3) @@ -107,7 +107,7 @@ Function duration: |------------------|------:|------:|-------:|------:| | PHP function | 490ms | 255ms | 235ms | 230ms | | HTTP application | 520ms | 340ms | 325ms | 320ms | -| Laravel | | | 1160ms | | +| Laravel | | | 1210ms | | Total latency (measured from API Gateway or X-Ray): @@ -115,7 +115,7 @@ Total latency (measured from API Gateway or X-Ray): |------------------|------:|------:|-------:|------:| | PHP function | 670ms | 470ms | 430ms | 430ms | | HTTP application | 730ms | 600ms | 600ms | 600ms | -| Laravel | | | 1460ms | | +| Laravel | | | 1510ms | | Measuring cold starts in CloudWatch Logs Insights: diff --git a/fpm/Dockerfile b/fpm/Dockerfile index 0a2a594..9da37fa 100644 --- a/fpm/Dockerfile +++ b/fpm/Dockerfile @@ -1,4 +1,6 @@ -FROM bref/php-83-fpm:3 +FROM bref/php-83:3 + +ENV BREF_RUNTIME=fpm COPY . /var/task diff --git a/function/Dockerfile b/function/Dockerfile index 610e1d3..7cffe71 100644 --- a/function/Dockerfile +++ b/function/Dockerfile @@ -1,4 +1,6 @@ -FROM bref/php-83:2 +FROM bref/php-83:3 + +ENV BREF_RUNTIME=function COPY . /var/task diff --git a/laravel/Dockerfile b/laravel/Dockerfile index 709e6b9..0ccf292 100644 --- a/laravel/Dockerfile +++ b/laravel/Dockerfile @@ -1,4 +1,6 @@ -FROM bref/php-83-fpm:2 +FROM bref/php-83:3 + +ENV BREF_RUNTIME=fpm COPY . /var/task RUN rm -rf storage diff --git a/laravel/composer.json b/laravel/composer.json index ffdc52f..f5c0094 100644 --- a/laravel/composer.json +++ b/laravel/composer.json @@ -5,8 +5,8 @@ "keywords": ["laravel", "framework"], "license": "MIT", "require": { - "php": "^8.2", - "bref/bref": "^2.1", + "php": "^8.3", + "bref/bref": "v3.x-dev as 2.99.0", "bref/laravel-bridge": "^2.3", "laravel/framework": "^11.0", "laravel/tinker": "^2.9" From b7135b418028f7558d85b1f45c75a1607c529285 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Tue, 27 May 2025 17:21:07 +0200 Subject: [PATCH 3/9] Update benchmarks --- README.md | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 08fef0d..d772702 100644 --- a/README.md +++ b/README.md @@ -15,19 +15,19 @@ Number of samples: 900 | Memory | 128 | 512 | 1024 | 1769 | |------------------------------|------:|-----:|-----:|-----:| -| PHP function | 200ms | 34ms | 16ms | 16ms | +| PHP function | 170ms | 32ms | 16ms | 16ms | | PHP function (BREF_LOOP_MAX) | | | 1ms | 1ms | | HTTP application | 2ms | 2ms | 2ms | 2ms | -| Laravel | | | 7ms | | +| Laravel | | | 28ms | | ### Bref 3.x ARM (PHP 8.3) | Memory | 128 | 512 | 1024 | 1769 | |------------------------------|------:|-----:|-----:|-----:| -| PHP function | 170ms | 30ms | 16ms | 16ms | +| PHP function | 160ms | 16ms | 15ms | 15ms | | PHP function (BREF_LOOP_MAX) | | | 1ms | 1ms | | HTTP application | 2ms | 2ms | 2ms | 2ms | -| Laravel | | | 8ms | | +| Laravel | | | 44ms | | For comparison on a 512M Digital Ocean droplet we get 1ms for "HTTP application" and 6ms for Symfony. @@ -56,10 +56,10 @@ Comparison (1024M): | | x86 container | x86 layer | ARM layer | |--------------------|--------------:|----------:|----------:| -| HTTP (duration) | 190ms | 355ms | 325ms | -| HTTP (latency) | 370ms | 600ms | 600ms | -| Laravel (duration) | 850ms | 1260ms | 1210ms | -| Function | 175ms | 270ms | 235ms | +| HTTP (duration) | 190ms | 300ms | 280ms | +| HTTP (latency) | 370ms | 520ms | 520ms | +| Laravel (duration) | 850ms | 1250ms | 1210ms | +| Function | 175ms | 230ms | 200ms | ### Bref 3.x containers (PHP 8.3) @@ -69,17 +69,17 @@ Function duration: | Memory | 1024 | |------------------|------:| -| PHP function | 175ms | -| HTTP application | 190ms | -| Laravel | 850ms | +| PHP function | 145ms | +| HTTP application | 180ms | +| Laravel | 960ms | Total latency (measured from API Gateway or X-Ray): -| Memory | 1024 | -|------------------|------:| -| PHP function | | -| HTTP application | 370ms | -| Laravel | | +| Memory | 1024 | +|------------------|-------:| +| PHP function | | +| HTTP application | 340ms | +| Laravel | 1110ms | ### Bref 3.x (PHP 8.3) @@ -87,17 +87,17 @@ Function duration: | Memory | 128 | 512 | 1024 | 1769 | |------------------|------:|------:|-------:|------:| -| PHP function | 520ms | 300ms | 270ms | 250ms | -| HTTP application | 590ms | 380ms | 355ms | 350ms | -| Laravel | | | 1260ms | | +| PHP function | 480ms | 260ms | 230ms | 220ms | +| HTTP application | 480ms | 335ms | 305ms | 300ms | +| Laravel | | | 1250ms | | Total latency (measured from API Gateway or X-Ray): | Memory | 128 | 512 | 1024 | 1769 | |------------------|------:|------:|-------:|------:| | PHP function | 700ms | 430ms | 440ms | 410ms | -| HTTP application | 800ms | 600ms | 600ms | 600ms | -| Laravel | | | 1520ms | | +| HTTP application | 660ms | 525ms | 475ms | 535ms | +| Laravel | | | 1480ms | | ### Bref 3.x ARM (PHP 8.3) @@ -105,8 +105,8 @@ Function duration: | Memory | 128 | 512 | 1024 | 1769 | |------------------|------:|------:|-------:|------:| -| PHP function | 490ms | 255ms | 235ms | 230ms | -| HTTP application | 520ms | 340ms | 325ms | 320ms | +| PHP function | 410ms | 215ms | 200ms | 195ms | +| HTTP application | 450ms | 300ms | 280ms | 275ms | | Laravel | | | 1210ms | | Total latency (measured from API Gateway or X-Ray): @@ -114,8 +114,8 @@ Total latency (measured from API Gateway or X-Ray): | Memory | 128 | 512 | 1024 | 1769 | |------------------|------:|------:|-------:|------:| | PHP function | 670ms | 470ms | 430ms | 430ms | -| HTTP application | 730ms | 600ms | 600ms | 600ms | -| Laravel | | | 1510ms | | +| HTTP application | 670ms | 550ms | 520ms | 530ms | +| Laravel | | | 1500ms | | Measuring cold starts in CloudWatch Logs Insights: From 75f7ba4d35d3f26e342a550db748519864d0d41d Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Tue, 27 May 2025 18:46:30 +0200 Subject: [PATCH 4/9] Update benchmarks --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d772702..b02b13c 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Number of samples: 900 | PHP function | 170ms | 32ms | 16ms | 16ms | | PHP function (BREF_LOOP_MAX) | | | 1ms | 1ms | | HTTP application | 2ms | 2ms | 2ms | 2ms | -| Laravel | | | 28ms | | +| Laravel | | | 10ms | | ### Bref 3.x ARM (PHP 8.3) @@ -27,9 +27,9 @@ Number of samples: 900 | PHP function | 160ms | 16ms | 15ms | 15ms | | PHP function (BREF_LOOP_MAX) | | | 1ms | 1ms | | HTTP application | 2ms | 2ms | 2ms | 2ms | -| Laravel | | | 44ms | | +| Laravel | | | 11ms | | -For comparison on a 512M Digital Ocean droplet we get 1ms for "HTTP application" and 6ms for Symfony. +These results are comparable to an HTTP application served using a classic server. ## CPU performance From e223648dbfd85d261197fe8374f11993835b2f81 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Mon, 25 Aug 2025 10:41:18 +0200 Subject: [PATCH 5/9] v3 AL2023 benchmarks --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b02b13c..167f523 100644 --- a/README.md +++ b/README.md @@ -15,19 +15,19 @@ Number of samples: 900 | Memory | 128 | 512 | 1024 | 1769 | |------------------------------|------:|-----:|-----:|-----:| -| PHP function | 170ms | 32ms | 16ms | 16ms | +| PHP function | 220ms | 43ms | 21ms | 19ms | | PHP function (BREF_LOOP_MAX) | | | 1ms | 1ms | | HTTP application | 2ms | 2ms | 2ms | 2ms | -| Laravel | | | 10ms | | +| Laravel | | | 9ms | | ### Bref 3.x ARM (PHP 8.3) | Memory | 128 | 512 | 1024 | 1769 | |------------------------------|------:|-----:|-----:|-----:| -| PHP function | 160ms | 16ms | 15ms | 15ms | +| PHP function | 170ms | 30ms | 19ms | 19ms | | PHP function (BREF_LOOP_MAX) | | | 1ms | 1ms | | HTTP application | 2ms | 2ms | 2ms | 2ms | -| Laravel | | | 11ms | | +| Laravel | | | 10ms | | These results are comparable to an HTTP application served using a classic server. @@ -87,9 +87,9 @@ Function duration: | Memory | 128 | 512 | 1024 | 1769 | |------------------|------:|------:|-------:|------:| -| PHP function | 480ms | 260ms | 230ms | 220ms | -| HTTP application | 480ms | 335ms | 305ms | 300ms | -| Laravel | | | 1250ms | | +| PHP function | 480ms | 240ms | 195ms | 190ms | +| HTTP application | 430ms | 280ms | 270ms | 270ms | +| Laravel | | | 1300ms | | Total latency (measured from API Gateway or X-Ray): @@ -105,9 +105,9 @@ Function duration: | Memory | 128 | 512 | 1024 | 1769 | |------------------|------:|------:|-------:|------:| -| PHP function | 410ms | 215ms | 200ms | 195ms | -| HTTP application | 450ms | 300ms | 280ms | 275ms | -| Laravel | | | 1210ms | | +| PHP function | 380ms | 210ms | 170ms | 165ms | +| HTTP application | 410ms | 270ms | 240ms | 240ms | +| Laravel | | | 1225ms | | Total latency (measured from API Gateway or X-Ray): From 186b916f082c67aba2c697a753caca8397c2271b Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Mon, 25 Aug 2025 13:29:07 +0200 Subject: [PATCH 6/9] v3 AL2023 benchmarks --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 167f523..50ae51f 100644 --- a/README.md +++ b/README.md @@ -69,17 +69,17 @@ Function duration: | Memory | 1024 | |------------------|------:| -| PHP function | 145ms | -| HTTP application | 180ms | -| Laravel | 960ms | +| PHP function | 160ms | +| HTTP application | 200ms | +| Laravel | 990ms | Total latency (measured from API Gateway or X-Ray): | Memory | 1024 | |------------------|-------:| | PHP function | | -| HTTP application | 340ms | -| Laravel | 1110ms | +| HTTP application | 360ms | +| Laravel | 1190ms | ### Bref 3.x (PHP 8.3) @@ -87,7 +87,7 @@ Function duration: | Memory | 128 | 512 | 1024 | 1769 | |------------------|------:|------:|-------:|------:| -| PHP function | 480ms | 240ms | 195ms | 190ms | +| PHP function | 470ms | 240ms | 195ms | 190ms | | HTTP application | 430ms | 280ms | 270ms | 270ms | | Laravel | | | 1300ms | | @@ -96,8 +96,8 @@ Total latency (measured from API Gateway or X-Ray): | Memory | 128 | 512 | 1024 | 1769 | |------------------|------:|------:|-------:|------:| | PHP function | 700ms | 430ms | 440ms | 410ms | -| HTTP application | 660ms | 525ms | 475ms | 535ms | -| Laravel | | | 1480ms | | +| HTTP application | 680ms | 650ms | 550ms | 590ms | +| Laravel | | | 1550ms | | ### Bref 3.x ARM (PHP 8.3) @@ -107,14 +107,14 @@ Function duration: |------------------|------:|------:|-------:|------:| | PHP function | 380ms | 210ms | 170ms | 165ms | | HTTP application | 410ms | 270ms | 240ms | 240ms | -| Laravel | | | 1225ms | | +| Laravel | | | 1550ms | | Total latency (measured from API Gateway or X-Ray): | Memory | 128 | 512 | 1024 | 1769 | |------------------|------:|------:|-------:|------:| | PHP function | 670ms | 470ms | 430ms | 430ms | -| HTTP application | 670ms | 550ms | 520ms | 530ms | +| HTTP application | 680ms | 550ms | 520ms | 560ms | | Laravel | | | 1500ms | | Measuring cold starts in CloudWatch Logs Insights: From 29024fdb44dbe0eefa78ae43804ca7deb96bda4c Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Mon, 25 Aug 2025 13:33:23 +0200 Subject: [PATCH 7/9] v3 AL2023 benchmarks --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 50ae51f..5dc41c0 100644 --- a/README.md +++ b/README.md @@ -56,10 +56,10 @@ Comparison (1024M): | | x86 container | x86 layer | ARM layer | |--------------------|--------------:|----------:|----------:| -| HTTP (duration) | 190ms | 300ms | 280ms | -| HTTP (latency) | 370ms | 520ms | 520ms | -| Laravel (duration) | 850ms | 1250ms | 1210ms | -| Function | 175ms | 230ms | 200ms | +| HTTP (duration) | 200ms | 270ms | 240ms | +| HTTP (latency) | 360ms | 520ms | 520ms | +| Laravel (duration) | 990ms | 1280ms | 1230ms | +| Function | 160ms | 195ms | 170ms | ### Bref 3.x containers (PHP 8.3) @@ -89,7 +89,7 @@ Function duration: |------------------|------:|------:|-------:|------:| | PHP function | 470ms | 240ms | 195ms | 190ms | | HTTP application | 430ms | 280ms | 270ms | 270ms | -| Laravel | | | 1300ms | | +| Laravel | | | 1280ms | | Total latency (measured from API Gateway or X-Ray): @@ -107,7 +107,7 @@ Function duration: |------------------|------:|------:|-------:|------:| | PHP function | 380ms | 210ms | 170ms | 165ms | | HTTP application | 410ms | 270ms | 240ms | 240ms | -| Laravel | | | 1550ms | | +| Laravel | | | 1230ms | | Total latency (measured from API Gateway or X-Ray): From ba173af6f62b6dba338d6547509c5395e6672aa3 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Mon, 1 Sep 2025 11:38:31 +0200 Subject: [PATCH 8/9] Update --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5dc41c0..98175a4 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Comparison (1024M): |--------------------|--------------:|----------:|----------:| | HTTP (duration) | 200ms | 270ms | 240ms | | HTTP (latency) | 360ms | 520ms | 520ms | -| Laravel (duration) | 990ms | 1280ms | 1230ms | +| Laravel (duration) | 800ms | 1020ms | 1020ms | | Function | 160ms | 195ms | 170ms | ### Bref 3.x containers (PHP 8.3) @@ -71,7 +71,7 @@ Function duration: |------------------|------:| | PHP function | 160ms | | HTTP application | 200ms | -| Laravel | 990ms | +| Laravel | 800ms | Total latency (measured from API Gateway or X-Ray): @@ -89,7 +89,7 @@ Function duration: |------------------|------:|------:|-------:|------:| | PHP function | 470ms | 240ms | 195ms | 190ms | | HTTP application | 430ms | 280ms | 270ms | 270ms | -| Laravel | | | 1280ms | | +| Laravel | | | 1020ms | | Total latency (measured from API Gateway or X-Ray): @@ -107,7 +107,7 @@ Function duration: |------------------|------:|------:|-------:|------:| | PHP function | 380ms | 210ms | 170ms | 165ms | | HTTP application | 410ms | 270ms | 240ms | 240ms | -| Laravel | | | 1230ms | | +| Laravel | | | 1020ms | | Total latency (measured from API Gateway or X-Ray): From 635aaa9802947fddcfb9036f524b708ffc83c7b0 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Thu, 4 Sep 2025 19:47:39 +0200 Subject: [PATCH 9/9] Update query --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 98175a4..466edbe 100644 --- a/README.md +++ b/README.md @@ -120,14 +120,14 @@ Total latency (measured from API Gateway or X-Ray): Measuring cold starts in CloudWatch Logs Insights: ``` -filter @type = “REPORT” and @initDuration > 0 +filter @type = “REPORT” | stats count(@type) as count, min(@billedDuration) as min, avg(@billedDuration) as avg, pct(@billedDuration, 50) as p50, max(@billedDuration) as max -by @log +by @log, (@initDuration > 0) as coldstart | sort @log ```