21 |
21 |
22 $ hg --config "alias.profst=status --profile" profst 2>&1 | statprofran |
22 $ hg --config "alias.profst=status --profile" profst 2>&1 | statprofran |
23 |
23 |
24 #if lsprof |
24 #if lsprof |
25 |
25 |
26 $ prof='hg --config profiling.type=ls --profile' |
26 $ prof () { |
|
27 > hg --config profiling.type=ls --profile $@ |
|
28 > } |
27 |
29 |
28 $ $prof st 2>../out |
30 $ prof st 2>../out |
29 $ grep CallCount ../out > /dev/null || cat ../out |
31 $ grep CallCount ../out > /dev/null || cat ../out |
30 |
32 |
31 $ $prof --config profiling.output=../out st |
33 $ prof --config profiling.output=../out st |
32 $ grep CallCount ../out > /dev/null || cat ../out |
34 $ grep CallCount ../out > /dev/null || cat ../out |
33 |
35 |
34 $ $prof --config profiling.output=blackbox --config extensions.blackbox= st |
36 $ prof --config profiling.output=blackbox --config extensions.blackbox= st |
35 $ grep CallCount .hg/blackbox.log > /dev/null || cat .hg/blackbox.log |
37 $ grep CallCount .hg/blackbox.log > /dev/null || cat .hg/blackbox.log |
36 |
38 |
37 $ $prof --config profiling.format=text st 2>../out |
39 $ prof --config profiling.format=text st 2>../out |
38 $ grep CallCount ../out > /dev/null || cat ../out |
40 $ grep CallCount ../out > /dev/null || cat ../out |
39 |
41 |
40 $ echo "[profiling]" >> $HGRCPATH |
42 $ echo "[profiling]" >> $HGRCPATH |
41 $ echo "format=kcachegrind" >> $HGRCPATH |
43 $ echo "format=kcachegrind" >> $HGRCPATH |
42 |
44 |
43 $ $prof st 2>../out |
45 $ prof st 2>../out |
44 $ grep 'events: Ticks' ../out > /dev/null || cat ../out |
46 $ grep 'events: Ticks' ../out > /dev/null || cat ../out |
45 |
47 |
46 $ $prof --config profiling.output=../out st |
48 $ prof --config profiling.output=../out st |
47 $ grep 'events: Ticks' ../out > /dev/null || cat ../out |
49 $ grep 'events: Ticks' ../out > /dev/null || cat ../out |
48 |
50 |
49 #endif |
51 #endif |
50 |
52 |
51 #if lsprof serve |
53 #if lsprof serve |
52 |
54 |
53 Profiling of HTTP requests works |
55 Profiling of HTTP requests works |
54 |
56 |
55 $ $prof --config profiling.format=text --config profiling.output=../profile.log serve -d -p $HGPORT --pid-file ../hg.pid -A ../access.log |
57 $ prof --config profiling.format=text --config profiling.output=../profile.log serve -d -p $HGPORT --pid-file ../hg.pid -A ../access.log |
56 $ cat ../hg.pid >> $DAEMON_PIDS |
58 $ cat ../hg.pid >> $DAEMON_PIDS |
57 $ hg -q clone -U http://localhost:$HGPORT ../clone |
59 $ hg -q clone -U http://localhost:$HGPORT ../clone |
58 |
60 |
59 A single profile is logged because file logging doesn't append |
61 A single profile is logged because file logging doesn't append |
60 $ grep CallCount ../profile.log | wc -l |
62 $ grep CallCount ../profile.log | wc -l |