Skip to content

Commit

Permalink
fixes issue 876 bad assumption about temp path
Browse files Browse the repository at this point in the history
  • Loading branch information
fbbradheintz committed Dec 11, 2020
1 parent c15fb54 commit ae71749
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions benchmarks/benchmark-ab.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,9 @@ def extract_metrics():
if pattern.search(line):
all_lines.append(line.split("|")[0].split(':')[3].strip())

click.secho(f"\nWriting extracted {v} metrics to {k} ", fg='green')
with open(f'{TMP_DIR}/benchmark/{k}', 'w') as outf:
out_fname = f'{TMP_DIR}/benchmark/{k}'
click.secho(f"\nWriting extracted {v} metrics to {out_fname} ", fg='green')
with open(out_fname, 'w') as outf:
all_lines = map(lambda x: x + '\n', all_lines)
outf.writelines(all_lines)

Expand Down Expand Up @@ -326,7 +327,7 @@ def generate_profile_graph():

plot_data = {}
for m in metrics:
df = pd.read_csv(f'/tmp/benchmark/{m}', header=None)
df = pd.read_csv(f'{TMP_DIR}/benchmark/{m}', header=None)
m = m.split('.txt')[0]
plot_data[f"{m}_index"] = df.index
plot_data[f"{m}_values"] = df.values
Expand Down

0 comments on commit ae71749

Please sign in to comment.