MCPcopy Create free account
hub / github.com/apache/httpd / h2load_status

Method h2load_status

test/pyhttpd/env.py:884–906  ·  view source on GitHub ↗
(self, run: ExecResult)

Source from the content-addressed store, hash-verified

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)

Callers 4

check_h2load_okMethod · 0.80
test_h2_101_05Method · 0.80
check_h2load_okMethod · 0.80
check_h2load_okMethod · 0.80

Calls 1

add_resultsMethod · 0.80

Tested by 4

check_h2load_okMethod · 0.64
test_h2_101_05Method · 0.64
check_h2load_okMethod · 0.64
check_h2load_okMethod · 0.64