MCPcopy Create free account
hub / github.com/python/mypy / trial

Function trial

misc/perf_checker.py:48–56  ·  view source on GitHub ↗
(num_trials: int, command: Command)

Source from the content-addressed store, hash-verified

46
47
48def trial(num_trials: int, command: Command) -> list[float]:
49 trials = []
50 for i in range(num_trials):
51 command.setup()
52 start = time.time()
53 command.command()
54 delta = time.time() - start
55 trials.append(delta)
56 return trials
57
58
59def report(name: str, times: list[float]) -> None:

Callers 1

mainFunction · 0.85

Calls 3

rangeClass · 0.85
appendMethod · 0.80
setupMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…