Skip to content

Commit

Permalink
Consider a profiler and tracer scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
PROFeNoM committed Dec 29, 2023
1 parent fb7b3d0 commit 89adde1
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 24 deletions.
40 changes: 31 additions & 9 deletions .gitlab/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,8 @@ variables:
# The Dockerfile to this image is located at:
# https://github.com/DataDog/benchmarking-platform/tree/dd-trace-php

microbenchmarks:
.microbenchmarks:
stage: benchmarks
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"
changes:
paths:
- profiling/**/*
compare_to: "master"
when: on_success
- when: manual
tags: ["runner:apm-k8s-tweaked-metal"]
needs: []
image:
Expand Down Expand Up @@ -41,6 +33,36 @@ microbenchmarks:
KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: dd-trace-php
FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: "true"

benchmarks-profiler:
extends: .microbenchmarks
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"
changes:
paths:
- profiling/**/*
compare_to: "master"
when: on_success
- when: manual
variables:
SCENARIO: "profiler"

benchmarks-tracer:
extends: .microbenchmarks
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"
changes:
paths:
- bridge/*
- ext/**/*
- src/**/*
- zend_abstract_interface/**/*
compare_to: "master"
when: on_success
- when: manual
variables:
SCENARIO: "tracer"


download_circle_ci_release:
stage: benchmarks
rules:
Expand Down
34 changes: 19 additions & 15 deletions benchmark/runall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,27 @@

set -exu

# Run Profiling Benchmarks
cd ../profiling/
if [ "$SCENARIO" = "profiler" ]; then
# Run Profiling Benchmarks
cd ../profiling/

cargo build --release --features trigger_time_sample
cargo build --release --features trigger_time_sample

sirun benches/memory.json > "$ARTIFACTS_DIR/sirun_mem.ndjson"
sirun benches/memory.json > "$ARTIFACTS_DIR/sirun_mem.ndjson"

sed -i -e "s/crate-type.*$/crate-type = [\"rlib\"]/g" Cargo.toml
sed -i -e "s/crate-type.*$/crate-type = [\"rlib\"]/g" Cargo.toml

cargo bench --features stack_walking_tests -- --noplot
cargo bench --features stack_walking_tests -- --noplot
elif [ "$SCENARIO" = "tracer" ]; then
# Run Trace Benchmarks
cd ..
make composer_tests_update

# Run Trace Benchmarks
cd ..
make composer_tests_update
## Non-OPCache Benchmarks
make benchmarks
cp tests/Benchmarks/reports/tracer-bench-results.csv "$ARTIFACTS_DIR"
## OPCache Benchmarks
make benchmarks_opcache
cp tests/Benchmarks/reports/tracer-bench-results-opcache.csv "$ARTIFACTS_DIR"
## Non-OPCache Benchmarks
make benchmarks
cp tests/Benchmarks/reports/tracer-bench-results.csv "$ARTIFACTS_DIR"

## OPCache Benchmarks
make benchmarks_opcache
cp tests/Benchmarks/reports/tracer-bench-results-opcache.csv "$ARTIFACTS_DIR"
fi

0 comments on commit 89adde1

Please sign in to comment.