-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Integrate time-require into the CLI. #276
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
Conversation
|
Can't we just use |
|
I am not sure I understand how to use the This way |
var debug = require('debug')('ava');
if (debug.enabled) {
require('time-require');
} |
|
Got it. That works. How should I handle If I have to pick one, then I guess I'd prefer the default sequential sorting (easier to figure out which module is requiring |
If you feel it would be useful, just forward it to the forked processes like we do with the other ones. |
I want to start focusing on getting our require times down, both in the main thread and forked tests. This adds `time-require` support directly to the CLI to assist in that. This is especially important for forked test processes, where I currently have to manually add a line of code each time I want to test an optimization. I don't think this should be a publicly documented move. I think we want the freedom to remove this once we are happy with performance. I have placed comments above all `time-require` references, indicating it is for internal use only. Users have been given fair warning against relying on its inclusion long term. Usage: ```sh $ DEBUG=ava ./cli.js test/fixture/es2015.js --sorted ``` `--sorted` is optional. It sorts the requires from most expensive to least. The default is sequential sorting. The output will display multiple `time-require` reports. One for each forked process, and the last one for the main thread.
0568a8f to
5e92745
Compare
|
I just checked out both of those. They are a lot more verbose and don't provide the sort option. |
|
I think AppVeyor ate too much turkey today and is feeling sluggish. |
Integrate time-require into the CLI.
I want to start focusing on getting our require times down,
both in the main thread and forked tests.
This adds
time-requiresupport directly to the CLI to assist in that.This is especially important for forked test processes, where I currently
have to manually add a line of code each time I want to test an optimization.
I don't think this should be a publicly documented move. I think we want
the freedom to remove this once we are happy with performance.
I have placed comments above all
time-requirereferences, indicatingit is for internal use only. Users have been given fair warning against
relying on its inclusion long term.
Usage:
--sortedis optional. It sorts the requires from most expensive to least. The default is sequential sorting.The output will display multiple
time-requirereports.One for each forked process, and the last one for the main thread.