Skip to content

Commit 912ba18

Browse files
committed
draft: system tests working in node 21 with noop
1 parent dead429 commit 912ba18

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

system-test/busybench-js/src/busybench.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ const testArr = [];
2525
* It continues to do this until durationSeconds after the startTime.
2626
*/
2727
function busyLoop(durationSeconds) {
28+
const noop = () => {};
2829
for (let i = 0; i < testArr.length; i++) {
2930
for (let j = 0; j < testArr[i].length; j++) {
3031
testArr[i][j] = Math.sqrt(j * testArr[i][j]);
32+
noop();
3133
}
3234
}
3335
if (Date.now() - startTime < 1000 * durationSeconds) {

system-test/busybench/src/busybench.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ const testArr: number[][] = [];
2727
* It continues to do this until durationSeconds after the startTime.
2828
*/
2929
function busyLoop(durationSeconds: number) {
30+
const noop = () => {};
3031
for (let i = 0; i < testArr.length; i++) {
3132
for (let j = 0; j < testArr[i].length; j++) {
3233
testArr[i][j] = Math.sqrt(j * testArr[i][j]);
34+
noop();
3335
}
3436
}
3537
if (Date.now() - startTime < 1000 * durationSeconds) {

system-test/test.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ fi
5757

5858
node -v
5959
node --trace-warnings "$BENCHPATH" 10 $VERIFY_TIME_LINE_NUMBERS
60+
cp time.pb.gz /src/$(node -v)-time.pb.gz
61+
cp heap.pb.gz /src/$(node -v)-heap.pb.gz
6062

6163
if [[ "$VERIFY_TIME_LINE_NUMBERS" == "true" ]]; then
6264
pprof -lines -top -nodecount=2 time.pb.gz | tee $tty | \
63-
grep "busyLoop.*src/busybench.js:[2-3][08-9]"
65+
grep "busyLoop.*src/busybench.js:[2-3][0-9]"
6466
pprof -filefunctions -top -nodecount=2 heap.pb.gz | tee $tty | \
6567
grep "busyLoop.*src/busybench.js"
6668
else

0 commit comments

Comments
 (0)