<filename>benchmark/statistics.py
import os,time,json,shutil,datetime

startopen=open("temp/temp_logs/start.txt", mode='r')
starttime = float(startopen.read())
startopen.close()
numberopen=open("temp/temp_logs/number.txt", mode='r')
number = numberopen.read()
numberopen.close()
overopen=open("temp/temp_logs/over.txt", mode='r')
picover = float(overopen.read())
overopen.close()

condition=True
while(condition):
    if(os.path.exists('temp/temp_output/' + str(number) + '.wav')):
        condition=False
        overtime=float(time.mktime(datetime.datetime.now().timetuple()))
        timeused=str(overtime-starttime)
        pictimeused=str(picover-starttime)
        audiotimeused=str(float(timeused)-float(pictimeused))

        score=str((1 // float(timeused) * audiotimeused + 10 ) ** float(pictimeused))
    else:
        donothing=True

outputinfo='TimeUsed:' + timeused + '\n' + 'Output Pictures TimeUsed:' + pictimeused + '\n' + 'Output Audios TimeUsed:' + audiotimeused + '\n' + 'Score:' + score
outputjson='{"TimeUsed":"' + timeused + '",' + '"Output_Pictures_TimeUsed":"' + pictimeused + '",' + '"Output_Audios_TimeUsed":"' + audiotimeused + '",' + '"Score":"' + score + '"}'
timelogwrite=open('score/' + str(time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) + '.txt'),mode='w')
timelogwrite.write(outputinfo)
timelogwrite.close()
timelogwrite=open('score/' + str(time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) + '.json'),mode='w')
timelogwrite.write(outputjson)
timelogwrite.close()
try:
    shutil.rmtree('temp')
except:
    time.slee(2)
    shutil.rmtree('temp')
<filename>benchmark/statistics.py
import os,time,json,shutil,datetime

startopen=open("temp/temp_logs/start.txt", mode='r')
starttime = float(startopen.read())
startopen.close()
numberopen=open("temp/temp_logs/number.txt", mode='r')
number = numberopen.read()
numberopen.close()
overopen=open("temp/temp_logs/over.txt", mode='r')
picover = float(overopen.read())
overopen.close()

condition=True
while(condition):
    if(os.path.exists('temp/temp_output/' + str(number) + '.wav')):
        condition=False
        overtime=float(time.mktime(datetime.datetime.now().timetuple()))
        timeused=str(overtime-starttime)
        pictimeused=str(picover-starttime)
        audiotimeused=str(float(timeused)-float(pictimeused))

        score=str((1 // float(timeused) * audiotimeused + 10 ) ** float(pictimeused))
    else:
        donothing=True

outputinfo='TimeUsed:' + timeused + '\n' + 'Output Pictures TimeUsed:' + pictimeused + '\n' + 'Output Audios TimeUsed:' + audiotimeused + '\n' + 'Score:' + score
outputjson='{"TimeUsed":"' + timeused + '",' + '"Output_Pictures_TimeUsed":"' + pictimeused + '",' + '"Output_Audios_TimeUsed":"' + audiotimeused + '",' + '"Score":"' + score + '"}'
timelogwrite=open('score/' + str(time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) + '.txt'),mode='w')
timelogwrite.write(outputinfo)
timelogwrite.close()
timelogwrite=open('score/' + str(time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) + '.json'),mode='w')
timelogwrite.write(outputjson)
timelogwrite.close()
try:
    shutil.rmtree('temp')
except:
    time.slee(2)
    shutil.rmtree('temp')