Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions system-test/busybench-js/src/busybench.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ const testArr = [];
* It continues to do this until durationSeconds after the startTime.
*/
function busyLoop(durationSeconds) {
const noop = () => {};
for (let i = 0; i < testArr.length; i++) {
for (let j = 0; j < testArr[i].length; j++) {
testArr[i][j] = Math.sqrt(j * testArr[i][j]);
noop();
}
}
if (Date.now() - startTime < 1000 * durationSeconds) {
Expand Down
2 changes: 2 additions & 0 deletions system-test/busybench/src/busybench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ const testArr: number[][] = [];
* It continues to do this until durationSeconds after the startTime.
*/
function busyLoop(durationSeconds: number) {
const noop = () => {};
for (let i = 0; i < testArr.length; i++) {
for (let j = 0; j < testArr[i].length; j++) {
testArr[i][j] = Math.sqrt(j * testArr[i][j]);
noop();
}
}
if (Date.now() - startTime < 1000 * durationSeconds) {
Expand Down
2 changes: 1 addition & 1 deletion system-test/system_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cd $(dirname $0)
# official releases. https://nodejs.org/en/about/releases/
if [[ -z "$BINARY_HOST" ]]; then
ADDITIONAL_PACKAGES="python3 g++ make"
NODE_VERSIONS=(14 16 18 20)
NODE_VERSIONS=(14 16 18 20 21 22)
else
# Tested versions for pre-built binaries are limited based on
# what node-pre-gyp can specify as its target version.
Expand Down
4 changes: 3 additions & 1 deletion system-test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ fi

node -v
node --trace-warnings "$BENCHPATH" 10 $VERIFY_TIME_LINE_NUMBERS
cp time.pb.gz /src/$(node -v)-time.pb.gz
cp heap.pb.gz /src/$(node -v)-heap.pb.gz

if [[ "$VERIFY_TIME_LINE_NUMBERS" == "true" ]]; then
pprof -lines -top -nodecount=2 time.pb.gz | tee $tty | \
grep "busyLoop.*src/busybench.js:[2-3][08-9]"
grep "busyLoop.*src/busybench.js:[2-3][0-9]"
pprof -filefunctions -top -nodecount=2 heap.pb.gz | tee $tty | \
grep "busyLoop.*src/busybench.js"
else
Expand Down