MCPcopy Index your code
hub / github.com/nodejs/node / run

Function run

benchmark/test_runner/suite-tests.js:19–58  ·  view source on GitHub ↗
({ numberOfSuites, testsPerSuite, testType, concurrency })

Source from the content-addressed store, hash-verified

17});
18
19async function run({ numberOfSuites, testsPerSuite, testType, concurrency }) {
20 concurrency = concurrency === 'yes';
21
22 // eslint-disable-next-line no-unused-vars
23 let avoidV8Optimization;
24
25 switch (testType) {
26 case 'sync': {
27 for (let i = 0; i < numberOfSuites; i++) {
28 describe(`${i}`, { concurrency }, () => {
29 for (let j = 0; j < testsPerSuite; j++) {
30 it(`${j}`, () => {
31 avoidV8Optimization = i;
32 });
33 }
34 });
35 }
36
37 break;
38 }
39
40 case 'async': {
41 for (let i = 0; i < numberOfSuites; i++) {
42 describe(`${i}`, { concurrency }, () => {
43 for (let j = 0; j < testsPerSuite; j++) {
44 it(`${j}`, async () => {
45 avoidV8Optimization = i;
46 });
47 }
48 });
49 }
50
51 break;
52 }
53 }
54
55 await finished(reporter);
56
57 return numberOfSuites * testsPerSuite;
58}
59
60function main(params) {
61 bench.start();

Callers 3

mainFunction · 0.70
test-reporters.jsFile · 0.70
runBenchmarkFunction · 0.70

Calls 2

itFunction · 0.50
finishedFunction · 0.50

Tested by

no test coverage detected