MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _run_with_time

Method _run_with_time

examples/performance/__init__.py:302–308  ·  view source on GitHub ↗
(self, fn)

Source from the content-addressed store, hash-verified

300 return result
301
302 def _run_with_time(self, fn):
303 now = time.time()
304 try:
305 return fn(self.num)
306 finally:
307 total = time.time() - now
308 self.stats.append(TestResult(self, fn, total_time=total))
309
310 def _run_test(self, fn):
311 if self._setup:

Callers 1

_run_testMethod · 0.95

Calls 3

TestResultClass · 0.85
timeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected