Show More
@@ -2862,13 +2862,21 b' def dispatch(args):' | |||
|
2862 | 2862 | if options['profile']: |
|
2863 | 2863 | import hotshot, hotshot.stats |
|
2864 | 2864 | prof = hotshot.Profile("hg.prof") |
|
2865 |
|
|
|
2866 |
|
|
|
2867 | stats = hotshot.stats.load("hg.prof") | |
|
2868 | stats.strip_dirs() | |
|
2869 | stats.sort_stats('time', 'calls') | |
|
2870 | stats.print_stats(40) | |
|
2871 | return r | |
|
2865 | try: | |
|
2866 | try: | |
|
2867 | return prof.runcall(d) | |
|
2868 | except: | |
|
2869 | try: | |
|
2870 | u.warn(_('exception raised - generating profile ' | |
|
2871 | 'anyway\n')) | |
|
2872 | except: | |
|
2873 | pass | |
|
2874 | finally: | |
|
2875 | prof.close() | |
|
2876 | stats = hotshot.stats.load("hg.prof") | |
|
2877 | stats.strip_dirs() | |
|
2878 | stats.sort_stats('time', 'calls') | |
|
2879 | stats.print_stats(40) | |
|
2872 | 2880 | else: |
|
2873 | 2881 | return d() |
|
2874 | 2882 | except: |
General Comments 0
You need to be logged in to leave comments.
Login now