MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / run

Method run

benchmarks/future_full_pipeline.py:26–46  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

24class Runner(BenchmarkThread):
25
26 def run(self):
27 futures = queue.Queue(maxsize=121)
28
29 self.start_profile()
30
31 for i in range(self.num_queries):
32 if i >= 120:
33 old_future = futures.get_nowait()
34 old_future.result()
35
36 key = "{}-{}".format(self.thread_num, i)
37 future = self.run_query(key)
38 futures.put_nowait(future)
39
40 while True:
41 try:
42 futures.get_nowait().result()
43 except queue.Empty:
44 break
45
46 self.finish_profile
47
48
49if __name__ == "__main__":

Callers

nothing calls this directly

Calls 3

start_profileMethod · 0.80
resultMethod · 0.80
run_queryMethod · 0.80

Tested by

no test coverage detected