view tests/test-profile.t @ 26965:1fa66d3ad28d

import-checker: reset context to verify convention in function scope I got the following error by rewriting hgweb/webcommands.py to use absolute_import. It is false-positive because the import line appears in "help" function: hgweb/webcommands.py:1297: higher-level import should come first: mercurial This patch makes the import checker aware of the function scope and apply rules recursively.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 01 Nov 2015 17:42:03 +0900
parents 39a0b11158d8
children 80df04266a16
line wrap: on
line source

test --time

  $ hg --time help -q help 2>&1 | grep time > /dev/null
  $ hg init a
  $ cd a

#if lsprof

test --profile

  $ hg --profile st 2>../out
  $ grep CallCount ../out > /dev/null || cat ../out

  $ hg --profile --config profiling.output=../out st
  $ grep CallCount ../out > /dev/null || cat ../out

  $ hg --profile --config profiling.output=blackbox --config extensions.blackbox= st
  $ grep CallCount .hg/blackbox.log > /dev/null || cat .hg/blackbox.log

  $ hg --profile --config profiling.format=text st 2>../out
  $ grep CallCount ../out > /dev/null || cat ../out

  $ echo "[profiling]" >> $HGRCPATH
  $ echo "format=kcachegrind" >> $HGRCPATH

  $ hg --profile st 2>../out
  $ grep 'events: Ticks' ../out > /dev/null || cat ../out

  $ hg --profile --config profiling.output=../out st
  $ grep 'events: Ticks' ../out > /dev/null || cat ../out

#endif

  $ cd ..