mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 09:24:54 +01:00
perf-test: initial support for talloc leak report in memory tests
As with the valgrind logs, we print a (very) brief summary and leave the log for inspection.
This commit is contained in:
parent
e40bb1561a
commit
8d05dcfffe
1 changed files with 4 additions and 1 deletions
|
@ -126,13 +126,16 @@ memory_run ()
|
|||
test_count=$(($test_count+1))
|
||||
|
||||
log_file=$log_dir/$test_count.log
|
||||
talloc_log=$log_dir/$test_count.talloc
|
||||
|
||||
printf "[ %d ]\t%s\n" $test_count "$1"
|
||||
|
||||
valgrind --leak-check=full --log-file="$log_file" $2
|
||||
NOTMUCH_TALLOC_REPORT="$talloc_log" valgrind --leak-check=full --log-file="$log_file" $2
|
||||
|
||||
awk '/LEAK SUMMARY/,/suppressed/ { sub(/^==[0-9]*==/," "); print }' "$log_file"
|
||||
echo
|
||||
sed -n -e 's/.*[(]total *\([^)]*\)[)]/talloced at exit: \1/p' $talloc_log
|
||||
echo
|
||||
}
|
||||
|
||||
memory_done ()
|
||||
|
|
Loading…
Reference in a new issue