MCPcopy Index your code
hub / github.com/python/cpython / get_print_list

Method get_print_list

Lib/pstats.py:392–414  ·  view source on GitHub ↗
(self, sel_list)

Source from the content-addressed store, hash-verified

390 return stats_profile
391
392 def get_print_list(self, sel_list):
393 width = self.max_name_len
394 if self.fcn_list:
395 stat_list = self.fcn_list[:]
396 msg = " Ordered by: " + self.sort_type + '\n'
397 else:
398 stat_list = list(self.stats.keys())
399 msg = " Random listing order was used\n"
400
401 for selection in sel_list:
402 stat_list, msg = self.eval_print_amount(selection, stat_list, msg)
403
404 count = len(stat_list)
405
406 if not stat_list:
407 return 0, stat_list
408 print(msg, file=self.stream)
409 if count < len(self.stats):
410 width = 0
411 for func in stat_list:
412 if len(func_std_string(func)) > width:
413 width = len(func_std_string(func))
414 return width+2, stat_list
415
416 def print_stats(self, *amount):
417 for filename in self.files:

Callers 3

print_statsMethod · 0.95
print_calleesMethod · 0.95
print_callersMethod · 0.95

Calls 4

eval_print_amountMethod · 0.95
listClass · 0.85
func_std_stringFunction · 0.85
keysMethod · 0.45

Tested by

no test coverage detected