-
-
Notifications
You must be signed in to change notification settings - Fork 112
Use meaningful processTitle for better monitoring #135
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
|
Thanks for submitting this here. |
| var cmdArgs = process.argv.slice(2); | ||
| var cli = new Liftoff({ | ||
| name: 'gulp', | ||
| processTitle: ['gulp'].concat(cmdArgs).join(' '), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can make the process title nicer. Maybe we should only show the tasks being run? Maybe we should wrap them in ( )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can wrap them in ( ) but I think we should keep the original command argv without any modification. So for example gulp watch should be different from gulp watch -L. Is that ok for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit concerned that the process title will get too long. Maybe it should get truncated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sttk any ideas about how we can reduce the size of the process title but still show uniqueness across flags?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phated I have no idea to make short it.
I agree with @nguymin4's saying, keeping the original command argv, but there may be some platforms or tools which are not support too long process name. (Though I don't know actual cases.)
I think it would be better that this feature is optional and able to be specified in config file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I cannot come up with a case that the command is too long. If it is, then you are doing something wrong, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nguymin4 My thought seemed to be overcautious. I think no problem about this now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, if @sttk doesn't see a problem with it. Can you turn this into a named utility function?
At the moment when we run several gulp tasks separately, they have the same process title
gulpwhich is very hard to differentiate and monitor them. This PR is to solve that issue.