-
Notifications
You must be signed in to change notification settings - Fork 334
Only async is used from the options passed into Benchmark.prototype.run(options). #65
Comments
Basically what this line does is check if you have enabled the |
It is the only option shown and the only option supported. We should make this more clear using JSDoc. So I'll mark this as a doc bug. |
Thanks; it's true that it was the only thing shown, and yes, it looks deliberate and "by design" in the code, but examples are not usually exhaustive. For what it's worth, I was trying to capture the benchmark itself in one of the options' callbacks. This would not be relevant except that I'm using Benchmark.js via Script#, so I was trying to work around the C# scoping rules. |
Is it really the idea to set all other options like this?
Edit: If you use a benchmark suite, then the correct way is to pass the options to
|
@joelrich
Default options yep. |
I see this line inside of run(options) that obviously overrides options that are passed in:
options = { 'async': ((options = options && options.async) == null ? me.async : options) && support.timeout };
The documentation does not say that only the async option will be used.
What is the reason for this? It looks intentional; however, I spent a couple of hours debugging before I gradually concluded that my options were not being used, so I'm very frustrated.
The text was updated successfully, but these errors were encountered: