(self, niter, avoidfscache, verbose)
| 139 | print(f"Mean (skipping the first 5 meas.): {qtime2:.3f}") |
| 140 | |
| 141 | def query_db(self, niter, avoidfscache, verbose): |
| 142 | self.con = self.open_db() |
| 143 | earray = self.con.root.earray |
| 144 | if avoidfscache: |
| 145 | rseed = int(np.random.randint(self.nrows)) |
| 146 | else: |
| 147 | rseed = 19 |
| 148 | np.random.seed(rseed) |
| 149 | np.random.randint(self.nrows) |
| 150 | ltimes = [] |
| 151 | for i in range(niter): |
| 152 | t1 = clock() |
| 153 | self.do_query(earray, np.random.randint(self.nrows)) |
| 154 | ltimes.append(clock() - t1) |
| 155 | self.print_qtime(ltimes) |
| 156 | self.close_db() |
| 157 | |
| 158 | def do_query(self, earray, idx): |
| 159 | return earray[idx] |
no test coverage detected