mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +01:00
perf-test: add test for reindexing after removal/renaming msgs
At this point it is a bit tricky to measure the performance increase
from the new message deletion code, since the same commit (9ad19e4
)
that improved the performance also seems to have fixed a bug with an
uncaught Xapian exception triggered by this test.
This commit is contained in:
parent
f2533b9e73
commit
8cb30b08d8
1 changed files with 28 additions and 0 deletions
|
@ -10,4 +10,32 @@ time_run 'reindex *' "notmuch reindex '*'"
|
||||||
time_run 'reindex *' "notmuch reindex '*'"
|
time_run 'reindex *' "notmuch reindex '*'"
|
||||||
time_run 'reindex *' "notmuch reindex '*'"
|
time_run 'reindex *' "notmuch reindex '*'"
|
||||||
|
|
||||||
|
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`))
|
||||||
|
|
||||||
|
xargs tar uf backup.tar < $manifest
|
||||||
|
|
||||||
|
perl -nle 'rename $_, "$_.renamed"' $manifest
|
||||||
|
|
||||||
|
time_run "reindex ($count mv)" "notmuch reindex '*'"
|
||||||
|
|
||||||
|
perl -nle 'rename "$_.renamed", $_' $manifest
|
||||||
|
|
||||||
|
time_run "reindex ($count mv back)" "notmuch reindex '*'"
|
||||||
|
|
||||||
|
perl -nle 'unlink $_; unlink $_.copy' $manifest
|
||||||
|
|
||||||
|
time_run "reindex ($count rm)" "notmuch reindex '*'"
|
||||||
|
|
||||||
|
tar xf backup.tar
|
||||||
|
|
||||||
|
time_run "reindex ($count restore)" "notmuch reindex '*'"
|
||||||
|
|
||||||
|
perl -nle 'link $_, "$_.copy"' $manifest
|
||||||
|
|
||||||
|
time_run "reindex ($count cp)" "notmuch reindex '*'"
|
||||||
|
|
||||||
time_done
|
time_done
|
||||||
|
|
Loading…
Reference in a new issue