Skip to content

Commit 573c62d

Browse files
committed
bench: chmod +x bench scripts
1 parent 0ec409e commit 573c62d

File tree

4 files changed

+16
-22
lines changed

4 files changed

+16
-22
lines changed

.github/workflows/benchmark.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
benchmark:
1919
name: Performance Benchmark
2020
runs-on: ubuntu-latest
21-
timeout-minutes: 30
2221

2322
steps:
2423
- name: Check out the repo
@@ -112,13 +111,6 @@ jobs:
112111
run: |
113112
pip install pandas matplotlib seaborn numpy
114113
115-
- name: Make scripts executable
116-
run: |
117-
chmod +x benchmarks/run-benchmarks.sh
118-
chmod +x benchmarks/benchmark.sh
119-
chmod +x benchmarks/analyze-benchmarks.py
120-
chmod +x benchmarks/move-results.sh
121-
122114
- name: Setup benchmark results directory
123115
run: |
124116
mkdir -p benchmark-results
@@ -132,9 +124,7 @@ jobs:
132124
RESULTS_DIR: benchmark-results
133125

134126
- name: Generate PR benchmark summary
135-
run: |
136-
chmod +x benchmarks/generate-pr-summary.py
137-
python3 benchmarks/generate-pr-summary.py
127+
run: python3 benchmarks/generate-pr-summary.py
138128
env:
139129
GITHUB_SHA: ${{ github.sha }}
140130
RUNNER_OS: ${{ runner.os }}

benchmarks/README.md

100644100755
File mode changed.

benchmarks/generate-pr-summary.py

100644100755
Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,22 @@ def parse_latency(latency_str):
3434
if not latency_str or latency_str == "N/A":
3535
return 0
3636

37-
latency_str = str(latency_str).lower()
38-
if 'ms' in latency_str:
39-
return float(latency_str.replace('ms', ''))
40-
elif 's' in latency_str and 'ms' not in latency_str:
41-
return float(latency_str.replace('s', '')) * 1000
42-
elif 'us' in latency_str:
43-
return float(latency_str.replace('us', '')) / 1000
44-
else:
45-
try:
37+
latency_str = str(latency_str).lower().strip()
38+
39+
try:
40+
# Check for most specific patterns first
41+
if 'ms' in latency_str:
42+
return float(latency_str.replace('ms', ''))
43+
elif 'us' in latency_str:
44+
return float(latency_str.replace('us', '')) / 1000
45+
elif latency_str.endswith('s'):
46+
# Only for pure seconds (not microseconds or milliseconds)
47+
return float(latency_str.replace('s', '')) * 1000
48+
else:
49+
# Try to parse as plain number (assume milliseconds)
4650
return float(latency_str)
47-
except:
48-
return 0
51+
except (ValueError, TypeError):
52+
return 0
4953

5054
def format_rps(rps_str):
5155
"""Format RPS for display"""

benchmarks/move-results.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)