<commit_before>
def printKeys(evt):
    print evt.keys()    

def printNativeKeys(evt):
    print evt.nativeKeys()

def printID(eventID):
    for k,v in eventID.iteritems():
        print "%s = %s" %(k, v.data)
        try:
            print "datetime64 = %s" %(v.datetime64)
        except AttributeError:
            pass
        try:
            print "fiducials = %s" %(v.fiducials)
        except AttributeError:
            pass
        try:
            print "run = %s" %(v.run)
        except AttributeError:
            pass
        try:
            print "ticks = %s" %(v.ticks)
        except AttributeError:
            pass
        try:
            print "vector = %s" %(v.vector)
        except AttributeError:
            pass<commit_msg>Add processing rate counter<commit_after>import collections
import datetime

def printKeys(evt):
    print evt.keys()    

def printNativeKeys(evt):
    print evt.nativeKeys()

def printID(eventID):
    for k,v in eventID.iteritems():
        print "%s = %s" %(k, v.data)
        try:
            print "datetime64 = %s" %(v.datetime64)
        except AttributeError:
            pass
        try:
            print "fiducials = %s" %(v.fiducials)
        except AttributeError:
            pass
        try:
            print "run = %s" %(v.run)
        except AttributeError:
            pass
        try:
            print "ticks = %s" %(v.ticks)
        except AttributeError:
            pass
        try:
            print "vector = %s" %(v.vector)
        except AttributeError:
            pass


processingTimes = collections.deque([],100)

def printProcessingRate(evt = None):
    processingTimes.appendleft(datetime.datetime.now())
    dt = processingTimes[0] - processingTimes[-1]
    if(len(processingTimes) > 1):
        print "Processing at %g Hz" % (len(processingTimes)/dt.total_seconds())
    
{'fraction_non_alphanumeric': 0.11212446351931331, 'fraction_numerical': 0.0075107296137339056, 'mean_word_length': 1.7961019490254873, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '7519146', 'n_tokens_mistral': 567, 'n_tokens_neox': 562, 'n_words': 142}