MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / summarize

Function summarize

tools/materialize-bench/run_agent_sandbox.py:49–58  ·  view source on GitHub ↗
(report)

Source from the content-addressed store, hash-verified

47
48
49def summarize(report):
50 groups = defaultdict(list)
51 phases = defaultdict(lambda: defaultdict(list))
52 for sample in report['samples']:
53 groups[sample['case']].append(sample['total_ns'] / 1_000_000)
54 for name, nanos in sample['phases_ns'].items():
55 phases[sample['case']][name].append(nanos / 1_000_000)
56 return {case: dict(distribution(values),
57 phases_ms={name: distribution(values) for name, values in phases[case].items()})
58 for case, values in groups.items()}
59
60
61def main():

Callers 1

mainFunction · 0.70

Calls 2

distributionFunction · 0.90
appendMethod · 0.45

Tested by

no test coverage detected