MCPcopy Create free account
hub / github.com/apache/thrift / main

Function main

contrib/parse_profiling.py:283–307  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

281
282
283def main(argv):
284 parser = optparse.OptionParser(usage='%prog [options] [<file>]')
285 parser.add_option('--no-functions', help='Don\'t print function names&#x27;,
286 dest='printFunctions', action='store_false',
287 default=True)
288 parser.add_option('--no-demangle',
289 help='Don\'t demangle C++ symbol names&#x27;,
290 dest='cxxfilt', action='store_false',
291 default=True)
292
293 (options, args) = parser.parse_args(argv[1:])
294 num_args = len(args)
295 if num_args == 0:
296 in_file = sys.stdin
297 elif num_args == 1:
298 in_file = open(argv[1], 'r')
299 else:
300 parser.print_usage(sys.stderr)
301 print >> sys.stderr, 'trailing arguments: %s' % (' '.join(args[1:],))
302 return 1
303
304 if options.cxxfilt:
305 start_cppfilt()
306
307 process_file(in_file, sys.stdout, options)
308
309
310if __name__ == '__main__':

Callers 1

parse_profiling.pyFile · 0.70

Calls 3

start_cppfiltFunction · 0.85
process_fileFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected