Show More
@@ -545,6 +545,13 b' profiling::' | |||||
545 | collected during profiling, while 'profiling report' stands for a |
|
545 | collected during profiling, while 'profiling report' stands for a | |
546 | statistical text report generated from the profiling data. |
|
546 | statistical text report generated from the profiling data. | |
547 | The profiling is done using lsprof. |
|
547 | The profiling is done using lsprof. | |
|
548 | format;; | |||
|
549 | Profiling format. | |||
|
550 | Default: text. | |||
|
551 | text;; | |||
|
552 | Generate a profiling report. | |||
|
553 | When saving to a file, it should be noted that only the report is saved, | |||
|
554 | and the profiling data is not kept. | |||
548 | output;; |
|
555 | output;; | |
549 | File path where profiling data or report should be saved. |
|
556 | File path where profiling data or report should be saved. | |
550 | If the file exists, it is replaced. |
|
557 | If the file exists, it is replaced. |
@@ -379,6 +379,13 b' def _runcommand(ui, options, cmd, cmdfun' | |||||
379 | raise error.ParseError(cmd, _("invalid arguments")) |
|
379 | raise error.ParseError(cmd, _("invalid arguments")) | |
380 |
|
380 | |||
381 | if options['profile']: |
|
381 | if options['profile']: | |
|
382 | format = ui.config('profiling', 'format', default='text') | |||
|
383 | ||||
|
384 | if not format in ['text']: | |||
|
385 | ui.warn(_("unrecognized profiling format '%s'" | |||
|
386 | " - Ignored\n") % format) | |||
|
387 | format = 'text' | |||
|
388 | ||||
382 | output = ui.config('profiling', 'output') |
|
389 | output = ui.config('profiling', 'output') | |
383 |
|
390 | |||
384 | if output: |
|
391 | if output: |
@@ -15,4 +15,7 b' if "$TESTDIR/hghave" -q lsprof; then' | |||||
15 | || echo --profile + output to file failed |
|
15 | || echo --profile + output to file failed | |
16 | grep CallCount < ../out > /dev/null \ |
|
16 | grep CallCount < ../out > /dev/null \ | |
17 | || echo wrong --profile output when saving to a file |
|
17 | || echo wrong --profile output when saving to a file | |
|
18 | ||||
|
19 | hg --profile --config profiling.format=text st 2>&1 \ | |||
|
20 | | grep CallCount > /dev/null || echo --profile format=text failed | |||
18 | fi |
|
21 | fi |
General Comments 0
You need to be logged in to leave comments.
Login now