summaryrefslogtreecommitdiff
path: root/benchmark/napi
AgeCommit message (Collapse)Author
2019-10-17build: build benchmark addons like test addonsRichard Lau
Build the addons for benchmarks in the same way that the addons for tests are built. PR-URL: https://github.com/nodejs/node/pull/29995 Fixes: https://github.com/nodejs/build/issues/1961 Refs: https://github.com/nodejs/node/commit/53ca0b9ae145c430842bf78e553e3b6cbd2823aa#commitcomment-35494896 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-10-13src: render N-API weak callbacks as cleanup hooksGabriel Schulhof
Since worker threads are complete Node.js environments, including the ability to load native addons, and since those native addons can allocate resources to be freed when objects go out of scope, and since, upon worker thread exit, the engine does not invoke the weak callbacks responsible for freeing resources which still have references, this modification introduces tracking for weak references such that a list of outstanding weak references is maintained. This list is traversed during environment teardown. The callbacks for the remaining weak references are called. This change is also relevant for Node.js embedder scenarios, because in those cases the process also outlives the `node::Environment` and therefore weak callbacks should also be rendered as environment cleanup hooks to ensure proper cleanup after native addons. This changes introduces the means by which this can be accomplished. A benchmark is included which measures the time it takes to execute the weak reference callback for a given number of weak references. Re: https://github.com/tc39/proposal-weakrefs/issues/125#issuecomment-535832130 PR-URL: https://github.com/nodejs/node/pull/28428 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-05-10tools: enable block-scoped-var eslint ruleRoman Reiss
PR-URL: https://github.com/nodejs/node/pull/27616 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-12-17doc,lib,test: capitalize comment sentencesRuben Bridgewater
This activates the eslint capitalize comment rule for comments above 50 characters. PR-URL: https://github.com/nodejs/node/pull/24996 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-10tools: capitalize sentencesRuben Bridgewater
This adds the `capitalized-comments` eslint rule to verify that actual sentences use capital letters as starting letters. It ignores special words and all lines below 62 characters. PR-URL: https://github.com/nodejs/node/pull/24808 Reviewed-By: Sam Ruby <rubys@intertwingly.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-11-11build: use BUILDTYPE in bench-addons-build targetsDaniel Bevenius
This commit uses the BUILDTYPE for the benchmark targets that currently explicitly use Release as the build type. The motivation for this change is allows switching between debug builds and release builds using the bench-addons-clean/bench-addons-build targets. PR-URL: https://github.com/nodejs/node/pull/24033 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-11test: fix v8 Set/Get compiler warningsDaniel Bevenius
PR-URL: https://github.com/nodejs/node/pull/24246 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-11-06benchmark: remove unused catch bindingscjihrig
PR-URL: https://github.com/nodejs/node/pull/24079 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Wyatt Preul <wpreul@gmail.com>
2018-10-24test: add test-benchmark-napiEmily Marigold Klassen
Also makes sure that the napi benchmark is built before running jstest. Skipped on windows since n-api benchmarks aren't built there yet. PR-URL: https://github.com/nodejs/node/pull/23585 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-07benchmark: increase lint complianceRich Trott
Remove two eslint-disable comments by replacing string concatenation with template literals. These changes are in catch blocks that are not part of the actual code being benchmarked. PR-URL: https://github.com/nodejs/node/pull/23305 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-08-29src: use String::Utf8Length with isolateMichaël Zasso
PR-URL: https://github.com/nodejs/node/pull/22531 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-08-29src: use String::Write{OneByte,Utf8} with isolateMichaël Zasso
PR-URL: https://github.com/nodejs/node/pull/22531 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-05benchmark: add n-api function args benchmarkKenny Yuan
This benchmark suite is added to measure the performance of n-api function call with various type/number of arguments. The cases in this suite are carefully selected to efficiently show the performance trend. PR-URL: https://github.com/nodejs/node/pull/21555 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
2018-06-19benchmark: create napi benchmark directoryRich Trott
Move C++ benchmark useful for NAPI to its own directory. This will isolate the benchmark so it can be excluded from testing that applies to all other benchmarks but not this one. PR-URL: https://github.com/nodejs/node/pull/21046 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>