Skip to content

Commit 56c8412

Browse files
chore(profiling): improve typing in memalloc.py
1 parent ba60fe5 commit 56c8412

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

ddtrace/profiling/collector/memalloc.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
from typing import Type
1010
from typing import cast
1111

12+
from typing_extensions import override
13+
1214

1315
try:
1416
from ddtrace.profiling.collector import _memalloc
@@ -25,7 +27,7 @@
2527
LOG = logging.getLogger(__name__)
2628

2729

28-
class MemoryCollector:
30+
class MemoryCollector(collector.Collector):
2931
"""Memory allocation collector."""
3032

3133
def __init__(
@@ -152,3 +154,11 @@ def snapshot_and_parse_pprof(self, output_filename: str) -> Any:
152154
)
153155

154156
return pprof_utils.parse_newest_profile(output_filename)
157+
158+
@override
159+
def _start_service(self, *args: Any, **kwargs: Any) -> None:
160+
raise NotImplementedError("MemoryCollector cannot be started")
161+
162+
@override
163+
def _stop_service(self, *args: Any, **kwargs: Any) -> None:
164+
raise NotImplementedError("MemoryCollector cannot be stopped")

0 commit comments

Comments
 (0)