##// 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 $ hg init a
4 $ hg init a
5 $ cd a
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 test --profile
12 test --profile
9
13
10 $ hg st --profile 2>&1 | grep Sample
14 $ hg st --profile 2>&1 | statprofran
11 Sample count: \d+ (re)
12
15
13 Abreviated version
16 Abreviated version
14
17
15 $ hg st --prof 2>&1 | grep Sample
18 $ hg st --prof 2>&1 | statprofran
16 Sample count: \d+ (re)
17
19
18 In alias
20 In alias
19
21
20 $ hg --config "alias.profst=status --profile" profst 2>&1 | grep Sample
22 $ hg --config "alias.profst=status --profile" profst 2>&1 | statprofran
21 Sample count: \d+ (re)
22
23
23 #if lsprof
24 #if lsprof
24
25
@@ -81,26 +82,22 b' Install an extension that can sleep and '
81 statistical profiler works
82 statistical profiler works
82
83
83 $ hg --profile sleep 2>../out
84 $ hg --profile sleep 2>../out
84 $ grep Sample ../out
85 $ cat ../out | statprofran
85 Sample count: \d+ (re)
86
86
87 Various statprof formatters work
87 Various statprof formatters work
88
88
89 $ hg --profile --config profiling.statformat=byline sleep 2>../out
89 $ hg --profile --config profiling.statformat=byline sleep 2>../out
90 $ head -n 1 ../out
90 $ head -n 1 ../out
91 % cumulative self
91 % cumulative self
92 $ grep Sample ../out
92 $ cat ../out | statprofran
93 Sample count: \d+ (re)
94
93
95 $ hg --profile --config profiling.statformat=bymethod sleep 2>../out
94 $ hg --profile --config profiling.statformat=bymethod sleep 2>../out
96 $ head -n 1 ../out
95 $ head -n 1 ../out
97 % cumulative self
96 % cumulative self
98 $ grep Sample ../out
97 $ cat ../out | statprofran
99 Sample count: \d+ (re)
100
98
101 $ hg --profile --config profiling.statformat=hotpath sleep 2>../out
99 $ hg --profile --config profiling.statformat=hotpath sleep 2>../out
102 $ grep Sample ../out
100 $ cat ../out | statprofran
103 Sample count: \d+ (re)
104
101
105 $ hg --profile --config profiling.statformat=json sleep 2>../out
102 $ hg --profile --config profiling.statformat=json sleep 2>../out
106 $ cat ../out
103 $ cat ../out
General Comments 0
You need to be logged in to leave comments. Login now