##// END OF EJS Templates
revset: stop supporting plain list as input set (API)...
revset: stop supporting plain list as input set (API) There was no deprecwarn(), but this is the same kind of API compatibility as the one removed by the previous patch.

File last commit:

r30845:262c2be8 stable
r31810:81abd0d1 default
Show More
test-profile.t
101 lines | 2.5 KiB | text/troff | Tads3Lexer
Matt Mackall
tests: unify test-profile
r12478 test --time
Martin Geisler
dispatch: lowercase --time message
r16933 $ hg --time help -q help 2>&1 | grep time > /dev/null
Matt Mackall
tests: unify test-profile
r12478 $ hg init a
$ cd a
Mads Kiilerich
tests: change odd uses of 'if hghave' to #if
r16898 #if lsprof
Matt Mackall
tests: unify test-profile
r12478 test --profile
Gregory Szorc
tests: explicitly use ls profiler...
r30259 $ prof='hg --config profiling.type=ls --profile'
$ $prof st 2>../out
Mads Kiilerich
tests: change odd uses of 'if hghave' to #if
r16898 $ grep CallCount ../out > /dev/null || cat ../out
Gregory Szorc
tests: explicitly use ls profiler...
r30259 $ $prof --config profiling.output=../out st
Mads Kiilerich
tests: change odd uses of 'if hghave' to #if
r16898 $ grep CallCount ../out > /dev/null || cat ../out
Gregory Szorc
tests: explicitly use ls profiler...
r30259 $ $prof --config profiling.output=blackbox --config extensions.blackbox= st
Durham Goode
profiling: allow logging profile to the blackbox...
r26191 $ grep CallCount .hg/blackbox.log > /dev/null || cat .hg/blackbox.log
Gregory Szorc
tests: explicitly use ls profiler...
r30259 $ $prof --config profiling.format=text st 2>../out
Mads Kiilerich
tests: change odd uses of 'if hghave' to #if
r16898 $ grep CallCount ../out > /dev/null || cat ../out
$ echo "[profiling]" >> $HGRCPATH
$ echo "format=kcachegrind" >> $HGRCPATH
Gregory Szorc
tests: explicitly use ls profiler...
r30259 $ $prof st 2>../out
Mads Kiilerich
tests: change odd uses of 'if hghave' to #if
r16898 $ grep 'events: Ticks' ../out > /dev/null || cat ../out
Gregory Szorc
tests: explicitly use ls profiler...
r30259 $ $prof --config profiling.output=../out st
Mads Kiilerich
tests: change odd uses of 'if hghave' to #if
r16898 $ grep 'events: Ticks' ../out > /dev/null || cat ../out
#endif
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913
Gregory Szorc
hgweb: profile HTTP requests...
r29787 #if lsprof serve
Profiling of HTTP requests works
Gregory Szorc
tests: explicitly use ls profiler...
r30259 $ $prof --config profiling.format=text --config profiling.output=../profile.log serve -d -p $HGPORT --pid-file ../hg.pid -A ../access.log
Gregory Szorc
hgweb: profile HTTP requests...
r29787 $ cat ../hg.pid >> $DAEMON_PIDS
$ hg -q clone -U http://localhost:$HGPORT ../clone
A single profile is logged because file logging doesn't append
$ grep CallCount ../profile.log | wc -l
\s*1 (re)
#endif
Gregory Szorc
profiling: use vendored statprof and upstream enhancements (BC)...
r30316 Install an extension that can sleep and guarantee a profiler has time to run
$ cat >> sleepext.py << EOF
> import time
> from mercurial import cmdutil, commands
> cmdtable = {}
> command = cmdutil.command(cmdtable)
> @command('sleep', [], 'hg sleep')
> def sleep(ui, *args, **kwargs):
> time.sleep(0.1)
> EOF
$ cat >> $HGRCPATH << EOF
> [extensions]
> sleep = `pwd`/sleepext.py
> EOF
statistical profiler works
Gregory Szorc
profiling: make statprof the default profiler (BC)...
r30317 $ hg --profile sleep 2>../out
Gregory Szorc
profiling: use vendored statprof and upstream enhancements (BC)...
r30316 $ grep Sample ../out
Sample count: \d+ (re)
Various statprof formatters work
Gregory Szorc
profiling: make statprof the default profiler (BC)...
r30317 $ hg --profile --config profiling.statformat=byline sleep 2>../out
Gregory Szorc
profiling: use vendored statprof and upstream enhancements (BC)...
r30316 $ head -n 1 ../out
% cumulative self
$ grep Sample ../out
Sample count: \d+ (re)
Gregory Szorc
profiling: make statprof the default profiler (BC)...
r30317 $ hg --profile --config profiling.statformat=bymethod sleep 2>../out
Gregory Szorc
profiling: use vendored statprof and upstream enhancements (BC)...
r30316 $ head -n 1 ../out
% cumulative self
$ grep Sample ../out
Sample count: \d+ (re)
Gregory Szorc
profiling: make statprof the default profiler (BC)...
r30317 $ hg --profile --config profiling.statformat=hotpath sleep 2>../out
Gregory Szorc
profiling: use vendored statprof and upstream enhancements (BC)...
r30316 $ grep Sample ../out
Sample count: \d+ (re)
Gregory Szorc
profiling: make statprof the default profiler (BC)...
r30317 $ hg --profile --config profiling.statformat=json sleep 2>../out
Gregory Szorc
profiling: use vendored statprof and upstream enhancements (BC)...
r30316 $ cat ../out
\[\[\d+.* (re)
Gregory Szorc
statprof: require input file...
r30845 statprof can be used as a standalone module
$ $PYTHON -m mercurial.statprof hotpath
must specify --file to load
[1]
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913 $ cd ..