mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
test: adapt test-linux-perf to V8 changes
Refs: https://github.com/v8/v8/commit/9a31804bbe6597bfb54b47958fd3839f2da51875 PR-URL: https://github.com/nodejs/node/pull/38273 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Mary Marchini <oss@mmarchini.me>
This commit is contained in:
1 file changed
+11
-8
@@ -96,17 +96,20 @@ for (const perfArgs of perfArgsList) {
|
||||
output += perfScript.stdout;
|
||||
}
|
||||
|
||||
const interpretedFunctionOneRe = /InterpretedFunction:functionOne/;
|
||||
const compiledFunctionOneRe = /LazyCompile:\*functionOne/;
|
||||
const interpretedFunctionTwoRe = /InterpretedFunction:functionTwo/;
|
||||
const compiledFunctionTwoRe = /LazyCompile:\*functionTwo/;
|
||||
const interpretedFunctionOneRe = /~functionOne/;
|
||||
const compiledFunctionOneRe = /\*functionOne/;
|
||||
const interpretedFunctionTwoRe = /~functionTwo/;
|
||||
const compiledFunctionTwoRe = /\*functionTwo/;
|
||||
|
||||
function makeAssertMessage(message) {
|
||||
return message + '\nPerf output:\n\n' + output;
|
||||
}
|
||||
|
||||
assert.ok(output.match(interpretedFunctionOneRe),
|
||||
"Couldn't find interpreted functionOne()");
|
||||
makeAssertMessage("Couldn't find interpreted functionOne()"));
|
||||
assert.ok(output.match(compiledFunctionOneRe),
|
||||
"Couldn't find compiled functionOne()");
|
||||
makeAssertMessage("Couldn't find compiled functionOne()"));
|
||||
assert.ok(output.match(interpretedFunctionTwoRe),
|
||||
"Couldn't find interpreted functionTwo()");
|
||||
makeAssertMessage("Couldn't find interpreted functionTwo()"));
|
||||
assert.ok(output.match(compiledFunctionTwoRe),
|
||||
"Couldn't find compiled functionTwo");
|
||||
makeAssertMessage("Couldn't find compiled functionTwo"));
|
||||
Reference in new issue
Block a user