This commit is contained in:
Untriex Programming
2021-04-01 12:08:36 +02:00
parent 4161f49870
commit 79b5537440
6 changed files with 99 additions and 37 deletions

24
server/test.py Normal file
View File

@@ -0,0 +1,24 @@
import threading
import uuid
import time
zoznam = []
rovnake = 0
run = True
start = time.time()
def generate():
global zoznam, rovnake, run
while run:
cache = uuid.uuid4().hex[24:]
if cache in zoznam:
rovnake += 1
zoznam.append(cache)
pocet = len(zoznam)
print(f"{pocet} : {rovnake} rovnakých - {cache}")
if pocet > 50000:
break
generate()
print(f"process lasted {time.time()-start}")