Show More
@@ -764,7 +764,7 b' def _dispatch(req):' | |||
|
764 | 764 | for ui_ in uis: |
|
765 | 765 | ui_.setconfig('profiling', 'enabled', 'true', '--profile') |
|
766 | 766 | |
|
767 | with profiling.maybeprofile(lui): | |
|
767 | with profiling.maybeprofile(lui) as profiler: | |
|
768 | 768 | # Configure extensions in phases: uisetup, extsetup, cmdtable, and |
|
769 | 769 | # reposetup. Programs like TortoiseHg will call _dispatch several |
|
770 | 770 | # times so we keep track of configured extensions in _loaded. |
@@ -827,6 +827,8 b' def _dispatch(req):' | |||
|
827 | 827 | _("time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n") % |
|
828 | 828 | (t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3])) |
|
829 | 829 | ui.atexit(print_time) |
|
830 | if options["profile"]: | |
|
831 | profiler.start() | |
|
830 | 832 | |
|
831 | 833 | if options['verbose'] or options['debug'] or options['quiet']: |
|
832 | 834 | for opt in ('verbose', 'debug', 'quiet'): |
@@ -4,10 +4,24 b' test --time' | |||
|
4 | 4 | $ hg init a |
|
5 | 5 | $ cd a |
|
6 | 6 | |
|
7 | #if lsprof | |
|
8 | 7 |
|
|
9 | 8 | test --profile |
|
10 | 9 | |
|
10 | $ hg st --profile 2>&1 | grep Sample | |
|
11 | Sample count: \d+ (re) | |
|
12 | ||
|
13 | Abreviated version | |
|
14 | ||
|
15 | $ hg st --prof 2>&1 | grep Sample | |
|
16 | Sample count: \d+ (re) | |
|
17 | ||
|
18 | In alias | |
|
19 | ||
|
20 | $ hg --config "alias.profst=status --profile" profst 2>&1 | grep Sample | |
|
21 | Sample count: \d+ (re) | |
|
22 | ||
|
23 | #if lsprof | |
|
24 | ||
|
11 | 25 | $ prof='hg --config profiling.type=ls --profile' |
|
12 | 26 | |
|
13 | 27 | $ $prof st 2>../out |
General Comments 0
You need to be logged in to leave comments.
Login now