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

Allow function options and support deferred benchmarks #4

Merged
merged 1 commit into from
Jun 1, 2015

Conversation

mridgway
Copy link
Contributor

This allows tests with defer and other options.

@@ -160,7 +161,12 @@ BenchTable.prototype = Object.create(Benchmark.Suite.prototype);
BenchTable.prototype.run = function(config) {
var self = this, mapkey, mapfun;

function createBenchmarkFunction(fun, input) {
function createBenchmarkFunction(fun, options, input) {
Copy link
Owner

Choose a reason for hiding this comment

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

What do you think about moving the options parameter to the last place? Just wondering if there's a reason you put it in 2nd place here, and in last place in addFunction. 💭

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No real preference there. I chose to keep fun and options next to each other similarly to addFunction. This is an internal function only, so I have no problem switching it.

Copy link
Owner

Choose a reason for hiding this comment

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

It's fine -- thanks again for this! Just published v0.0.5 on npm. 🏄

@izuzak
Copy link
Owner

izuzak commented May 31, 2015

Thanks for the PR, @mridgway -- just have one question, but otherwise happy to merge this. 👍

izuzak added a commit that referenced this pull request Jun 1, 2015
Allow function options and support deferred benchmarks
@izuzak izuzak merged commit b79e346 into izuzak:master Jun 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants