##// END OF EJS Templates
tests: make test-profile.t pass if statprof didn't collect samples...
Martin von Zweigbergk -
r33611:a72b2db1 stable
parent child Browse files
Show More
@@ -4,21 +4,22 b' test --time'
4 4 $ hg init a
5 5 $ cd a
6 6
7 Function to check that statprof ran
8 $ statprofran () {
9 > egrep 'Sample count:|No samples recorded' > /dev/null
10 > }
7 11
8 12 test --profile
9 13
10 $ hg st --profile 2>&1 | grep Sample
11 Sample count: \d+ (re)
14 $ hg st --profile 2>&1 | statprofran
12 15
13 16 Abreviated version
14 17
15 $ hg st --prof 2>&1 | grep Sample
16 Sample count: \d+ (re)
18 $ hg st --prof 2>&1 | statprofran
17 19
18 20 In alias
19 21
20 $ hg --config "alias.profst=status --profile" profst 2>&1 | grep Sample
21 Sample count: \d+ (re)
22 $ hg --config "alias.profst=status --profile" profst 2>&1 | statprofran
22 23
23 24 #if lsprof
24 25
@@ -81,26 +82,22 b' Install an extension that can sleep and '
81 82 statistical profiler works
82 83
83 84 $ hg --profile sleep 2>../out
84 $ grep Sample ../out
85 Sample count: \d+ (re)
85 $ cat ../out | statprofran
86 86
87 87 Various statprof formatters work
88 88
89 89 $ hg --profile --config profiling.statformat=byline sleep 2>../out
90 90 $ head -n 1 ../out
91 91 % cumulative self
92 $ grep Sample ../out
93 Sample count: \d+ (re)
92 $ cat ../out | statprofran
94 93
95 94 $ hg --profile --config profiling.statformat=bymethod sleep 2>../out
96 95 $ head -n 1 ../out
97 96 % cumulative self
98 $ grep Sample ../out
99 Sample count: \d+ (re)
97 $ cat ../out | statprofran
100 98
101 99 $ hg --profile --config profiling.statformat=hotpath sleep 2>../out
102 $ grep Sample ../out
103 Sample count: \d+ (re)
100 $ cat ../out | statprofran
104 101
105 102 $ hg --profile --config profiling.statformat=json sleep 2>../out
106 103 $ cat ../out
General Comments 0
You need to be logged in to leave comments. Login now