Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/list-scenarios/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type matrixEntry struct {

func run(pattern, scenariosDir string, chunkSize int) ([]matrixEntry, error) {
// Anchor the user pattern so e.g. "python" doesn't accidentally match
// "python_basic_idle_3.10". The non-capturing group preserves precedence of
// "python_basic_idle_3.12". The non-capturing group preserves precedence of
// any alternation inside the user pattern.
re, err := regexp.Compile(`^(?:` + pattern + `)$`)
if err != nil {
Expand Down
20 changes: 10 additions & 10 deletions cmd/list-scenarios/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ func mkScenarios(t *testing.T, names []string) string {
func TestRun_ChunksAlphabetically(t *testing.T) {
root := mkScenarios(t, []string{
// Intentionally unsorted to verify run() sorts before chunking.
"python_basic_idle_3.11",
"python_asyncio_3.11",
"python_basic_idle_3.10",
"python_basic_idle_3.12",
"python_asyncio_3.12",
"python_basic_memory_3.12",
"python_cpu",
"python_deep_stack_3.11",
"python_deep_stack_3.12",
"node_heap", // must be filtered out by the pattern
})

Expand All @@ -45,13 +45,13 @@ func TestRun_ChunksAlphabetically(t *testing.T) {
want := []matrixEntry{
{
Shard: "1/2",
Regex: "(^|/)(python_asyncio_3.11|python_basic_idle_3.10|python_basic_idle_3.11)$",
Names: "python_asyncio_3.11, python_basic_idle_3.10, python_basic_idle_3.11",
Regex: "(^|/)(python_asyncio_3.12|python_basic_idle_3.12|python_basic_memory_3.12)$",
Names: "python_asyncio_3.12, python_basic_idle_3.12, python_basic_memory_3.12",
},
{
Shard: "2/2",
Regex: "(^|/)(python_cpu|python_deep_stack_3.11)$",
Names: "python_cpu, python_deep_stack_3.11",
Regex: "(^|/)(python_cpu|python_deep_stack_3.12)$",
Names: "python_cpu, python_deep_stack_3.12",
},
}
if !reflect.DeepEqual(got, want) {
Expand Down Expand Up @@ -138,7 +138,7 @@ func TestRun_RegexMatchesIntendedDirAndOnlyThat(t *testing.T) {
root := mkScenarios(t, []string{
"python_cpu",
"python_cpu_sleep_sync_3.12",
"python_basic_idle_3.11",
"python_basic_idle_3.12",
})
got, err := run("python.*", root, 3)
if err != nil {
Expand All @@ -155,7 +155,7 @@ func TestRun_RegexMatchesIntendedDirAndOnlyThat(t *testing.T) {
}{
{"scenarios/python_cpu", true},
{"scenarios/python_cpu_sleep_sync_3.12", true},
{"scenarios/python_basic_idle_3.11", true},
{"scenarios/python_basic_idle_3.12", true},
// substring within another name must NOT match
{"scenarios/python_cpu_something_else", false},
// completely unrelated
Expand Down
2 changes: 1 addition & 1 deletion flakiness_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
//
// Usage:
//
// TEST_SCENARIOS="python_basic_idle_3.11" FLAKINESS_RUNS=10 go test -v -timeout 30m -run TestFlakiness
// TEST_SCENARIOS="python_basic_idle_3.12" FLAKINESS_RUNS=10 go test -v -timeout 30m -run TestFlakiness
//
// Environment variables:
// - TEST_SCENARIOS: regex matching the scenario to test (required, should match exactly one)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG BASE_IMAGE="prof-python-3.11"
ARG BASE_IMAGE="prof-python-3.12"
FROM $BASE_IMAGE

COPY ./scenarios/python_async_on_and_off_cpu_3.11/main.py \
./scenarios/python_async_on_and_off_cpu_3.11/requirements.txt \
COPY ./scenarios/python_async_on_and_off_cpu_3.12/main.py \
./scenarios/python_async_on_and_off_cpu_3.12/requirements.txt \
/app/
RUN chmod 644 /app/*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# python_async_on_and_off_cpu_3.11
# python_async_on_and_off_cpu_3.12

_**Note** This workload currently does not behave as expected._
_We should only see a minority of CPU time attributed to `off_cpu_task`,_
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ARG BASE_IMAGE="prof-python-3.11"
ARG BASE_IMAGE="prof-python-3.12"
FROM $BASE_IMAGE

RUN pip install ddtrace

# Copy the Python target into the container
COPY ./scenarios/python_asyncio_3.11/main.py /app/
COPY ./scenarios/python_asyncio_3.12/main.py /app/
RUN chmod 644 /app/*

# Set the working directory to the location of the program
Expand Down
2 changes: 1 addition & 1 deletion scenarios/python_basic_gevent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE="prof-python-3.10"
ARG BASE_IMAGE="prof-python-3.12"
FROM $BASE_IMAGE

ENV EXECUTION_TIME_SEC="2"
Expand Down
2 changes: 1 addition & 1 deletion scenarios/python_basic_gevent/expected_profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"pprof-regex": "",
"stack-content": [
{
"regular_expression": "^run$",
"regular_expression": "^Hub\\.run;loop\\.run$",
"value": 2000000000,
"error_margin": 25,
"labels": [
Expand Down
21 changes: 0 additions & 21 deletions scenarios/python_basic_idle_3.10/Dockerfile

This file was deleted.

13 changes: 0 additions & 13 deletions scenarios/python_basic_idle_3.10/README.md

This file was deleted.

41 changes: 0 additions & 41 deletions scenarios/python_basic_idle_3.10/expected_profile.json

This file was deleted.

27 changes: 0 additions & 27 deletions scenarios/python_basic_idle_3.11/main.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG BASE_IMAGE="prof-python-3.11"
ARG BASE_IMAGE="prof-python-3.12"
FROM $BASE_IMAGE

# Copy the Python target into the container
COPY ./scenarios/python_basic_idle_3.11/main.py \
./scenarios/python_basic_idle_3.11/requirements.txt \
COPY ./scenarios/python_basic_idle_3.12/main.py \
./scenarios/python_basic_idle_3.12/requirements.txt \
/app/
RUN chmod 644 /app/*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"test_name": "python_basic_idle_3.11",
"test_name": "python_basic_idle_3.12",
"pprof-regex": "",
"stacks": [
{
"profile-type": "wall-time",
"pprof-regex": "",
"stack-content": [
{
"regular_expression": "^\u003cmodule\u003e;target$",
"regular_expression": "^\u003cmodule\u003e;target;sleep$",
"value": 1000000000,
"error_margin": 15,
"labels": [
Expand All @@ -21,7 +21,7 @@
]
},
{
"regular_expression": ".*run;target$",
"regular_expression": ".*run;target;sleep$",
"value": 500000000,
"error_margin": 15,
"labels": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ARG BASE_IMAGE="prof-python-3.11"
ARG BASE_IMAGE="prof-python-3.12"
FROM $BASE_IMAGE

# Copy the Python target into the container
COPY ./scenarios/python_basic_memory_3.11/requirements.txt /app/requirements.txt
COPY ./scenarios/python_basic_memory_3.12/requirements.txt /app/requirements.txt
RUN chmod 644 /app/*

RUN pip install -r /app/requirements.txt

COPY ./scenarios/python_basic_memory_3.11/main.py /app/main.py
COPY ./scenarios/python_basic_memory_3.12/main.py /app/main.py

# Set the working directory to the location of the program
WORKDIR /app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG BASE_IMAGE="prof-python-3.11"
ARG BASE_IMAGE="prof-python-3.12"
FROM $BASE_IMAGE

COPY ./scenarios/python_concurrent_cpu_wall_3.11/main.py \
./scenarios/python_concurrent_cpu_wall_3.11/requirements.txt \
COPY ./scenarios/python_concurrent_cpu_wall_3.12/main.py \
./scenarios/python_concurrent_cpu_wall_3.12/requirements.txt \
/app/
RUN chmod 644 /app/*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# python_concurrent_cpu_wall_3.11
# python_concurrent_cpu_wall_3.12

Verifies per-thread CPU-vs-wall attribution for threads that are on-CPU and
off-CPU *at the same time*. Unlike `python_spiky_3.11` (single thread that
off-CPU *at the same time*. Unlike `python_spiky_3.12` (single thread that
alternates between bursts and sleeps sequentially), this runs two threads
concurrently for the full duration:

Expand Down
2 changes: 1 addition & 1 deletion scenarios/python_cpu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE="prof-python-3.11"
ARG BASE_IMAGE="prof-python-3.12"
FROM $BASE_IMAGE

# Set the working directory in the container
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG BASE_IMAGE="prof-python-3.11"
ARG BASE_IMAGE="prof-python-3.12"
FROM $BASE_IMAGE

COPY ./scenarios/python_deep_stack_3.11/main.py \
./scenarios/python_deep_stack_3.11/requirements.txt \
COPY ./scenarios/python_deep_stack_3.12/main.py \
./scenarios/python_deep_stack_3.12/requirements.txt \
/app/
RUN chmod 644 /app/*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# python_deep_stack_3.11
# python_deep_stack_3.12

Verifies that the stack unwinder correctly captures deep call stacks. Every
other scenario has shallow stacks (fewer than ~10 frames), so the unwinder's
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
ARG BASE_IMAGE="prof-python-3.11"
ARG BASE_IMAGE="prof-python-3.12"
FROM $BASE_IMAGE

# Copy the Python target into the container
COPY ./scenarios/python_fastapi_3.11/requirements.txt /app/
COPY ./scenarios/python_fastapi_3.12/requirements.txt /app/
RUN chmod 644 /app/*

# Set the working directory to the location of the program
WORKDIR /app

RUN pip install -r requirements.txt

COPY ./scenarios/python_fastapi_3.11/main.py /app/
COPY ./scenarios/python_fastapi_3.12/main.py /app/

ENV DD_PROFILING_ENABLED=true
ENV DD_TRACE_ENABLED=false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"test_name": "python_fastapi_3.11",
"test_name": "python_fastapi_3.12",
"scale_by_duration": false,
"pprof-regex": "",
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
ARG BASE_IMAGE="prof-python-3.11"
ARG BASE_IMAGE="prof-python-3.12"
FROM $BASE_IMAGE

# Copy the Python target into the container
COPY ./scenarios/python_flask_3.11/requirements.txt /app/
COPY ./scenarios/python_flask_3.12/requirements.txt /app/
RUN chmod 644 /app/*

# Set the working directory to the location of the program
WORKDIR /app

RUN pip install -r requirements.txt

COPY ./scenarios/python_flask_3.11/app.py /app/
COPY ./scenarios/python_flask_3.12/app.py /app/

ENV ECHION_USE_FAST_COPY_MEMORY=1
ENV _DD_PROFILING_STACK_ADAPTIVE_SAMPLING_ENABLED=0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"test_name": "python_flask_3.11",
"test_name": "python_flask_3.12",
"scale_by_duration": false,
"pprof-regex": "",
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG BASE_IMAGE="prof-python-3.11"
ARG BASE_IMAGE="prof-python-3.12"
FROM $BASE_IMAGE

COPY ./scenarios/python_gil_contention_3.11/main.py \
./scenarios/python_gil_contention_3.11/requirements.txt \
COPY ./scenarios/python_gil_contention_3.12/main.py \
./scenarios/python_gil_contention_3.12/requirements.txt \
/app/
RUN chmod 644 /app/*

Expand Down
Loading
Loading