timers: move priority_queue to internal/timers/#26876
timers: move priority_queue to internal/timers/#26876ZYSzys wants to merge 2 commits intonodejs:masterfrom zys-contrib:internal-queue-mv
Conversation
|
|
||
| function main({ n, type }) { | ||
| const PriorityQueue = require('internal/priority_queue'); | ||
| const PriorityQueue = require('internal/timers/priority_queue'); |
There was a problem hiding this comment.
Perhaps we should move this benchmark file to the timers directory now?
There was a problem hiding this comment.
If you do that (and I think it's a fine idea), be sure to run test/benchmark/test-benchmark-timers to make sure the move doesn't break that test file. (If it does break it, it should be easy to fix, but you may have to know something about how the benchmark tests work. Happy to help with that, although I'm guessing you'll figure it out if you aren't familiar with the benchmark tests already.)
There was a problem hiding this comment.
^^^^ You'll want to run that test locally because the benchmark tests don't run in node-test-pull-request. (But they do run in node-daily-master so if it breaks, we'll find out, but not until after the code lands!)
There was a problem hiding this comment.
Yep👍.
And I've run python tools/test.py -J --mode=release benchmark/test-benchmark-timers and this benchmark test passed, so I think it should be fine :)
There was a problem hiding this comment.
By the way you can use https://ci.nodejs.org/job/node-test-commit-custom-suites-freestyle/ to run this in the CI for this PR (use benchmark in CI_JS_SUITES)
|
It is only used in timers now but it could be also used for something else in future no? |
|
Benchmark CI (the testing one): https://ci.nodejs.org/job/node-test-commit-custom-suites-freestyle/5617/ |
AFAIK, It's a little hard for me to figure out other modules where Maybe /cc @nodejs/timers |
|
I do not see what purpose this PR is... Does this actually matter? |
|
Maybe slightly improve the tidiness of our |
sam-github
left a comment
There was a problem hiding this comment.
Putting timers code in internal/timers/ seems reasonable to me.
|
I personally would keep it where it is due to possibly reusing it elsewhere at some point. |
apapirovski
left a comment
There was a problem hiding this comment.
It’s a generic implementation of a binary heap in JS. I see no reason to move it. Does this actually improve anything?
There was no any other affect, and I'm also willng to close this since majority wants keep it is as original. Still thanks all. |
The
priority_queue.jsis only used intimersmodule, so maybe it's more reasonable to move it intointernal/timers/specifically ?(I've used
git mvcommand so I think it wouldn't hurt whengit blame priority_queue.js)Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes