Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: create benchmark test for misc and module #16044

Conversation

CharlesWall
Copy link
Contributor

@CharlesWall CharlesWall commented Oct 6, 2017

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

test

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Oct 6, 2017
@mscdex mscdex added the benchmark Issues and PRs related to the benchmark subsystem. label Oct 6, 2017
'millions=.000001',
'type=extend',
'concat=0'
]);
Copy link
Member

Choose a reason for hiding this comment

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

This will likely result in an error as e.g. misc/console.js requires a method and none is set here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if I provide a method in the file it will also apply to other benchmarks that use the same parameter, but don't implement the same functions, eg object-property-bench.js.

Conversly, by not defining it the benchmarks use their default values.

Path: parallel/test-benchmark-misc                                  
misc/console.js                                                     
misc/console.js n=1 concat=0 method="restAndSpread": 577.2662172841588                                                                  

misc/freelist.js                                                    
misc/freelist.js n=1: 1,740.3744241536124                           

misc/function_call                                                  

misc/object-property-bench.js                                       
misc/function_call.js Binding failed to load                        
/Users/charles.wall.3/projects/node/benchmark/misc/object-property-bench.js:79                                                          
      throw new Error('Unexpected method');                         
      ^                                                             

Error: Unexpected method                                            
    at main (/Users/charles.wall.3/projects/node/benchmark/misc/object-property-bench.js:79:13)                                         
    at Benchmark.process.nextTick (/Users/charles.wall.3/projects/node/benchmark/common.js:34:28)                                       
    at _combinedTickCallback (internal/process/next_tick.js:131:7)  
    at process._tickCallback (internal/process/next_tick.js:180:9)  
    at Function.Module.runMain (module.js:643:11)                   
    at startup (bootstrap_node.js:187:16)                           
    at bootstrap_node.js:605:3                                      
assert.js:45                                                        
  throw new errors.AssertionError({                                 
  ^                                                                 

AssertionError [ERR_ASSERTION]: 1 === 0                             
    at ChildProcess.child.on (/Users/charles.wall.3/projects/node/test/common/benchmark.js:25:12)                                       
    at emitTwo (events.js:125:13)                                   
    at ChildProcess.emit (events.js:213:7)                          
    at Process.ChildProcess._handle.onexit (internal/child_process.js:210:12)                                                           
Command: out/Release/node /Users/charles.wall.3/projects/node/test/parallel/test-benchmark-misc.js                                      
[02:13|% 100|+ 1971|-   1]: Done                                                                                                        
make: *** [test] Error 1  

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The output above is after defining method to equal restAndSpread which is not defined in the other benchmarks.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I am sorry, when I looked at this I forgot how the test worked again. Just ignore my comment.

@Trott Trott added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Oct 6, 2017
Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

LGTM if CI passes.

'millions=.000001',
'type=extend',
'concat=0'
]);
Copy link
Member

Choose a reason for hiding this comment

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

Yes, I am sorry, when I looked at this I forgot how the test worked again. Just ignore my comment.

@BridgeAR BridgeAR self-assigned this Oct 9, 2017
@BridgeAR
Copy link
Member

BridgeAR commented Oct 9, 2017

Landed in be3ac44

Thanks for the PR, and congratulations on becoming a Node.js Contributor 🎉 !

@BridgeAR BridgeAR closed this Oct 9, 2017
BridgeAR pushed a commit that referenced this pull request Oct 9, 2017
PR-URL: #16044
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins pushed a commit that referenced this pull request Oct 11, 2017
PR-URL: #16044
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@MylesBorins MylesBorins mentioned this pull request Oct 11, 2017
addaleax pushed a commit to addaleax/ayo that referenced this pull request Oct 12, 2017
PR-URL: nodejs/node#16044
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark Issues and PRs related to the benchmark subsystem. code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants