Add 'Informatics/InfLab4/' from commit '639d363dfbc85a37e6c2ba0dda202107ab3769d1'
git-subtree-dir: Informatics/InfLab4 git-subtree-mainline:a51dfe26c0git-subtree-split:639d363dfb
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
from time import time
|
||||
from task1 import json_to_bin
|
||||
from task2 import bin_to_yaml
|
||||
from task3 import json_to_yaml
|
||||
from task4 import bin_to_xml
|
||||
|
||||
|
||||
try:
|
||||
timer = time()
|
||||
for i in range(100):
|
||||
json_to_bin("schedule.json")
|
||||
bin_to_yaml("schedule.bin")
|
||||
print("json -> yaml")
|
||||
print(time() - timer)
|
||||
|
||||
timer = time()
|
||||
for i in range(100):
|
||||
json_to_yaml("schedule.json")
|
||||
print("json -> yaml (with libraries)")
|
||||
print(time() - timer)
|
||||
|
||||
timer = time()
|
||||
for i in range(100):
|
||||
json_to_bin("schedule.json")
|
||||
bin_to_xml("schedule.bin")
|
||||
print("json -> xml")
|
||||
print(time() - timer)
|
||||
except Exception as error:
|
||||
print(f"Ошибка: {error}")
|
||||
Reference in New Issue
Block a user