Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dispatch.py @ 8021:1c2cf2e5dc9b
profiling: dropping hotshot profiling. --profile as a unique profiling option
hotshot was an experimental module, which is broken for Python < 2.5
And even for Python >= 2.5 users, hotshot usage is discouraged: cProfile
(formerly lsprof) should be used instead.
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Wed, 08 Apr 2009 14:18:20 +0200 |
parents | de377b1a9a84 |
children | 4f3fdfaa3874 |
line wrap: on
line diff
--- a/mercurial/dispatch.py Tue Apr 07 20:57:25 2009 +0200 +++ b/mercurial/dispatch.py Wed Apr 08 14:18:20 2009 +0200 @@ -379,25 +379,6 @@ raise error.ParseError(cmd, _("invalid arguments")) if options['profile']: - import hotshot, hotshot.stats - prof = hotshot.Profile("hg.prof") - try: - try: - return prof.runcall(checkargs) - except: - try: - ui.warn(_('exception raised - generating ' - 'profile anyway\n')) - except: - pass - raise - finally: - prof.close() - stats = hotshot.stats.load("hg.prof") - stats.strip_dirs() - stats.sort_stats('time', 'calls') - stats.print_stats(40) - elif options['lsprof']: try: from mercurial import lsprof except ImportError: