INNER CODE UNIT · Python

test_noise_uses_repeats

openHiTLS/openHiTLS · testcode/benchmark/async_perf/test_async_perf.py:202

    def test_noise_uses_repeats(self):
        proc = self.compare(self.dataset("base", [80, 100, 120]), self.dataset("cand", [103] * 3))
        self.assertEqual(proc.returncode, 0, proc.stdout)
        self.assertIn("NOISE", proc.stdout)

    def test_json_thresholds(self):
        thresholds = self.root / "thresholds.json"
        thresholds.write_text(json.dumps({"q1_sync_cross_build": 1.3, "noise_inline": 0.01}))
        proc = self.compare(self.dataset("base", [100] * 5), self.dataset("cand", [120] * 5),
                            "--thresholds", thresholds)
        self.assertEqual(proc.returncode, 0, proc.stdout)
        self.assertIn("PASS", proc.stdout)

    def test_cross_form(self):
        base = self.dataset("base", [100] * 5, mode="worker")
        for form in ("on-fd", "on-cb"):
            with self.subTest(form=form):
                proc = self.compare(base, self.dataset("cand", [40] * 5, form=form, mode="worker"),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…