Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 027a543

Browse files
committed
TST: Indicate where the warmup started and actual test began
1 parent fb9e723 commit 027a543

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tools/memleak.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def run_memleak_test(bench, iterations, report):
4141
print("{0: 4d}: pymalloc {1: 10d}, rss {2: 10d}, nobjs {3: 10d}, "
4242
"garbage {4: 4d}, files: {5: 4d}".format(
4343
i, malloc, rss, nobjs, garbage, open_files))
44-
44+
if i == starti:
45+
print('{:-^86s}'.format(' warmup done '))
4546
malloc_arr[i] = malloc
4647
rss_arr[i] = rss
4748
if rss > rss_peak:
@@ -56,6 +57,8 @@ def run_memleak_test(bench, iterations, report):
5657

5758
from matplotlib import pyplot as plt
5859
fig, (ax1, ax2, ax3) = plt.subplots(3)
60+
for ax in (ax1, ax2, ax3):
61+
ax.axvline(starti, linestyle='--', color='k')
5962
ax1b = ax1.twinx()
6063
ax1.plot(malloc_arr, 'r')
6164
ax1b.plot(rss_arr, 'b')

0 commit comments

Comments
 (0)