2 |
2 |
3 $ hg --time help -q help 2>&1 | grep Time > /dev/null |
3 $ hg --time help -q help 2>&1 | grep Time > /dev/null |
4 $ hg init a |
4 $ hg init a |
5 $ cd a |
5 $ cd a |
6 |
6 |
|
7 #if lsprof |
|
8 |
7 test --profile |
9 test --profile |
8 |
10 |
9 $ if "$TESTDIR/hghave" -q lsprof; then |
11 $ hg --profile st 2>../out |
10 > hg --profile st 2>../out || echo --profile failed |
12 $ grep CallCount ../out > /dev/null || cat ../out |
11 > grep CallCount < ../out > /dev/null || echo wrong --profile |
13 |
12 > |
14 $ hg --profile --config profiling.output=../out st |
13 > hg --profile --config profiling.output=../out st 2>&1 \ |
15 $ grep CallCount ../out > /dev/null || cat ../out |
14 > || echo --profile + output to file failed |
16 |
15 > grep CallCount < ../out > /dev/null \ |
17 $ hg --profile --config profiling.format=text st 2>../out |
16 > || echo wrong --profile output when saving to a file |
18 $ grep CallCount ../out > /dev/null || cat ../out |
17 > |
19 |
18 > hg --profile --config profiling.format=text st 2>&1 \ |
20 $ echo "[profiling]" >> $HGRCPATH |
19 > | grep CallCount > /dev/null || echo --profile format=text failed |
21 $ echo "format=kcachegrind" >> $HGRCPATH |
20 > |
22 |
21 > echo "[profiling]" >> $HGRCPATH |
23 $ hg --profile st 2>../out |
22 > echo "format=kcachegrind" >> $HGRCPATH |
24 $ grep 'events: Ticks' ../out > /dev/null || cat ../out |
23 > |
25 |
24 > hg --profile st 2>../out || echo --profile format=kcachegrind failed |
26 $ hg --profile --config profiling.output=../out st |
25 > grep 'events: Ticks' < ../out > /dev/null || echo --profile output is wrong |
27 $ grep 'events: Ticks' ../out > /dev/null || cat ../out |
26 > |
28 |
27 > hg --profile --config profiling.output=../out st 2>&1 \ |
29 #endif |
28 > || echo --profile format=kcachegrind + output to file failed |
|
29 > grep 'events: Ticks' < ../out > /dev/null \ |
|
30 > || echo --profile output is wrong |
|
31 > fi |
|