MCPcopy Create free account
hub / github.com/duckdb/duckdb / benchmark

Method benchmark

scripts/regression_test_python.py:336–351  ·  view source on GitHub ↗
(self, benchmark_name)

Source from the content-addressed store, hash-verified

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
354def test_arrow_dictionaries_scan():

Callers 1

test_pandas_analyzeFunction · 0.95

Calls 3

addMethod · 0.95
BenchmarkResultClass · 0.70
timeMethod · 0.45

Tested by

no test coverage detected