| OLD | NEW | 
|---|
| 1 #!/usr/bin/python | 1 #!/usr/bin/env python | 
| 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be | 
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. | 
| 5 | 5 | 
| 6 """Parse NetLog output and reformat it to display in Gnuplot.""" | 6 """Parse NetLog output and reformat it to display in Gnuplot.""" | 
| 7 | 7 | 
| 8 import math | 8 import math | 
| 9 import optparse | 9 import optparse | 
| 10 import os | 10 import os | 
| 11 import re | 11 import re | 
| 12 import sys | 12 import sys | 
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 165     parser.error('Must specify input dump_file.') | 165     parser.error('Must specify input dump_file.') | 
| 166   if not options.output: | 166   if not options.output: | 
| 167     options.output = args[0] + '.gnuplot' | 167     options.output = args[0] + '.gnuplot' | 
| 168 | 168 | 
| 169   netlog = Parse(open(args[0])) | 169   netlog = Parse(open(args[0])) | 
| 170   GnuplotRenderNetlog(netlog, options.output, options.labels) | 170   GnuplotRenderNetlog(netlog, options.output, options.labels) | 
| 171   return 0 | 171   return 0 | 
| 172 | 172 | 
| 173 | 173 | 
| 174 if '__main__' == __name__: | 174 if '__main__' == __name__: | 
| 175   ret = main(sys.argv) | 175   sys.exit(main(sys.argv)) | 
| 176   sys.exit(ret) |  | 
| 177 |  | 
| OLD | NEW | 
|---|