unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 1eeac6d0f75d8ac07d756c992ac19ae7bc441d58 913 bytes (raw)
name: performance-test/T00-new.sh 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
#!/usr/bin/env bash

test_description='notmuch new'

. $(dirname "$0")/perf-test-lib.sh || exit 1

uncache_database

time_start

for i in $(seq 2 6); do
    time_run "notmuch new #$i" 'notmuch new'
done

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'

tar --create --file backup.tar --files-from=$manifest

perl -nle 'unlink $_; unlink $_.copy' $manifest

time_run "new ($count rm)" 'notmuch new'

tar --extract --file backup.tar

time_run "new ($count restore)" 'notmuch new'

perl -nle 'link $_, "$_.copy"' $manifest

time_run "new ($count cp)" 'notmuch new'

time_done

debug log:

solving 1eeac6d0 ...
found 1eeac6d0 in https://yhetil.org/notmuch/20210414021627.1236560-2-david@tethera.net/
found a14dd13f in https://yhetil.org/notmuch.git/
preparing index
index prepared:
100755 a14dd13f1477a7cab465e1ca6c3fefe88b53c690	performance-test/T00-new.sh

applying [1/1] https://yhetil.org/notmuch/20210414021627.1236560-2-david@tethera.net/
diff --git a/performance-test/T00-new.sh b/performance-test/T00-new.sh
index a14dd13f..1eeac6d0 100755

Checking patch performance-test/T00-new.sh...
Applied patch performance-test/T00-new.sh cleanly.

index at:
100755 1eeac6d0f75d8ac07d756c992ac19ae7bc441d58	performance-test/T00-new.sh

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).