Skip to content

Commit

Permalink
calc difference
Browse files Browse the repository at this point in the history
  • Loading branch information
victoryang00 committed Dec 6, 2023
1 parent 5eed9ac commit b4ec917
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 1 deletion.
Binary file modified example-output/execution_times_for_log2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example-output/execution_times_for_memcpy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example-output/execution_times_for_memory a + b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example-output/execution_times_for_prime.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example-output/execution_times_for_return directly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example-output/execution_times_for_strcmp match.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example-output/execution_times_for_strcmp_mismatch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example-output/execution_times_for_switch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example-output/execution_usage_bar_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example-output/jit_execution_times.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example-output/jit_usage_bar_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion example-output/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,15 @@

i = 0

sum_llvm_jit = 0
sum_native = 0

for ax, (test_name, runtimes_data) in zip(axes.ravel(), plot_data.items()):

values = [runtimes_data.get(exe, 0) for exe in selected_runtimes]

print(values)
sum_llvm_jit += values[2]
sum_native += values[4]
# 更新显示名称
display_names = [exe.replace('llvm-jit', 'llvm jit') for exe in selected_runtimes]

Expand Down Expand Up @@ -172,6 +177,9 @@
# 自动调整子图间距,确保标签和标题不会重叠
plt.tight_layout(pad=3.0)

print(sum_llvm_jit)
print(sum_native)
print(sum_llvm_jit / sum_native)
# 可以选择将图例放在图表下方
handles = [plt.Rectangle((0,0),1,1, color=colors[i]) for i in range(len(selected_runtimes))]
labels = [name.replace('llvm-jit', 'llvm jit') for name in selected_runtimes]
Expand Down

0 comments on commit b4ec917

Please sign in to comment.