From 0a5567d6f8a5277f5f0445072d835393060582d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 1 Aug 2025 11:27:12 +0200 Subject: [PATCH 1/2] Add valgrind instruction count meansurement support to manual benchmark flow --- .github/workflows/real-time-benchmark.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/real-time-benchmark.yml b/.github/workflows/real-time-benchmark.yml index 7c28272c6c131..50c044d7bfd4c 100644 --- a/.github/workflows/real-time-benchmark.yml +++ b/.github/workflows/real-time-benchmark.yml @@ -11,6 +11,15 @@ on: jit: description: 'Whether JIT is benchmarked' required: false + default: "0" + type: choice + options: + - "0" + - "1" + instruction_count: + description: 'Whether Valgrind instruction count should be measured' + required: true + default: "0" type: choice options: - "0" @@ -50,6 +59,7 @@ jobs: OPCACHE: ${{ inputs.opcache || '1' }} BASELINE_OPCACHE: ${{ inputs.baseline_opcache || '2' }} JIT: ${{ inputs.jit || '1' }} + INSTRUCTION_COUNT: ${{ inputs.instruction_count || '0' }} YEAR: "" steps: - name: Setup benchmark environment @@ -130,6 +140,7 @@ jobs: cp ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini.dist ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini ESCAPED_DOCKER_REGISTRY=$(printf '%s\n' "${{ secrets.PHP_VERSION_BENCHMARK_DOCKER_REGISTRY }}" | sed -e 's/[\/&]/\\&/g') sed -i "s/INFRA_DOCKER_REGISTRY=public.ecr.aws\/abcdefgh/INFRA_DOCKER_REGISTRY=$ESCAPED_DOCKER_REGISTRY/g" ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini + sed -i "s/INFRA_MEASURE_INSTRUCTION_COUNT=0/INFRA_MEASURE_INSTRUCTION_COUNT=${{ env.INSTRUCTION_COUNT }}/g" ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini cp ./php-version-benchmarks/build/infrastructure/config/aws.tfvars.dist ./php-version-benchmarks/build/infrastructure/config/aws.tfvars sed -i 's/access_key = ""/access_key = "${{ secrets.PHP_VERSION_BENCHMARK_AWS_ACCESS_KEY }}"/g' ./php-version-benchmarks/build/infrastructure/config/aws.tfvars sed -i 's/secret_key = ""/secret_key = "${{ secrets.PHP_VERSION_BENCHMARK_AWS_SECRET_KEY }}"/g' ./php-version-benchmarks/build/infrastructure/config/aws.tfvars From 28d2ae6ab0ba06e482936c0ba0b374c20ddac904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 1 Aug 2025 11:29:32 +0200 Subject: [PATCH 2/2] Do not allow concurrent runs of the real time benchmark --- .github/workflows/real-time-benchmark.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/real-time-benchmark.yml b/.github/workflows/real-time-benchmark.yml index 50c044d7bfd4c..226f83fde5c03 100644 --- a/.github/workflows/real-time-benchmark.yml +++ b/.github/workflows/real-time-benchmark.yml @@ -45,6 +45,9 @@ on: permissions: contents: read pull-requests: write +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: false jobs: REAL_TIME_BENCHMARK: name: REAL_TIME_BENCHMARK