Skip to content
Snippets Groups Projects
main.py 1.15 KiB
Newer Older
import os
import time
from script.base.dataframe_base import load_dataframes
from script.build_cache import build_cache
bhm15's avatar
bhm15 committed
from script.analysis.course_analysis import *
bhm15's avatar
bhm15 committed
from datetime import timedelta
def analyze(submission):
    start_time = time.clock()
    start_time_exec = time.time()

    dataframe = load_dataframes(submission.path())

    build_cache(dataframe)

Jomaro Rodrigues's avatar
Jomaro Rodrigues committed
    submission.set_done(round(time.clock() - start_time))
    cpu_time = timedelta(seconds=round(time.clock() - start_time))
    run_time = timedelta(seconds=round(time.time() - start_time_exec))
    print("--- Tempo de CPU: {} ---".format(cpu_time))
    print("--- Tempo total: {} ---".format(run_time))

    start_time = time.clock()
    start_time_exec = time.time()

    dataframe = load_dataframes(os.getcwd() + '/script/' + 'base')
    build_cache(dataframe)
    cpu_time = timedelta(seconds=round(time.clock() - start_time))
bhm15's avatar
bhm15 committed
    analises_disciplinas(dataframe)
    run_time = timedelta(seconds=round(time.time() - start_time_exec))
    print("--- Tempo de CPU: {} ---".format(cpu_time))
    print("--- Tempo total: {} ---".format(run_time))
if __name__ == "__main__":