summaryrefslogtreecommitdiff
path: root/test/parallel/test-process-wrap.js
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-10-21 08:34:00 +0200
committerAnna Henningsen <anna@addaleax.net>2018-10-24 09:57:42 +0200
commit1365f657b51d31044cca54c3152d3940a4bd9dc3 (patch)
tree4772c2b484555de0a0368b35ebf889ff23d154c2 /test/parallel/test-process-wrap.js
parentbb79e768e5ab150f2075780734005783d53eb3ca (diff)
downloadandroid-node-v8-1365f657b51d31044cca54c3152d3940a4bd9dc3.tar.gz
android-node-v8-1365f657b51d31044cca54c3152d3940a4bd9dc3.tar.bz2
android-node-v8-1365f657b51d31044cca54c3152d3940a4bd9dc3.zip
src: improve StreamBase read throughput
Improve performance by providing JS with the raw ingridients for the read data, i.e. an `ArrayBuffer` + offset + length fields, instead of creating `Buffer` instances in C++ land. PR-URL: https://github.com/nodejs/node/pull/23797 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-process-wrap.js')
-rw-r--r--test/parallel/test-process-wrap.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/parallel/test-process-wrap.js b/test/parallel/test-process-wrap.js
index eccdeb5d07..ef9075e915 100644
--- a/test/parallel/test-process-wrap.js
+++ b/test/parallel/test-process-wrap.js
@@ -44,11 +44,10 @@ p.onexit = function(exitCode, signal) {
processExited = true;
};
-pipe.onread = function(err, b, off, len) {
+pipe.onread = function(arrayBuffer) {
assert.ok(processExited);
- if (b) {
+ if (arrayBuffer) {
gotPipeData = true;
- console.log('read %d', len);
} else {
gotPipeEOF = true;
pipe.close();