-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
benchmark: allow compare via fine-grained filters #711
Conversation
@@ -21,8 +23,14 @@ for (var i = 2; i < process.argv.length; i++) { | |||
case '-h': case '-?': case '--help': | |||
console.log(usage); | |||
process.exit(0); | |||
case '--': | |||
benchmarks = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
c63d3f8
to
26749db
Compare
I like this :]. LGTM |
default: | ||
nodes.push(arg); | ||
if (benchmarks !== undefined) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is splitting hairs, but can you make this Array.isArray(benchmarks)
Two small comments. Other than that, LGTM |
Before this commit, only benchmark targets defined in Makefile could be used. This commit allows execution of common.js directly and passing of filter arguments directly, allowing you to run either a subset of benchmarks or a single specific benchmark for comparison.
26749db
to
4f89fc1
Compare
Done. |
|
||
var show = 'both'; | ||
var nodes = []; | ||
var html = false; | ||
var benchmarks; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't [testFilter]
and benchmarks
be options
?
https://github.com/iojs/io.js/blob/v1.x/benchmark/common.js#L62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean. AFAIK using require('./common').createBenchmark()
won't work well because it spawns tests with stdio: 'inherit'
, so you can't capture the output needed for comparing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarified via irc that it is using the naming found in https://github.com/iojs/io.js/blob/v1.x/benchmark/common.js#L10-L37
LGTM other than that the naming is a little confusing. Edit: Looks like that may be for another issue. |
Before this commit, only benchmark targets defined in Makefile could be used. This commit allows execution of common.js directly and passing of filter arguments directly, allowing you to run either a subset of benchmarks or a single specific benchmark for comparison. PR-URL: #711 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
Before this commit, only benchmark targets defined in Makefile could be used. This commit allows execution of common.js directly and passing of filter arguments directly, allowing you to run either a subset of benchmarks or a single specific benchmark for comparison.