fix: fixed the bug about plugin duration calculate #91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
When I used devtools to analyze real project, I found the abnormal case about time duration display. This time is not possible to be so long! 😱
And so on I found duration is calculate by add together currently, adding time simply is incorrect because multiple files may be processed and multiple hooks may be run at the same time. This is a classical question about merge nearby time section.
After I fixed it, the duration seen normally, and I try to manual calculation also meets expectations.
But now this pr is wip, because I have some question, after got answer I will finish it and make it can be merged.
Question
PluginFlowTimeline
also need to display duration, now it make duplicate calculate duration, I think the duration value can transfer into byPluginDetailsLoader
, in the past I liked to useprovide
/inject
, but I found this project never used it before, so should I transfer it by transparent transmission props?BuildMetrics
also display duration, plugin run duration is wrong obviously, but I don't know the single module time duration Is right or wrong, because I know plugin have parallel running, but IMO file is be handled by serial, so should I modify the duration calculate logic about module?