bindings/python/ns3modulegen.py
changeset 4105 ce8be572c4d4
parent 4090 3dda1049f0d8
child 4196 ed59d07c5373
     1.1 --- a/bindings/python/ns3modulegen.py	Wed Jan 14 15:35:42 2009 +0000
     1.2 +++ b/bindings/python/ns3modulegen.py	Sat Jan 17 16:59:45 2009 +0000
     1.3 @@ -146,5 +146,14 @@
     1.4      out.close()
     1.5  
     1.6  if __name__ == '__main__':
     1.7 -    main()
     1.8 +    if 0:
     1.9 +        try:
    1.10 +            import cProfile as profile
    1.11 +        except ImportError:
    1.12 +            main()
    1.13 +        else:
    1.14 +            print >> sys.stderr, "** running under profiler"
    1.15 +            profile.run('main()', 'ns3modulegen.pstat')
    1.16 +    else:
    1.17 +        main()
    1.18