Skip to content

Commit 45cc044

Browse files
committed
Try fix path to plot.py
1 parent e3f4c1b commit 45cc044

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/soa-benchmark.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
cmake --build ${{github.workspace}}/build
1616
- name: run benchmarks
1717
run: |
18-
cd ${{github.workspace}}/build
19-
python3 ../plot.py
18+
ls
19+
python3 ${{github.workspace}}/plot.py ${{github.workspace}}/build
2020
- name: upload results
2121
uses: actions/upload-artifact@v4
2222
with:

plot.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from matplotlib.ticker import FuncFormatter
33
import pandas as pd
44
import subprocess
5+
import sys
56
import os
67
import json
78

@@ -50,9 +51,12 @@ def plot_results(df, title):
5051
if __name__ == "__main__":
5152
print("Running the benchmarks...")
5253

54+
dirname = sys.argv[1]
55+
5356
for f, t in zip(['soa_boost', 'soa_wrapper'], ['Preprocessor Macros SoA', 'Template Metaprogramming SoA']):
54-
subprocess.run([f"./{f}", "--benchmark_out_format=json", f"--benchmark_out={f}.json",
57+
filename = f"{dirname}/{f}"
58+
subprocess.run([f"./{filename}", "--benchmark_out_format=json", f"--benchmark_out={filename}.json",
5559
"--benchmark_counters_tabular=true", "--benchmark_repetitions=3"])
56-
df = read_data(f"{f}.json")
60+
df = read_data(f"{filename}.json")
5761
plot_results(df, t)
58-
os.remove(f"{f}.json")
62+
os.remove(f"{filename}.json")

0 commit comments

Comments
 (0)