| 882 | tmp_dir=self.gen_dir, test_name=self._current_test) |
| 883 | |
| 884 | def h2load_status(self, run: ExecResult): |
| 885 | stats = {} |
| 886 | m = re.search( |
| 887 | r'requests: (\d+) total, (\d+) started, (\d+) done, (\d+) succeeded' |
| 888 | r', (\d+) failed, (\d+) errored, (\d+) timeout', run.stdout) |
| 889 | if m: |
| 890 | stats["requests"] = { |
| 891 | "total": int(m.group(1)), |
| 892 | "started": int(m.group(2)), |
| 893 | "done": int(m.group(3)), |
| 894 | "succeeded": int(m.group(4)) |
| 895 | } |
| 896 | m = re.search(r'status codes: (\d+) 2xx, (\d+) 3xx, (\d+) 4xx, (\d+) 5xx', |
| 897 | run.stdout) |
| 898 | if m: |
| 899 | stats["status"] = { |
| 900 | "2xx": int(m.group(1)), |
| 901 | "3xx": int(m.group(2)), |
| 902 | "4xx": int(m.group(3)), |
| 903 | "5xx": int(m.group(4)) |
| 904 | } |
| 905 | run.add_results({"h2load": stats}) |
| 906 | return run |
| 907 | |
| 908 | def make_data_file(self, indir: str, fname: str, fsize: int) -> str: |
| 909 | fpath = os.path.join(indir, fname) |