From fb33c98a99214db4c55dcb759d40619cbff5d300 Mon Sep 17 00:00:00 2001 From: Michael Kleen Date: Tue, 27 Aug 2024 22:17:09 +0200 Subject: [PATCH] fixup! Add session setting support for specs --- cr8/clients.py | 2 +- cr8/engine.py | 2 +- cr8/run_spec.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cr8/clients.py b/cr8/clients.py index 5733f4d..e2556a2 100644 --- a/cr8/clients.py +++ b/cr8/clients.py @@ -387,7 +387,7 @@ def __exit__(self, exc_type, exc_val, exc_tb): self.close() -def client(hosts, session_settings=None, concurrency=25): +def client(hosts, concurrency=25, session_settings=None): hosts = hosts or 'localhost:4200' if hosts.startswith('asyncpg://'): if not asyncpg: diff --git a/cr8/engine.py b/cr8/engine.py index 9314a38..cba9264 100644 --- a/cr8/engine.py +++ b/cr8/engine.py @@ -71,7 +71,7 @@ def _generate_statements(stmt, args, iterations, duration): class Runner: def __init__(self, hosts, concurrency, sample_mode, session_settings=None): self.concurrency = concurrency - self.client = client(hosts, session_settings=session_settings, concurrency=concurrency) + self.client = client(hosts, concurrency=concurrency, session_settings=session_settings) self.sampler = get_sampler(sample_mode) def warmup(self, stmt, num_warmup, concurrency=0, args=None): diff --git a/cr8/run_spec.py b/cr8/run_spec.py index 521494c..811602f 100644 --- a/cr8/run_spec.py +++ b/cr8/run_spec.py @@ -88,7 +88,7 @@ def __init__(self, self.session_settings = session_settings self.spec_dir = spec_dir self.client = clients.client(benchmark_hosts, session_settings) - self.result_client = clients.client(result_hosts, session_settings) + self.result_client = clients.client(result_hosts) self.server_version_info = aio.run(self.client.get_server_version) self.server_version = parse_version(self.server_version_info['number']) self.log = log