Brian White
f13cc3237e
stream: improve stream creation performance
...
PR-URL: https://github.com/nodejs/node/pull/19401
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-03-27 15:53:05 +02:00
Ruben Bridgewater
b04dd7b351
tools: enable eslint one-var rule
...
Backport-PR-URL: https://github.com/nodejs/node/pull/19244
PR-URL: https://github.com/nodejs/node/pull/18831
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-03-21 10:50:18 +00:00
Ruben Bridgewater
d4d7df8371
tools: enable eslint strict key-spacing
...
Backport-PR-URL: https://github.com/nodejs/node/pull/19244
PR-URL: https://github.com/nodejs/node/pull/18831
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-03-21 10:50:15 +00:00
Ruben Bridgewater
d7958657d7
tools: add assert.doesNotThrow eslint rule
...
Prohibit the usage of `assert.doesNotThrow()`.
Backport-PR-URL: https://github.com/nodejs/node/pull/19244
PR-URL: https://github.com/nodejs/node/pull/18669
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-03-21 10:50:06 +00:00
Sergey Golovin
530b8a4077
benchmark: fix benchmark for url
...
Rename different parameters with the same names to make it possible
to run tests for url benchmarks.
PR-URL: https://github.com/nodejs/node/pull/19084
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-03-20 11:33:54 +00:00
Rich Trott
563bed00f5
benchmark,lib,test,tools: use consistent quotes
...
In preparation for a linting rule, use consistent quotation for
properties in objects.
PR-URL: https://github.com/nodejs/node/pull/19156
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Roman Reiss <me@silverwind.io >
2018-03-20 11:33:44 +00:00
Сковорода Никита Андреевич
f864509991
test,benchmark: use new Buffer API where appropriate
...
For tests / benchmarks that are creating Buffer instances for
any reason other than to test Buffer constructor, use the new
Buffer.alloc/Buffer.from API instead of the deprecated API.
PR-URL: https://github.com/nodejs/node/pull/18980
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-03-05 10:07:17 +00:00
Anna Henningsen
91694497ba
src: refactor WriteWrap and ShutdownWraps
...
Encapsulate stream requests more:
- `WriteWrap` and `ShutdownWrap` classes are now tailored to the
streams on which they are used. In particular, for most streams
these are now plain `AsyncWrap`s and do not carry the overhead
of unused libuv request data.
- Provide generic `Write()` and `Shutdown()` methods that wrap
around the actual implementations, and make *usage* of streams
easier, rather than implementing; for example, wrap objects
don’t need to be provided by callers anymore.
- Use `EmitAfterWrite()` and `EmitAfterShutdown()` handlers to
call the corresponding JS handlers, rather than always trying
to call them. This makes usage of streams by other C++ code
easier and leaner.
Also fix up some tests that were previously not actually testing
asynchronicity when the comments indicated that they would.
PR-URL: https://github.com/nodejs/node/pull/18676
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-27 17:56:01 +01:00
Mathias Buus
be9777c5f6
benchmark: add stream.pipe benchmarks
...
PR-URL: https://github.com/nodejs/node/pull/18617
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-02-27 17:55:58 +01:00
Weijia Wang
def51bafbd
url: reduce deplicated codes in autoEscapeStr
...
PR-URL: https://github.com/nodejs/node/pull/18613
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-02-26 23:42:47 +01:00
Ruben Bridgewater
66f8d346b8
test,benchmark,doc: enable dot-notation rule
...
This enables the eslint dot-notation rule for all code instead of
only in /lib.
PR-URL: https://github.com/nodejs/node/pull/18749
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
2018-02-21 18:12:26 -05:00
Seth Brenith
6ce8b24c6d
http: simplify checkInvalidHeaderChar
...
In the spirit of [17399](https://github.com/nodejs/node/pull/17399 ),
we can also simplify checkInvalidHeaderChar to use regex matching
instead of a loop. This makes it faster on long matches and slower
on short matches or non-matches. This change also includes some
sample data from an AcmeAir benchmark run, as a rough proxy for
real-world data.
PR-URL: https://github.com/nodejs/node/pull/18381
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-02-21 14:20:31 -05:00
Ruben Bridgewater
4d78eb8663
benchmark: improve compare output
...
The current output uses JSON.stringify to escape the config values.
This switches to util.inspect to have a better readable output.
PR-URL: https://github.com/nodejs/node/pull/18597
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-02-21 14:20:02 -05:00
Anatoli Papirovski
0d390f7bdf
test: add test for tls benchmarks
...
PR-URL: https://github.com/nodejs/node/pull/18489
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-21 10:19:10 -05:00
James M Snell
ffbad8350e
benchmark: spread operator benchmark
...
Benchmark comparing `util._extend()`, `Object.assign()`,
and the spread operator for object assignment.
`util._extend()` still wins currently.
PR-URL: https://github.com/nodejs/node/pull/18442
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
2018-02-21 10:19:03 -05:00
Joyee Cheung
9ae513a7de
benchmark: shorten config name in http benchmark
...
Shorten the config name in check_invalid_header_char so it would
not result in long lines that make the benchmark result hard to read.
PR-URL: https://github.com/nodejs/node/pull/18452
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-02-21 10:19:01 -05:00
Joyee Cheung
d469a06ace
benchmark: cut down http benchmark run time
...
PR-URL: https://github.com/nodejs/node/pull/18379
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-02-21 10:18:59 -05:00
Ruben Bridgewater
9c125825a9
benchmark: refactor
...
PR-URL: https://github.com/nodejs/node/pull/18320
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-21 10:18:57 -05:00
Ruben Bridgewater
f0186704cd
benchmark: (timers) refactor
...
PR-URL: https://github.com/nodejs/node/pull/18320
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-21 10:18:57 -05:00
Ruben Bridgewater
28156e16d1
benchmark: (http(2)) refactor
...
PR-URL: https://github.com/nodejs/node/pull/18320
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-21 10:18:56 -05:00
Ruben Bridgewater
076b3d9b0a
benchmark: (es) refactor
...
PR-URL: https://github.com/nodejs/node/pull/18320
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-21 10:18:56 -05:00
Ruben Bridgewater
76cb958975
benchmark: (url) refactor
...
PR-URL: https://github.com/nodejs/node/pull/18320
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-21 10:18:55 -05:00
Ruben Bridgewater
0851822b87
benchmark: (crypto) refactor
...
PR-URL: https://github.com/nodejs/node/pull/18320
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-21 10:18:55 -05:00
Ruben Bridgewater
cb13c7c653
benchmark: (buffer) refactor
...
PR-URL: https://github.com/nodejs/node/pull/18320
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-21 10:18:54 -05:00
Ruben Bridgewater
9acf7545f0
benchmark: (assert) refactor
...
PR-URL: https://github.com/nodejs/node/pull/18320
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-21 10:18:54 -05:00
Ruben Bridgewater
7da01f43fd
benchmark: fix variables not being set
...
Due to the destructuring the outer variables were not set anymore.
PR-URL: https://github.com/nodejs/node/pull/18320
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-21 10:18:53 -05:00
Ruben Bridgewater
4a5d7d4248
benchmark: fix platform in basename-win32
...
It should say `win32` and not `posix`.
PR-URL: https://github.com/nodejs/node/pull/18320
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-21 10:18:53 -05:00
Rich Trott
eb252527e5
test: move tmpdir to submodule of common
...
Move tmpdir functionality to its own module (common/tmpdir).
PR-URL: https://github.com/nodejs/node/pull/17856
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-02-21 10:18:51 -05:00
Seth Brenith
d76403985f
http: switch on string values
...
Long ago, V8 was much faster switching on string lengths than values.
That is no longer the case, so we can simplify a couple of methods.
PR-URL: https://github.com/nodejs/node/pull/18351
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-02-21 10:18:44 -05:00
Joyee Cheung
2efa7d1bfd
benchmark: implement duration in http test double
...
PR-URL: https://github.com/nodejs/node/pull/18380
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-01-30 14:25:43 -06:00
Andreas Madsen
b5ec6ea3d0
benchmark: make compare.R easier to understand
...
PR-URL: https://github.com/nodejs/node/pull/18373
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-30 14:25:43 -06:00
Ruben Bridgewater
ea19f7db0d
benchmark: use destructuring
...
This applies to all `async_hooks`, `dns`, `cluster`, `domain` and
`module` benchmarks.
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:29 -06:00
Ruben Bridgewater
cd9bc8bc50
benchmark: (dgram) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:29 -06:00
Ruben Bridgewater
e19c77b14e
benchmark: (child_process) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:28 -06:00
Ruben Bridgewater
5cf5ab154e
benchmark: (buffers) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:28 -06:00
Ruben Bridgewater
71faa5c1b4
benchmark: (events) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:27 -06:00
Ruben Bridgewater
c25d4d66dc
benchmark: (es) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:27 -06:00
Ruben Bridgewater
59271c8f7f
benchmark: (fs) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:27 -06:00
Ruben Bridgewater
4e19cbef86
benchmark: (http) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:26 -06:00
Ruben Bridgewater
e9c426b35b
benchmark: (misc) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:26 -06:00
Ruben Bridgewater
d13d900eee
benchmark: (http2) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:25 -06:00
Ruben Bridgewater
97e882061d
benchmark: (string_decoder) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:25 -06:00
Ruben Bridgewater
5b0e3b9860
benchmark: (path) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:24 -06:00
Ruben Bridgewater
7bc5bad74f
benchmark: (os) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:24 -06:00
Ruben Bridgewater
cf666d8529
benchmark: (net) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:24 -06:00
Ruben Bridgewater
88f4bf219d
benchmark: (process) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:23 -06:00
Ruben Bridgewater
f4918289e7
benchmark: (querystring) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:23 -06:00
Ruben Bridgewater
81abea592f
benchmark: (streams) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:22 -06:00
Ruben Bridgewater
11d6458fd7
benchmark: (timers) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:22 -06:00
Ruben Bridgewater
3e3254a2e7
benchmark: (tls) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 14:25:21 -06:00