Skip to content
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

Add option to show timings for each command in cli and also return timings when used programmatically #291

Closed
eliasm307 opened this issue Oct 27, 2021 · 3 comments · Fixed by #295

Comments

@eliasm307
Copy link
Contributor

It would be useful if the package tracked the start and end times of processes and/or the calculated duration in ms, then returning this as part of ExitInfos for programmatic use or printing to terminal when a timing option is enabled.

@gustavohenke
Copy link
Member

For the CLI, you can run your command with time <command>, or instead you can set your prefix to be a timestamp, which should give some insights too:

$ concurrently -p "{time}" "echo hi; sleep 1; echo bye"
2021-10-28 20:01:01.644 hi
2021-10-28 20:01:03.953 bye
2021-10-28 20:01:03.955 echo hi; sleep 1; echo bye exited with code 0

That said, the API doesn't provide this, so your idea still is a good one.

@eliasm307
Copy link
Contributor Author

@gustavohenke yes the timestamp prefixes are an option however when there are multiple processes that produce a lot of logs it's difficult to manually calculate the durations of the processes. I feel it would be a better experience if there was an option to log this at the end as a summary

@eliasm307
Copy link
Contributor Author

I'm not available for the near future but I would be interested in giving this a go if its still open when I'm free

eliasm307 added a commit to eliasm307/concurrently that referenced this issue Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants