<jupyter_start><jupyter_text>`timing` package examples  initialization<jupyter_code>import timing

_TIME = timing.get_timing_group(__name__)  # type: timing.TimingGroup
import logging

_LOG = logging.getLogger(__name__)
import time

def spam():
    time.sleep(0.1)

def more_spam():
    time.sleep(0.2)

def ham():
    time.sleep(0.3)

def more_ham():
    time.sleep(0.4)

def eggs():
    time.sleep(0.0005)

def more_eggs():
    time.sleep(0.0006)

def bacon():
    time.sleep(0.0007)

def more_bacon():
    time.sleep(0.0008)

def tomatoes():
    time.sleep(0.0009)

def more_tomatoes():
    time.sleep(0.0010)<jupyter_output><empty_output><jupyter_text>measurements<jupyter_code>timer = _TIME.start('spam')  # type: timing.Timing
spam()
more_spam()
timer.stop()
with _TIME.measure('ham') as timer:  # type: timing.Timing
    ham()
    more_ham()
for timer in _TIME.measure_many('eggs', samples=1000):  # type: timing.Timing
    eggs()
    more_eggs()
for timer in _TIME.measure_many('bacon', threshold=0.5):  # type: timing.Timing
    bacon()
    more_bacon()
for timer in _TIME.measure_many('tomatoes', samples=500, threshold=0.5):  # type: timing.Timing
    tomatoes()
    more_tomatoes()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1463614063777596, 'fraction_numerical': 0.04006541291905151, 'mean_word_length': 4.488789237668161, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '181056', 'license': 'Apache-2.0', 'n_tokens_mistral': 492, 'n_tokens_neox': 465, 'n_words': 87, 'path': 'examples.ipynb', 'repo_name': 'mbdevpl/timing', 'size': '1223'}