Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: third_party/grpc/src/node/performance/worker.js

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/grpc/src/node/performance/worker.js
diff --git a/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.idl b/third_party/grpc/src/node/performance/worker.js
similarity index 64%
copy from third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.idl
copy to third_party/grpc/src/node/performance/worker.js
index e6fd4eeeda6cc54ee661af057ad073ed38e9aab6..7c8ab00026538ae03182a3ec03042036f876bf40 100644
--- a/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.idl
+++ b/third_party/grpc/src/node/performance/worker.js
@@ -1,5 +1,7 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Copyright 2015-2016, Google Inc.
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -26,10 +28,36 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
*/
-[
- NoInterfaceObject,
-] interface DirectoryReaderSync {
- [RaisesException] EntrySync[] readEntries();
-};
+'use strict';
+
+var worker_service_impl = require('./worker_service_impl');
+
+var grpc = require('../../../');
+var serviceProto = grpc.load({
+ root: __dirname + '/../../..',
+ file: 'src/proto/grpc/testing/services.proto'}).grpc.testing;
+
+function runServer(port) {
+ var server_creds = grpc.ServerCredentials.createInsecure();
+ var server = new grpc.Server();
+ server.addProtoService(serviceProto.WorkerService.service,
+ worker_service_impl);
+ var address = '0.0.0.0:' + port;
+ server.bind(address, server_creds);
+ server.start();
+ return server;
+}
+
+if (require.main === module) {
+ Error.stackTraceLimit = Infinity;
+ var parseArgs = require('minimist');
+ var argv = parseArgs(process.argv, {
+ string: ['driver_port']
+ });
+ runServer(argv.driver_port);
+}
+
+exports.runServer = runServer;
« no previous file with comments | « third_party/grpc/src/node/performance/histogram.js ('k') | third_party/grpc/src/node/performance/worker_service_impl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698