Follow up staging benchmarking

* change zenith-perf-data checkout ref to be main
* set cluster id through secrets so there is no code changes required
  when we wipe out clusters on staging
* display full pgbench output on error
This commit is contained in:
Dmitry Rodionov
2021-11-04 13:17:52 +03:00
committed by Dmitry Rodionov
parent d19263aec8
commit 865870a8e5
2 changed files with 18 additions and 50 deletions

View File

@@ -24,10 +24,11 @@ class PgBenchRunner:
pgbench_bin_path: str = "pgbench"
def invoke(self, args: List[str]) -> 'subprocess.CompletedProcess[str]':
return subprocess.run([self.pgbench_bin_path, *args],
check=True,
text=True,
capture_output=True)
res = subprocess.run([self.pgbench_bin_path, *args], text=True, capture_output=True)
if res.returncode != 0:
raise RuntimeError(f"pgbench failed. stdout: {res.stdout} stderr: {res.stderr}")
return res
def init(self, vacuum: bool = True) -> 'subprocess.CompletedProcess[str]':
args = []