feature: add an option to find the slowest tasks #7478
Replies: 5 comments
-
|
Hi, thanks for opening the issue. One of our goals for Turborepo 1.9 is increased visibility into your tasks, so we'll definitely look into this as a potential feature! |
Beta Was this translation helpful? Give feedback.
-
|
@NicholasLYang thanks!!!! |
Beta Was this translation helpful? Give feedback.
-
|
@GiancarlosIO in the latest canary, try running |
Beta Was this translation helpful? Give feedback.
-
|
Update here... you can build this on top of the turbo build --summarize
SUMMARY_FILE=$(/bin/ls .turbo/runs/*.json | head -n1)
cat $SUMMARY_FILE | jq '[.tasks[] | {"taskId": .taskId, "duration": (.execution.endTime - .execution.startTime)}] | sort_by(-.duration)' and as plain text output: turbo build --summarize
SUMMARY_FILE=$(/bin/ls .turbo/runs/*.json | head -n1)
cat $SUMMARY_FILE | jq -r '[.tasks[] | {"taskId": .taskId, "duration": (.execution.endTime - .execution.startTime)}] | sort_by(-.duration) | .[] | "\(.taskId) \(.duration)"' | column -tThis esoteric I'm going to keep this open, but hope this helps |
Beta Was this translation helpful? Give feedback.
-
|
The workaround is fine but involves finding the file and piping through jq (which may not be installed in CI environments), or some other tools. It would be nicer if |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Which project is this feature idea for?
Turborepo
Describe the feature you'd like to request
Hi there
It would be good to have the option to find the top 10 slowest tasks. Similar to how jest-slow-test-reporter works.
With that information, we can focus on reducing the amount of time for that specific tasks.
My use case is that I have a monorepo with 120 tasks. So it's a little hard to find the slowest tasks just by looking the logs.
Describe the solution you'd like
A flag in the turbo cli, something like:
turbo run build --findSlowest=10Describe alternatives you've considered
I have found the
--traceoption but I think this is not what we want to use when trying to find the slowest tasks.Beta Was this translation helpful? Give feedback.
All reactions