def usage(when):
    gc.collect()
    process = psutil.Process(os.getpid())
    bytes = process.memory_info().rss
    mb = (bytes / (1024 * 1024.0))
    gb = (bytes / (1024 * 1024 * 1024.0))
    return "USAGE: %s current: %s MB (%s GB)" % \
           (when, int(mb), round(gb, 2))
dataset/ETHPy150Open UDST/activitysim/activitysim/activitysim.py/usage/original