8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b59a89e commit a1f2e5fCopy full SHA for a1f2e5f
lib/matplotlib/tests/test_backends_interactive.py
@@ -513,21 +513,22 @@ def _test_figure_leak():
513
from matplotlib import pyplot as plt
514
# Second argument is pause length, but if zero we should skip pausing
515
t = float(sys.argv[1])
516
+ p = psutil.Process()
517
518
# Warmup cycle, this reasonably allocates a lot
- p = psutil.Process()
519
- fig = plt.figure()
520
- if t:
521
- plt.pause(t)
522
- plt.close(fig)
523
- mem = p.memory_full_info().uss
+ for _ in range(2):
+ fig = plt.figure()
+ if t:
+ plt.pause(t)
+ plt.close(fig)
524
+ mem = p.memory_info().rss
525
526
for _ in range(5):
527
fig = plt.figure()
528
if t:
529
plt.pause(t)
530
plt.close(fig)
- growth = p.memory_full_info().uss - mem
531
+ growth = p.memory_info().rss - mem
532
533
print(growth)
534
0 commit comments