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

Function main

Tools/scripts/summarize_stats.py:1517–1546  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1515
1516
1517def main():
1518 parser = argparse.ArgumentParser(description="Summarize pystats results")
1519
1520 parser.add_argument(
1521 "inputs",
1522 nargs="*",
1523 type=str,
1524 default=[DEFAULT_DIR],
1525 help=f"""
1526 Input source(s).
1527 For each entry, if a .json file, the output provided by --json-output from a previous run;
1528 if a directory, a directory containing raw pystats .txt files.
1529 If one source is provided, its stats are printed.
1530 If two sources are provided, comparative stats are printed.
1531 Default is {DEFAULT_DIR}.
1532 """,
1533 )
1534
1535 parser.add_argument(
1536 "--json-output",
1537 nargs="?",
1538 help="Output complete raw results to the given JSON file.",
1539 )
1540
1541 args = parser.parse_args()
1542
1543 if len(args.inputs) > 2:
1544 raise ValueError("0-2 arguments may be provided.")
1545
1546 output_stats(args.inputs, json_output=args.json_output)
1547
1548
1549if __name__ == "__main__":

Callers 1

summarize_stats.pyFile · 0.70

Calls 3

parse_argsMethod · 0.95
output_statsFunction · 0.85
add_argumentMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…