Skip to content
Open
Show file tree
Hide file tree
Changes from 12 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
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ ddtrace/profiling @DataDog/profiling-python
ddtrace/internal/settings/profiling.py @DataDog/profiling-python
ddtrace/internal/datadog/profiling @DataDog/profiling-python
tests/profiling @DataDog/profiling-python
tests/profiling_v2 @DataDog/profiling-python
.gitlab/tests/profiling.yml @DataDog/profiling-python

# MLObs
Expand Down
2 changes: 1 addition & 1 deletion hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ DD_PROFILING_PYTORCH_ENABLED = "true"
test = [
"uname -a",
"pip freeze",
"python -m pytest tests/profiling_v2/test_pytorch.py -vvv --capture=tee-sys",
"python -m pytest tests/profiling/test_pytorch.py -vvv --capture=tee-sys",
]

[[envs.profiling_pytorch.matrix]]
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ exclude = [
"ddtrace/vendor/*",
"ddtrace/appsec/_iast/_taint_tracking/_vendor/*",
"tests/profiling/collector/pprof_*pb2.py",
"tests/profiling/simple_program_gevent.py",
"tests/contrib/grpc/hello_pb2.py",
"tests/contrib/django_celery/app/*",
"tests/contrib/protobuf/schemas/**/*.py",
Expand Down
6 changes: 3 additions & 3 deletions riotfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3235,7 +3235,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT
Venv(
name="profile-v2",
# NB riot commands that use this Venv must include --pass-env to work properly
command="python -m tests.profiling.run pytest -v --no-cov --capture=no --benchmark-disable --ignore='tests/profiling_v2/collector/test_memalloc.py' {cmdargs} tests/profiling_v2", # noqa: E501
command="python -m tests.profiling.run pytest -v --no-cov --capture=no --benchmark-disable --ignore='tests/profiling/collector/test_memalloc.py' {cmdargs} tests/profiling", # noqa: E501
env={
"DD_PROFILING_ENABLE_ASSERTS": "1",
"CPUCOUNT": "12",
Expand All @@ -3258,7 +3258,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT
venvs=[
Venv(
name="profile-v2-uwsgi",
command="python -m tests.profiling.run pytest -v --no-cov --capture=no --benchmark-disable {cmdargs} tests/profiling_v2/test_uwsgi.py", # noqa: E501
command="python -m tests.profiling.run pytest -v --no-cov --capture=no --benchmark-disable {cmdargs} tests/profiling/test_uwsgi.py", # noqa: E501
pys=select_pys(max_version="3.13"),
pkgs={
"uwsgi": "<2.0.30",
Expand Down Expand Up @@ -3376,7 +3376,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT
),
Venv(
name="profile-v2-memalloc",
command="python -m tests.profiling.run pytest -v --no-cov --capture=no --benchmark-disable {cmdargs} tests/profiling_v2/collector/test_memalloc.py", # noqa: E501
command="python -m tests.profiling.run pytest -v --no-cov --capture=no --benchmark-disable {cmdargs} tests/profiling/collector/test_memalloc.py", # noqa: E501
# skipping v3.14 for now due to an unstable `lz4 ` lib issue: https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-py/-/jobs/1163312347
pys=select_pys(max_version="3.13"),
pkgs={
Expand Down
4 changes: 0 additions & 4 deletions scripts/check_suitespec_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@

# Ignore any embedded documentation
IGNORE_PATTERNS.add("**/*.md")
# TODO(taegyunkim): remove these after merging profiling v2 tests back to profiling
IGNORE_PATTERNS.add("tests/profiling/*.py")
IGNORE_PATTERNS.add("tests/profiling/*/*.py")
IGNORE_PATTERNS.add("tests/profiling/*/*.proto")


def owners(path: str) -> str:
Expand Down
1 change: 0 additions & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ suites:
- '@core'
- '@profiling'
- tests/profiling/*
- tests/profiling_v2/*
services:
- redis
```
Expand Down
16 changes: 1 addition & 15 deletions tests/profiling/collector/conftest.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
import pytest

import ddtrace
from ddtrace.profiling import Profiler
from tests.utils import override_global_config


@pytest.fixture
def tracer():
with override_global_config(dict(_startup_logs_enabled=False)):
yield ddtrace.trace.tracer


@pytest.fixture
def profiler(monkeypatch):
monkeypatch.setenv("DD_PROFILING_API_TIMEOUT_MS", "100")
p = Profiler()
p.start()
try:
yield p
finally:
p.stop()
return ddtrace.trace.tracer
Loading
Loading