exA: make sure file is written with newline at the end
This commit is contained in:
parent
5154b6df70
commit
01ad60042d
1 changed files with 3 additions and 2 deletions
|
@ -24,8 +24,9 @@ elapsed_time = time.time() - start_time
|
||||||
print(f'Time used for matrix multiplication: {elapsed_time:.2f} s')
|
print(f'Time used for matrix multiplication: {elapsed_time:.2f} s')
|
||||||
|
|
||||||
# Check if timings folder exists
|
# Check if timings folder exists
|
||||||
if not os.path.isdir('timings/'): os.mkdir('timings')
|
if not os.path.isdir('timings/'):
|
||||||
|
os.mkdir('timings')
|
||||||
|
|
||||||
# IO: Save the timing to a unique txt file
|
# IO: Save the timing to a unique txt file
|
||||||
with open(f'timings/{threads}_threads_t{timestamp}.txt', 'w') as file:
|
with open(f'timings/{threads}_threads_t{timestamp}.txt', 'w') as file:
|
||||||
file.write(f'{threads},{elapsed_time:.6f}')
|
print(f'{threads},{elapsed_time:.6f}', file=file)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue