<commit_before>## Copyright (c) Cognitect, Inc.
## All rights reserved.

from transit.reader import JsonUnmarshaler
import time
from StringIO import StringIO
def run_tests(data):
    t = time.time()
    JsonUnmarshaler().load(StringIO(data))
    print "Done: " + str((time.time() - t) * 1000.0)

data = open("../transit/seattle-data0.tjs", 'r').read()

for x in range(100):
    run_tests(data)

<commit_msg>Close the FD in the test<commit_after>## Copyright (c) Cognitect, Inc.
## All rights reserved.

from transit.reader import JsonUnmarshaler
import time
from StringIO import StringIO
def run_tests(data):
    t = time.time()
    JsonUnmarshaler().load(StringIO(data))
    print "Done: " + str((time.time() - t) * 1000.0)

fd = open("../transit/seattle-data0.tjs", 'r')
data = fd.read()
fd.close()

for x in range(100):
    run_tests(data)


{'fraction_non_alphanumeric': 0.15402843601895735, 'fraction_numerical': 0.02132701421800948, 'mean_word_length': 4.059880239520958, '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': '4482228', 'n_tokens_mistral': 311, 'n_tokens_neox': 292, 'n_words': 80}