<commit_before>import unittest
import sys

sys.path.append("../src/")
from blowfish import Blowfish

class TestRunningTime(unittest.TestCase):
    def setUp(self):
        self.n = 1

    def test_ntimes(self):
        for i in range(self.n):
            self.test_once()

    def test_once(self):
        zero_key = bytearray(b'\x00' * Blowfish.keySize())
        self.cipher = Blowfish(zero_key)

        zero_block = bytearray(b'\x00' * Blowfish.blockSize())
        self.cipher.encrypt(zero_block)
        print(zero_block)



x = TestRunningTime()
x.setUp()
x.test_ntimes()<commit_msg>Running time profiles are here!<commit_after>import unittest
import sys
from datetime import datetime
import cProfile

sys.path.append("../src/")
from blowfish import Blowfish

class TestRunningTime(unittest.TestCase):
    def setUp(self):
        self.n = 1

    def test_ntimes(self):
        t = datetime.now()
        #print("Starting trial at " +str(t))
        zero_key = bytearray(b'\x00' * Blowfish.keySize())
        self.cipher = Blowfish(zero_key)
        for i in range(self.n):
            self.test_once()
        y = datetime.now()
        t = y - t
        #print("Ending timetrial at " + str(y))
        #print("Total time taken: "+str(t))

    def test_once(self):
        

        zero_block = bytearray(b'\x00' * Blowfish.blockSize())
        self.cipher.encrypt(zero_block)
        #print(zero_block)



x = TestRunningTime()
x.setUp()
n = input("How many times should the all 0 bitstring?\n")
x.n = int(n)
cProfile.run('x.test_ntimes()')
{'fraction_non_alphanumeric': 0.1296774193548387, 'fraction_numerical': 0.0070967741935483875, 'mean_word_length': 2.7373493975903616, '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': '3556015', 'n_tokens_mistral': 541, 'n_tokens_neox': 518, 'n_words': 115}