def rust(filename: str) -> Tuple[int, float, float]: start_load = perf_counter() doc = html_py_ever.parse_file(filename) end_load = perf_counter() start_search = perf_counter() links = doc.select("a[href]") end_search = perf_counter() return len(links), end_load - start_load, end_search - start_search
def rust(filename: str) -> Document: return html_py_ever.parse_file(filename)
def test_bench_selector_rust(benchmark, filename): document = html_py_ever.parse_file(filename) benchmark(document.select, "a[href]")