annotate tests/test-inotify-issue1556.t @ 16414:e8d37b78acfb

parsers: use base-16 trie for faster node->rev mapping This greatly speeds up node->rev lookups, with results that are often user-perceptible: for instance, "hg --time log" of the node associated with rev 1000 on a linux-2.6 repo improves from 0.3 seconds to 0.03. I have not found any instances of slowdowns. The new perfnodelookup command in contrib/perf.py demonstrates the speedup more dramatically, since it performs no I/O. For a single lookup, the new code is about 40x faster. These changes also prepare the ground for the possibility of further improving the performance of prefix-based node lookups.
author Bryan O'Sullivan <bryano@fb.com>
date Thu, 12 Apr 2012 14:05:59 -0700
parents 1f74b0d0f485
children 895d65364570
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8601
021de2d12355 inotify: adding test for issue1556
Dmitriy Kostunin <dmitriy.kostunin@gmail.com>
parents:
diff changeset
1
12456
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
2 $ "$TESTDIR/hghave" inotify || exit 80
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
3 $ hg init
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
4 $ touch a b
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
5 $ hg add a b
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
6 $ rm b
8601
021de2d12355 inotify: adding test for issue1556
Dmitriy Kostunin <dmitriy.kostunin@gmail.com>
parents:
diff changeset
7
12456
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
8 status without inotify
8601
021de2d12355 inotify: adding test for issue1556
Dmitriy Kostunin <dmitriy.kostunin@gmail.com>
parents:
diff changeset
9
12456
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
10 $ hg st
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
11 A a
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
12 ! b
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
13 $ echo "[extensions]" >> $HGRCPATH
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
14 $ echo "inotify=" >> $HGRCPATH
8601
021de2d12355 inotify: adding test for issue1556
Dmitriy Kostunin <dmitriy.kostunin@gmail.com>
parents:
diff changeset
15
12456
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
16 inserve
8601
021de2d12355 inotify: adding test for issue1556
Dmitriy Kostunin <dmitriy.kostunin@gmail.com>
parents:
diff changeset
17
12456
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
18 $ hg inserve -d --pid-file=hg.pid 2>&1
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
19 $ cat hg.pid >> "$DAEMON_PIDS"
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
20
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
21 status
8601
021de2d12355 inotify: adding test for issue1556
Dmitriy Kostunin <dmitriy.kostunin@gmail.com>
parents:
diff changeset
22
12456
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
23 $ hg st
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
24 A a
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
25 ! b
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
26 ? hg.pid
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
27 $ sleep 1
8601
021de2d12355 inotify: adding test for issue1556
Dmitriy Kostunin <dmitriy.kostunin@gmail.com>
parents:
diff changeset
28
12456
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
29 Are we able to kill the service? if not, the service died on some error
8601
021de2d12355 inotify: adding test for issue1556
Dmitriy Kostunin <dmitriy.kostunin@gmail.com>
parents:
diff changeset
30
12456
1f74b0d0f485 tests: unify test-inotify-issue1556
Matt Mackall <mpm@selenic.com>
parents: 8601
diff changeset
31 $ kill `cat hg.pid`