<commit_before>import timeit
setup="""
from _ppeg import Pattern

text = open('kjv10.txt').read()

pat = Pattern()
pat.setdummy()
pat.dump()
"""

t = timeit.Timer(stmt='print pat.match(text)', setup=setup)
N=5
print "Time taken: %.2f sec" % (t.timeit(N)/float(N))
<commit_msg>Update timing test to new pattern API<commit_after>import timeit
setup="""
from _ppeg import Pattern

text = open('kjv10.txt').read()

pat = Pattern.Dummy()
pat.dump()
"""

t = timeit.Timer(stmt='print pat(text)', setup=setup)
N=5
print "Time taken: %.2f sec" % (t.timeit(N)/float(N))

{'fraction_non_alphanumeric': 0.19073083778966132, 'fraction_numerical': 0.0142602495543672, 'mean_word_length': 5.459770114942529, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2300709', 'n_tokens_mistral': 218, 'n_tokens_neox': 213, 'n_words': 53}