Skip to content

Commit 6218e49

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

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

Diff for: system-test/busybench-js/src/busybench.js

+2
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) {

Diff for: system-test/busybench/src/busybench.ts

+2
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) {

Diff for: system-test/test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ 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 | \

0 commit comments

Comments
 (0)