Skip to content

Conversation

@Trott
Copy link
Member

@TrottTrott commented May 30, 2018

This required:

  • changing benchmark tests that produced more than one line of output per benchmark file to only produce one (which is what we've always wanted anyway)

  • add a build step to MakeFile to make sure that delete the misc/function_calls benchmark will work; /cc @nodejs/build

  • make it so the benchmark test module checks the output to make sure each file only produces one line of results

Whoops, just realized I forgot to add the build step to vcbuild.bat. Marking as in progress for the moment until I fix that. (If someone wants to add a commit to the branch to do that, feel free to beat me to it. That would be awesome.)

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-botnodejs-github-bot added the build Issues and PRs related to build files or the CI. label May 30, 2018
@TrottTrott added wip Issues and PRs that are still a work in progress. test Issues and PRs related to the tests. benchmark Issues and PRs related to the benchmark subsystem. labels May 30, 2018
Copy link
Contributor

@apapirovskiapapirovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thank you for working on this!!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalization issue in "Therefore"

@Trott
Copy link
MemberAuthor

@Trott
Copy link
MemberAuthor

Hmmm...if I'm not mistaken, there is no build step for the C++ benchmark code in vcbuild.bat.

I'll probably have to create it because I don't think this will pass on Windows without it.

Maybe someone with a Windows laptop at the Collaborator Summit would like to pair on this sometime today (or just do it without me and add your commit to this branch)? It will no doubt go a lot faster if we can build locally rather than having me guess at the write vcbuild.bat incantation, testing on CI, having it not work, rinse and repeat...

@Trott
Copy link
MemberAuthor

@apapirovski and anyone else: The first two commits here are the PR at #21032. It might simplify things a bit if those land first (and they should land anyway, independent of this), so feel free to review that PR and maybe give an approval for fast-tracking.

Or not, and it will all land eventually.

@Trott
Copy link
MemberAuthor

Argh, yeah, confirmed, fails on Windows because there's no build step for the C++ benchmark code.

@joyeecheung
Copy link
Member

Instead of building misc/function_calls in the tests, I think we might as well skip it in the tests for the moment - and other addon tests to come until we work out how they should be built properly.

@Trott
Copy link
MemberAuthor

This is now ready to go. Discussion with other Collaborators led to the conclusion that the benchmark C++ benchmark is of little or no value and should be deleted.

@apapirovski@addaleax@joyeecheung@BridgeAR

@Trott
Copy link
MemberAuthor

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rather use child.stdout.setEncoding('utf8')? That way we don’t have to explicitly convert + we handle multi-byte characters properly, if that should ever be an issue

@Trott
Copy link
MemberAuthor

Trott commented Jun 1, 2018

@richardlau
Copy link
Member

Hmmm...if I'm not mistaken, there is no build step for the C++ benchmark code in vcbuild.bat.

... Discussion with other Collaborators led to the conclusion that the benchmark C++ benchmark is of little or no value and should be deleted.

FYI part of #21072 proposes adding a new C++ benchmark for n-api function calls.

@gabrielschulhof
Copy link
Contributor

Measuring call-into-native is relevant for N-API, because we have to measure up to plain V8 addons. For example, #21072 has revealed a potential near-halving (49%) of the overhead of calling into a N-API addon.

@TrottTrott added blocked PRs that are blocked by other issues or PRs. and removed wip Issues and PRs that are still a work in progress. labels Jun 1, 2018
@Trott
Copy link
MemberAuthor

Trott commented Jun 1, 2018

Marking as blocked on the N-API comments from @richardlau and @gabrielschulhof. Thanks for the information. This will probably have to find another way to deal with these things. If either of you want to add something to Makefile and vcbuild.bat such that it builds the C++ stuff as part of make test and friends, that would be awesome. Just saying. :-D

@nodejsnodejs deleted a comment from refackJun 1, 2018
@joyeecheung
Copy link
Member

@Trott I still think it's OK to skip the addon tests for now and leave a TODO there about making the build steps work.

Trott added 3 commits June 15, 2018 13:01
Prevent misc benchmark files from running more than one benchmark during tests.
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.
Check that benchmark tests are not running longer than necessary by confirming that they only produce one set of configs to report on per benchmark file.
@Trott
Copy link
MemberAuthor

I moved the function_call benchmark to its own directory (napi instead of misc). How's that work for people?

@TrottTrott removed the blocked PRs that are blocked by other issues or PRs. label Jun 15, 2018
@Trott
Copy link
MemberAuthor

@Trott
Copy link
MemberAuthor

@Trott
Copy link
MemberAuthor

CI is green, but I did move that one benchmark to its own directory since the last reviews, so it would be good if people who already approved this could indicate if this is still good by them... @apapirovski@jasnell@addaleax

Copy link
Member

@addaleaxaddaleax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM :)

Trott added a commit to Trott/io.js that referenced this pull request Jun 19, 2018
Prevent misc benchmark files from running more than one benchmark during tests. PR-URL: nodejs#21046 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Trott added a commit to Trott/io.js that referenced this pull request Jun 19, 2018
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: nodejs#21046 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Trott added a commit to Trott/io.js that referenced this pull request Jun 19, 2018
Check that benchmark tests are not running longer than necessary by confirming that they only produce one set of configs to report on per benchmark file. PR-URL: nodejs#21046 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
@Trott
Copy link
MemberAuthor

Landed in 8944a4f...b72de3d

@TrottTrott closed this Jun 19, 2018
targos pushed a commit that referenced this pull request Jun 20, 2018
Prevent misc benchmark files from running more than one benchmark during tests. PR-URL: #21046 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
targos pushed a commit that referenced this pull request Jun 20, 2018
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: #21046 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
targos pushed a commit that referenced this pull request Jun 20, 2018
Check that benchmark tests are not running longer than necessary by confirming that they only produce one set of configs to report on per benchmark file. PR-URL: #21046 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
@targostargos mentioned this pull request Jul 3, 2018
@TrottTrott deleted the berlin-7 branch January 13, 2022 22:49
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmarkIssues and PRs related to the benchmark subsystem.buildIssues and PRs related to build files or the CI.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@Trott@joyeecheung@richardlau@gabrielschulhof@apapirovski@jasnell@addaleax@nodejs-github-bot