def get_runtime_and_maxRAM(dataset):
    """ Return runtime in hours and max RAM in GB """

    curr_dir = dataset + "/"
    log = {}
    logfile = curr_dir + dataset + ".log"
    with open(logfile) as f:
        for line in f:
            if line.startswith("="):
                continue
            (key, val) = line.split()[0:2]
            log[key] = val
    
    runtime_s = float((log["ru_utime"]).split("s")[0])
    max_RAM = float(log["maxvmem"].split("GB")[0])

    # Convert to hours
    runtime = round(runtime_s/(60*60),3)
    return runtime, max_RAM