From 45cb2d07d040baff72f3ad87e8f692489da89d80 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Tue, 2 Feb 2016 10:54:01 -0800 Subject: [PATCH] Implement core_count RPC for Node.JS to track new master version of services.proto and control.proto --- performance/worker_service_impl.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/performance/worker_service_impl.js b/performance/worker_service_impl.js index 99ae3212..79baa1ce 100644 --- a/performance/worker_service_impl.js +++ b/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}); +};