def log_add_data(file, data):
    with open(file) as f:
        log = f.read()
        log = json.loads(log)
        log.update(data)
        log = json.dumps(log, sort_keys=True, indent=4, separators=(', ', ': '))
    with open(file, 'w') as f:
        f.write(log)
Merge the dictionary data into the json log file root.
dataset/ETHPy150Open datastax/cstar_perf/tool/cstar_perf/tool/benchmark.py/log_add_data