]> git.notmuchmail.org Git - notmuch/blob - performance-test/T00-new.sh
Merge tag 'debian/0.29.2-2'
[notmuch] / performance-test / T00-new.sh
1 #!/usr/bin/env bash
2
3 test_description='notmuch new'
4
5 . $(dirname "$0")/perf-test-lib.sh || exit 1
6
7 uncache_database
8
9 time_start
10
11 for i in $(seq 2 6); do
12     time_run "notmuch new #$i" 'notmuch new'
13 done
14
15 manifest=$(mktemp manifestXXXXXX)
16
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`))
20
21 perl -nle 'rename $_, "$_.renamed"' $manifest
22
23 time_run "new ($count mv)" 'notmuch new'
24
25 perl -nle 'rename "$_.renamed", $_' $manifest
26
27 time_run "new ($count mv back)" 'notmuch new'
28
29 perl -nle 'link $_, "$_.copy"' $manifest
30
31 time_run "new ($count cp)" 'notmuch new'
32
33 time_done