MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / do_sort

Method do_sort

tools/python-3.11.9-amd64/Lib/pstats.py:726–737  ·  view source on GitHub ↗
(self, line)

Source from the content-addressed store, hash-verified

724 print("Reverse the sort order of the profiling report.", file=self.stream)
725
726 def do_sort(self, line):
727 if not self.stats:
728 print("No statistics object is loaded.", file=self.stream)
729 return
730 abbrevs = self.stats.get_sort_arg_defs()
731 if line and all((x in abbrevs) for x in line.split()):
732 self.stats.sort_stats(*line.split())
733 else:
734 print("Valid sort keys (unique prefixes are accepted):", file=self.stream)
735 for (key, value) in Stats.sort_arg_dict_default.items():
736 print("%s -- %s" % (key, value[1]), file=self.stream)
737 return 0
738 def help_sort(self):
739 print("Sort profile data according to specified keys.", file=self.stream)
740 print("(Typing `sort' without arguments lists valid keys.)", file=self.stream)

Callers

nothing calls this directly

Calls 5

get_sort_arg_defsMethod · 0.80
sort_statsMethod · 0.80
printFunction · 0.50
splitMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected