2019-05-31 20:32:50 +02:00
|
|
|
#!/usr/bin/env bash
|
2012-12-06 02:34:30 +01:00
|
|
|
|
|
|
|
test_description='notmuch new'
|
|
|
|
|
2017-09-25 22:38:20 +02:00
|
|
|
. $(dirname "$0")/perf-test-lib.sh || exit 1
|
2012-12-06 02:34:30 +01:00
|
|
|
|
|
|
|
uncache_database
|
|
|
|
|
|
|
|
time_start
|
|
|
|
|
|
|
|
for i in $(seq 2 6); do
|
|
|
|
time_run "notmuch new #$i" 'notmuch new'
|
|
|
|
done
|
|
|
|
|
2019-04-01 12:31:51 +02:00
|
|
|
manifest=$(mktemp manifestXXXXXX)
|
|
|
|
|
|
|
|
find mail -type f ! -path 'mail/.notmuch/*' | sed -n '1~4 p' > $manifest
|
|
|
|
# arithmetic context is to eat extra whitespace on e.g. some BSDs
|
|
|
|
count=$((`wc -l < $manifest`))
|
|
|
|
|
|
|
|
perl -nle 'rename $_, "$_.renamed"' $manifest
|
|
|
|
|
|
|
|
time_run "new ($count mv)" 'notmuch new'
|
|
|
|
|
|
|
|
perl -nle 'rename "$_.renamed", $_' $manifest
|
|
|
|
|
|
|
|
time_run "new ($count mv back)" 'notmuch new'
|
|
|
|
|
|
|
|
perl -nle 'link $_, "$_.copy"' $manifest
|
|
|
|
|
|
|
|
time_run "new ($count cp)" 'notmuch new'
|
|
|
|
|
2012-12-06 02:34:30 +01:00
|
|
|
time_done
|