Livia Medeiros
fcf5de008a
benchmark: use tmpdir.resolve()
...
PR-URL: https://github.com/nodejs/node/pull/49137
Refs: https://github.com/nodejs/node/pull/49079
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2023-08-30 09:55:20 +00:00
Antoine du Hamel
f466fe5ecc
benchmark: add trailing commas in benchmark/process
...
PR-URL: https://github.com/nodejs/node/pull/46481
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-02-05 11:00:09 +00:00
Darshan Sen
e35e893d26
src: speed up process.getActiveResourcesInfo()
...
This change reduces the number of calls that were crossing the JS-C++
boundary to 1 and also removes the need for calling Array::New()
multiple times internally and ArrayPrototypeConcat-ing the results
later on, thus improving performance.
Refs: https://github.com/nodejs/node/pull/44445#pullrequestreview-1220052837
Signed-off-by: Darshan Sen <raisinten@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/46014
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2023-01-03 10:36:25 +00:00
falsandtru
bae03c4e30
lib: fix reference leak
...
PR-URL: https://github.com/nodejs/node/pull/44499
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-09-07 09:33:10 +00:00
bcoe
8c9dc4e9e6
benchmark: add benchmark for NODE_V8_COVERAGE
...
PR-URL: https://github.com/nodejs/node/pull/36972
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2021-01-27 14:31:37 -08:00
Michaël Zasso
bf31d3c3b1
tools: enable no-unused-expressions lint rule
...
Fixes: https://github.com/nodejs/node/issues/36246
PR-URL: https://github.com/nodejs/node/pull/36248
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-12-07 20:33:45 +01:00
Yash Ladha
56b25e7a6f
benchmark: add benchmark script for resourceUsage
...
Added a benchmark script for process method to benchmark the method
resourceUsage.
PR-URL: https://github.com/nodejs/node/pull/34691
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Mary Marchini <oss@mmarchini.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
2020-08-13 22:33:07 +08:00
Daniele Belardi
4bf888d3d2
benchmark: use let instead of var
...
Use `let` in module, napi, net, os, path, process, querystring, streams
and string_decoder.
PR-URL: https://github.com/nodejs/node/pull/31592
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-13 21:41:33 +01:00
Alex Ramirez
d0ed431041
benchmark: swap var for let in benchmarks
...
In benchmark directory this changes for loops
using var to let when it applies for consistency
PR-URL: https://github.com/nodejs/node/pull/28958
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-02-13 21:38:00 +01:00
Rich Trott
359766b2c3
benchmark,doc,lib,test: prepare for padding lint rule
...
Upcoming lint rule will require a blank line between consecutive
functions. Add it in the places where we don't have it already.
PR-URL: https://github.com/nodejs/node/pull/30696
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-11-30 06:28:29 -08:00
Anna Henningsen
82ebcb37d6
benchmark: improve process.env benchmarks
...
Benchmark different types of operations and make results comparable
by normalizing process.env for enumeartion.
PR-URL: https://github.com/nodejs/node/pull/29188
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-09-18 23:24:42 +02:00
Brian White
34961c7b5f
process: improve nextTick performance
...
PR-URL: https://github.com/nodejs/node/pull/25461
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-08-27 22:14:15 -04:00
Ruben Bridgewater
ed8fc7e11d
tools: update eslint
...
This updates eslint from v6.0.0-alpha.2 to v6.0.1
This also removes eslint-disable comments about `bigint` typeof
checks. Those would otherwise have caused linting errors now that
`bigint` is accepted as valid entry.
PR-URL: https://github.com/nodejs/node/pull/28173
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-06-27 11:57:19 +02:00
Anatoli Papirovski
2c49e8b537
lib: make queueMicrotask faster
...
No longer create an additional scope within queueMicrotask
in order to improve performance.
PR-URL: https://github.com/nodejs/node/pull/27032
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-05 05:37:11 +02:00
Anna Henningsen
69906fbc52
benchmark,lib: add process.hrtime.bigint benchmark
...
Add a benchmark, and amend the relevant source code comment to state
that currently, switching to directly returning a BigInt is not
stopped by technical obstacles but rather the fact that using a typed
array is actually a bit faster (about 2.5 %, measured locally).
PR-URL: https://github.com/nodejs/node/pull/26381
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-05 23:23:53 +01:00
Benjamin Gruenbaum
d68f946fe4
test: remove unused config
...
process.maxTickDepth was removed in v0.12 a whole while ago and was
mostly removed from our code base. There are still some places it was
left in old benchmarks and tests.
This PR removes setting the value in those tests and
benchmarks.
PR-URL: https://github.com/nodejs/node/pull/21985
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-08-02 22:33:51 -04:00
Anatoli Papirovski
34bd9f318a
benchmark: track exec time in next-tick-exec
...
The next-tick-exec benchmarks were meant to track nextTick execution
time but due to an error, they actually track addition and execution.
PR-URL: https://github.com/nodejs/node/pull/20462
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-06 07:29:47 +02:00
Anatoli Papirovski
a957f248ae
benchmark: fix next-tick-depth
...
A recent change made these benchmarks fail by always finishing
with 0 iterations. Restore a counter variable.
PR-URL: https://github.com/nodejs/node/pull/20461
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-05-03 07:14:40 +02:00
juggernaut451
b80da63b99
benchmark: changed millions and thousands to n
...
PR-URL: https://github.com/nodejs/node/pull/18917
Fixes: https://github.com/nodejs/node/issues/18778
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2018-04-10 00:22:33 +02:00
Ruben Bridgewater
d163a6b8c2
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-23 01:29:22 +01:00
Anatoli Papirovski
cbaf59c5b9
process: slightly simplify next tick execution
...
Get rid of separate function to call callback from _tickCallback as
it no longer yields worthwhile performance improvement.
Move some code from nextTick & internalNextTick into TickObject
constructor to minimize duplication.
PR-URL: https://github.com/nodejs/node/pull/16888
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
2017-11-28 08:48:30 -05:00
Ruben Bridgewater
e167ab71fb
benchmark: var to const
...
PR-URL: https://github.com/nodejs/node/pull/13757
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: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-09-19 21:14:38 -03:00
Rich Trott
97c43940c8
benchmark: cover more nextTick() code
...
The benchmarks for `process.nextTick()` do not cover the `default` case
in the internal code's `switch` statement where the callback receives
more than 3 arguments. Modify two of the benchmarks to include this
condition.
PR-URL: https://github.com/nodejs/node/pull/14645
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-10 09:11:50 -07:00
Brian White
460ee75f7e
process: improve nextTick() performance
...
PR-URL: https://github.com/nodejs/node/pull/13446
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2017-06-17 10:38:24 -04:00
Brian White
f385f77f1d
process: improve memoryUsage() performance
...
Creating an object in JS and using a typed array to transfer values
from C++ to JS is faster than creating an object and setting
properties in C++.
The included benchmark shows ~34% increase in performance with this
change.
PR-URL: https://github.com/nodejs/node/pull/11497
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-02-23 17:19:39 -08:00
Joyee Cheung
a647d82f83
process: improve process.hrtime
...
* Add benchmarks for diffing a previous result
* Improvements to the documentation, including type annotation
* Update the outdated comments in src/node.cc, improve comments
in lib/internal/process.js
* Check the argument is an Array Tuple with length 2
PR-URL: https://github.com/nodejs/node/pull/10764
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-01-23 21:30:18 +08:00
Andreas Madsen
d9079ab801
benchmark: move misc to categorized directories
...
PR-URL: https://github.com/nodejs/node/pull/5177
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
2016-02-26 20:28:45 +11:00