Ticket #36190: test.py

File test.py, 496 bytes (added by Michel Le Bihan, 4 days ago)
Line 
1import time
2
3from pympler import asizeof
4
5
6start = time.process_time()
7
8with open("/dev/shm/piotrcki-wordlist-top10m.txt") as f:
9 passwords = {x.strip() for x in f}
10
11print("Reading password list took:", time.process_time() - start)
12
13
14start = time.process_time()
15
16is_present = "asdfjkl:" in passwords
17
18print("Checking if password is in list took:", time.process_time() - start)
19
20print("Password is in list:", is_present)
21
22print("Size of passwords in MB:", asizeof.asizeof(passwords) / 1024**2)
Back to Top