diff --git a/cmd/list-scenarios/main.go b/cmd/list-scenarios/main.go index a0e5f33..7844167 100644 --- a/cmd/list-scenarios/main.go +++ b/cmd/list-scenarios/main.go @@ -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 { diff --git a/cmd/list-scenarios/main_test.go b/cmd/list-scenarios/main_test.go index ddbe278..47033be 100644 --- a/cmd/list-scenarios/main_test.go +++ b/cmd/list-scenarios/main_test.go @@ -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 }) @@ -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) { @@ -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 { @@ -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 diff --git a/flakiness_test.go b/flakiness_test.go index 8af8583..6641ee5 100644 --- a/flakiness_test.go +++ b/flakiness_test.go @@ -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) diff --git a/scenarios/python_async_on_and_off_cpu_3.11/Dockerfile b/scenarios/python_async_on_and_off_cpu_3.12/Dockerfile similarity index 85% rename from scenarios/python_async_on_and_off_cpu_3.11/Dockerfile rename to scenarios/python_async_on_and_off_cpu_3.12/Dockerfile index ecce4be..3442df1 100644 --- a/scenarios/python_async_on_and_off_cpu_3.11/Dockerfile +++ b/scenarios/python_async_on_and_off_cpu_3.12/Dockerfile @@ -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/* diff --git a/scenarios/python_async_on_and_off_cpu_3.11/README.md b/scenarios/python_async_on_and_off_cpu_3.12/README.md similarity index 96% rename from scenarios/python_async_on_and_off_cpu_3.11/README.md rename to scenarios/python_async_on_and_off_cpu_3.12/README.md index 9d965d7..b4e8241 100644 --- a/scenarios/python_async_on_and_off_cpu_3.11/README.md +++ b/scenarios/python_async_on_and_off_cpu_3.12/README.md @@ -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`,_ diff --git a/scenarios/python_async_on_and_off_cpu_3.11/expected_profile.json b/scenarios/python_async_on_and_off_cpu_3.12/expected_profile.json similarity index 100% rename from scenarios/python_async_on_and_off_cpu_3.11/expected_profile.json rename to scenarios/python_async_on_and_off_cpu_3.12/expected_profile.json diff --git a/scenarios/python_async_on_and_off_cpu_3.11/main.py b/scenarios/python_async_on_and_off_cpu_3.12/main.py similarity index 100% rename from scenarios/python_async_on_and_off_cpu_3.11/main.py rename to scenarios/python_async_on_and_off_cpu_3.12/main.py diff --git a/scenarios/python_async_on_and_off_cpu_3.11/requirements.txt b/scenarios/python_async_on_and_off_cpu_3.12/requirements.txt similarity index 100% rename from scenarios/python_async_on_and_off_cpu_3.11/requirements.txt rename to scenarios/python_async_on_and_off_cpu_3.12/requirements.txt diff --git a/scenarios/python_asyncio_3.11/Dockerfile b/scenarios/python_asyncio_3.12/Dockerfile similarity index 81% rename from scenarios/python_asyncio_3.11/Dockerfile rename to scenarios/python_asyncio_3.12/Dockerfile index eeb6f45..2c24ade 100644 --- a/scenarios/python_asyncio_3.11/Dockerfile +++ b/scenarios/python_asyncio_3.12/Dockerfile @@ -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 diff --git a/scenarios/python_asyncio_3.11/expected_profile.json b/scenarios/python_asyncio_3.12/expected_profile.json similarity index 100% rename from scenarios/python_asyncio_3.11/expected_profile.json rename to scenarios/python_asyncio_3.12/expected_profile.json diff --git a/scenarios/python_asyncio_3.11/main.py b/scenarios/python_asyncio_3.12/main.py similarity index 100% rename from scenarios/python_asyncio_3.11/main.py rename to scenarios/python_asyncio_3.12/main.py diff --git a/scenarios/python_asyncio_3.11/requirements.txt b/scenarios/python_asyncio_3.12/requirements.txt similarity index 100% rename from scenarios/python_asyncio_3.11/requirements.txt rename to scenarios/python_asyncio_3.12/requirements.txt diff --git a/scenarios/python_basic_gevent/Dockerfile b/scenarios/python_basic_gevent/Dockerfile index 636c64e..45484b8 100644 --- a/scenarios/python_basic_gevent/Dockerfile +++ b/scenarios/python_basic_gevent/Dockerfile @@ -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" diff --git a/scenarios/python_basic_gevent/expected_profile.json b/scenarios/python_basic_gevent/expected_profile.json index 5822916..092d7e5 100644 --- a/scenarios/python_basic_gevent/expected_profile.json +++ b/scenarios/python_basic_gevent/expected_profile.json @@ -8,7 +8,7 @@ "pprof-regex": "", "stack-content": [ { - "regular_expression": "^run$", + "regular_expression": "^Hub\\.run;loop\\.run$", "value": 2000000000, "error_margin": 25, "labels": [ diff --git a/scenarios/python_basic_idle_3.10/Dockerfile b/scenarios/python_basic_idle_3.10/Dockerfile deleted file mode 100644 index e15d622..0000000 --- a/scenarios/python_basic_idle_3.10/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -ARG BASE_IMAGE="prof-python-3.11" -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 \ - /app/ -RUN chmod 644 /app/* - - -# Set the working directory to the location of the program -WORKDIR /app - -RUN pip install -r requirements.txt - -ENV EXECUTION_TIME_SEC="2" -ENV _DD_PROFILING_STACK_ADAPTIVE_SAMPLING_ENABLED=0 - -# Run the program when the container starts -CMD python main.py -# CMD ddprof -l notice --preset cpu_live_heap python main.py diff --git a/scenarios/python_basic_idle_3.10/README.md b/scenarios/python_basic_idle_3.10/README.md deleted file mode 100644 index 633014b..0000000 --- a/scenarios/python_basic_idle_3.10/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Python Basic 3.10 Profiling Test - -This test validates that the Datadog Python profiler correctly instruments multi-threaded applications. - -## Test Application -- Creates two threads that each run `target()` function -- MainThread: executes `target(2)` directly -- Worker Thread: spawns `Thread-1 (target)` that executes `target(2 / 2)` - -## Expected Profile -The profiler should capture wall-time for both threads: -- `^;target$` from MainThread: ~2 seconds -- `^_bootstrap;thread_bootstrap_inner;_bootstrap_inner;run;target$` from Thread-1: ~1 second diff --git a/scenarios/python_basic_idle_3.10/expected_profile.json b/scenarios/python_basic_idle_3.10/expected_profile.json deleted file mode 100644 index ade188e..0000000 --- a/scenarios/python_basic_idle_3.10/expected_profile.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "test_name": "python_basic_idle_3.10", - "pprof-regex": "", - "stacks": [ - { - "profile-type": "wall-time", - "pprof-regex": "", - "stack-content": [ - { - "regular_expression": "^\u003cmodule\u003e;target$", - "value": 2000000000, - "error_margin": 20, - "labels": [ - { - "key": "thread name", - "values": [ - "MainThread" - ], - "values_regex": "" - } - ] - }, - { - "regular_expression": ".*run;target$", - "value": 1000000000, - "error_margin": 25, - "labels": [ - { - "key": "thread name", - "values": [ - "Thread-1 (target)" - ], - "values_regex": "" - } - ] - } - ] - } - ], - "scale_by_duration": false -} diff --git a/scenarios/python_basic_idle_3.11/main.py b/scenarios/python_basic_idle_3.11/main.py deleted file mode 100644 index 7ea5374..0000000 --- a/scenarios/python_basic_idle_3.11/main.py +++ /dev/null @@ -1,27 +0,0 @@ -import os -from threading import Thread -from time import sleep - -from ddtrace.profiling import Profiler - - -def target(n: int) -> None: - sleep(n) - - -if __name__ == "__main__": - # Simple application that creates two threads with different durations: - # - MainThread runs target() for 2 seconds - # - Worker Thread-1 runs target() for 1 second - # The profiler should capture both threads with their respective durations. - prof = Profiler() - prof.start() # Should be as early as possible, eg before other imports, to ensure everything is profiled - - EXECUTION_TIME_SEC = int(os.environ.get("EXECUTION_TIME_SEC", "2")) - - t = Thread(target=target, args=(EXECUTION_TIME_SEC / 2,)) - t.start() - - target(EXECUTION_TIME_SEC) - - t.join() diff --git a/scenarios/python_basic_idle_3.11/Dockerfile b/scenarios/python_basic_idle_3.12/Dockerfile similarity index 74% rename from scenarios/python_basic_idle_3.11/Dockerfile rename to scenarios/python_basic_idle_3.12/Dockerfile index e15d622..fb77f1c 100644 --- a/scenarios/python_basic_idle_3.11/Dockerfile +++ b/scenarios/python_basic_idle_3.12/Dockerfile @@ -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/* diff --git a/scenarios/python_basic_idle_3.11/expected_profile.json b/scenarios/python_basic_idle_3.12/expected_profile.json similarity index 82% rename from scenarios/python_basic_idle_3.11/expected_profile.json rename to scenarios/python_basic_idle_3.12/expected_profile.json index b23fe6a..f549dc3 100644 --- a/scenarios/python_basic_idle_3.11/expected_profile.json +++ b/scenarios/python_basic_idle_3.12/expected_profile.json @@ -1,5 +1,5 @@ { - "test_name": "python_basic_idle_3.11", + "test_name": "python_basic_idle_3.12", "pprof-regex": "", "stacks": [ { @@ -7,7 +7,7 @@ "pprof-regex": "", "stack-content": [ { - "regular_expression": "^\u003cmodule\u003e;target$", + "regular_expression": "^\u003cmodule\u003e;target;sleep$", "value": 1000000000, "error_margin": 15, "labels": [ @@ -21,7 +21,7 @@ ] }, { - "regular_expression": ".*run;target$", + "regular_expression": ".*run;target;sleep$", "value": 500000000, "error_margin": 15, "labels": [ diff --git a/scenarios/python_basic_idle_3.10/main.py b/scenarios/python_basic_idle_3.12/main.py similarity index 100% rename from scenarios/python_basic_idle_3.10/main.py rename to scenarios/python_basic_idle_3.12/main.py diff --git a/scenarios/python_basic_idle_3.10/requirements.txt b/scenarios/python_basic_idle_3.12/requirements.txt similarity index 100% rename from scenarios/python_basic_idle_3.10/requirements.txt rename to scenarios/python_basic_idle_3.12/requirements.txt diff --git a/scenarios/python_basic_memory_3.11/Dockerfile b/scenarios/python_basic_memory_3.12/Dockerfile similarity index 69% rename from scenarios/python_basic_memory_3.11/Dockerfile rename to scenarios/python_basic_memory_3.12/Dockerfile index 3f2e60b..20f663f 100644 --- a/scenarios/python_basic_memory_3.11/Dockerfile +++ b/scenarios/python_basic_memory_3.12/Dockerfile @@ -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 diff --git a/scenarios/python_basic_memory_3.11/README.md b/scenarios/python_basic_memory_3.12/README.md similarity index 100% rename from scenarios/python_basic_memory_3.11/README.md rename to scenarios/python_basic_memory_3.12/README.md diff --git a/scenarios/python_basic_memory_3.11/expected_profile.json b/scenarios/python_basic_memory_3.12/expected_profile.json similarity index 100% rename from scenarios/python_basic_memory_3.11/expected_profile.json rename to scenarios/python_basic_memory_3.12/expected_profile.json diff --git a/scenarios/python_basic_memory_3.11/main.py b/scenarios/python_basic_memory_3.12/main.py similarity index 100% rename from scenarios/python_basic_memory_3.11/main.py rename to scenarios/python_basic_memory_3.12/main.py diff --git a/scenarios/python_basic_memory_3.11/requirements.txt b/scenarios/python_basic_memory_3.12/requirements.txt similarity index 100% rename from scenarios/python_basic_memory_3.11/requirements.txt rename to scenarios/python_basic_memory_3.12/requirements.txt diff --git a/scenarios/python_concurrent_cpu_wall_3.11/Dockerfile b/scenarios/python_concurrent_cpu_wall_3.12/Dockerfile similarity index 54% rename from scenarios/python_concurrent_cpu_wall_3.11/Dockerfile rename to scenarios/python_concurrent_cpu_wall_3.12/Dockerfile index 807fc97..8d57b61 100644 --- a/scenarios/python_concurrent_cpu_wall_3.11/Dockerfile +++ b/scenarios/python_concurrent_cpu_wall_3.12/Dockerfile @@ -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/* diff --git a/scenarios/python_concurrent_cpu_wall_3.11/README.md b/scenarios/python_concurrent_cpu_wall_3.12/README.md similarity index 90% rename from scenarios/python_concurrent_cpu_wall_3.11/README.md rename to scenarios/python_concurrent_cpu_wall_3.12/README.md index 2cf8d53..1481c78 100644 --- a/scenarios/python_concurrent_cpu_wall_3.11/README.md +++ b/scenarios/python_concurrent_cpu_wall_3.12/README.md @@ -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: diff --git a/scenarios/python_concurrent_cpu_wall_3.11/expected_profile.json b/scenarios/python_concurrent_cpu_wall_3.12/expected_profile.json similarity index 100% rename from scenarios/python_concurrent_cpu_wall_3.11/expected_profile.json rename to scenarios/python_concurrent_cpu_wall_3.12/expected_profile.json diff --git a/scenarios/python_concurrent_cpu_wall_3.11/main.py b/scenarios/python_concurrent_cpu_wall_3.12/main.py similarity index 100% rename from scenarios/python_concurrent_cpu_wall_3.11/main.py rename to scenarios/python_concurrent_cpu_wall_3.12/main.py diff --git a/scenarios/python_basic_idle_3.11/requirements.txt b/scenarios/python_concurrent_cpu_wall_3.12/requirements.txt similarity index 100% rename from scenarios/python_basic_idle_3.11/requirements.txt rename to scenarios/python_concurrent_cpu_wall_3.12/requirements.txt diff --git a/scenarios/python_cpu/Dockerfile b/scenarios/python_cpu/Dockerfile index 23dd9bc..1e33e7c 100644 --- a/scenarios/python_cpu/Dockerfile +++ b/scenarios/python_cpu/Dockerfile @@ -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 diff --git a/scenarios/python_deep_stack_3.11/Dockerfile b/scenarios/python_deep_stack_3.12/Dockerfile similarity index 56% rename from scenarios/python_deep_stack_3.11/Dockerfile rename to scenarios/python_deep_stack_3.12/Dockerfile index 453137b..9140c84 100644 --- a/scenarios/python_deep_stack_3.11/Dockerfile +++ b/scenarios/python_deep_stack_3.12/Dockerfile @@ -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/* diff --git a/scenarios/python_deep_stack_3.11/README.md b/scenarios/python_deep_stack_3.12/README.md similarity index 97% rename from scenarios/python_deep_stack_3.11/README.md rename to scenarios/python_deep_stack_3.12/README.md index b876caf..5305e7f 100644 --- a/scenarios/python_deep_stack_3.11/README.md +++ b/scenarios/python_deep_stack_3.12/README.md @@ -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 diff --git a/scenarios/python_deep_stack_3.11/expected_profile.json b/scenarios/python_deep_stack_3.12/expected_profile.json similarity index 100% rename from scenarios/python_deep_stack_3.11/expected_profile.json rename to scenarios/python_deep_stack_3.12/expected_profile.json diff --git a/scenarios/python_deep_stack_3.11/main.py b/scenarios/python_deep_stack_3.12/main.py similarity index 100% rename from scenarios/python_deep_stack_3.11/main.py rename to scenarios/python_deep_stack_3.12/main.py diff --git a/scenarios/python_concurrent_cpu_wall_3.11/requirements.txt b/scenarios/python_deep_stack_3.12/requirements.txt similarity index 100% rename from scenarios/python_concurrent_cpu_wall_3.11/requirements.txt rename to scenarios/python_deep_stack_3.12/requirements.txt diff --git a/scenarios/python_fastapi_3.11/Dockerfile b/scenarios/python_fastapi_3.12/Dockerfile similarity index 76% rename from scenarios/python_fastapi_3.11/Dockerfile rename to scenarios/python_fastapi_3.12/Dockerfile index 9fd9971..99a5d5a 100644 --- a/scenarios/python_fastapi_3.11/Dockerfile +++ b/scenarios/python_fastapi_3.12/Dockerfile @@ -1,8 +1,8 @@ -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 @@ -10,7 +10,7 @@ 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 diff --git a/scenarios/python_fastapi_3.11/README.md b/scenarios/python_fastapi_3.12/README.md similarity index 100% rename from scenarios/python_fastapi_3.11/README.md rename to scenarios/python_fastapi_3.12/README.md diff --git a/scenarios/python_fastapi_3.11/expected_profile.json b/scenarios/python_fastapi_3.12/expected_profile.json similarity index 98% rename from scenarios/python_fastapi_3.11/expected_profile.json rename to scenarios/python_fastapi_3.12/expected_profile.json index b952f3a..c441817 100644 --- a/scenarios/python_fastapi_3.11/expected_profile.json +++ b/scenarios/python_fastapi_3.12/expected_profile.json @@ -1,5 +1,5 @@ { - "test_name": "python_fastapi_3.11", + "test_name": "python_fastapi_3.12", "scale_by_duration": false, "pprof-regex": "", "stacks": [ diff --git a/scenarios/python_fastapi_3.11/main.py b/scenarios/python_fastapi_3.12/main.py similarity index 100% rename from scenarios/python_fastapi_3.11/main.py rename to scenarios/python_fastapi_3.12/main.py diff --git a/scenarios/python_fastapi_3.11/requirements.txt b/scenarios/python_fastapi_3.12/requirements.txt similarity index 100% rename from scenarios/python_fastapi_3.11/requirements.txt rename to scenarios/python_fastapi_3.12/requirements.txt diff --git a/scenarios/python_flask_3.11/Dockerfile b/scenarios/python_flask_3.12/Dockerfile similarity index 79% rename from scenarios/python_flask_3.11/Dockerfile rename to scenarios/python_flask_3.12/Dockerfile index 0357923..2a62fae 100644 --- a/scenarios/python_flask_3.11/Dockerfile +++ b/scenarios/python_flask_3.12/Dockerfile @@ -1,8 +1,8 @@ -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 @@ -10,7 +10,7 @@ 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 diff --git a/scenarios/python_flask_3.11/README.md b/scenarios/python_flask_3.12/README.md similarity index 100% rename from scenarios/python_flask_3.11/README.md rename to scenarios/python_flask_3.12/README.md diff --git a/scenarios/python_flask_3.11/app.py b/scenarios/python_flask_3.12/app.py similarity index 100% rename from scenarios/python_flask_3.11/app.py rename to scenarios/python_flask_3.12/app.py diff --git a/scenarios/python_flask_3.11/expected_profile.json b/scenarios/python_flask_3.12/expected_profile.json similarity index 97% rename from scenarios/python_flask_3.11/expected_profile.json rename to scenarios/python_flask_3.12/expected_profile.json index 967fa89..92fdd6b 100644 --- a/scenarios/python_flask_3.11/expected_profile.json +++ b/scenarios/python_flask_3.12/expected_profile.json @@ -1,5 +1,5 @@ { - "test_name": "python_flask_3.11", + "test_name": "python_flask_3.12", "scale_by_duration": false, "pprof-regex": "", "stacks": [ diff --git a/scenarios/python_flask_3.11/requirements.txt b/scenarios/python_flask_3.12/requirements.txt similarity index 100% rename from scenarios/python_flask_3.11/requirements.txt rename to scenarios/python_flask_3.12/requirements.txt diff --git a/scenarios/python_gil_contention_3.11/Dockerfile b/scenarios/python_gil_contention_3.12/Dockerfile similarity index 54% rename from scenarios/python_gil_contention_3.11/Dockerfile rename to scenarios/python_gil_contention_3.12/Dockerfile index 1cd3a26..044cb09 100644 --- a/scenarios/python_gil_contention_3.11/Dockerfile +++ b/scenarios/python_gil_contention_3.12/Dockerfile @@ -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/* diff --git a/scenarios/python_gil_contention_3.11/README.md b/scenarios/python_gil_contention_3.12/README.md similarity index 89% rename from scenarios/python_gil_contention_3.11/README.md rename to scenarios/python_gil_contention_3.12/README.md index 6886139..cb257a2 100644 --- a/scenarios/python_gil_contention_3.11/README.md +++ b/scenarios/python_gil_contention_3.12/README.md @@ -1,4 +1,4 @@ -# python_gil_contention_3.11 +# python_gil_contention_3.12 Verifies the wall-vs-CPU relationship across many threads that are all runnable at once: wall time scales with the number of threads, but CPU time @@ -6,7 +6,7 @@ is bounded by the GIL to roughly one core. The workload runs 8 CPU-bound `spin` threads for the full duration. 8 is below the default `max_threads` cap, so every thread is sampled each cycle (no -reservoir sampling, unlike `python_many_threads_3.11`). +reservoir sampling, unlike `python_many_threads_3.12`). ## Expected behavior diff --git a/scenarios/python_gil_contention_3.11/expected_profile.json b/scenarios/python_gil_contention_3.12/expected_profile.json similarity index 100% rename from scenarios/python_gil_contention_3.11/expected_profile.json rename to scenarios/python_gil_contention_3.12/expected_profile.json diff --git a/scenarios/python_gil_contention_3.11/main.py b/scenarios/python_gil_contention_3.12/main.py similarity index 100% rename from scenarios/python_gil_contention_3.11/main.py rename to scenarios/python_gil_contention_3.12/main.py diff --git a/scenarios/python_deep_stack_3.11/requirements.txt b/scenarios/python_gil_contention_3.12/requirements.txt similarity index 100% rename from scenarios/python_deep_stack_3.11/requirements.txt rename to scenarios/python_gil_contention_3.12/requirements.txt diff --git a/scenarios/python_greenlet_3.11/Dockerfile b/scenarios/python_greenlet_3.12/Dockerfile similarity index 76% rename from scenarios/python_greenlet_3.11/Dockerfile rename to scenarios/python_greenlet_3.12/Dockerfile index bdf4341..7c8fa91 100644 --- a/scenarios/python_greenlet_3.11/Dockerfile +++ b/scenarios/python_greenlet_3.12/Dockerfile @@ -1,8 +1,8 @@ -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_greenlet_3.11/requirements.txt /app/ +COPY ./scenarios/python_greenlet_3.12/requirements.txt /app/ RUN chmod 644 /app/* # Set the working directory to the location of the program @@ -10,7 +10,7 @@ WORKDIR /app RUN pip install -r requirements.txt -COPY ./scenarios/python_greenlet_3.11/main.py /app/ +COPY ./scenarios/python_greenlet_3.12/main.py /app/ ENV DD_PROFILING_ENABLED=true ENV DD_TRACE_ENABLED=false diff --git a/scenarios/python_greenlet_3.11/expected_profile.json b/scenarios/python_greenlet_3.12/expected_profile.json similarity index 98% rename from scenarios/python_greenlet_3.11/expected_profile.json rename to scenarios/python_greenlet_3.12/expected_profile.json index a867369..d081c6c 100644 --- a/scenarios/python_greenlet_3.11/expected_profile.json +++ b/scenarios/python_greenlet_3.12/expected_profile.json @@ -1,5 +1,5 @@ { - "test_name": "python_greenlet_3.11", + "test_name": "python_greenlet_3.12", "scale_by_duration": false, "pprof-regex": "", "stacks": [ diff --git a/scenarios/python_greenlet_3.11/main.py b/scenarios/python_greenlet_3.12/main.py similarity index 100% rename from scenarios/python_greenlet_3.11/main.py rename to scenarios/python_greenlet_3.12/main.py diff --git a/scenarios/python_greenlet_3.11/requirements.txt b/scenarios/python_greenlet_3.12/requirements.txt similarity index 100% rename from scenarios/python_greenlet_3.11/requirements.txt rename to scenarios/python_greenlet_3.12/requirements.txt diff --git a/scenarios/python_greenlet_multithreaded_3.11/Dockerfile b/scenarios/python_greenlet_multithreaded_3.12/Dockerfile similarity index 65% rename from scenarios/python_greenlet_multithreaded_3.11/Dockerfile rename to scenarios/python_greenlet_multithreaded_3.12/Dockerfile index 95320dc..1988837 100644 --- a/scenarios/python_greenlet_multithreaded_3.11/Dockerfile +++ b/scenarios/python_greenlet_multithreaded_3.12/Dockerfile @@ -1,14 +1,14 @@ -ARG BASE_IMAGE="prof-python-3.11" +ARG BASE_IMAGE="prof-python-3.12" FROM $BASE_IMAGE -COPY ./scenarios/python_greenlet_multithreaded_3.11/requirements.txt /app/ +COPY ./scenarios/python_greenlet_multithreaded_3.12/requirements.txt /app/ RUN chmod 644 /app/* WORKDIR /app RUN pip install --no-cache-dir -r requirements.txt -COPY ./scenarios/python_greenlet_multithreaded_3.11/main.py /app/ +COPY ./scenarios/python_greenlet_multithreaded_3.12/main.py /app/ ENV DD_PROFILING_ENABLED=true ENV DD_TRACE_ENABLED=false diff --git a/scenarios/python_greenlet_multithreaded_3.11/expected_profile.json b/scenarios/python_greenlet_multithreaded_3.12/expected_profile.json similarity index 97% rename from scenarios/python_greenlet_multithreaded_3.11/expected_profile.json rename to scenarios/python_greenlet_multithreaded_3.12/expected_profile.json index fe34a70..0d89dac 100644 --- a/scenarios/python_greenlet_multithreaded_3.11/expected_profile.json +++ b/scenarios/python_greenlet_multithreaded_3.12/expected_profile.json @@ -1,5 +1,5 @@ { - "test_name": "python_greenlet_multithreaded_3.11", + "test_name": "python_greenlet_multithreaded_3.12", "scale_by_duration": false, "pprof-regex": "", "stacks": [ diff --git a/scenarios/python_greenlet_multithreaded_3.11/main.py b/scenarios/python_greenlet_multithreaded_3.12/main.py similarity index 100% rename from scenarios/python_greenlet_multithreaded_3.11/main.py rename to scenarios/python_greenlet_multithreaded_3.12/main.py diff --git a/scenarios/python_greenlet_multithreaded_3.11/requirements.txt b/scenarios/python_greenlet_multithreaded_3.12/requirements.txt similarity index 100% rename from scenarios/python_greenlet_multithreaded_3.11/requirements.txt rename to scenarios/python_greenlet_multithreaded_3.12/requirements.txt diff --git a/scenarios/python_gunicorn_3.11/Dockerfile b/scenarios/python_gunicorn_3.12/Dockerfile similarity index 75% rename from scenarios/python_gunicorn_3.11/Dockerfile rename to scenarios/python_gunicorn_3.12/Dockerfile index 5e6d1f8..b6d427e 100644 --- a/scenarios/python_gunicorn_3.11/Dockerfile +++ b/scenarios/python_gunicorn_3.12/Dockerfile @@ -1,8 +1,8 @@ -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_gunicorn_3.11/requirements.txt /app/ +COPY ./scenarios/python_gunicorn_3.12/requirements.txt /app/ RUN chmod 644 /app/* # Set the working directory to the location of the program @@ -10,7 +10,7 @@ WORKDIR /app RUN pip install -r requirements.txt -COPY ./scenarios/python_gunicorn_3.11/main.py /app/ +COPY ./scenarios/python_gunicorn_3.12/main.py /app/ ENV DD_PROFILING_ENABLED=true ENV DD_TRACE_ENABLED=false diff --git a/scenarios/python_gunicorn_3.11/README.md b/scenarios/python_gunicorn_3.12/README.md similarity index 100% rename from scenarios/python_gunicorn_3.11/README.md rename to scenarios/python_gunicorn_3.12/README.md diff --git a/scenarios/python_gunicorn_3.11/expected_profile.json b/scenarios/python_gunicorn_3.12/expected_profile.json similarity index 98% rename from scenarios/python_gunicorn_3.11/expected_profile.json rename to scenarios/python_gunicorn_3.12/expected_profile.json index 4dad82f..a815331 100644 --- a/scenarios/python_gunicorn_3.11/expected_profile.json +++ b/scenarios/python_gunicorn_3.12/expected_profile.json @@ -1,5 +1,5 @@ { - "test_name": "python_gunicorn_3.11", + "test_name": "python_gunicorn_3.12", "scale_by_duration": false, "pprof-regex": "profiles.*\\.pprof$", "allow_first_profile_failure": true, diff --git a/scenarios/python_gunicorn_3.11/main.py b/scenarios/python_gunicorn_3.12/main.py similarity index 100% rename from scenarios/python_gunicorn_3.11/main.py rename to scenarios/python_gunicorn_3.12/main.py diff --git a/scenarios/python_gunicorn_3.11/requirements.txt b/scenarios/python_gunicorn_3.12/requirements.txt similarity index 100% rename from scenarios/python_gunicorn_3.11/requirements.txt rename to scenarios/python_gunicorn_3.12/requirements.txt diff --git a/scenarios/python_many_threads/Dockerfile b/scenarios/python_many_threads/Dockerfile index 6be25b4..fee782b 100644 --- a/scenarios/python_many_threads/Dockerfile +++ b/scenarios/python_many_threads/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE="prof-python-3.11" +ARG BASE_IMAGE="prof-python-3.12" FROM $BASE_IMAGE COPY ./scenarios/python_many_threads/main.py \ diff --git a/scenarios/python_many_threads/README.md b/scenarios/python_many_threads/README.md index 98ba1cd..72335c9 100644 --- a/scenarios/python_many_threads/README.md +++ b/scenarios/python_many_threads/README.md @@ -1,4 +1,4 @@ -# python_many_threads_3.11 +# python_many_threads_3.12 Verifies that the stack sampler's reservoir sampling produces correct wall-time totals when the number of live threads exceeds the per-cycle sampling cap. diff --git a/scenarios/python_multiprocessing/Dockerfile b/scenarios/python_multiprocessing/Dockerfile index 70a7cd7..2d7371a 100644 --- a/scenarios/python_multiprocessing/Dockerfile +++ b/scenarios/python_multiprocessing/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE="prof-python-3.11" +ARG BASE_IMAGE="prof-python-3.12" FROM $BASE_IMAGE COPY ./scenarios/python_multiprocessing/main.py \ diff --git a/scenarios/python_multiprocessing/README.md b/scenarios/python_multiprocessing/README.md index da8c08f..63765f8 100644 --- a/scenarios/python_multiprocessing/README.md +++ b/scenarios/python_multiprocessing/README.md @@ -5,7 +5,7 @@ profiles in forked child processes. The profiler is started in the parent and then `NUM_WORKERS` children are forked, so each child inherits the running native sampler and must restart it through the `pthread_atfork` handler (re-registering the surviving thread with a fresh clock id and clearing stale -echion state). Only `python_gunicorn_3.11` touches forking today, and it does +echion state). Only `python_gunicorn_3.12` touches forking today, and it does so as a web server with `allow_first_profile_failure`, so the pure-compute fork path is otherwise uncovered. diff --git a/scenarios/python_native_cpu_3.11/Dockerfile b/scenarios/python_native_cpu_3.12/Dockerfile similarity index 58% rename from scenarios/python_native_cpu_3.11/Dockerfile rename to scenarios/python_native_cpu_3.12/Dockerfile index f6cfcc3..ae4985f 100644 --- a/scenarios/python_native_cpu_3.11/Dockerfile +++ b/scenarios/python_native_cpu_3.12/Dockerfile @@ -1,8 +1,8 @@ -ARG BASE_IMAGE="prof-python-3.11" +ARG BASE_IMAGE="prof-python-3.12" FROM $BASE_IMAGE -COPY ./scenarios/python_native_cpu_3.11/main.py \ - ./scenarios/python_native_cpu_3.11/requirements.txt \ +COPY ./scenarios/python_native_cpu_3.12/main.py \ + ./scenarios/python_native_cpu_3.12/requirements.txt \ /app/ RUN chmod 644 /app/* diff --git a/scenarios/python_native_cpu_3.11/README.md b/scenarios/python_native_cpu_3.12/README.md similarity index 97% rename from scenarios/python_native_cpu_3.11/README.md rename to scenarios/python_native_cpu_3.12/README.md index d3be6e1..2e9a81e 100644 --- a/scenarios/python_native_cpu_3.11/README.md +++ b/scenarios/python_native_cpu_3.12/README.md @@ -1,4 +1,4 @@ -# python_native_cpu_3.11 +# python_native_cpu_3.12 Verifies that the Python profiler correctly attributes CPU time to Python frames that call native (C-extension) functions. diff --git a/scenarios/python_native_cpu_3.11/expected_profile.json b/scenarios/python_native_cpu_3.12/expected_profile.json similarity index 100% rename from scenarios/python_native_cpu_3.11/expected_profile.json rename to scenarios/python_native_cpu_3.12/expected_profile.json diff --git a/scenarios/python_native_cpu_3.11/main.py b/scenarios/python_native_cpu_3.12/main.py similarity index 100% rename from scenarios/python_native_cpu_3.11/main.py rename to scenarios/python_native_cpu_3.12/main.py diff --git a/scenarios/python_gil_contention_3.11/requirements.txt b/scenarios/python_native_cpu_3.12/requirements.txt similarity index 100% rename from scenarios/python_gil_contention_3.11/requirements.txt rename to scenarios/python_native_cpu_3.12/requirements.txt diff --git a/scenarios/python_pytorch_3.11/Dockerfile b/scenarios/python_pytorch_3.12/Dockerfile similarity index 77% rename from scenarios/python_pytorch_3.11/Dockerfile rename to scenarios/python_pytorch_3.12/Dockerfile index ceef425..a76805e 100644 --- a/scenarios/python_pytorch_3.11/Dockerfile +++ b/scenarios/python_pytorch_3.12/Dockerfile @@ -1,9 +1,9 @@ -ARG BASE_IMAGE="prof-python-3.11" +ARG BASE_IMAGE="prof-python-3.12" FROM $BASE_IMAGE WORKDIR /usr/src/app -COPY ./scenarios/python_pytorch_3.11/ /usr/src/app +COPY ./scenarios/python_pytorch_3.12/ /usr/src/app RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu RUN pip install --no-cache-dir -r requirements.txt diff --git a/scenarios/python_pytorch_3.11/expected_profile.json b/scenarios/python_pytorch_3.12/expected_profile.json similarity index 100% rename from scenarios/python_pytorch_3.11/expected_profile.json rename to scenarios/python_pytorch_3.12/expected_profile.json diff --git a/scenarios/python_pytorch_3.11/main.py b/scenarios/python_pytorch_3.12/main.py similarity index 100% rename from scenarios/python_pytorch_3.11/main.py rename to scenarios/python_pytorch_3.12/main.py diff --git a/scenarios/python_native_cpu_3.11/requirements.txt b/scenarios/python_pytorch_3.12/requirements.txt similarity index 100% rename from scenarios/python_native_cpu_3.11/requirements.txt rename to scenarios/python_pytorch_3.12/requirements.txt diff --git a/scenarios/python_safe_point_bias_3.11/Dockerfile b/scenarios/python_safe_point_bias_3.12/Dockerfile similarity index 72% rename from scenarios/python_safe_point_bias_3.11/Dockerfile rename to scenarios/python_safe_point_bias_3.12/Dockerfile index 5b35b3a..d7d5083 100644 --- a/scenarios/python_safe_point_bias_3.11/Dockerfile +++ b/scenarios/python_safe_point_bias_3.12/Dockerfile @@ -1,9 +1,9 @@ -ARG BASE_IMAGE="prof-python-3.11" +ARG BASE_IMAGE="prof-python-3.12" FROM $BASE_IMAGE WORKDIR /usr/src/app -COPY ./scenarios/python_safe_point_bias_3.11/ /usr/src/app +COPY ./scenarios/python_safe_point_bias_3.12/ /usr/src/app RUN chmod 644 /usr/src/app/main.py RUN pip install --no-cache-dir -r requirements.txt diff --git a/scenarios/python_safe_point_bias_3.11/README.md b/scenarios/python_safe_point_bias_3.12/README.md similarity index 73% rename from scenarios/python_safe_point_bias_3.11/README.md rename to scenarios/python_safe_point_bias_3.12/README.md index c51ee38..0f3175d 100644 --- a/scenarios/python_safe_point_bias_3.11/README.md +++ b/scenarios/python_safe_point_bias_3.12/README.md @@ -1,4 +1,4 @@ -# python_safe_point_bias_3.11 +# python_safe_point_bias_3.12 Verifies that the Python profiler correctly attributes CPU time to `slow_method` rather than to `empty_method`, which is called from `slow_method` but does no work. @@ -21,6 +21,8 @@ def slow_method() -> None: ## Expected behavior - **cpu-time**: `slow_method` appears in ~100% of samples (inclusive), since all CPU work happens there. -- **cpu-time**: `empty_method` appears in ~0% of samples; it is a no-op and should not be blamed for the CPU usage of its caller. +- **cpu-time**: `empty_method` appears in at most 10% of samples. Its call and + return still consume some CPU, but the no-op should not receive a significant + share of its caller's CPU time. -A profiler with a blame-attribution bug would incorrectly show `empty_method` consuming significant CPU time. +A profiler with a blame-attribution bug would incorrectly show `empty_method` consuming a substantial share of CPU time. diff --git a/scenarios/python_safe_point_bias_3.11/expected_profile.json b/scenarios/python_safe_point_bias_3.12/expected_profile.json similarity index 93% rename from scenarios/python_safe_point_bias_3.11/expected_profile.json rename to scenarios/python_safe_point_bias_3.12/expected_profile.json index fe0301d..dc1a8a7 100644 --- a/scenarios/python_safe_point_bias_3.11/expected_profile.json +++ b/scenarios/python_safe_point_bias_3.12/expected_profile.json @@ -12,7 +12,7 @@ { "regular_expression": ".*empty_method", "percent": 0, - "error_margin": 5 + "error_margin": 10 } ] } diff --git a/scenarios/python_safe_point_bias_3.11/main.py b/scenarios/python_safe_point_bias_3.12/main.py similarity index 100% rename from scenarios/python_safe_point_bias_3.11/main.py rename to scenarios/python_safe_point_bias_3.12/main.py diff --git a/scenarios/python_pytorch_3.11/requirements.txt b/scenarios/python_safe_point_bias_3.12/requirements.txt similarity index 100% rename from scenarios/python_pytorch_3.11/requirements.txt rename to scenarios/python_safe_point_bias_3.12/requirements.txt diff --git a/scenarios/python_sample_count_3.11/Dockerfile b/scenarios/python_sample_count_3.12/Dockerfile similarity index 68% rename from scenarios/python_sample_count_3.11/Dockerfile rename to scenarios/python_sample_count_3.12/Dockerfile index 08aa74e..5492358 100644 --- a/scenarios/python_sample_count_3.11/Dockerfile +++ b/scenarios/python_sample_count_3.12/Dockerfile @@ -1,8 +1,8 @@ -ARG BASE_IMAGE="prof-python-3.11" +ARG BASE_IMAGE="prof-python-3.12" FROM $BASE_IMAGE -COPY ./scenarios/python_sample_count_3.11/main.py \ - ./scenarios/python_sample_count_3.11/requirements.txt \ +COPY ./scenarios/python_sample_count_3.12/main.py \ + ./scenarios/python_sample_count_3.12/requirements.txt \ /app/ RUN chmod 644 /app/* diff --git a/scenarios/python_sample_count_3.11/README.md b/scenarios/python_sample_count_3.12/README.md similarity index 96% rename from scenarios/python_sample_count_3.11/README.md rename to scenarios/python_sample_count_3.12/README.md index b0f234e..29925ea 100644 --- a/scenarios/python_sample_count_3.11/README.md +++ b/scenarios/python_sample_count_3.12/README.md @@ -1,4 +1,4 @@ -# python_sample_count_3.11 +# python_sample_count_3.12 Verifies that the stack-sampling adaptive sampler produces a reasonable number of `wall-samples` under its configured overhead target. diff --git a/scenarios/python_sample_count_3.11/expected_profile.json b/scenarios/python_sample_count_3.12/expected_profile.json similarity index 100% rename from scenarios/python_sample_count_3.11/expected_profile.json rename to scenarios/python_sample_count_3.12/expected_profile.json diff --git a/scenarios/python_sample_count_3.11/main.py b/scenarios/python_sample_count_3.12/main.py similarity index 100% rename from scenarios/python_sample_count_3.11/main.py rename to scenarios/python_sample_count_3.12/main.py diff --git a/scenarios/python_safe_point_bias_3.11/requirements.txt b/scenarios/python_sample_count_3.12/requirements.txt similarity index 100% rename from scenarios/python_safe_point_bias_3.11/requirements.txt rename to scenarios/python_sample_count_3.12/requirements.txt diff --git a/scenarios/python_spiky_3.11/requirements.txt b/scenarios/python_spiky_3.11/requirements.txt deleted file mode 100644 index 749bf29..0000000 --- a/scenarios/python_spiky_3.11/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -ddtrace diff --git a/scenarios/python_spiky_3.11/Dockerfile b/scenarios/python_spiky_3.12/Dockerfile similarity index 87% rename from scenarios/python_spiky_3.11/Dockerfile rename to scenarios/python_spiky_3.12/Dockerfile index 0cec815..9c28b29 100644 --- a/scenarios/python_spiky_3.11/Dockerfile +++ b/scenarios/python_spiky_3.12/Dockerfile @@ -1,8 +1,8 @@ -ARG BASE_IMAGE="prof-python-3.11" +ARG BASE_IMAGE="prof-python-3.12" FROM $BASE_IMAGE -COPY ./scenarios/python_spiky_3.11/main.py \ - ./scenarios/python_spiky_3.11/requirements.txt \ +COPY ./scenarios/python_spiky_3.12/main.py \ + ./scenarios/python_spiky_3.12/requirements.txt \ /app/ RUN chmod 644 /app/* diff --git a/scenarios/python_spiky_3.11/README.md b/scenarios/python_spiky_3.12/README.md similarity index 98% rename from scenarios/python_spiky_3.11/README.md rename to scenarios/python_spiky_3.12/README.md index 1b5bd23..2784cc8 100644 --- a/scenarios/python_spiky_3.11/README.md +++ b/scenarios/python_spiky_3.12/README.md @@ -1,4 +1,4 @@ -# python_spiky_3.11 +# python_spiky_3.12 Verifies that the Python profiler correctly distinguishes CPU-time from wall-time when a process mixes on-CPU work and `time.sleep`. diff --git a/scenarios/python_spiky_3.11/expected_profile.json b/scenarios/python_spiky_3.12/expected_profile.json similarity index 100% rename from scenarios/python_spiky_3.11/expected_profile.json rename to scenarios/python_spiky_3.12/expected_profile.json diff --git a/scenarios/python_spiky_3.11/main.py b/scenarios/python_spiky_3.12/main.py similarity index 100% rename from scenarios/python_spiky_3.11/main.py rename to scenarios/python_spiky_3.12/main.py diff --git a/scenarios/python_sample_count_3.11/requirements.txt b/scenarios/python_spiky_3.12/requirements.txt similarity index 100% rename from scenarios/python_sample_count_3.11/requirements.txt rename to scenarios/python_spiky_3.12/requirements.txt diff --git a/scenarios/python_thread_churn/Dockerfile b/scenarios/python_thread_churn/Dockerfile index bbbb603..96a0670 100644 --- a/scenarios/python_thread_churn/Dockerfile +++ b/scenarios/python_thread_churn/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE="prof-python-3.11" +ARG BASE_IMAGE="prof-python-3.12" FROM $BASE_IMAGE COPY ./scenarios/python_thread_churn/main.py \ diff --git a/scenarios/python_thread_churn/README.md b/scenarios/python_thread_churn/README.md index 0ac3947..4ce6117 100644 --- a/scenarios/python_thread_churn/README.md +++ b/scenarios/python_thread_churn/README.md @@ -1,4 +1,4 @@ -# python_thread_churn_3.11 +# python_thread_churn_3.12 Verifies that work done in short-lived threads is still attributed correctly under constant thread creation and destruction. All other scenarios use diff --git a/scenarios/python_uvloop_3.11/Dockerfile b/scenarios/python_uvloop_3.12/Dockerfile similarity index 77% rename from scenarios/python_uvloop_3.11/Dockerfile rename to scenarios/python_uvloop_3.12/Dockerfile index 8b0ec0d..09a495a 100644 --- a/scenarios/python_uvloop_3.11/Dockerfile +++ b/scenarios/python_uvloop_3.12/Dockerfile @@ -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_uvloop_3.11/main.py \ - ./scenarios/python_uvloop_3.11/requirements.txt \ +COPY ./scenarios/python_uvloop_3.12/main.py \ + ./scenarios/python_uvloop_3.12/requirements.txt \ /app/ RUN chmod 644 /app/* diff --git a/scenarios/python_uvloop_3.11/expected_profile.json b/scenarios/python_uvloop_3.12/expected_profile.json similarity index 97% rename from scenarios/python_uvloop_3.11/expected_profile.json rename to scenarios/python_uvloop_3.12/expected_profile.json index 098d56d..219a602 100644 --- a/scenarios/python_uvloop_3.11/expected_profile.json +++ b/scenarios/python_uvloop_3.12/expected_profile.json @@ -1,5 +1,5 @@ { - "test_name": "python_uvloop_3.11", + "test_name": "python_uvloop_3.12", "scale_by_duration": false, "pprof-regex": "", "stacks": [ diff --git a/scenarios/python_uvloop_3.11/main.py b/scenarios/python_uvloop_3.12/main.py similarity index 100% rename from scenarios/python_uvloop_3.11/main.py rename to scenarios/python_uvloop_3.12/main.py diff --git a/scenarios/python_uvloop_3.11/requirements.txt b/scenarios/python_uvloop_3.12/requirements.txt similarity index 100% rename from scenarios/python_uvloop_3.11/requirements.txt rename to scenarios/python_uvloop_3.12/requirements.txt diff --git a/scenarios/python_uwsgi_3.11/Dockerfile b/scenarios/python_uwsgi_3.12/Dockerfile similarity index 78% rename from scenarios/python_uwsgi_3.11/Dockerfile rename to scenarios/python_uwsgi_3.12/Dockerfile index 285381b..bac9f94 100644 --- a/scenarios/python_uwsgi_3.11/Dockerfile +++ b/scenarios/python_uwsgi_3.12/Dockerfile @@ -1,8 +1,8 @@ -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_uwsgi_3.11/requirements.txt /app/ +COPY ./scenarios/python_uwsgi_3.12/requirements.txt /app/ RUN chmod 644 /app/* # Set the working directory to the location of the program @@ -10,8 +10,8 @@ WORKDIR /app RUN pip install -r requirements.txt -COPY ./scenarios/python_uwsgi_3.11/app.py /app/ -COPY ./scenarios/python_uwsgi_3.11/uwsgi.ini /app/ +COPY ./scenarios/python_uwsgi_3.12/app.py /app/ +COPY ./scenarios/python_uwsgi_3.12/uwsgi.ini /app/ ENV DD_TRACE_ENABLED=false ENV DD_PROFILING_ENABLED=true diff --git a/scenarios/python_uwsgi_3.11/app.py b/scenarios/python_uwsgi_3.12/app.py similarity index 100% rename from scenarios/python_uwsgi_3.11/app.py rename to scenarios/python_uwsgi_3.12/app.py diff --git a/scenarios/python_uwsgi_3.11/expected_profile.json b/scenarios/python_uwsgi_3.12/expected_profile.json similarity index 96% rename from scenarios/python_uwsgi_3.11/expected_profile.json rename to scenarios/python_uwsgi_3.12/expected_profile.json index 759006e..46347d1 100644 --- a/scenarios/python_uwsgi_3.11/expected_profile.json +++ b/scenarios/python_uwsgi_3.12/expected_profile.json @@ -1,5 +1,5 @@ { - "test_name": "python_uwsgi_3.11", + "test_name": "python_uwsgi_3.12", "note": "The _make_requests regex is replaced by .+ because dd-trace-py sometimes reports the function name as instead of _make_requests in wall-time samples (known profiler bug with pprof location deduplication). We rely on the thread name label to identify Requester thread samples instead.", "scale_by_duration": true, "pprof-regex": "", diff --git a/scenarios/python_uwsgi_3.11/requirements.txt b/scenarios/python_uwsgi_3.12/requirements.txt similarity index 100% rename from scenarios/python_uwsgi_3.11/requirements.txt rename to scenarios/python_uwsgi_3.12/requirements.txt diff --git a/scenarios/python_uwsgi_3.11/uwsgi.ini b/scenarios/python_uwsgi_3.12/uwsgi.ini similarity index 100% rename from scenarios/python_uwsgi_3.11/uwsgi.ini rename to scenarios/python_uwsgi_3.12/uwsgi.ini