(self, benchmark_name)
| 334 | return |
| 335 | |
| 336 | def benchmark(self, benchmark_name) -> BenchmarkResult: |
| 337 | result = BenchmarkResult(benchmark_name) |
| 338 | data = [None] * 9999999 + [1] # Last element is 1, others are None |
| 339 | |
| 340 | # Create the DataFrame with the specified data and column type as object |
| 341 | pandas_df = pd.DataFrame(data, columns=['Column'], dtype=object) |
| 342 | for _ in range(nruns): |
| 343 | duration = 0.0 |
| 344 | start = time.time() |
| 345 | for _ in range(30): |
| 346 | res = self.con.execute("""select * from pandas_df""").df() |
| 347 | end = time.time() |
| 348 | duration = float(end - start) |
| 349 | del res |
| 350 | result.add(duration) |
| 351 | return result |
| 352 | |
| 353 | |
| 354 | def test_arrow_dictionaries_scan(): |
no test coverage detected