MCPcopy
hub / github.com/bloomberg/memray / format_thread_name

Function format_thread_name

src/memray/reporters/common.py:7–14  ·  view source on GitHub ↗
(
    record: Union[AllocationRecord, TemporalAllocationRecord]
)

Source from the content-addressed store, hash-verified

5
6
7def format_thread_name(
8 record: Union[AllocationRecord, TemporalAllocationRecord]
9) -> str:
10 if record.tid == -1:
11 return "merged thread"
12 name = record.thread_name
13 thread_id = hex(record.tid)
14 return f"{thread_id} ({name})" if name else f"{thread_id}"

Callers 4

from_snapshotMethod · 0.90
render_as_csvMethod · 0.90
from_snapshotMethod · 0.90
_from_any_snapshotMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…