Skip to content

Commit 4f1b7f8

Browse files
committed
fix
1 parent 450919a commit 4f1b7f8

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/ci-performance.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,13 @@ jobs:
224224
const changeStr = change > 0 ? \`+\${change.toFixed(1)}%\` : \`\${change.toFixed(1)}%\`;
225225
226226
let status = '✅';
227-
if (change > 50) {
227+
if (change > 100) {
228228
status = '❌ Much Slower';
229229
hasRegression = true;
230-
} else if (change > 25) {
230+
} else if (change > 50) {
231231
status = '⚠️ Slower';
232232
hasRegression = true;
233-
} else if (change < -25) {
233+
} else if (change < -50) {
234234
status = '🚀 Faster';
235235
hasImprovement = true;
236236
}
@@ -281,9 +281,9 @@ jobs:
281281
echo "" >> comment.md
282282
echo "</details>" >> comment.md
283283
echo "" >> comment.md
284-
echo "*Benchmarks ran with ${BENCHMARK_ITERATIONS:-300} iterations per test on Node.js ${{ env.NODE_VERSION }}*" >> comment.md
284+
echo "*Benchmarks ran with ${BENCHMARK_ITERATIONS:-1000} iterations per test on Node.js ${{ env.NODE_VERSION }}*" >> comment.md
285285
echo "" >> comment.md
286-
echo "> **Note:** Benchmarks run on shared CI infrastructure and may show ±20% variance between runs. Only sustained regressions >25% are flagged." >> comment.md
286+
echo "> **Note:** Benchmarks run on shared CI infrastructure and may show ±30% variance between runs. Only regressions >50% are flagged as concerning." >> comment.md
287287
288288
- name: Comment PR with results
289289
if: github.event_name == 'pull_request'

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ Performance benchmarks are located in [`benchmark/performance.js`](benchmark/per
341341
4. **Test locally**: Run the benchmarks locally to verify they work:
342342
```bash
343343
npm run benchmark:quick # Quick test with 10 iterations
344-
npm run benchmark # Full test with 100 iterations
344+
npm run benchmark # Full test with 1000 iterations
345345
```
346346

347347
For new features where no baseline exists, the CI will establish new benchmarks that future PRs will be compared against.

benchmark/performance.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const MONGODB_URI = process.env.MONGODB_URI || 'mongodb://localhost:27017/parse_
1919
const SERVER_URL = 'http://localhost:1337/parse';
2020
const APP_ID = 'benchmark-app-id';
2121
const MASTER_KEY = 'benchmark-master-key';
22-
const ITERATIONS = parseInt(process.env.BENCHMARK_ITERATIONS || '300', 10);
22+
const ITERATIONS = parseInt(process.env.BENCHMARK_ITERATIONS || '1000', 10);
2323

2424
// Parse Server instance
2525
let parseServer;

0 commit comments

Comments
 (0)