Run benchmarks for different array sizes
(self)
| 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""" |
no test coverage detected