-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
timers "depth" benchmark usefulness #9493
Comments
@mscdex @misterdjules @Fishrock123 @AndreasMadsen Oh, I'll also note that it was moved from |
We could probably remove it, a test assertion asserting that timers are indeed pooled in this case mentioning benchmarks should be good enough combined with other benchmarks. |
Hmmm, at a second look I definitely think there are not enough benchmarks to replace it yet. |
There are definitely benchmarks that uses many more iterations than what is required. I guess this is one of them. I'm don't like moving the benchmark to a diffrent category, I think If you are interested in reducing the number of iterations, a rough estimate on the appropriate number of iterations could be found by tuning the coefficient of variation |
I think in general there are lots of cases like this in many of the different benchmarks where some configurations take longer than others but the same iteration count is used for all of them. I don't know of a good way to solve this, since implicitly altering the iteration count for certain configurations could be seen as unexpected (even if the new iteration count is reported in the output). |
Maybe it makes sense to split this benchmark into two files and but leave them both in the |
The depth benchmark for timers sets a timer that sets a timer that sets a timer that... 500K of them. Since each timer has to wait for the next tick of the event loop this benchmark takes a very long time to run compared to the breadth test that is already in the file. This may be more of an event loop benchmark than a timer benchmark. Reduce the number of iterations for the depth test as it's really just running the iterations in sequence, not in parallel. And even on an infinitely fast machine, it would take over 8 minutes to run because each tick of the event loop would have to wait 1ms before firing the timer. Split the depth and breadth benchmarks so that their `N` values can be set independently. Do some minor refactoring to the benchmarks (but no ES6 additions so that the benchmarks can still be run with old versions of Node.js). Refs: nodejs#9493
The depth benchmark for timers sets a timer that sets a timer that sets a timer that... 500K of them. Since each timer has to wait for the next tick of the event loop this benchmark takes a very long time to run compared to the breadth test that is already in the file. This may be more of an event loop benchmark than a timer benchmark. Reduce the number of iterations for the depth test as it's really just running the iterations in sequence, not in parallel. And even on an infinitely fast machine, it would take over 8 minutes to run because each tick of the event loop would have to wait 1ms before firing the timer. Split the depth and breadth benchmarks so that their `N` values can be set independently. Do some minor refactoring to the benchmarks (but no ES6 additions so that the benchmarks can still be run with old versions of Node.js). Refs: nodejs#9493 PR-URL: nodejs#9497 Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
The depth benchmark for timers sets a timer that sets a timer that sets a timer that... 500K of them. Since each timer has to wait for the next tick of the event loop this benchmark takes a very long time to run compared to the breadth test that is already in the file. This may be more of an event loop benchmark than a timer benchmark. Reduce the number of iterations for the depth test as it's really just running the iterations in sequence, not in parallel. And even on an infinitely fast machine, it would take over 8 minutes to run because each tick of the event loop would have to wait 1ms before firing the timer. Split the depth and breadth benchmarks so that their `N` values can be set independently. Do some minor refactoring to the benchmarks (but no ES6 additions so that the benchmarks can still be run with old versions of Node.js). Refs: #9493 PR-URL: #9497 Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
The depth benchmark for timers sets a timer that sets a timer that sets a timer that... 500K of them. Since each timer has to wait for the next tick of the event loop this benchmark takes a very long time to run compared to the breadth test that is already in the file. This may be more of an event loop benchmark than a timer benchmark. Reduce the number of iterations for the depth test as it's really just running the iterations in sequence, not in parallel. And even on an infinitely fast machine, it would take over 8 minutes to run because each tick of the event loop would have to wait 1ms before firing the timer. Split the depth and breadth benchmarks so that their `N` values can be set independently. Do some minor refactoring to the benchmarks (but no ES6 additions so that the benchmarks can still be run with old versions of Node.js). Refs: #9493 PR-URL: #9497 Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
The depth benchmark for timers sets a timer that sets a timer that sets a timer that... 500K of them. Since each timer has to wait for the next tick of the event loop this benchmark takes a very long time to run compared to the breadth test that is already in the file. This may be more of an event loop benchmark than a timer benchmark. Reduce the number of iterations for the depth test as it's really just running the iterations in sequence, not in parallel. And even on an infinitely fast machine, it would take over 8 minutes to run because each tick of the event loop would have to wait 1ms before firing the timer. Split the depth and breadth benchmarks so that their `N` values can be set independently. Do some minor refactoring to the benchmarks (but no ES6 additions so that the benchmarks can still be run with old versions of Node.js). Refs: #9493 PR-URL: #9497 Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
The depth benchmark for timers sets a timer that sets a timer that sets a timer that... 500K of them. Since each timer has to wait for the next tick of the event loop this benchmark takes a very long time to run compared to the breadth test that is already in the file. This may be more of an event loop benchmark than a timer benchmark. Reduce the number of iterations for the depth test as it's really just running the iterations in sequence, not in parallel. And even on an infinitely fast machine, it would take over 8 minutes to run because each tick of the event loop would have to wait 1ms before firing the timer. Split the depth and breadth benchmarks so that their `N` values can be set independently. Do some minor refactoring to the benchmarks (but no ES6 additions so that the benchmarks can still be run with old versions of Node.js). Refs: #9493 PR-URL: #9497 Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
The depth benchmark for timers sets a timer that sets a timer that sets a timer that... 500K of them. Since each timer has to wait for the next tick of the event loop this benchmark takes a very long time to run compared to the breadth test that is already in the file. This may be more of an event loop benchmark than a timer benchmark. Reduce the number of iterations for the depth test as it's really just running the iterations in sequence, not in parallel. And even on an infinitely fast machine, it would take over 8 minutes to run because each tick of the event loop would have to wait 1ms before firing the timer. Split the depth and breadth benchmarks so that their `N` values can be set independently. Do some minor refactoring to the benchmarks (but no ES6 additions so that the benchmarks can still be run with old versions of Node.js). Refs: #9493 PR-URL: #9497 Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
The depth benchmark for timers sets a timer that sets a timer that sets a timer that... 500K of them. Since each timer has to wait for the next tick of the event loop this benchmark takes a very long time to run compared to the breadth test that is already in the file. This may be more of an event loop benchmark than a timer benchmark. Reduce the number of iterations for the depth test as it's really just running the iterations in sequence, not in parallel. And even on an infinitely fast machine, it would take over 8 minutes to run because each tick of the event loop would have to wait 1ms before firing the timer. Split the depth and breadth benchmarks so that their `N` values can be set independently. Do some minor refactoring to the benchmarks (but no ES6 additions so that the benchmarks can still be run with old versions of Node.js). Refs: #9493 PR-URL: #9497 Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Refs: nodejs#9493 PR-URL: nodejs#10925 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
The
depth
benchmark for timers sets a timer that sets a timer that sets a timer that... 500K of them.Since each timer has to wait for the next tick of the event loop:
breadth
test that is already in the file.I wonder if it makes sense to do any of the following or something similar:
Reduce the number of iterations for the depth test as it's really just running the iterations in sequence, not in parallel. And even on an infinitely fast machine, it would take over 8 minutes to run because each tick of the event loop would have to wait 1ms before firing the timer.
Move and/or rename the depth benchmark as it is unlikely to be something significantly impacted by changes in the Node.js timers code.
I know I can send command line arguments to skip the depth test or change the value of N. I just suspect that the default behavior right now isn't ideal. Every time I touch timers code and run a benchmark, this is an annoyance.
The text was updated successfully, but these errors were encountered: