Skip to content

Commit

Permalink
feat: Added result savin for raw data
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximilian Krebs committed Oct 24, 2024
1 parent ae1023c commit 29595bf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ cmake-build-debug
*.52579
target/
.pem
.bin
.bin

result.csv
20 changes: 19 additions & 1 deletion demo/runner/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import struct
import numpy as np
import matplotlib.pyplot as plt

import csv

REPEATEDEXECUTIONS=10000

Expand Down Expand Up @@ -93,12 +93,15 @@ def execute(path, name, arg):

fig, axs = plt.subplots(1, len(tasks_used), figsize=(15, 5))
i=1
dataagg={}

for task in tasks_used:
path = os.path.abspath(f"{democodeString}/{task}")
print("Running {})".format(task))
clean(path)
compile(path)
edata = execute(path, f"target/{task}", "")
dataagg[task]=edata

mean = np.mean(edata)
std_dev = np.std(edata)
Expand All @@ -112,6 +115,21 @@ def execute(path, name, arg):

i = i + 1

with open("result.csv", "w") as outfile:

# pass the csv file to csv.writer function.
writer = csv.writer(outfile)

# pass the dictionary keys to writerow
# function to frame the columns of the csv file
writer.writerow(dataagg.keys())

# make use of writerows function to append
# the remaining values to the corresponding
# columns using zip function.
writer.writerows(zip(*dataagg.values()))


# Creating plot
#mean = [np.mean(d) for d in data]
#std_devs = [np.std(d) for d in data]
Expand Down

0 comments on commit 29595bf

Please sign in to comment.