summaryrefslogtreecommitdiff
path: root/lint.py
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-11-08 13:24:56 +0100
committerEmile Anclin <emile.anclin@logilab.fr>2010-11-08 13:24:56 +0100
commitdb2d049d8593ca7d710744b5f697f1c2847b7148 (patch)
tree88468afba730d9eadba043494f5f2381d99d0042 /lint.py
parentb30b9e2de798cf5d2c9863dae8824a42cfcd80d2 (diff)
downloadpylint-db2d049d8593ca7d710744b5f697f1c2847b7148.tar.gz
py3k: update profile option
Diffstat (limited to 'lint.py')
-rw-r--r--lint.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/lint.py b/lint.py
index 60ded6f..a306f90 100644
--- a/lint.py
+++ b/lint.py
@@ -851,11 +851,9 @@ been issued by analysing pylint output status code
sys.path.insert(0, os.getcwd())
if self.linter.config.profile:
print >> sys.stderr, '** profiled run'
- from hotshot import Profile, stats
- prof = Profile('stones.prof')
- prof.runcall(linter.check, args)
- prof.close()
- data = stats.load('stones.prof')
+ import cProfile, pstats
+ cProfile.runctx('linter.check(%r)' % args, globals(), locals(), 'stones.prof' )
+ data = pstats.Stats('stones.prof')
data.strip_dirs()
data.sort_stats('time', 'calls')
data.print_stats(30)