Skip to content

πŸš€ v2.0.36: Unify versions & docs for KotlinConf 2025-2026 submission #293

πŸš€ v2.0.36: Unify versions & docs for KotlinConf 2025-2026 submission

πŸš€ v2.0.36: Unify versions & docs for KotlinConf 2025-2026 submission #293

Workflow file for this run

# Performance Regression CI

Check failure on line 1 in .github/workflows/performance.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/performance.yml

Invalid workflow file

(Line: 104, Col: 19): Unexpected symbol: '"pass"'. Located at position 27 within expression: env.PERFORMANCE_STATUS == "pass" && "βœ… All performance tests passed!" || "❌ Performance regression detected!"
# Runs on every push/PR to detect performance regressions early
# Fails if thresholds are exceeded
name: Performance Regression
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: perf-${{ github.ref }}
cancel-in-progress: true
jobs:
performance-check:
name: Performance Regression Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run Performance Benchmarks
id: benchmark
run: |
echo "πŸš€ Running performance regression tests..."
./gradlew :common:desktopTest \
--tests "*PerformanceBenchmarkTest*" \
--tests "*PerformanceRegressionTest*" \
--no-daemon \
--console=plain 2>&1 | tee benchmark-output.txt
- name: Check for Regressions
run: |
echo "πŸ“Š Checking for performance regressions..."
# Check if tests passed
if grep -q "BUILD SUCCESSFUL" benchmark-output.txt; then
echo "βœ… All performance tests passed - no regressions detected"
echo "PERFORMANCE_STATUS=pass" >> $GITHUB_ENV
else
echo "❌ Performance regression detected!"
echo "PERFORMANCE_STATUS=fail" >> $GITHUB_ENV
exit 1
fi
- name: Generate Performance Summary
if: always()
run: |
mkdir -p performance-results
cat <<EOF > performance-results/summary.md
# Performance Regression Report
**Commit:** \`${{ github.sha }}\`
**Branch:** \`${{ github.ref_name }}\`
**Date:** $(date -u +"%Y-%m-%d %H:%M UTC")
**Status:** ${{ env.PERFORMANCE_STATUS == 'pass' && 'βœ… PASS' || '❌ FAIL' }}
## Thresholds
| Metric | Target | Status |
|--------|--------|--------|
| Full URL Analysis | <50ms | ${{ env.PERFORMANCE_STATUS == 'pass' && 'βœ…' || '❌' }} |
| P99 Latency | <50ms | ${{ env.PERFORMANCE_STATUS == 'pass' && 'βœ…' || '❌' }} |
| Heuristics Engine | <10ms | ${{ env.PERFORMANCE_STATUS == 'pass' && 'βœ…' || '❌' }} |
| ML Inference | <5ms | ${{ env.PERFORMANCE_STATUS == 'pass' && 'βœ…' || '❌' }} |
| Brand Detection | <15ms | ${{ env.PERFORMANCE_STATUS == 'pass' && 'βœ…' || '❌' }} |
| Throughput | >100 URLs/sec | ${{ env.PERFORMANCE_STATUS == 'pass' && 'βœ…' || '❌' }} |
## Why This Matters
- **User Experience:** <50ms analysis enables real-time feedback during QR scanning
- **Battery Life:** Fast execution minimizes CPU time and energy consumption
- **Responsiveness:** No UI jank or delay during analysis
EOF
cat performance-results/summary.md
- name: Upload Performance Report
uses: actions/upload-artifact@v4
if: always()
with:
name: performance-report
path: performance-results/
retention-days: 30
- name: Comment on PR
if: github.event_name == 'pull_request' && always()
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
let report = '## πŸ“Š Performance Check\n\n';
try {
report += fs.readFileSync('performance-results/summary.md', 'utf8');
} catch (e) {
report += '${{ env.PERFORMANCE_STATUS == "pass" && "βœ… All performance tests passed!" || "❌ Performance regression detected!" }}';
}
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: report
});