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

Function validate_report

tools/materialize-bench/run_agent_sandbox.py:35–46  ·  view source on GitHub ↗
(report, iterations)

Source from the content-addressed store, hash-verified

33
34
35def validate_report(report, iterations):
36 expected = {(case, iteration) for case in CASES for iteration in range(iterations)}
37 seen = set()
38 for sample in report['samples']:
39 key = (sample['case'], sample['iteration'])
40 if key not in expected or key in seen:
41 raise ValueError('unexpected or duplicate sample: ' + repr(key))
42 seen.add(key)
43 if not isinstance(sample['total_ns'], int) or sample['total_ns'] <= 0:
44 raise ValueError('nonpositive or invalid sample duration')
45 if seen != expected:
46 raise ValueError('not all cases produced samples')
47
48
49def summarize(report):

Callers 1

mainFunction · 0.70

Calls 3

rangeFunction · 0.85
setFunction · 0.85
addMethod · 0.45

Tested by

no test coverage detected