Take a snapshot of traces of memory blocks allocated by Python.
()
| 549 | |
| 550 | |
| 551 | def take_snapshot(): |
| 552 | """ |
| 553 | Take a snapshot of traces of memory blocks allocated by Python. |
| 554 | """ |
| 555 | if not is_tracing(): |
| 556 | raise RuntimeError("the tracemalloc module must be tracing memory " |
| 557 | "allocations to take a snapshot") |
| 558 | traces = _get_traces() |
| 559 | traceback_limit = get_traceback_limit() |
| 560 | return Snapshot(traces, traceback_limit) |
nothing calls this directly
no test coverage detected
searching dependent graphs…