From b6c01aaeb169ac3dbca7c9f2e1882c4ff33c5781 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Tue, 2 Feb 2016 10:05:43 -0800 Subject: [PATCH] Add quit option to Node.js worker --- 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..a5cdc1cb 100644 --- a/performance/worker_service_impl.js +++ b/performance/worker_service_impl.js @@ -36,6 +36,11 @@ var BenchmarkClient = require('./benchmark_client'); var BenchmarkServer = require('./benchmark_server'); +exports.quitWorker = function quitWorker(call, callback) { + callback(null, {}); + process.exit(0); +} + exports.runClient = function runClient(call) { var client; call.on('data', function(request) {