3 test_description='notmuch new'
5 . $(dirname "$0")/perf-test-lib.sh || exit 1
11 for i in $(seq 2 6); do
12 time_run "notmuch new #$i" 'notmuch new'
15 manifest=$(mktemp manifestXXXXXX)
17 find mail -type f ! -path 'mail/.notmuch/*' | sed -n '1~4 p' > $manifest
18 # arithmetic context is to eat extra whitespace on e.g. some BSDs
19 count=$((`wc -l < $manifest`))
21 perl -nle 'rename $_, "$_.renamed"' $manifest
23 time_run "new ($count mv)" 'notmuch new'
25 perl -nle 'rename "$_.renamed", $_' $manifest
27 time_run "new ($count mv back)" 'notmuch new'
29 perl -nle 'link $_, "$_.copy"' $manifest
31 time_run "new ($count cp)" 'notmuch new'