<commit_before>
import time
from jinja2 import Template, Environment, FileSystemLoader

# env = Environment(loader=FileSystemLoader('.'))
# src = open('index.html').read()

# print env._generate(env._parse(src, 'poop', 'hello.html'),
#                     'poop',
#                     'hello.html')

env = Environment(loader=FileSystemLoader('.'))
times = []

for i in range(100):
    env = Environment(loader=FileSystemLoader('.'))
    t1 = time.time()
    tmpl = env.get_template('index.html')
    tmpl.render({'username': 'james',
                 'arr': [5]*1000})
    t2 = time.time()

    times.append(t2-t1)

print reduce(lambda x, y: x+y, times) / len(times)<commit_msg>tweak benchmark<commit_after>
import time
from jinja2 import Template, Environment, FileSystemLoader

# env = Environment(loader=FileSystemLoader('.'))
# src = open('index.html').read()

# print env._generate(env._parse(src, 'poop', 'hello.html'),
#                     'poop',
#                     'hello.html')

env = Environment(loader=FileSystemLoader('.'))
times = []
arr = [5]*1000

for i in range(100):
    env = Environment(loader=FileSystemLoader('.'))
    t1 = time.time()
    tmpl = env.get_template('index.html')
    tmpl.render({'username': 'james',
                 'arr': arr})
    t2 = time.time()

    times.append(t2-t1)

print reduce(lambda x, y: x+y, times) / len(times)
{'fraction_non_alphanumeric': 0.17153284671532848, 'fraction_numerical': 0.01897810218978102, 'mean_word_length': 3.1171171171171173, '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': '711024', 'n_tokens_mistral': 466, 'n_tokens_neox': 445, 'n_words': 94}