Commit ea76ec4d authored by Tom Fischer's avatar Tom Fischer
Browse files

Run time comparisons for different processes.

parent 1eacbdb4
#!/bin/python
import sys
import pandas as pd
import matplotlib.pyplot as plt
header_array=["branch","ctest process switch","run time"]
df = pd.read_csv(sys.argv[1], sep=',', names=header_array)
process_array=["ComponentTransport","ReactiveMassTransport","SteadyStateDiffusion","StokesFlow","HT","ThermalConvection","HeatConduction","BHE","HydroMechanics","LiquidFlow","LIE","PhaseField","ThermoRichardsMechanics"]
branches=["master","MeshLibElementCleanup"]
master_times=[]
MeshLibElementCleanup_times=[]
for process in process_array:
for branch in branches:
filtered_by_branch = df[df['branch'] == branch]
filtered_by_process_switch = filtered_by_branch[filtered_by_branch['ctest process switch'] == process]
if (branch == 'master'):
master_times.append(filtered_by_process_switch['run time'].mean())
if (branch == 'MeshLibElementCleanup'):
MeshLibElementCleanup_times.append(filtered_by_process_switch['run time'].mean())
#print(branch + ' ' + process + ' ' + str(filtered_by_process_switch['run time'].mean()))
print(master_times)
print(MeshLibElementCleanup_times)
final_df=pd.DataFrame(list(zip(process_array,master_times,MeshLibElementCleanup_times)), columns=['ctest process switch','master','MeshLibElementCleanup'])
final_df['relative_difference'] = (final_df['master']-final_df['MeshLibElementCleanup'])/final_df['master']
print(final_df)
ax = final_df.plot.bar(x='ctest process switch', y='relative_difference')
ax.set_ylabel(r'$\frac{t_{branch} - t_{master}}{t_{master}}$')
plt.grid()
plt.tight_layout()
plt.show()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment