diff options
author | Michael Lumish <mlumish@google.com> | 2016-02-04 16:11:28 -0800 |
---|---|---|
committer | Michael Lumish <mlumish@google.com> | 2016-02-04 16:11:28 -0800 |
commit | 3c7c76e71386cb0173c6f538c3bf6625a5d52777 (patch) | |
tree | 3c6aa428dd9aef479828f1f0ffa4fef4d552fc36 /src/node | |
parent | 4a593cb12ffab60eecc97483d02b1b912de855ec (diff) | |
parent | 38460b8065d1d44e83fc293cd033e8eea03e1986 (diff) |
Merge pull request #5010 from vjpai/core_count
Implement core_count RPC for Node.JS
Diffstat (limited to 'src/node')
-rw-r--r-- | src/node/performance/worker_service_impl.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/node/performance/worker_service_impl.js b/src/node/performance/worker_service_impl.js index 99ae32127e..79baa1ce69 100644 --- a/src/node/performance/worker_service_impl.js +++ b/src/node/performance/worker_service_impl.js @@ -33,6 +33,7 @@ 'use strict'; +var os = require('os'); var BenchmarkClient = require('./benchmark_client'); var BenchmarkServer = require('./benchmark_server'); @@ -130,3 +131,7 @@ exports.runServer = function runServer(call) { }); }); }; + +exports.coreCount = function coreCount(call, callback) { + callback(null, {cores: os.cpus().length}); +}; |