MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / Timer

Class Timer

test/performance/perf_test.py:104–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102
103
104class Timer:
105 def __enter__(self):
106 self.start = time.monotonic()
107 return self
108
109 def __exit__(self, *args):
110 self.end = time.monotonic()
111 self.interval = self.end - self.start
112
113
114def threaded(n_threads, func):

Callers 1

runTestMethod · 0.70

Calls

no outgoing calls

Tested by 1

runTestMethod · 0.56