Wrapper for tracemalloc.take_snapshot() that filters out blocks with backtraces that we are not interested in.
()
| 271 | ] |
| 272 | |
| 273 | def get_snapshot(): |
| 274 | ''' |
| 275 | Wrapper for tracemalloc.take_snapshot() that filters out blocks with |
| 276 | backtraces that we are not interested in. |
| 277 | ''' |
| 278 | ret = tracemalloc.take_snapshot() |
| 279 | ret2 = ret.filter_traces(tm_filters) |
| 280 | #log(f' {len(ret.traces)=} => {len(ret2.traces)=}') |
| 281 | return ret2 |
| 282 | |
| 283 | # Check that `analysis()` does not leak. |
| 284 | # |
no outgoing calls
no test coverage detected
searching dependent graphs…