Skip to content

Commit

Permalink
add testing script
Browse files Browse the repository at this point in the history
  • Loading branch information
amogh-saxena committed Oct 19, 2020
1 parent 80d2219 commit 0dc4542
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions testing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import time
from query import query
import random, string
from random_word import RandomWords

def test(text,queries):
start_time = time.time()
query(text,queries)
end_time = time.time()
return end_time-start_time


def testing():
r = RandomWords()
text = r.get_random_word()
print("Testing using the word - " + text + "\n")
for i in range(5,25,5):
print(str(i) + " queries - " + str(test(text,i)) + " seconds")
print("\n")

def tester():
for i in range(10):
testing()
if __name__ == '__main__':
tester()

0 comments on commit 0dc4542

Please sign in to comment.