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

Method benchmark

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

Source from the content-addressed store, hash-verified

304 self.con.execute(f"copy wide to 'wide_table.csv' (FORMAT CSV)")
305
306 def benchmark(self, benchmark_name) -> BenchmarkResult:
307 result = BenchmarkResult(benchmark_name)
308 for _ in range(nruns):
309 duration = 0.0
310 pandas_df = pd.read_csv('wide_table.csv')
311 start = time.time()
312 for _ in range(30):
313 res = self.con.execute("""select * from pandas_df""").df()
314 end = time.time()
315 duration = float(end - start)
316 del res
317 result.add(duration)
318 return result
319
320
321class PandasAnalyzerBenchmark:

Callers 1

Calls 3

addMethod · 0.95
BenchmarkResultClass · 0.70
timeMethod · 0.45

Tested by

no test coverage detected