mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Added rudimentary profiling support.
This commit is contained in:
parent
90409d0e19
commit
4c6e33b72d
@ -178,5 +178,10 @@ def main():
|
|||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
import sys
|
||||||
|
if '-p' in sys.args:
|
||||||
|
import profile, time
|
||||||
|
profile.run('main()', '%i.prof' % time.time())
|
||||||
|
else:
|
||||||
main()
|
main()
|
||||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
Loading…
Reference in New Issue
Block a user