(cmd)
| 394 | |
| 395 | |
| 396 | def profile_mem(cmd): |
| 397 | with profile(activities=[ProfilerActivity.CPU]) as prof: |
| 398 | exec(cmd) |
| 399 | print(cmd) |
| 400 | print(prof.key_averages().table(row_limit=10)) |
| 401 | |
| 402 | |
| 403 | ###################################################################### |