|
9 | 9 | import os |
10 | 10 | import subprocess |
11 | 11 |
|
12 | | -import matplotlib.pyplot as plt |
13 | 12 | import pandas as pd |
14 | 13 |
|
15 | 14 |
|
@@ -64,14 +63,16 @@ def create_comparison_table(results): |
64 | 63 | for result in results: |
65 | 64 | commit = result.get("git_info", {}).get("commit_hash", "unknown")[:8] |
66 | 65 | date = result.get("git_info", {}).get("commit_date", "unknown") |
67 | | - |
| 66 | + system_info = result["system_info"] |
| 67 | + python_version = system_info["python_version"] |
| 68 | + python_implementation = system_info.get("python_implementation", "") |
| 69 | + if python_implementation: |
| 70 | + python_version = python_version + " " + python_implementation |
68 | 71 | row = { |
69 | 72 | "timestamp": result.get("timestamp", "unknown"), |
70 | 73 | "commit": _try_get_git_tag(commit), |
71 | 74 | "date": date, |
72 | | - "python_version": result.get("system_info", {}).get( |
73 | | - "python_version", "unknown" |
74 | | - ), |
| 75 | + "python_version": python_version, |
75 | 76 | "platform": result.get("system_info", {}).get("platform", "unknown"), |
76 | 77 | "branch": result.get("git_info", {}).get("branch", "unknown"), |
77 | 78 | } |
@@ -124,38 +125,6 @@ def _aggregate(df: pd.DataFrame, by: str): |
124 | 125 | return aggregated_df |
125 | 126 |
|
126 | 127 |
|
127 | | -def plot_performance_trends(df, output_file="performance_trends.png"): |
128 | | - """Create a plot showing performance trends""" |
129 | | - plt.figure(figsize=(12, 8)) |
130 | | - |
131 | | - # Plot time metrics |
132 | | - time_cols = [col for col in df.columns if col.endswith("_avg_ms")] |
133 | | - for col in time_cols: |
134 | | - plt.subplot(2, 1, 1) |
135 | | - plt.plot(df["date"], df[col], marker="o", label=col) |
136 | | - |
137 | | - plt.title("Performance Trends Across Commits") |
138 | | - plt.ylabel("Time (ms)") |
139 | | - plt.xticks(rotation=45) |
140 | | - plt.legend() |
141 | | - plt.grid(True) |
142 | | - |
143 | | - # Plot memory metrics |
144 | | - mem_cols = [col for col in df.columns if col.endswith("_peak_mb")] |
145 | | - for col in mem_cols: |
146 | | - plt.subplot(2, 1, 2) |
147 | | - plt.plot(df["date"], df[col], marker="s", label=col) |
148 | | - |
149 | | - plt.ylabel("Memory (MB)") |
150 | | - plt.xticks(rotation=45) |
151 | | - plt.legend() |
152 | | - plt.grid(True) |
153 | | - |
154 | | - plt.tight_layout() |
155 | | - plt.savefig(output_file) |
156 | | - print(f"Plot saved to {output_file}") |
157 | | - |
158 | | - |
159 | 128 | def _set_conditional_formatting(df, worksheet, max_row): |
160 | 129 | all_cols = [ |
161 | 130 | col for col in df.columns if col.endswith("_avg_ms") or col.endswith("_peak_mb") |
|
0 commit comments