def performance_test__regex_basic_mirrorlization(self):
"""? regex_basic_mirrorlization ??????"""
from more_configs.config_google_and_zhwikipedia import target_domain, external_domains
self.reload_zmirror(configs_dict=dict(
target_domain=target_domain,
external_domains=external_domains,
))
from time import process_time
reg_func = self.zmirror.response_text_basic_mirrorlization
print(self.zmirror.regex_basic_mirrorlization.pattern)
with open(zmirror_file("tests/sample/google_home.html"), "r", encoding="utf-8") as fp:
text = fp.read()
start_time = process_time()
for _ in range(1000):
reg_func(text)
print("100x google_home.html", process_time() - start_time)
评论列表
文章目录