8000 Print system information after tests · shelljs/benchmarks@743f8b1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 743f8b1

Browse files
committed
Print system information after tests
1 parent 9a32c92 commit 743f8b1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

benchmark.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ function writeLog(msg, link) {
1414
log.push(msg);
1515
}
1616

17+
function printSystemInfo() {
18+
var os = require('os');
19+
var cpus = os.cpus();
20+
var spawn = require('child_process').spawn;
21+
console.log('System Information:');
22+
console.log(os.type(), os.release(), os.arch());
23+
console.log('Node.js ' + process.versions.node);
24+
console.log('V8 ' + process.versions.v8);
25+
console.log(cpus[0].model + ' × ' + cpus.length);
26+
console.log();
27+
console.log('Shell Information:');
28+
spawn('sh', ['-c', '${SHELL} --version'], { stdio: 'inherit' });
29+
}
30+
1731
cd(__dirname + '/' + TEST_DIR);
1832
var prefix;
1933
var shellJSWins = [];
@@ -82,3 +96,4 @@ if (shouldLog) {
8296
// Append new docs to README
8397
sed('-i', /## Results/, '## Results\n\n' + text, 'README.md');
8498
}
99+
printSystemInfo();

0 commit comments

Comments
 (0)
0