Starts worker threads to execute queries.
(self)
| 97 | return self.query_rate |
| 98 | |
| 99 | def start(self): |
| 100 | """Starts worker threads to execute queries.""" |
| 101 | # Start workers |
| 102 | for i in range(self.num_streams): |
| 103 | t = Thread(target=self.loop_query, args=(self.query, self.output_q, self.stop_ev)) |
| 104 | self.threads.append(t) |
| 105 | t.start() |
| 106 | self.query_rate_thread.start() |
| 107 | |
| 108 | def print_query_rate(self): |
| 109 | """Prints the current query throughput until user presses ctrl-c.""" |