INNER CODE UNIT · Python
directory
openHiTLS/openHiTLS · testcode/benchmark/async_perf/test_async_perf.py:178
directory = self.root / name
directory.mkdir(exist_ok=True)
lines = [self.header]
for i, value in enumerate(values):
status = statuses[i] if statuses else "OK"
lines.append(f"hs-{form}-tls13-ecdhe-ecdsa,{i},8,4,{mode},8,{value},1,1,1,1,0,0,0,{status}\n")
(directory / "meta.json").write_text(json.dumps({
"environment": {"cpu_model": cpu, "hostname": "test-host", "cpu_count": 8}, "compiler": "test-cc"}))
path = directory / "results.csv"
path.write_text("".join(lines))
return path
def compare(self, base, cand, *options):
return subprocess.run([str(BINARY), "compare", str(base), str(cand), *map(str, options)],
text=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, timeout=10)
def test_verdicts(self):
base = self.dataset("base", [100] * 5)