INNER CODE UNIT · Python

_load

mbhall88/rasusa · benches/lib.py:14

def _load(path):
    try:
        with open(path) as f:
            return json.load(f)
    except FileNotFoundError:
        return {"scenarios": {}}


def _dump(path, data):
    with open(path, "w") as f:
        json.dump(data, f, indent=2, sort_keys=True)
        f.write("\n")


def cmd_write_scenario(args):
    # write-scenario <result.json> <scenario> <wall_mean_s> <wall_stddev_s> <peak_rss_bytes|"">
    path, scenario, wall_mean, wall_stddev, rss = args
    data = _load(path)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…