MCPcopy Index your code
hub / github.com/RustPython/RustPython / run_perf

Method run_perf

Lib/test/test_patma.py:3558–3567  ·  view source on GitHub ↗
(self, count)

Source from the content-addressed store, hash-verified

3556 assert False, "this test should be a method of a different class!"
3557
3558 def run_perf(self, count):
3559 tests = []
3560 for attr in vars(TestPatma):
3561 if attr.startswith("test_"):
3562 tests.append(getattr(self, attr))
3563 tests *= count
3564 start = pyperf.perf_counter()
3565 for test in tests:
3566 test()
3567 return pyperf.perf_counter() - start
3568
3569
3570 runner = pyperf.Runner()

Callers

nothing calls this directly

Calls 5

varsFunction · 0.85
getattrFunction · 0.85
testFunction · 0.70
startswithMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected