Skip to content

Commit fd0924e

Browse files
committed
Refactor performance tests workflow and enhance performance plot generation
- Renamed job from 'publish' to 'performance-tests' for clarity. - Added step to upload performance plot artifact after tests. - Updated boxplot function to use 'tick_labels' for better label handling.
1 parent cb382a7 commit fd0924e

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/performance_tests.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions:
1717
contents: read
1818

1919
jobs:
20-
publish:
20+
performance-tests:
2121
defaults:
2222
run:
2323
working-directory: ./python
@@ -48,4 +48,12 @@ jobs:
4848
env:
4949
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
5050
E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }}
51-
E2B_TESTS_TEMPLATE: ${{ inputs.E2B_TESTS_TEMPLATE }}
51+
E2B_TESTS_TEMPLATE: ${{ inputs.E2B_TESTS_TEMPLATE }}
52+
53+
- name: Upload performance plot artifact
54+
uses: actions/upload-artifact@v4
55+
if: always()
56+
with:
57+
name: performance-plot-${{ github.run_number }}
58+
path: tests/performance_plot.png
59+
retention-days: 30

python/tests/performance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def create_performance_plot(
159159
"Second Code\nRun",
160160
]
161161

162-
box_plot = ax2.boxplot(all_metrics, labels=metric_names, patch_artist=True)
162+
box_plot = ax2.boxplot(all_metrics, tick_labels=metric_names, patch_artist=True)
163163
colors = ["lightblue", "lightgreen", "lightcoral", "plum"]
164164
for patch, color in zip(box_plot["boxes"], colors):
165165
patch.set_facecolor(color)

0 commit comments

Comments
 (0)