Make it easy to turn on profiling of pybindgen

This commit is contained in:
Gustavo J. A. M. Carneiro
2009-01-17 16:59:45 +00:00
parent 796dee6f9e
commit 8bd42a0693

View File

@@ -146,5 +146,14 @@ def main():
out.close()
if __name__ == '__main__':
main()
if 0:
try:
import cProfile as profile
except ImportError:
main()
else:
print >> sys.stderr, "** running under profiler"
profile.run('main()', 'ns3modulegen.pstat')
else:
main()