def locking_expt_records(outdir, filename, threads, txns, records, expt, distribution, theta, rec_size): outfile = os.path.join(outdir, filename) temp = os.path.join(outdir, filename[:filename.find(".txt")] + "_out.txt") os.system("mkdir -p outdir") outdep = os.path.join(outdir, "." + filename) if not os.path.exists(outdep): os.system("rm locking.txt") cmd = fmt_locking.format(str(threads), str(txns), str(records), str(expt), str(distribution), str(theta), str(rec_size)) os.system(cmd) os.system("cat locking.txt >>" + outfile) clean.records_fn(outfile, temp) saved_dir = os.getcwd() os.chdir(outdir) os.system("gnuplot plot.plt") os.chdir(saved_dir)