MCPcopy Create free account
hub / github.com/erans/pgsqlite / run_benchmarks

Method run_benchmarks

benchmarks/benchmark_array_binary.py:253–271  ·  view source on GitHub ↗

Run benchmarks for different array sizes

(self)

Source from the content-addressed store, hash-verified

251 self.cleanup()
252
253 def run_benchmarks(self):
254 """Run benchmarks for different array sizes"""
255 print(f"{Fore.GREEN}🚀 Array Binary Protocol Benchmark{Style.RESET_ALL}")
256 print(f"Driver: psycopg3-binary")
257 print(f"Iterations: {self.iterations}")
258 print(f"Port: {self.port}")
259 print()
260
261 # Test different array sizes
262 array_sizes = [5, 10, 50, 100, 500]
263
264 for i, size in enumerate(array_sizes):
265 # Use unique database for each array size
266 original_db = self.sqlite_file
267 self.sqlite_file = f"array_benchmark_test_{i}_{size}.db"
268 self.run_array_size_benchmark(size)
269 self.sqlite_file = original_db
270
271 self.print_results()
272
273 def print_results(self):
274 """Print benchmark results in a formatted table"""

Callers 1

mainFunction · 0.95

Calls 2

print_resultsMethod · 0.95

Tested by

no test coverage detected