Esempio n. 1
0
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
Esempio n. 2
0
def rust(filename: str) -> Document:
    return html_py_ever.parse_file(filename)
Esempio n. 3
0
def test_bench_selector_rust(benchmark, filename):
    document = html_py_ever.parse_file(filename)
    benchmark(document.select, "a[href]")