MCPcopy Index your code
hub / github.com/nodejs/node / do_json

Function do_json

deps/v8/tools/callstats.py:600–619  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

598# Generate JSON file.
599
600def do_json(args):
601 versions = _read_logs(args)
602
603 for version, domains in versions.items():
604 if args.aggregate:
605 create_total_page_stats(domains, args)
606 for domain, entries in domains.items():
607 stats = []
608 for name, value in entries.items():
609 # We don't want the calculated sum in the JSON file.
610 if name == "Sum": continue
611 entry = [name]
612 for x in ['time_list', 'count_list']:
613 s = statistics(entries[name][x])
614 entry.append(round(s['average'], 1))
615 entry.append(round(s['ci']['abs'], 1))
616 entry.append(round(s['ci']['perc'], 2))
617 stats.append(entry)
618 domains[domain] = stats
619 print(json.dumps(versions, separators=(',', ':')))
620
621
622# Help.

Callers

nothing calls this directly

Calls 6

_read_logsFunction · 0.85
create_total_page_statsFunction · 0.85
statisticsFunction · 0.85
printFunction · 0.70
itemsMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…