def show_profile(args, sample_producer): resolver = symbol_resolver(args) time_range = get_time_range(args) node_filters = [] if args.min_duration: min_duration = prof.parse_time_as_nanos(args.min_duration) node_filters.append(lambda node, tree_root: node.resident_time >= min_duration) if args.min_hits: if args.min_hits.endswith('%'): node_filters.append(MinHitPercentageFilter(parse_percentage(args.min_hits))) else: node_filters.append(MinHitCountFilter(int(args.min_hits))) def node_filter(*args): for filter in node_filters: if not filter(*args): return False return True with get_trace_reader(args) as reader: prof.print_profile(sample_producer(reader.get_traces()), symbol_resolver=resolver, caller_oriented=args.caller_oriented, grouping=groupers[args.group_by](), src_addr_formatter=src_addr_formatter(args), root_function=args.function, node_filter=node_filter, time_range=time_range, max_levels=args.max_levels)
def show_profile(args, sample_producer): resolver = symbol_resolver(args) time_range = get_time_range(args) node_filters = [] if args.min_duration: min_duration = prof.parse_time_as_nanos(args.min_duration) node_filters.append( lambda node, tree_root: node.resident_time >= min_duration) if args.min_hits: if args.min_hits.endswith('%'): node_filters.append( MinHitPercentageFilter(parse_percentage(args.min_hits))) else: node_filters.append(MinHitCountFilter(int(args.min_hits))) def node_filter(*args): for filter in node_filters: if not filter(*args): return False return True with get_trace_reader(args) as reader: prof.print_profile(sample_producer(reader.get_traces()), symbol_resolver=resolver, caller_oriented=args.caller_oriented, grouping=groupers[args.group_by](), src_addr_formatter=src_addr_formatter(args), root_function=args.function, node_filter=node_filter, time_range=time_range, max_levels=args.max_levels)
def show_profile(args, sample_producer): resolver = symbol_resolver(args) time_range = get_time_range(args) if args.min_duration: min_duration = prof.parse_time_as_nanos(args.min_duration) node_filter = lambda node: node.resident_time >= min_duration else: node_filter = None with get_trace_reader(args) as reader: prof.print_profile(sample_producer(reader.get_traces()), symbol_resolver=resolver, caller_oriented=args.caller_oriented, merge_threads=args.merge_threads, src_addr_formatter=src_addr_formatter(args), root_function=args.function, node_filter=node_filter, time_range=time_range, max_levels=args.max_levels)