Skip to content

Commit 5756664

Browse files
ozgesolidkeyclaude
andcommitted
Add benchmark test suite with GitHub Actions workflow
Run performance benchmarks (indexing, search, filter, analysis) on synthetic log files up to 1M lines. Results are posted to the Actions job summary. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5a85687 commit 5756664

3 files changed

Lines changed: 526 additions & 2 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Benchmark
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
benchmark:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
cache: 'npm'
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Run benchmark
26+
run: npm run benchmark 2>&1 | tee benchmark-output.txt
27+
28+
- name: Post benchmark results to summary
29+
if: always()
30+
run: |
31+
echo '## Benchmark Results' >> $GITHUB_STEP_SUMMARY
32+
echo '' >> $GITHUB_STEP_SUMMARY
33+
echo '```' >> $GITHUB_STEP_SUMMARY
34+
grep -A 100 'LOGAN BENCHMARK RESULTS' benchmark-output.txt >> $GITHUB_STEP_SUMMARY || echo 'No results table found' >> $GITHUB_STEP_SUMMARY
35+
echo '```' >> $GITHUB_STEP_SUMMARY
36+
37+
- name: Upload benchmark output
38+
if: always()
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: benchmark-results
42+
path: benchmark-output.txt
43+
retention-days: 30

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
"dev": "npm run build && electron .",
1212
"watch": "tsc -w",
1313
"typecheck": "tsc --noEmit",
14-
"test": "vitest run",
15-
"test:watch": "vitest",
14+
"test": "vitest run --exclude src/tests/benchmark.test.ts",
15+
"test:watch": "vitest --exclude src/tests/benchmark.test.ts",
16+
"benchmark": "vitest run src/tests/benchmark.test.ts --reporter verbose --no-file-parallelism",
1617
"package": "npm run build && electron-builder --mac",
1718
"package:win": "npm run build && electron-builder --win",
1819
"package:linux": "npm run build && electron-builder --linux",

0 commit comments

Comments
 (0)