diff options
author | Lars Wirzenius <liw@xander> | 2010-11-26 18:29:48 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@xander> | 2010-11-26 18:29:48 +0200 |
commit | 58398ff7e4b47ec39a9106e193c2ea54eda4f723 (patch) | |
tree | 5ada5aa2112f8ce2c68cffda24449b72daa1ad1e /dupfiles | |
parent | 88cbe745cd55eca07407b6a7798fafaa4dab225c (diff) | |
download | dupfiles-58398ff7e4b47ec39a9106e193c2ea54eda4f723.tar.gz |
Optionall run program under profiling.
Diffstat (limited to 'dupfiles')
-rwxr-xr-x | dupfiles | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -228,4 +228,9 @@ def main(): if __name__ == '__main__': - main() + profname = os.environ.get('DUPFILES_PROFILE') + if profname: + import cProfile + cProfile.run('main()', profname) + else: + main() |